summaryrefslogtreecommitdiffstats
path: root/source.local/d/clisp/clisp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/d/clisp/clisp.SlackBuild')
-rwxr-xr-xsource.local/d/clisp/clisp.SlackBuild127
1 files changed, 69 insertions, 58 deletions
diff --git a/source.local/d/clisp/clisp.SlackBuild b/source.local/d/clisp/clisp.SlackBuild
index 92e74a7..22686ae 100755
--- a/source.local/d/clisp/clisp.SlackBuild
+++ b/source.local/d/clisp/clisp.SlackBuild
@@ -23,41 +23,51 @@
# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
-VERSION=2.49
+VERSION=2.49_20130417hg
DIRNAME=2.49
BUILD=${BUILD:-1}
# Bundled libraries:
-FFCALLVER=20100903cvs
+FFCALLVER=20130417cvs
LIBSIGSEVVER=2.10
-# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
+NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ # Automatically determine the architecture we're building on:
+ MARCH=$( uname -m )
+ if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+ LIBDIRSUFFIX=""
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
fi
case "$ARCH" in
@@ -65,8 +75,6 @@ case "$ARCH" in
*) TARGET=$ARCH-slackware-linux ;;
esac
-NUMJOBS=${NUMJOBS:-" -j7 "}
-
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-clisp
@@ -134,7 +142,8 @@ CFLAGS="$SLKCFLAGS -fPIC -DMAP_VARIABLE=2" \
--mandir=/usr/man \
--build=$TARGET || exit 1
-make $NUMJOBS || make || exit 1
+# Fails in a parallel build:
+make -j1 || exit 1
make install DESTDIR=$PKG || exit 1
# We need ffcall installed in order to build clisp:
@@ -155,9 +164,25 @@ rmdir $PKG/usr/share/
# OK, now we compile CLISP:
cd $TMP
-rm -rf clisp-$VERSION
-tar xvf $CWD/clisp-$VERSION.tar.bz2 || exit 1
+rm -rf clisp-$DIRNAME
+tar xvf $CWD/clisp-$VERSION.tar.?z* || exit 1
cd clisp-$DIRNAME || exit 1
+
+case "$ARCH" in
+arm*)
+ # Support ARM assembly:
+ zcat $CWD/clisp-2.49.arm.patch.gz | patch -p0 --verbose || exit 1
+ zcat $CWD/clisp-2.49.makemake_arm.patch.gz | patch -p0 --verbose || exit 1
+ # Allows to build bindings/glibc (this requires FFI as well):
+ zcat $CWD/clisp-2.49.linux.patch | patch -p0 --verbose || exit 1
+ # Different things to build (or not) on ARM:
+ ARCHOPTS="--with-module=bindings/glibc"
+ ;;
+*)
+ ARCHOPTS="--with-dynamic-ffi"
+ ;;
+esac
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -165,9 +190,14 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS -DNO_GENERATIONAL_GC -DNO_MULTIMAP_FILE -DNO_SINGLEMAP -Wa,--noexecstack" \
+# Or else the ARM build fails memory-starved with "handle_fault error2"...
+ulimit -s unlimited
+
+CFLAGS="$SLKCFLAGS -Wa,--noexecstack" \
LDFLAGS="-Wl,-z,noexecstack" \
+FORCE_UNSAFE_CONFIGURE=1 \
./configure \
+ $ARCHOPTS \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
@@ -175,34 +205,15 @@ LDFLAGS="-Wl,-z,noexecstack" \
--with-module=clx/new-clx \
--with-module=pcre \
--with-module=rawsock \
- --with-module=wildcard \
--with-module=zlib \
--cbc with-gcc-wall \
- --with-dynamic-ffi || exit 1
+ # || exit 1
+ # No longer present in clisp:
+ #--with-module=wildcard \
+ # Want to add this but the compilation fails:
+ #--with-module=asdf \
-cd with-gcc-wall
-./makemake \
- --with-dynamic-ffi \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --with-module=clx/new-clx \
- --with-module=pcre \
- --with-module=rawsock \
- --with-module=wildcard \
- --with-module=zlib \
- --srcdir=../src \
- > Makefile
-make config.lisp
-make init
-make allc
-make $NUMJOBS lisp.run
-make interpreted.mem
-make halfcompiled.mem
-make lispinit.mem
-make manual
-make modular
-
-make install DESTDIR=$PKG || exit 1
+make -C with-gcc-wall install DESTDIR=$PKG || exit 1
# Strip stuff:
find $PKG | xargs file | grep -e "executable" -e "shared object" \