summaryrefslogtreecommitdiffstats
path: root/games/haxima-nazghul
diff options
context:
space:
mode:
author B. Watson2022-02-20 22:01:04 +0100
committer Robby Workman2022-02-21 21:34:27 +0100
commit04cc49c13f6801f91c340c6be5ac62e519c49b1f (patch)
tree1297f73a18ea75c5b649ca9ff2d035f1216b663a /games/haxima-nazghul
parent16b4100e0eb9eb874566a7ebd3aab66a0f0d34bf (diff)
downloadslackbuilds-04cc49c13f6801f91c340c6be5ac62e519c49b1f.tar.gz
games/haxima-nazghul: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/haxima-nazghul')
-rw-r--r--games/haxima-nazghul/README3
-rw-r--r--games/haxima-nazghul/haxima-nazghul.SlackBuild40
-rw-r--r--games/haxima-nazghul/haxima-nazghul.desktop10
3 files changed, 40 insertions, 13 deletions
diff --git a/games/haxima-nazghul/README b/games/haxima-nazghul/README
index 78116259d2..3610f7b919 100644
--- a/games/haxima-nazghul/README
+++ b/games/haxima-nazghul/README
@@ -1,2 +1,5 @@
Haxima is an Ultima-like game engine (2D tile graphics) with combat,
magic, NPC AI, an embedded scripting language, and in-game editing.
+
+The executable is called "haxima.sh", if you're launching it from the
+shell.
diff --git a/games/haxima-nazghul/haxima-nazghul.SlackBuild b/games/haxima-nazghul/haxima-nazghul.SlackBuild
index d1ac8c62cf..b936cd36a3 100644
--- a/games/haxima-nazghul/haxima-nazghul.SlackBuild
+++ b/games/haxima-nazghul/haxima-nazghul.SlackBuild
@@ -22,12 +22,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220220 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - fix build on 15.0.
+# - fix .desktop so it validates and has correct paths.
+# - move the nazghul binary to libexec, since it doesn't run on its own.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=haxima-nazghul
SRCNAM=$(echo $PRGNAM | cut -c8-14)
VERSION=${VERSION:-0.7.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +44,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
@@ -76,30 +78,42 @@ 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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
DOCS="doc/GHULSCRIPT doc/USERS_GUIDE doc/GAME_RULES doc/MAP_HACKERS_GUIDE \
doc/world_building/*.txt"
-sed -i 's/Exec\=haxima/Exec\=haxima.sh/' haxima.desktop
+
+# 20220220 bkw: source defines its own min() max() distance() macros,
+# which conflict with the ones in the modern STL. just renaming them
+# works.
+sed -i -e 's,\<max *(,Max(,g' \
+ -e 's,\<min *(,Min(,g' \
+ -e 's,\<distance *(,Distance(,g' \
+ src/*
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -std=gnu++98" \
./configure \
--prefix=/usr \
- --datadir=/usr/share/games \
+ --bindir=/usr/libexec/$PRGNAM \
+ --datadir=/usr/share/games/$PRGNAM \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
+make install-strip DESTDIR=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/games
+sed "s,/usr/bin/,/usr/libexec/$PRGNAM/," \
+ < $PKG/usr/libexec/$PRGNAM/haxima.sh \
+ > $PKG/usr/games/haxima.sh
+rm -f $PKG/usr/libexec/$PRGNAM/haxima.sh
+chmod 755 $PKG/usr/games/haxima.sh
mkdir -p $PKG/usr/share/applications
-install -D -m644 haxima.desktop $PKG/usr/share/applications/$PRGNAM.desktop
+install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/share/pixmaps/
install -D -m644 icons/haxima.png $PKG/usr/share/pixmaps/haxima.png
diff --git a/games/haxima-nazghul/haxima-nazghul.desktop b/games/haxima-nazghul/haxima-nazghul.desktop
new file mode 100644
index 0000000000..248fbf17d8
--- /dev/null
+++ b/games/haxima-nazghul/haxima-nazghul.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Haxima
+GenericName=Role Playing Game
+Comment=An old school role playing game
+Exec=/usr/games/haxima.sh
+Icon=/usr/share/pixmaps/haxima.png
+Terminal=false
+Type=Application
+Categories=Game;
+Version=1.0