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>
This commit is contained in:
parent
650bc309dc
commit
30bcea97fc
|
@ -0,0 +1,24 @@
|
|||
diff -Naur xu4-20130612_svn/src/event_sdl.cpp xu4-20130612_svn.patched/src/event_sdl.cpp
|
||||
--- xu4-20130612_svn/src/event_sdl.cpp 2013-06-12 19:34:25.000000000 -0400
|
||||
+++ xu4-20130612_svn.patched/src/event_sdl.cpp 2021-10-12 03:38:36.048487922 -0400
|
||||
@@ -43,7 +43,7 @@
|
||||
case U4_META + 'q': /* Cmd+q */
|
||||
case U4_META + 'x': /* Cmd+x */
|
||||
#endif
|
||||
- case U4_ALT + 'x': /* Alt+x */
|
||||
+ // case U4_ALT + 'x': /* Alt+x */
|
||||
#if defined(WIN32)
|
||||
case U4_ALT + U4_FKEY + 3:
|
||||
#endif
|
||||
diff -Naur xu4-20130612_svn/src/game.cpp xu4-20130612_svn.patched/src/game.cpp
|
||||
--- xu4-20130612_svn/src/game.cpp 2013-06-12 19:34:24.000000000 -0400
|
||||
+++ xu4-20130612_svn.patched/src/game.cpp 2021-10-12 03:33:55.794513398 -0400
|
||||
@@ -1205,7 +1205,7 @@
|
||||
screenMessage("Quit & Save...\n%d moves\n", c->saveGame->moves);
|
||||
if (c->location->context & CTX_CAN_SAVE_GAME) {
|
||||
gameSave();
|
||||
- screenMessage("Press Alt-x to quit\n");
|
||||
+ screenMessage("Close window to quit\n");
|
||||
}
|
||||
else screenMessage("%cNot here!%c\n", FG_GREY, FG_WHITE);
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
|
@ -1,4 +1,4 @@
|
|||
.TH u4 1 "26 Oct 2011" "Version 1.1+svn" "XU4 Manual"
|
||||
.TH u4 6 "12 Oct 2021" "Version 1.1+svn" "XU4 Manual"
|
||||
|
||||
.SH NAME
|
||||
\fBu4\fR \- A modern reimplementation of the classic Ultima IV role\-playing game.
|
|
@ -1,7 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=Ultima 4
|
||||
Comment=Ultima 4 (xu4)
|
||||
Exec=u4
|
||||
Exec=/usr/games/u4
|
||||
Icon=u4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue