diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-12 03:43:44 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:52:46 +0700 |
commit | 30bcea97fcf0f7a1857f55ea3c256abf510c390e (patch) | |
tree | 01dc5ac8ff164b2610cf6e24d70b011ba3310129 /games/xu4/xu4.SlackBuild | |
parent | 650bc309dc9066a03a4e7c7d84ab470d76cd0aab (diff) |
games/xu4: New-style icons, disable alt-x.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/xu4/xu4.SlackBuild')
-rw-r--r-- | games/xu4/xu4.SlackBuild | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/games/xu4/xu4.SlackBuild b/games/xu4/xu4.SlackBuild index 32f7cf5b579a5..443875df22dee 100644 --- a/games/xu4/xu4.SlackBuild +++ b/games/xu4/xu4.SlackBuild @@ -6,11 +6,21 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211012 bkw: BUILD=3, +# - new-style icon. +# - binary in /usr/games. +# - man page in section 6. +# - disable Alt-x keystroke (it crashes the game). +# - "Press Alt-x to quit" => "Close window to quit". + +# TODO: make Alt-x stop crashing the game. It seems to work correctly +# only at the main menu, not while playing. Disabled it for now. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=xu4 VERSION=${VERSION:-20130612_svn} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -80,9 +90,13 @@ sed -i '/#define *DEFAULT_VALIDATE_XML/s,1,0,' src/settings.h # Patch for GCC 7 patch -p1 < $CWD/gcc7.patch +# 20211012 bkw: work around a bug. Disable Alt-X as it crashes the +# game. Tell the user to close the window to quit, instead. +patch -p1 < $CWD/disable_alt_x.diff + # The -DNPERF stops u4 from creating a debug/ in the current dir. make -C src DEBUGCXXFLAGS="-DNPERF $SLKCFLAGS" prefix=/usr libdir=$PKGLIBDIR -make -C src install prefix=$PKG/usr libdir=$PKGLIBDIR +make -C src install prefix=$PKG/usr bindir=$PKG/usr/games libdir=$PKGLIBDIR find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -114,6 +128,18 @@ find $PKGLIBDIR \ -name \*.xml -o -name \*.dtd -o -name \*.ogg \) \ -print0 | xargs -0 chmod 644 +# 20211012 bkw: new-style icon... +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/u4.png +done + +rm -f $PKG/usr/share/pixmaps/u4.png +ln -s ../icons/hicolor/64x64/apps/u4.png $PKG/usr/share/pixmaps/u4.png + # Docs. N.B. we don't need border.png. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/developers cp -a *.html AUTHORS COPYING README $PKG/usr/doc/$PRGNAM-$VERSION @@ -161,13 +187,13 @@ sed -i 's/\r//' *.txt cd - # I hate packages called "xfoo" whose binaries are called "foo". -ln -s u4 $PKG/usr/bin/$PRGNAM +ln -s u4 $PKG/usr/games/$PRGNAM # I also hate binaries that take options but have no man pages, so here's # the one I made. Enjoy. -mkdir -p $PKG/usr/man/man1 -sed "s/@VERSION@/$VERSION/" $CWD/u4.1 | gzip -9c - > $PKG/usr/man/man1/u4.1.gz -ln -s u4.1.gz $PKG/usr/man/man1/$PRGNAM.1.gz +mkdir -p $PKG/usr/man/man6 +sed "s/@VERSION@/$VERSION/" $CWD/u4.6 | gzip -9c - > $PKG/usr/man/man6/u4.6.gz +ln -s u4.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |