Browse Source

picolisp: Update from 17.6.6 to 17.7.9

Also switch to using clang for building 64-bit picolisp.
android-5
Fredrik Fornwall 8 years ago
parent
commit
ec49e87dbc
  1. 23
      packages/picolisp/build.sh
  2. 14
      packages/picolisp/src-Makefile.patch

23
packages/picolisp/build.sh

@ -2,12 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://picolisp.com
TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework" TERMUX_PKG_DESCRIPTION="Lisp interpreter and application server framework"
TERMUX_PKG_DEPENDS="libcrypt, openssl" TERMUX_PKG_DEPENDS="libcrypt, openssl"
_PICOLISP_YEAR=17 _PICOLISP_YEAR=17
_PICOLISP_MONTH=6 _PICOLISP_MONTH=7
_PICOLISP_DAY=6 _PICOLISP_DAY=9
TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY} TERMUX_PKG_VERSION=${_PICOLISP_YEAR}.${_PICOLISP_MONTH}.${_PICOLISP_DAY}
# We use our bintray mirror since old version snapshots are not kept on main site. # We use our bintray mirror since old version snapshots are not kept on main site.
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/picolisp_${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/picolisp_${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=aeb90c3002b5fb2a708d3bb189ed1c2d9c2e5b699c873c60689867672d04967e TERMUX_PKG_SHA256=22eff19214f3250099935dc871045a5be6728724ad91a0534b9c29bcd8fde858
TERMUX_PKG_FOLDERNAME=picoLisp TERMUX_PKG_FOLDERNAME=picoLisp
TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_BUILD_IN_SRC=true
# The assembly is not position-independent (would be a major rewrite): # The assembly is not position-independent (would be a major rewrite):
@ -15,14 +15,6 @@ TERMUX_PKG_BLACKLISTED_ARCHES="x86_64"
if [ $TERMUX_ARCH_BITS = 32 ]; then if [ $TERMUX_ARCH_BITS = 32 ]; then
# "Variable length array in structure won't be supported" # "Variable length array in structure won't be supported"
TERMUX_PKG_CLANG=no TERMUX_PKG_CLANG=no
else
# FIXME: Use gcc for linking, as a clang build causes (tzo),
# the time zone offset, to return 0:
# Also, this call (and probably more) hangs:
# (call "termux-notification" "--title" "Title" "--content" "Message")
# These two problems only happen when using the gold linker, which
# Termux does by default).
TERMUX_PKG_CLANG=no
fi fi
termux_step_pre_configure() { termux_step_pre_configure() {
@ -57,11 +49,14 @@ termux_step_make_install () {
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s $TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.s
$TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s $TERMUX_HOST_PLATFORM-as -o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.s
# Use -fuse-ld=bfd to avoid using the gold linker (which Termux
# patches NDK to use by default) as it causes (tzo), the time
# zone offset, to always be 0 (and probably other problems):
$CC -o ../bin/picolisp ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.o \ $CC -o ../bin/picolisp ${TERMUX_PKG_EXTRA_MAKE_ARGS}.base.o \
-Wl,--no-as-needed -rdynamic -lc -lm -ldl -pie -Wl,--no-as-needed -rdynamic -lc -lm -ldl -pie -fuse-ld=bfd
chmod +x ../bin/picolisp chmod +x ../bin/picolisp
$CC -o ../lib/ext -shared -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o $CC -o ../lib/ext -shared -rdynamic -fuse-ld=bfd ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ext.o
$CC -o ../lib/ht -shared -rdynamic ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o $CC -o ../lib/ht -shared -rdynamic -fuse-ld=bfd ${TERMUX_PKG_EXTRA_MAKE_ARGS}.ht.o
fi fi
mkdir -p $TERMUX_PREFIX/share/man/man1 mkdir -p $TERMUX_PREFIX/share/man/man1

14
packages/picolisp/src-Makefile.patch

@ -1,14 +1,14 @@
diff -u -r ../picoLisp/src/Makefile ./src/Makefile diff -u -r ../picoLisp/src/Makefile ./src/Makefile
--- ../picoLisp/src/Makefile 2016-02-02 10:52:49.000000000 -0500 --- ../picoLisp/src/Makefile 2017-07-06 14:35:21.000000000 +0200
+++ ./src/Makefile 2016-04-12 05:55:14.050621923 -0400 +++ ./src/Makefile 2017-07-10 01:13:20.897855727 +0200
@@ -6,119 +6,14 @@ @@ -6,118 +6,14 @@
picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c picoFiles = main.c gc.c apply.c flow.c sym.c subr.c big.c io.c net.c tab.c
-CC = gcc -CC = gcc
# CCLD is the cc (compiler frontend) to use for the link step. # CCLD is the cc (compiler frontend) to use for the link step.
-CCLD = gcc -CCLD = gcc
-
-CFLAGS = -c -O2 -pipe \ -CFLAGS = -c -O2 -pipe \
- -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing \ - -falign-functions=32 -fomit-frame-pointer -fno-strict-aliasing \
- -W -Wimplicit -Wreturn-type -Wunused -Wformat \ - -W -Wimplicit -Wreturn-type -Wunused -Wformat \
@ -96,7 +96,7 @@ diff -u -r ../picoLisp/src/Makefile ./src/Makefile
- DYNAMIC-LIB-FLAGS = -shared - DYNAMIC-LIB-FLAGS = -shared
- STRIP = strip -f - STRIP = strip -f
-else -else
-ifeq ($(shell uname -o), Cygwin) -ifeq ($(shell uname -o | egrep -q "Cygwin|Msys" ; echo $$?), 0)
- OS = Cygwin - OS = Cygwin
- CFLAGS += -m32 - CFLAGS += -m32
- DYNAMIC-LIB-FLAGS = -shared - DYNAMIC-LIB-FLAGS = -shared
@ -116,14 +116,12 @@ diff -u -r ../picoLisp/src/Makefile ./src/Makefile
-endif -endif
-endif -endif
-endif -endif
-
+CCLD = $(CC) +CCLD = $(CC)
+LCRYPT = -lcrypt +LCRYPT = -lcrypt
+OS = Android +OS = Android
+PICOLISP-FLAGS = -rdynamic -lm $(LDFLAGS) +PICOLISP-FLAGS = -rdynamic -lm $(LDFLAGS)
+DYNAMIC-LIB-FLAGS = -shared -export-dynamic $(LDFLAGS) -lm +DYNAMIC-LIB-FLAGS = -shared -export-dynamic $(LDFLAGS) -lm
+
picolisp: $(bin)/picolisp $(lib)/ext$(dll) $(lib)/ht$(dll) picolisp: $(bin)/picolisp $(lib)/ext$(dll) $(lib)/ht$(dll)
tools: $(bin)/lat1 $(bin)/utf2 $(bin)/balance tools: $(bin)/lat1 $(bin)/utf2 $(bin)/balance
gate: $(bin)/ssl $(bin)/httpGate

Loading…
Cancel
Save