diff options
Diffstat (limited to 'games/opendune/opendune.SlackBuild')
-rw-r--r-- | games/opendune/opendune.SlackBuild | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/games/opendune/opendune.SlackBuild b/games/opendune/opendune.SlackBuild index 31212e13fc609..ae32068b31b2a 100644 --- a/games/opendune/opendune.SlackBuild +++ b/games/opendune/opendune.SlackBuild @@ -6,6 +6,9 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211026 bkw: BUILD=2 +# - fix build on -current +# - document PULSE=no option # 20180612 bkw: update for v0.9, script can no longer build 0.8 # 20170531 bkw: BUILD=2, fix build on x86 # 20170302 bkw: use long-format github URL @@ -14,7 +17,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=opendune VERSION=${VERSION:-0.9} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -26,9 +29,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -65,11 +65,12 @@ rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.gz cd $SRCNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# 20211026 bkw: patch from upstream git, fixes gcc version detection +# for versions >= 10.x. +patch -p1 < $CWD/gcc10fix.diff # 20170531 bkw: upstream uses #if defined(__i386__) to test for MMX, # which is wrong (should be checking __MMX__ instead). This only affects @@ -101,8 +102,10 @@ sed -i "/\"data\//s,data,/usr/share/games/$PRGNAM," src/inifile.c # Allow building with ALSA instead of pulseaudio. There's no way to switch # between ALSA and Pulse at runtime, and many users prefer to avoid Pulse. +WITHPULSE="with" if [ "${PULSE:-yes}" = "no" -o ! -x /usr/bin/pulseaudio ]; then PULSEOPT="--without-pulse" + WITHPULSE="without" fi # The configure script autodetects SDL 2, but it doesn't check for @@ -110,13 +113,13 @@ fi # SDL2 but not SDL2_image, the build will fail. Fix: if [ "${SDL2:-yes}" = "no" ]; then SDLOPT="--without-sdl2" - SDLVER=1 + SDLVER=1.2 elif pkg-config --exists sdl2 && pkg-config --exists SDL2_image; then SDLOPT="--with-sdl2" - SDLVER=2 + SDLVER=2.0 else SDLOPT="--without-sdl2" - SDLVER=1 + SDLVER=1.2 fi # N.B. non-standard (non-autoconf) configure options here! @@ -154,7 +157,10 @@ cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -sed "s,@S@,$SDLVER," $CWD/slack-desc > $PKG/install/slack-desc +sed -e "s,@S@,$SDLVER," \ + -e "s,@P@,$WITHPULSE," \ + $CWD/slack-desc \ + > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG |