diff options
Diffstat (limited to 'games/zdoom/zdoom.SlackBuild')
-rw-r--r-- | games/zdoom/zdoom.SlackBuild | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/games/zdoom/zdoom.SlackBuild b/games/zdoom/zdoom.SlackBuild index e6278dbd67..b2ac55d48e 100644 --- a/games/zdoom/zdoom.SlackBuild +++ b/games/zdoom/zdoom.SlackBuild @@ -4,10 +4,15 @@ # Originally written by Pablo Santamaria (email removed) -# Modified and now maintained by B. Watson <yalhcru@gmail.com>. Original +# Modified and now maintained by B. Watson <urchlay@slackware.uk>. Original # version had no license, modified version released under the WTFPL, # see http://www.wtfpl.net/txt/copying/ for details. +# 20220318 bkw: fix 32-bit build (disable asm). +# 20211012 bkw: BUILD=2 +# - Fix -current build. +# - New-style icons. + # 20170207 bkw: # - Take over maintenance, update for v2.8.1, BUILD=1. Upstream # says zdoom development has halted, so 2.8.1 should be the last @@ -41,7 +46,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=zdoom VERSION=${VERSION:-2.8.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,9 +58,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 @@ -117,14 +119,8 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . - -# Slight template deviation: I used \+ rather than \; (same result, but maybe -# 40x faster). -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 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 {} \+ # gitinfo.h made like so: ## git clone https://github.com/rheit/zdoom.git @@ -145,10 +141,17 @@ sed -i \ "s,setPluginPath(progdir),setPluginPath(\"/usr/lib$LIBDIRSUFFIX/$PRGNAM\")," \ src/sound/fmodsound.cpp +# silly gcc version detection assumes the major version will always be +# only one digit, this broke when we got gcc 10. +sed -i '/REGEX *MATCH/s,\[3-9\],[1-9][0-9]*,g' game-music-emu/CMakeLists.txt + mkdir release cd release +# 20220318 bkw: the x86 asm code won't build on 15.0, so it's disabled. +# The x86_64 build never used it. cmake \ + -DNO_ASM=ON \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_BUILD_TYPE="Release" \ @@ -162,6 +165,7 @@ mkdir -p \ $PKG/usr/games \ $PKG/usr/share/applications \ $PKG/usr/share/pixmaps \ + $PKG/usr/share/icons/hicolor/48x48/apps \ $PKG/usr/share/games/doom \ $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM @@ -171,9 +175,17 @@ install -s -m755 $PRGNAM $PKG/usr/games [ -e liboutput_sdl.so ] && \ install -s -m755 liboutput_sdl.so $PKG/usr/lib$LIBDIRSUFFIX/$PRGNAM install -m644 $PRGNAM.pk3 $PKG/usr/share/games/doom/ -install -m644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/ install -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/ +for i in $CWD/icons/*.png; do + px=$( basename $i | cut -d. -f1 ) + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + cd .. # Get rid of CRLF endings in the docs. |