aboutsummaryrefslogtreecommitdiff
path: root/games/zdoom/zdoom.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-12 01:15:40 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:43 +0700
commit397bc0cd9bfb2dfcdbfa97523f02f9f02e15add2 (patch)
treeb7168f481ddb776c918e5a41d71b149b6da5d40a /games/zdoom/zdoom.SlackBuild
parent8d93bcfabe35a584ae25540ef992a1be84ce0bd9 (diff)
games/zdoom: New-style icons, fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/zdoom/zdoom.SlackBuild')
-rw-r--r--games/zdoom/zdoom.SlackBuild34
1 files changed, 21 insertions, 13 deletions
diff --git a/games/zdoom/zdoom.SlackBuild b/games/zdoom/zdoom.SlackBuild
index e6278dbd6782c..443ff986ab9c6 100644
--- a/games/zdoom/zdoom.SlackBuild
+++ b/games/zdoom/zdoom.SlackBuild
@@ -8,6 +8,10 @@
# version had no license, modified version released under the WTFPL,
# see http://www.wtfpl.net/txt/copying/ for details.
+# 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 +45,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 +57,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 +118,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,6 +140,10 @@ 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
@@ -162,6 +161,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 +171,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.