summaryrefslogtreecommitdiffstats
path: root/development/bacon/bacon.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/bacon/bacon.SlackBuild')
-rw-r--r--development/bacon/bacon.SlackBuild23
1 files changed, 12 insertions, 11 deletions
diff --git a/development/bacon/bacon.SlackBuild b/development/bacon/bacon.SlackBuild
index 94f09d0229..c09ec33002 100644
--- a/development/bacon/bacon.SlackBuild
+++ b/development/bacon/bacon.SlackBuild
@@ -1,11 +1,11 @@
#!/bin/sh
-# Slackware build script for bacon
+# Slackware build script for bacon
# Written by Steve Pledger <spledger91@yahoo.com>
PRGNAM=bacon
-VERSION=${VERSION:-1.0_build_21}
+VERSION=${VERSION:-1.0_build_22}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -22,8 +22,11 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# which C compiler to use:
+COMPILER="${COMPILER:-gcc}" # supported compilers: gcc, tcc, and HP's Compaq C Compiler
+
# Version number may change, so figure out the real version
-SRCVER="$(bash $CWD/bacon.bash -v | grep version | cut -d' ' -f3-5 | tr ' ' _)"
+SRCVER="$(/bin/bash $CWD/bacon.bash -v | grep version | cut -d' ' -f3-5 | tr ' ' _)"
# suggested by Niels Horn:
if [ "$VERSION" != "$SRCVER" ]; then
@@ -53,7 +56,7 @@ else
LIBDIRSUFFIX=""
fi
-set -e
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -62,8 +65,8 @@ rm -rf $PRGNAM-$VERSION
mkdir $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
-# Bacon creates a binary in the same location as the source, so copy the source file here.
-cat $CWD/bacon.bac > bacon.bac
+# Bacon creates a binary in the same location as the source, so copy the source files here.
+cp $CWD/bacon.bash $CWD/bacon.bac .
chown -R root:root .
find . \
@@ -73,14 +76,12 @@ find . \
-exec chmod 644 {} \;
# Use the Bash version of BaCon to convert and compile the BASIC version, which is much faster.
-# (Note: Not using sh because this requires Bash 4.x and sh may be a symlink to another shell)
-bash $CWD/bacon.bash -p -o $(echo $SLKCFLAGS | sed -e 's: : -o :g') bacon.bac
+# (Note: Not using sh because this requires Bash >=3.2 and sh may be a symlink to another shell)
+/bin/bash bacon.bash -c $COMPILER -p -o $(echo $SLKCFLAGS | sed -e 's: : -o :g') bacon.bac
mkdir -p $PKG/usr/bin
install -m 0755 bacon $PKG/usr/bin
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+strip --strip-unneeded $PKG/usr/bin/* 2>/dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild