mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
games/haxima-nazghul: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
16b4100e0e
commit
04cc49c13f
3 changed files with 40 additions and 13 deletions
|
@ -1,2 +1,5 @@
|
||||||
Haxima is an Ultima-like game engine (2D tile graphics) with combat,
|
Haxima is an Ultima-like game engine (2D tile graphics) with combat,
|
||||||
magic, NPC AI, an embedded scripting language, and in-game editing.
|
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.
|
||||||
|
|
|
@ -22,12 +22,17 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# 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)
|
cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
|
||||||
PRGNAM=haxima-nazghul
|
PRGNAM=haxima-nazghul
|
||||||
SRCNAM=$(echo $PRGNAM | cut -c8-14)
|
SRCNAM=$(echo $PRGNAM | cut -c8-14)
|
||||||
VERSION=${VERSION:-0.7.1}
|
VERSION=${VERSION:-0.7.1}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
PKGTYPE=${PKGTYPE:-tgz}
|
PKGTYPE=${PKGTYPE:-tgz}
|
||||||
|
|
||||||
|
@ -39,9 +44,6 @@ if [ -z "$ARCH" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
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
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -76,30 +78,42 @@ cd $SRCNAM-$VERSION
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find -L . \
|
find -L . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
\( -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 \
|
\( -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 \
|
DOCS="doc/GHULSCRIPT doc/USERS_GUIDE doc/GAME_RULES doc/MAP_HACKERS_GUIDE \
|
||||||
doc/world_building/*.txt"
|
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" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS -std=gnu++98" \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--datadir=/usr/share/games \
|
--bindir=/usr/libexec/$PRGNAM \
|
||||||
|
--datadir=/usr/share/games/$PRGNAM \
|
||||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||||
--build=$ARCH-slackware-linux
|
--build=$ARCH-slackware-linux
|
||||||
|
|
||||||
make
|
make
|
||||||
make install DESTDIR=$PKG
|
make install-strip DESTDIR=$PKG
|
||||||
|
|
||||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
mkdir -p $PKG/usr/games
|
||||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
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
|
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/
|
mkdir -p $PKG/usr/share/pixmaps/
|
||||||
install -D -m644 icons/haxima.png $PKG/usr/share/pixmaps/haxima.png
|
install -D -m644 icons/haxima.png $PKG/usr/share/pixmaps/haxima.png
|
||||||
|
|
10
games/haxima-nazghul/haxima-nazghul.desktop
Normal file
10
games/haxima-nazghul/haxima-nazghul.desktop
Normal file
|
@ -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
|
Loading…
Reference in a new issue