aboutsummaryrefslogtreecommitdiff
path: root/development/swig/swig.SlackBuild
diff options
context:
space:
mode:
authorhollywoodb <hollywoodb@fastmail.fm>2010-05-11 22:22:47 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:22:47 +0200
commitf58f28731eb0aafb88cdbf58a7757502ba50592d (patch)
tree2bd5fab05a2f36bb1097704f54a0432551e49107 /development/swig/swig.SlackBuild
parentbe035b3c87d424076616cbf077a07f6f35c5f89d (diff)
development/swig: Updated for version 1.3.35
Diffstat (limited to 'development/swig/swig.SlackBuild')
-rw-r--r--development/swig/swig.SlackBuild48
1 files changed, 27 insertions, 21 deletions
diff --git a/development/swig/swig.SlackBuild b/development/swig/swig.SlackBuild
index 8d66e67b9aa8d..6c81bd3bd4211 100644
--- a/development/swig/swig.SlackBuild
+++ b/development/swig/swig.SlackBuild
@@ -9,30 +9,35 @@
# Modified by the SlackBuilds.org project
-NAME=swig
-VERSION=1.3.31
+PRGNAM=swig
+VERSION=1.3.35
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
-PKG=${PKG:-$TMP/package-$NAME}
+PKG=${PKG:-$TMP/package-$PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
-rm -rf $PKG $TMP/$NAME-$VERSION
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
-tar -zxvf $CWD/$NAME-$VERSION.tar.gz || exit 1
-cd $NAME-$VERSION || exit 1
-chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
fi
+set -e
+
+rm -rf $PKG $TMP/$PRGNAM-$VERSION
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -40,26 +45,27 @@ CXXFLAGS="$SLKCFLAGS" \
--exec-prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
- || exit 1
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
-make || exit 1
-make install DESTDIR=$PKG || exit 1
+make
+make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-mkdir -p $PKG/usr/doc/$NAME-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ANNOUNCE CHANGES* FUTURE INSTALL LICENSE NEW README TODO Examples/ \
- Doc/Manual Doc/Devel $PKG/usr/doc/$NAME-$VERSION
-cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
+ Doc/Manual Doc/Devel $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# Fix permissions and wipe the pdf bloat
-find $PKG/usr/doc/$NAME-$VERSION -type f -exec chmod 0644 {} \;
-find $PKG/usr/doc/$NAME-$VERSION -name "*.pdf" -exec rm {} \;
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
+find $PKG/usr/doc/$PRGNAM-$VERSION -name "*.pdf" -exec rm {} \;
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$NAME-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz