games/supermariowar: Updated for version 2.0beta1.

This commit is contained in:
B. Watson 2016-10-15 21:33:20 -04:00 committed by Willy Sudiarto Raharjo
parent 9c6c81d52c
commit 96c08b02eb
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
10 changed files with 40 additions and 68 deletions

View File

@ -1,7 +0,0 @@
[Desktop Entry]
Name=Super Mario War Level Editor
Exec=smw-leveleditor
Icon=smw-leveleditor
Terminal=false
Type=Application
Categories=Game;ActionGame;

View File

@ -1,7 +0,0 @@
[Desktop Entry]
Name=Super Mario War World Editor
Exec=smw-worldeditor
Icon=smw-worldeditor
Terminal=false
Type=Application
Categories=Game;ActionGame;

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Name=Super Mario War
Comment=Super Mario multiplayer game
Exec=smw
Icon=smw
Terminal=false
Type=Application
Categories=Game;ActionGame;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

View File

@ -7,7 +7,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
PRGNAM=supermariowar
VERSION=${VERSION:-r16}
VERSION=${VERSION:-2.0beta1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
@ -24,6 +24,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
TARVER="$( echo "$VERSION" | sed 's,beta,-beta.,' )"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@ -43,9 +45,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
rm -rf $PRGNAM-$TARVER
tar xvf $CWD/$PRGNAM-$TARVER.tar.gz || tar xvf $CWD/v$TARVER.tar.gz
cd $PRGNAM-$TARVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@ -53,52 +55,44 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# C++ is a fast-moving target, code from 2009, compiler from 2014 or so.
# Also, the code got refactored and the VC++ projects updated, but the
# Makefile hadn't been (so I had to parse the VC++ project file, ugh).
zcat $CWD/compilefixes.diff.gz | patch -p1
# upstream ships these as zip files, but 'make install' expects them
# to be unzipped.
unzip data.zip
unzip testmaps.zip
# Patch for libpng16 (-current) thanks to Arch Linux
# (this is gzipped to preserve CRLF line endings)
zcat $CWD/libpng.patch.gz | patch -p0
# cmake defines a SMW_DATADIR but the code doesn't actually use it.
sed -i \
'/RootDataDirectory *= *"data"/s,"data",SMW_DATADIR,' \
src/common/global.cpp
# the configure script isn't autoconf (yay), but it has CRLFs (boo)
sed -i 's,\r,,g' configure
# -DUSE_PNG_SAVE=ON is listed in CMakeLists.txt, but isn't actually
# implemented in 2.0beta1... screenshots still work, they're saved as
# .bmp instead.
# 20151122 bkw: PNG screenshots stopped working in -current, let's check
# for it. When this is disabled, screenshots get saved as BMP instead.
[ "$( pkg-config --modversion libpng | cut -d. -f1,2 )" != "1.4" ] && \
PNGOPT="--no-png-save"
# -DUSE_SDL2_LIBS=ON will be supported in the future.
sh configure $PNGOPT
sed -i "/^CFLAGS/s,$, $SLKCFLAGS -fpermissive," configuration
mkdir -p build
cd build
cmake \
-DBUILD_STATIC_LIBS=OFF \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
make install/strip DESTDIR=$PKG
cd ..
make
# 'make install' installs maps/worlds a+w, don't want. We use
# setgid games executables instead.
mkdir -p $PKG/usr/games $PKG/usr/share/games/smw/
install -s -m0755 smw $PKG/usr/games
install -s -m2755 -g games leveledit $PKG/usr/games/smw-leveledit
install -s -m2755 -g games worldedit $PKG/usr/games/smw-worldedit
cp -r gfx maps music sfx tours worlds $PKG/usr/share/games/smw
chown -R root:games $PKG/usr/share/games/smw
chmod -R 0775 $PKG/usr/share/games/smw
# icons extracted from _src/icons/*.ico with icotool.
# .desktop files written for this build.
# No man pages, since none of the executables take any options.
mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps
for i in $PKG/usr/games/*; do
exe=$(basename $i)
cat $CWD/icons/$exe.png > $PKG/usr/share/pixmaps/$exe.png
cat $CWD/desktop/$exe.desktop > $PKG/usr/share/applications/$exe.desktop
done
# for some reason, the executables are being installed without
# the executable bits set...
chmod 0755 $PKG/usr/games/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
# get rid of the CRLFs in the docs
for i in *.html *.html *.txt; do
sed 's,\r,,g' "$i" > $PKG/usr/doc/$PRGNAM-$VERSION/"$i"
for i in CHANGELOG CREDITS README.md docs/*.html docs/*.txt; do
sed 's,\r,,g' "$i" > $PKG/usr/doc/$PRGNAM-$VERSION/"$( basename "$i" )"
done
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View File

@ -1,10 +1,10 @@
PRGNAM="supermariowar"
VERSION="r16"
VERSION="2.0beta1"
HOMEPAGE="https://github.com/mmatyas/supermariowar"
DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/supermariowar-r16.tar.gz"
MD5SUM="f64f5471b1d8811265ebbf799915ac76"
DOWNLOAD="https://github.com/mmatyas/supermariowar/archive/v2.0-beta.1.tar.gz"
MD5SUM="37084e687b54281fef862766f92a9481"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
REQUIRES="enet yaml-cpp"
MAINTAINER="B. Watson"
EMAIL="yalhcru@gmail.com"