diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-20 07:12:23 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-29 17:07:20 +0700 |
commit | 9f6b162a70ab524a064f05d67bde958470e66766 (patch) | |
tree | 50bcf8bdb6fdce3a93916746f05e9579146d518b /games/maelstrom | |
parent | 60f218bc23569cb6f374426ec5ffb333aafcf6ad (diff) |
games/maelstrom: Updated for version 3.0.7.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/maelstrom')
-rw-r--r-- | games/maelstrom/Maelstrom.6 | 7 | ||||
-rw-r--r-- | games/maelstrom/README | 6 | ||||
-rw-r--r-- | games/maelstrom/compile_fix.diff | 68 | ||||
-rw-r--r-- | games/maelstrom/doinst.sh | 6 | ||||
-rw-r--r-- | games/maelstrom/install_dirs.diff | 35 | ||||
-rw-r--r-- | games/maelstrom/maelstrom.SlackBuild | 55 | ||||
-rw-r--r-- | games/maelstrom/maelstrom.desktop | 4 | ||||
-rw-r--r-- | games/maelstrom/maelstrom.info | 8 | ||||
-rw-r--r-- | games/maelstrom/maelstrom_addon_package.pl | 2 | ||||
-rw-r--r-- | games/maelstrom/slack-desc | 4 |
10 files changed, 56 insertions, 139 deletions
diff --git a/games/maelstrom/Maelstrom.6 b/games/maelstrom/Maelstrom.6 index 03e7d74c19c1..8a2b5f1a3501 100644 --- a/games/maelstrom/Maelstrom.6 +++ b/games/maelstrom/Maelstrom.6 @@ -47,6 +47,9 @@ never get home... Run Maelstrom in full\-screen mode. You may also press Alt\-Enter while Maelstrom is running, to toggle full\-screen. .TP +\fB\-windowed\fR +Run Maelstrom in windowed mode. Alt\-Enter toggles. +.TP \fB\-gamma\fR [0\-8] Set the gamma correction .TP @@ -174,7 +177,7 @@ or both. Typically, the add\-on content is distributed as a zip file. There is a collection of Maelstrom add\-on content at .br .nh -\fIhttp://www.devolution.com/~slouken/Maelstrom/add-ons.html\fR +\fIhttps://www.libsdl.org/projects/Maelstrom/add\-ons.html\fR .hy .SS Automated Installation (Preferred) Use \fBmaelstrom_addon_package.pl\fR to convert the zip @@ -205,7 +208,7 @@ the system\-wide game data directory. \fB/usr/share/games/Maelstrom/\fR game data (images, music, sound) .TP -\fB$HOME/.Maelstrom\-data\fR +\fB$HOME/.local/share/Ambrosia Software/Maelstrom\fR per\-user settings and high\-score records .SH AUTHORS The original version of this game was written for the Macintosh by diff --git a/games/maelstrom/README b/games/maelstrom/README index 2f74a7ec2b83..657fe6f009b6 100644 --- a/games/maelstrom/README +++ b/games/maelstrom/README @@ -1,11 +1,13 @@ +maelstrom (Enhanced Asteroids-like game) + Maelstrom is a game similar to Asteroids. You pilot your ship through the dreaded "Maelstrom" asteroid belt -- suddenly your best friend thrusts towards you and fires, directly at your cockpit. You raise your shields just in time, and the battle -is joined. The deadliest stretch of space known to mankind has just +is joined. The deadliest stretch of space known to mankind has just gotten deadlier. This package also comes with a script to create Slackware -packages from the Maelstrom add-on graphics/sound files. Run +packages from the Maelstrom add-on graphics/sound files. Run 'maelstrom_addon_package.pl --help' for more information. diff --git a/games/maelstrom/compile_fix.diff b/games/maelstrom/compile_fix.diff deleted file mode 100644 index 1ce080a5a443..000000000000 --- a/games/maelstrom/compile_fix.diff +++ /dev/null @@ -1,68 +0,0 @@ -diff -Naur Maelstrom-3.0.6.orig/Maelstrom-netd.c Maelstrom-3.0.6/Maelstrom-netd.c ---- Maelstrom-3.0.6.orig/Maelstrom-netd.c 2000-02-12 04:58:59.000000000 -0500 -+++ Maelstrom-3.0.6/Maelstrom-netd.c 2016-07-30 18:49:48.254076062 -0400 -@@ -9,8 +9,11 @@ - #include <sys/time.h> - #include <sys/socket.h> - #include <netinet/in.h> -+#include <arpa/inet.h> - #include <netdb.h> - #include <unistd.h> -+#include <stdlib.h> -+#include <time.h> - - /* We wait in a loop for players to connect and tell us how many people - are playing. Then, once all players have connected, then we broadcast -@@ -181,7 +184,7 @@ - exit(sig); - } - --main(int argc, char *argv[]) -+int main(int argc, char *argv[]) - { - int netfd, i, slot; - struct sockaddr_in serv_addr; -@@ -201,7 +204,7 @@ - memset(&serv_addr, 0, sizeof(serv_addr)); - serv_addr.sin_family = AF_INET; - serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); -- serv_addr.sin_port = htons(NETPLAY_PORT-1); -+ serv_addr.sin_port = htons(NETPLAY_PORT - 1); - if (bind(netfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { - perror("Can't bind local address"); - exit(3); -diff -Naur Maelstrom-3.0.6.orig/netlogic/netplay.cpp Maelstrom-3.0.6/netlogic/netplay.cpp ---- Maelstrom-3.0.6.orig/netlogic/netplay.cpp 2002-10-20 00:11:52.000000000 -0400 -+++ Maelstrom-3.0.6/netlogic/netplay.cpp 2016-07-30 18:34:07.295131706 -0400 -@@ -128,7 +128,7 @@ - if ( port ) { - portnum = atoi(port); - } else { -- portnum = NETPLAY_PORT+playernum; -+ portnum = NETPLAY_PORT + playernum; - } - if ( host ) { - /* Resolve the remote address */ -@@ -183,7 +183,7 @@ - if ( port ) { - portnum = atoi(port); - } else { -- portnum = NETPLAY_PORT-1; -+ portnum = NETPLAY_PORT - 1; - } - SDLNet_ResolveHost(&ServAddr, host, portnum); - if ( ServAddr.host == INADDR_NONE ) { -diff -Naur Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp ---- Maelstrom-3.0.6.orig/screenlib/SDL_FrameBuf.cpp 2001-07-22 17:03:13.000000000 -0400 -+++ Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2016-07-30 18:18:37.043186717 -0400 -@@ -848,8 +848,8 @@ - for ( i=0; i<dirtymaplen; ++i ) { - if ( dirtymap[i] != NULL ) { - dirtymap[i] = (SDL_Rect *)( -- ((int)dirtymap[i]-(int)updatelist) + -- (int)newlist -+ ((long)dirtymap[i]-(long)updatelist) + -+ (long)newlist - ); - } - } diff --git a/games/maelstrom/doinst.sh b/games/maelstrom/doinst.sh index 3857649f506a..11813c310171 100644 --- a/games/maelstrom/doinst.sh +++ b/games/maelstrom/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications &> /dev/null 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 diff --git a/games/maelstrom/install_dirs.diff b/games/maelstrom/install_dirs.diff deleted file mode 100644 index 08c95405b1ef..000000000000 --- a/games/maelstrom/install_dirs.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur Maelstrom-3.0.6/Makefile.in Maelstrom-3.0.6.patched/Makefile.in ---- Maelstrom-3.0.6/Makefile.in 2002-10-20 00:19:42.000000000 -0400 -+++ Maelstrom-3.0.6.patched/Makefile.in 2009-04-14 14:45:59.000000000 -0400 -@@ -431,7 +431,7 @@ - - # Special install rule for the game - install: -- make install_gamedata target=@GAME_INSTALLDIR@ -+ make install_gamedata target=$(DESTDIR)/@GAME_INSTALLDIR@ - - install_gamedata: - sh mkinstalldirs $(target)/ -@@ -444,8 +444,8 @@ - chmod 666 $(target)/Maelstrom-Scores - - install_gamedocs: -- sh mkinstalldirs $(target)/ -- cp -rv README* COPYING* Docs* $(target)/ -+ sh mkinstalldirs $(DESTDIR)/$(target)/ -+ cp -rv README* COPYING* Docs* $(DESTDIR)/$(target)/ - - # Rule to build tar-gzipped distribution package - $(PACKAGE)-$(VERSION).tar.gz: dist -diff -Naur Maelstrom-3.0.6/configure Maelstrom-3.0.6.patched/configure ---- Maelstrom-3.0.6/configure 2002-10-19 23:43:07.000000000 -0400 -+++ Maelstrom-3.0.6.patched/configure 2009-04-14 14:47:33.000000000 -0400 -@@ -3232,7 +3232,7 @@ - GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE" - ;; - *) -- GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE" -+ GAME_INSTALLDIR="\$(prefix)/share/games/$PACKAGE" - ;; - esac - diff --git a/games/maelstrom/maelstrom.SlackBuild b/games/maelstrom/maelstrom.SlackBuild index fab02fac2b30..50dab5c12e17 100644 --- a/games/maelstrom/maelstrom.SlackBuild +++ b/games/maelstrom/maelstrom.SlackBuild @@ -6,6 +6,11 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211020 bkw: upstream's first update since 2002! ported to SDL2! +# - update for v3.0.7. +# - new-style icons. +# - update URLs in perl script and man page. + # 20180627 bkw: fix compile with gcc 8 (for -current). # 20160730 bkw: @@ -17,8 +22,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=maelstrom -VERSION=${VERSION:-3.0.6} -BUILD=${BUILD:-2} +VERSION=${VERSION:-3.0.7} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -32,9 +37,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 @@ -67,18 +69,11 @@ rm -rf $SRCNAM-$VERSION tar xvf $CWD/$SRCNAM-$VERSION.tar.gz 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ - -# Fix 64-bit compile issue (not needed on 32-bit, but does no harm) -patch -p1 < $CWD/compile_fix.diff +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# Install game data in /usr/share/games/Maelstrom, not /usr/games/Maelstrom -# (also make `make install' support DESTDIR properly!) -patch -p1 < $CWD/install_dirs.diff +# Look for game data in /usr/share/games/Maelstrom, not /usr/games/Maelstrom +sed -i '/GAME_INSTALLDIR=.*games/s,/games,/share/games,' configure # 20180627 bkw: It seems structs and typedefs now share a namespace # in gcc-8.1's g++. So rename this struct to keep the compiler happy @@ -94,8 +89,13 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG -strip --strip-unneeded $PKG/usr/games/* + +# 20211020 bkw: 3.0.7's make install is hard to deal with, do without. +GAMEDIR=$PKG/usr/share/games/$SRCNAM +mkdir -p $PKG/usr/games $GAMEDIR +cp -a Images Maelstrom_{Fonts,Sounds,Sprites} icon.* $GAMEDIR +rm $GAMEDIR/Images/Makefile* +install -s -m0755 $SRCNAM $SRCNAM-netd $PKG/usr/games # CLI users would probably prefer to type 'maelstrom', not 'Maelstrom' ( cd $PKG/usr/games && ln -s $SRCNAM $PRGNAM ) @@ -105,6 +105,15 @@ install -m0755 -o root -g root $CWD/maelstrom_addon_package.pl $PKG/usr/games mkdir -p $PKG/usr/share/applications cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications +# upstream's icon is 48x48, resize +for i in 16 32 48 64; do + px=$( basename $i | cut -d. -f1 ) + size=${px}x${px} + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size icon.xpm $dir/$PRGNAM.png +done + mkdir -p $PKG/usr/share/pixmaps ( cd $PKG/usr/share/pixmaps ; ln -s ../games/$SRCNAM/icon.xpm $PRGNAM.xpm ) @@ -114,11 +123,11 @@ gzip -9c $CWD/$SRCNAM.6 > $PKG/usr/man/man6/$SRCNAM.6.gz ln -s $SRCNAM.6.gz $PRGNAM.6.gz ln -s $SRCNAM.6.gz $SRCNAM-netd.6.gz ) -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -make install_gamedocs target=$PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -# Why does `make install' install this? -rm -f $PKG/usr/doc/$PRGNAM-$VERSION/Docs/Makefile +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a Changelog *.txt Docs $PKGDOC +rm -f $PKGDOC/Docs/Makefile* +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/games/maelstrom/maelstrom.desktop b/games/maelstrom/maelstrom.desktop index 9a94043690ca..96bde602fae1 100644 --- a/games/maelstrom/maelstrom.desktop +++ b/games/maelstrom/maelstrom.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Maelstrom -Exec=Maelstrom +Exec=/usr/games/Maelstrom Type=Application Icon=maelstrom -GenericName=Maelstrom +GenericName=Enhanced Asteroids-like game Categories=Game;ArcadeGame; diff --git a/games/maelstrom/maelstrom.info b/games/maelstrom/maelstrom.info index eadf972d41f8..513868512ee4 100644 --- a/games/maelstrom/maelstrom.info +++ b/games/maelstrom/maelstrom.info @@ -1,8 +1,8 @@ PRGNAM="maelstrom" -VERSION="3.0.6" -HOMEPAGE="http://web.archive.org/web/20100825165951/http://www.devolution.com/~slouken/Maelstrom/" -DOWNLOAD="http://mirrors.kernel.org/gentoo/distfiles/Maelstrom-3.0.6.tar.gz" -MD5SUM="8aab0e75ca52808fd6777535ebb1f1c4" +VERSION="3.0.7" +HOMEPAGE="https://www.libsdl.org/projects/Maelstrom/index.html" +DOWNLOAD="https://www.libsdl.org/projects/Maelstrom/src/Maelstrom-3.0.7.tar.gz" +MD5SUM="3437294981f43d23d73d8b69170a1f0e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/games/maelstrom/maelstrom_addon_package.pl b/games/maelstrom/maelstrom_addon_package.pl index 7358784c3bf3..e376a1e0a355 100644 --- a/games/maelstrom/maelstrom_addon_package.pl +++ b/games/maelstrom/maelstrom_addon_package.pl @@ -52,7 +52,7 @@ must run it with root privileges (e.g. with su or sudo). You can find a collection of Maelstrom add-on zip files here: - http://www.devolution.com/~slouken/Maelstrom/add-ons.html + https://www.libsdl.org/projects/Maelstrom/add-ons.html EOF exit 1; } diff --git a/games/maelstrom/slack-desc b/games/maelstrom/slack-desc index 1cda3b7d39be..75dfdd150cf8 100644 --- a/games/maelstrom/slack-desc +++ b/games/maelstrom/slack-desc @@ -6,12 +6,12 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -maelstrom: maelstrom (a game similar to Asteroids) +maelstrom: maelstrom (Enhanced Asteroids-like game) maelstrom: maelstrom: You pilot your ship through the dreaded "Maelstrom" asteroid belt -- maelstrom: suddenly your best friend thrusts towards you and fires, directly maelstrom: at your cockpit. You raise your shields just in time, and the battle -maelstrom: is joined. The deadliest stretch of space known to mankind has just +maelstrom: is joined. The deadliest stretch of space known to mankind has just maelstrom: gotten deadlier. maelstrom: maelstrom: |