[packages/abuse_sdl] Rel 5
arekm
arekm at pld-linux.org
Fri May 8 13:48:53 CEST 2026
commit e1581c62d9ca0880ee0be0347a9b72a5dbf79217
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri May 8 13:19:32 2026 +0200
Rel 5
abuse_sdl-macs-cxx.patch | 110 +++++++++++++++++++++++++++++++++++++++++++++++
abuse_sdl.spec | 4 +-
2 files changed, 113 insertions(+), 1 deletion(-)
---
diff --git a/abuse_sdl.spec b/abuse_sdl.spec
index 54ffdeb..574ac4c 100644
--- a/abuse_sdl.spec
+++ b/abuse_sdl.spec
@@ -2,7 +2,7 @@ Summary: An SDL port of the game Abuse
Summary(pl.UTF-8): Port SDL gry Abuse
Name: abuse_sdl
Version: 0.7.0
-Release: 4
+Release: 5
License: GPL v2
Group: X11/Applications/Games
#Source0Download: http://www.labyrinth.net.au/~trandor/abuse/
@@ -12,6 +12,7 @@ Source1: http://www.labyrinth.net.au/~trandor/abuse/files/abuse_datafiles.tar.gz
# Source1-md5: 2b857668849b2dc7cd29cdd84a33c19e
Source2: %{name}.desktop
Patch0: %{name}-etc_dir.patch
+Patch1: %{name}-macs-cxx.patch
URL: http://www.labyrinth.net.au/~trandor/abuse/
BuildRequires: SDL-devel >= 1.1.6
BuildRequires: autoconf
@@ -34,6 +35,7 @@ ekranie, ma dźwięk stereo z panningiem.
%prep
%setup -q -a 1
%patch -P0 -p1
+%patch -P1 -p0
%build
sed -i -e "s:/usr/local/share/games/abuse:%{_abusedir}:" src/sdlport/setup.cpp
diff --git a/abuse_sdl-macs-cxx.patch b/abuse_sdl-macs-cxx.patch
new file mode 100644
index 0000000..4b5c8ed
--- /dev/null
+++ b/abuse_sdl-macs-cxx.patch
@@ -0,0 +1,110 @@
+--- src/imlib/include/macs.hpp 2026-05-08 12:48:15.948930580 +0200
++++ src/imlib/include/macs.hpp 2026-05-08 12:48:25.549969550 +0200
+@@ -16,12 +16,19 @@
+ #endif
+
+
++#ifndef __cplusplus
+ #ifndef min
+ #define min(x,y) (x<y ? x:y)
+ #endif
+ #ifndef max
+ #define max(x,y) (x>y ? x:y)
+ #endif
++#else
++template<typename A, typename B>
++inline auto min(A a, B b) -> decltype(a < b ? a : b) { return a < b ? a : b; }
++template<typename A, typename B>
++inline auto max(A a, B b) -> decltype(a > b ? a : b) { return a > b ? a : b; }
++#endif
+
+ #define uchar unsigned char
+ #define schar signed char
+--- src/imlib/jmalloc.cpp 2026-05-08 12:48:15.950453739 +0200
++++ src/imlib/jmalloc.cpp 2026-05-08 12:48:25.560302534 +0200
+@@ -758,7 +758,7 @@
+ fprintf(stderr,"Memory available : %d\n",j_available());
+ if (j_available()<min_size)
+ {
+- fprintf(stderr,not_enough_total_memory_message);
++ fprintf(stderr,"%s",not_enough_total_memory_message);
+ exit(0);
+ }
+
+--- src/innet.cpp 2026-05-08 12:48:15.943179499 +0200
++++ src/innet.cpp 2026-05-08 12:48:25.569666089 +0200
+@@ -148,7 +148,7 @@
+ net_server=prot->get_node_address(sn,DEFAULT_COMM_PORT,0);
+ if (!net_server)
+ {
+- dprintf(symbol_str("unable_locate"));
++ dprintf("%s", symbol_str("unable_locate"));
+ exit(0);
+ }
+ dprintf("Server located! Please wait while data loads....\n");
+@@ -400,7 +400,7 @@
+
+ if (reg==2) // too many players
+ {
+- fprintf(stderr,symbol_str("max_players"));
++ fprintf(stderr,"%s",symbol_str("max_players"));
+ delete sock;
+ return 0;
+ }
+@@ -410,14 +410,14 @@
+
+ if (reg && !registered)
+ {
+- fprintf(stderr,symbol_str("net_not_reg"));
++ fprintf(stderr,"%s",symbol_str("net_not_reg"));
+ delete sock;
+ return 0;
+ }
+
+ if (!reg && registered)
+ {
+- fprintf(stderr,symbol_str("server_not_reg"));
++ fprintf(stderr,"%s",symbol_str("server_not_reg"));
+ delete sock;
+ return 0;
+ }
+--- src/cache.cpp 2026-05-08 12:48:15.944866726 +0200
++++ src/cache.cpp 2026-05-08 12:48:25.572069033 +0200
+@@ -36,7 +36,7 @@
+ int crc_manager::write_crc_file(char *filename) // return 0 on failure
+ {
+ char msg[100];
+- sprintf(msg,symbol_str("calc_crc")); // this may take some time, show the user a status indicator
++ sprintf(msg,"%s",symbol_str("calc_crc")); // this may take some time, show the user a status indicator
+ if (stat_man) stat_man->push(msg,NULL);
+
+ int i,total=0;
+--- src/dev.cpp 2026-05-08 12:48:15.947212100 +0200
++++ src/dev.cpp 2026-05-08 12:48:25.579114808 +0200
+@@ -1069,7 +1069,7 @@
+ for (x=0;x<l;x++)
+ the_game->put_bg(rx+x,ry+y,i++);
+ dprintf("%dx%d\n",l,h);
+- } else dprintf(symbol_str("unchop1"));
++ } else dprintf("%s", symbol_str("unchop1"));
+
+ }
+ }
+@@ -1091,7 +1091,7 @@
+ {
+ current_level->set_size(l,w);
+ dprintf("level is now %dx%d\n",l,w);
+- } else dprintf(symbol_str("size1"));
++ } else dprintf("%s", symbol_str("size1"));
+
+
+ }
+@@ -1129,7 +1129,7 @@
+
+ if (!strcmp(fword,"esave"))
+ {
+- dprintf(symbol_str("esave"));
++ dprintf("%s", symbol_str("esave"));
+ save();
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/abuse_sdl.git/commitdiff/e1581c62d9ca0880ee0be0347a9b72a5dbf79217
More information about the pld-cvs-commit
mailing list