From 96c08b02ebd24f2bb62c2a5bb5f6991b58a5a9b1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 15 Oct 2016 21:33:20 -0400 Subject: [PATCH] games/supermariowar: Updated for version 2.0beta1. --- games/supermariowar/compilefixes.diff.gz | Bin 1003 -> 0 bytes .../desktop/smw-leveledit.desktop | 7 -- .../desktop/smw-worldedit.desktop | 7 -- games/supermariowar/desktop/smw.desktop | 8 -- games/supermariowar/icons/smw-leveledit.png | Bin 613 -> 0 bytes games/supermariowar/icons/smw-worldedit.png | Bin 607 -> 0 bytes games/supermariowar/icons/smw.png | Bin 678 -> 0 bytes games/supermariowar/libpng.patch.gz | Bin 391 -> 0 bytes games/supermariowar/supermariowar.SlackBuild | 78 ++++++++---------- games/supermariowar/supermariowar.info | 8 +- 10 files changed, 40 insertions(+), 68 deletions(-) delete mode 100644 games/supermariowar/compilefixes.diff.gz delete mode 100644 games/supermariowar/desktop/smw-leveledit.desktop delete mode 100644 games/supermariowar/desktop/smw-worldedit.desktop delete mode 100644 games/supermariowar/desktop/smw.desktop delete mode 100644 games/supermariowar/icons/smw-leveledit.png delete mode 100644 games/supermariowar/icons/smw-worldedit.png delete mode 100644 games/supermariowar/icons/smw.png delete mode 100644 games/supermariowar/libpng.patch.gz diff --git a/games/supermariowar/compilefixes.diff.gz b/games/supermariowar/compilefixes.diff.gz deleted file mode 100644 index 96d6f2f543fa1ff88c7e3fba5a765ca80613fee2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1003 zcmVR&gO?8;y887vW{43JJoB~*-bSXA^W`b8d>@@8r4zZH%n;fpGv$WF$>y!W6z)3 zyirGYlg|&+_aE=vx9h+MEEo597Lp8#X?7dnh(z2cGV?^3GBEyXRIC}{IL8r|WCovo zC7#O6IK(R=(k%Aw&LJ!p891RHXG-v};3*}47#>$_! zs-O3%2&v3vAS>cw=C3lx4V2&Qv}BHp4+J5f;ha3m;zSh+BNu;yf9kvH(O< zb1tHNMNP#V>PpHBVCoG|-)cJ~Z*2Cg%7onGbm?+jZ*WWhPr|K+C0UToTY@uE?1 zzwy*6Chf($l9O_&1i=w_t=x;lfD5V?+KmzkEsCV_UDxA@x+uE{^TRC{WQ6;RV+4XX z%@NY1s6(Qpi06_c&sGqk-*cUAr4YUTKzE|PoEs@>wc7WFxzv2I@u-yOVWhk3BWB4JOZ*O*Ng;|HBZ*-)NBDVy5E{1oK7W-x34$doS?&`VK-5y(SA}yC884mKKh+t^RsgK4S z`P7Yy;|EyfP64t3bHxlJVf)~1X)t@Xo?$-KW-l`(@nc>e&3V} ZE);rdq4Z{@-&D}V{{lVn4`4qG007o}?92cF diff --git a/games/supermariowar/desktop/smw-leveledit.desktop b/games/supermariowar/desktop/smw-leveledit.desktop deleted file mode 100644 index 41a05d6c4b..0000000000 --- a/games/supermariowar/desktop/smw-leveledit.desktop +++ /dev/null @@ -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; diff --git a/games/supermariowar/desktop/smw-worldedit.desktop b/games/supermariowar/desktop/smw-worldedit.desktop deleted file mode 100644 index 8eee2981f4..0000000000 --- a/games/supermariowar/desktop/smw-worldedit.desktop +++ /dev/null @@ -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; diff --git a/games/supermariowar/desktop/smw.desktop b/games/supermariowar/desktop/smw.desktop deleted file mode 100644 index 9577b053da..0000000000 --- a/games/supermariowar/desktop/smw.desktop +++ /dev/null @@ -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; diff --git a/games/supermariowar/icons/smw-leveledit.png b/games/supermariowar/icons/smw-leveledit.png deleted file mode 100644 index 6cee4b043cfc00a85dff9a32ad41625b0c9e09e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)7W-16YQLfewkMh@9?$gU8yj;! zD?4}^WsOVE(A6JyNBl&iWPx#8g>cal7<0cFc{$&kEtyg-6qL}vrO*(*IpAfWyfm|! zZywnhuGS8qx=Y6_!0C@Z`SyJi3^K7bO_K-Yl^`|FmZ14tqM#lFFQewM*gXip;ruu- zpUKx_n@+I+L1Gy<-v&D--`1?RvbZv+c3}ULVa} zuK)LP7gFG#kqp@GujG^h?&i=A-X)Zz}b8uK}0KO3|YXhw{wAMJE&u${O zN&m&vQGz*?5*txb6ae6nlYlY5Qp#P+&8IgWy9llZ_=Ah0fVI|4!}G`t5GnUJ+5WMf`O#&-+79(Log#Ju+!7Fx?0_*pN8L2BZiY zmTxcp5E*VoT|@~eAkxg<-p!ftkD=>2ul)#rdLYRIqPi}8+Hx6KrEz~m61)v%9Vn%O zB7U6#U0odc&cKP#)x5)rYr|U?zppEp*=-o80oR5}s>)~q96xBo1n^HpNvg_wEjFYv t7~*QzkDn}@cJcOupJs%Yew_Y0z5w)kE>m-@P0|1W002ovPDHLkV1h{!5Y_+y diff --git a/games/supermariowar/icons/smw.png b/games/supermariowar/icons/smw.png deleted file mode 100644 index 63cec07f110593d6be51f5dbecb891a8179f540f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 678 zcmV;X0$KfuP)5uEo3r^7bHmlkh7>dRYVd2kY+N97$R^j;w}N# zfU85^pjhGf6ZEU!EGfdhay+QxOBo zG=h7LXehN|zP9g)g>yg^17; z5!KNmaxtPG`G9wB(RWmecy}Os`xyH~@{#-+-*!T6EU6X_%5iXNM&7Ro>#J})ICaxn z@MR8|GdVz&2jf|gw`FKo*t7~#5q71AB)^cKN%h1Fc3J?n@PTjVfHszc7H}SI>})C4 zD<A`FysC8&FQb>9~jJ41)`NK@c;k- M07*qoM6N<$g8qm#{{R30 diff --git a/games/supermariowar/libpng.patch.gz b/games/supermariowar/libpng.patch.gz deleted file mode 100644 index 84c6a45a334f2ffdbd2825957f71afd1ee69bf6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 391 zcmV;20eJo&iwFQmUZqw51Eo=6OT#b_{oF$T!!bcxySi0}vgt+ks|HqA@=ohi$D|}@Q z6C92LHw?o+5G$dc8DGF$$aUZ*2}Hv|_ZUJG;~0{}1?R&vfo^XPZczg&B@|RSFKW}d z4|_e&4R=@x*H;(WG(Dqqe|`fKi2H}bp(#41=r^dJmeMzqGm~d8rF}}Rf*>FQtQ({$ zKd=T6P1=SHju)&X;5!9cDlK7!urRAtsIW^PRbD_2Qi)lOOHh~>BvMxhC9Bb{Y?2VLUjZO!gFl$obp7({XE`v-O1WQnYT!+;C}ZnK#70s$bOBFUvx97T9Pd))~pf l%)DRb+TYz6-34noaY-3m-A$(?y#4u}`w0uCR%gEg006M`wn+d0 diff --git a/games/supermariowar/supermariowar.SlackBuild b/games/supermariowar/supermariowar.SlackBuild index c5acc1d397..794fc93a78 100644 --- a/games/supermariowar/supermariowar.SlackBuild +++ b/games/supermariowar/supermariowar.SlackBuild @@ -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 diff --git a/games/supermariowar/supermariowar.info b/games/supermariowar/supermariowar.info index bcf655c192..51a9e530de 100644 --- a/games/supermariowar/supermariowar.info +++ b/games/supermariowar/supermariowar.info @@ -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"