summaryrefslogtreecommitdiffstats
path: root/games/desmume/desmume.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/desmume/desmume.SlackBuild')
-rw-r--r--games/desmume/desmume.SlackBuild66
1 files changed, 28 insertions, 38 deletions
diff --git a/games/desmume/desmume.SlackBuild b/games/desmume/desmume.SlackBuild
index 4e5fec368b..f6323ea96d 100644
--- a/games/desmume/desmume.SlackBuild
+++ b/games/desmume/desmume.SlackBuild
@@ -23,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=desmume
-VERSION=${VERSION:-0.9.11}
+VERSION=${VERSION:-20210409_e8f619c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -69,44 +69,34 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fix end-of-line encoding.
-for i in AUTHORS; do
- cp -a $i ${i}.new
- sed -i 's/\r//' ${i}.new
- touch -r $i ${i}.new
- mv ${i}.new $i
-done
-
-# Fix missing header.
-patch -p1 < $CWD/osmesa-header-fix.patch
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --bindir=/usr/games \
- --mandir=/usr/man \
- --enable-osmesa \
- --enable-hud \
- --enable-gdb-stub \
- --enable-wifi \
- --enable-openal \
- --enable-glade \
- --enable-glx \
- --with-x \
- --build=$ARCH-slackware-linux
-
-make
-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
+# https://github.com/TASVideos/desmume
+
+cd $PRGNAM/src/frontend/posix
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --prefix=/usr \
+ --bindir=/usr/games \
+ --mandir=/usr/man \
+ --optimization=2 \
+ --strip \
+ -Dc_args='-minline-all-stringops -D_FORTIFY_SOURCE=2' \
+ -Db_pie=true \
+ -Dopenal=true \
+ -Dwifi=true
+
+ ninja
+ DESTDIR=$PKG ninja install
+cd ../../../..
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS ChangeLog COPYING INSTALL README README.LIN ds*.txt \
+ AUTHORS ChangeLog COPYING README README.LIN doc/ds*.txt \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild