aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-07-30 18:59:10 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:55 +0700
commit99d5b840db5bd1f5597d8e25db2caf7db4015a8a (patch)
tree5ff004a9d454c073176733d0d9bd16f1ebad91b2
parenta02ac510ed45db0e96aca07c89f79998fbfc7c30 (diff)
games/maelstrom: Fix build.
-rw-r--r--games/maelstrom/Maelstrom.64
-rw-r--r--games/maelstrom/README4
-rw-r--r--games/maelstrom/compile_fix.diff60
-rw-r--r--games/maelstrom/maelstrom.SlackBuild11
4 files changed, 63 insertions, 16 deletions
diff --git a/games/maelstrom/Maelstrom.6 b/games/maelstrom/Maelstrom.6
index dc60bbebd6612..03e7d74c19c11 100644
--- a/games/maelstrom/Maelstrom.6
+++ b/games/maelstrom/Maelstrom.6
@@ -158,10 +158,6 @@ player numbers, and will set up the proper addresses for all players.
It can field multiple games, and can be a "game hub" where a bunch
of players can get together for romping network games. :)
.P
-\fBNOTE\fR: Maelstrom-netd will not run correctly on 64\-bit hosts,
-and Maelstrom running on a 64\-bit host cannot successfully play in a
-mutiplayer game with the -server option. Use non\-server networked
-play mode instead.
.SS Network Ports
By default, Maelstrom uses UDP ports 44718 to 44720 for networked games,
where the port number is the player number plus 44717.
diff --git a/games/maelstrom/README b/games/maelstrom/README
index c3e64cfe97b3a..e789b4a453658 100644
--- a/games/maelstrom/README
+++ b/games/maelstrom/README
@@ -9,7 +9,3 @@ deadlier.
This package also comes with a script to create Slackware packages
from the Maelstrom add-on graphics/sound files.
Run 'maelstrom_addon_package.pl --help' for more information.
-
-Note to users of 64-bit and other non-x86 Slackware derivatives: you
-won't be able to host or join multiplayer games that use a server.
-Peer to peer (without the -server argument) multiplayer works OK though.
diff --git a/games/maelstrom/compile_fix.diff b/games/maelstrom/compile_fix.diff
index 6570dee650401..1ce080a5a4431 100644
--- a/games/maelstrom/compile_fix.diff
+++ b/games/maelstrom/compile_fix.diff
@@ -1,6 +1,60 @@
-diff -Naur Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp
---- Maelstrom-3.0.6/screenlib/SDL_FrameBuf.cpp 2001-07-22 17:03:13.000000000 -0400
-+++ Maelstrom-3.0.6.patched/screenlib/SDL_FrameBuf.cpp 2009-04-14 14:15:49.000000000 -0400
+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 ) {
diff --git a/games/maelstrom/maelstrom.SlackBuild b/games/maelstrom/maelstrom.SlackBuild
index a7893840e055e..1339163d76e94 100644
--- a/games/maelstrom/maelstrom.SlackBuild
+++ b/games/maelstrom/maelstrom.SlackBuild
@@ -6,14 +6,15 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
-# Note to 64-bit users: Maelstrom-netd and the -server option to Maelstrom
-# do not work correctly. I haven't investigated why. You can still play
-# networked games in non-server mode (see man page). Users of 32-bit
-# Slackware are not affected by this.
+# 20160730 bkw:
+# - Fix compile with gcc 5 (for Slack 14.2). Also fix some
+# compiler warnings while I'm at it.
+# - Remove warnings about multiplayer not working on 64-bit, it
+# works now.
PRGNAM=maelstrom
VERSION=${VERSION:-3.0.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM=Maelstrom