summaryrefslogtreecommitdiff
path: root/games/desmume/desmume.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/desmume/desmume.SlackBuild')
-rw-r--r--games/desmume/desmume.SlackBuild24
1 files changed, 18 insertions, 6 deletions
diff --git a/games/desmume/desmume.SlackBuild b/games/desmume/desmume.SlackBuild
index acd395e13e..36201deb99 100644
--- a/games/desmume/desmume.SlackBuild
+++ b/games/desmume/desmume.SlackBuild
@@ -1,11 +1,9 @@
#!/bin/sh
-
# Slackware build script for desmume
-
# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
PRGNAM=desmume
-VERSION=${VERSION:-0.9.2}
+VERSION=${VERSION:-0.9.5}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -17,10 +15,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -38,16 +39,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix end-of-line encoding.
+sed -i 's/\r//' AUTHORS ChangeLog
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--mandir=/usr/man \
+ --enable-osmesa \
--enable-gdb-stub \
+ --enable-wifi \
+ --with-x \
--build=$ARCH-slackware-linux
make
-make install-strip DESTDIR=$PKG
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -55,7 +65,9 @@ make install-strip DESTDIR=$PKG
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS ChangeLog COPYING INSTALL README* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING INSTALL README README.LIN \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -63,4 +75,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}