aboutsummaryrefslogtreecommitdiff
path: root/development/chicken/chicken.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/chicken/chicken.SlackBuild')
-rw-r--r--development/chicken/chicken.SlackBuild27
1 files changed, 22 insertions, 5 deletions
diff --git a/development/chicken/chicken.SlackBuild b/development/chicken/chicken.SlackBuild
index 02a153c2ba7c3..af53a7f16fb66 100644
--- a/development/chicken/chicken.SlackBuild
+++ b/development/chicken/chicken.SlackBuild
@@ -1,12 +1,12 @@
#!/bin/sh
-# Slackware build script for Chicken
+# Slackware build script for Chicken Scheme
-# Written by Patrick Pippen (dabittweiler@gmail.com)
+# Written by Erik Falor (ewfalor@gmail.com)
PRGNAM=chicken
-VERSION=${VERSION:-4.6.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.8.0.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
@@ -59,13 +59,30 @@ for f in defaults.make Makefile.linux rules.make
sed "s,ARCH,zARCH," -i ${f}
done
+# Due to the way Chicken generates C code from Scheme sources, it is expensive
+# to apply a patch to the generated C files. Instead, we first build an
+# unpatched bootstrap Chicken compiler - this will allow us to apply the
+# security patches to the Scheme source code of Chicken itself, allowing us to
+# rebuild Chicken from scratch.
+
+make boot-chicken \
+ C_COMPILER_OPTIMIZATION_OPTIONS="$SLKCFLAGS" \
+ PLATFORM=linux \
+ PREFIX=/usr
+
+# Apply the security patches to Chicken's Scheme sources
+for P in $CWD/patches/* ; do patch -p1 -i $P ; done
+
+# Build Chicken anew using the bootstrapping compiler to generate new C files
+# from our patched code
make \
C_COMPILER_OPTIMIZATION_OPTIONS="$SLKCFLAGS" \
PLATFORM=linux \
PREFIX=/usr \
LIBDIR=/usr/lib${LIBDIRSUFFIX} \
TOPMANDIR=/usr/man \
- DOCDIR=/usr/doc/$PRGNAM-$VERSION
+ DOCDIR=/usr/doc/$PRGNAM-$VERSION \
+ CHICKEN=./chicken-boot
make install \
C_COMPILER_OPTIMIZATION_OPTIONS="$SLKCFLAGS" \