[packages/doomlegacy] Rel 5
arekm
arekm at pld-linux.org
Thu May 21 15:15:19 CEST 2026
commit 28b430dbe62faf4b04853d6004965c69b35fc1fb
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu May 21 15:15:01 2026 +0200
Rel 5
doomlegacy-Makefile.patch | 32 +++++++++---------
doomlegacy-extern.patch | 71 ++++++++++++++++++++++++++++++++++++++++
doomlegacy-paths.patch | 36 ++++++++++----------
doomlegacy-signal-handlers.patch | 17 ++++++++++
doomlegacy-sound.patch | 8 ++---
doomlegacy.spec | 14 +++++---
svnversion.patch | 4 +--
7 files changed, 137 insertions(+), 45 deletions(-)
---
diff --git a/doomlegacy.spec b/doomlegacy.spec
index 965726d..1e7c3d3 100644
--- a/doomlegacy.spec
+++ b/doomlegacy.spec
@@ -3,7 +3,7 @@
%bcond_with x11 # build with System Media Interface (broken, seems unsupported)
%bcond_without sdl # build with SDL System Media Interface
-%define rel 4
+%define rel 5
%define svnrev 817
Summary: DOOM Legacy for Linux
Summary(pl.UTF-8): DOOM Legacy dla Linuksa
@@ -30,6 +30,8 @@ Patch1: %{name}-Makefile.patch
Patch2: %{name}-nosndstat.patch
Patch3: %{name}-sound.patch
Patch4: svnversion.patch
+Patch5: %{name}-signal-handlers.patch
+Patch6: %{name}-extern.patch
URL: http://doomlegacy.sourceforge.net/
BuildRequires: OpenGL-GLU-devel
%{?with_sdl:BuildRequires: SDL_mixer-devel}
@@ -94,6 +96,8 @@ cd src
%patch -P1 -p2
%patch -P2 -p1
%patch -P3 -p1
+%patch -P5 -p1
+%patch -P6 -p1
cd -
%patch -P4 -p1
echo %{svnrev} > src/svnrev.txt
@@ -105,13 +109,13 @@ cd src
# build musserv/sndserv first. with our flags
%{__make} -C linux_x/musserv -f Makefile.linux \
CC="%{__cc}" \
- OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+ OPTFLAGS="%{rpmcflags} %{rpmcppflags} -std=gnu11 %{!?debug:-fomit-frame-pointer}" \
LDFLAGS="%{rpmldflags}"
install -p linux_x/musserv/linux/musserver ../bin
%{__make} -C linux_x/sndserv \
CC="%{__cc}" \
- OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+ OPTFLAGS="%{rpmcflags} %{rpmcppflags} -std=gnu11 %{!?debug:-fomit-frame-pointer}" \
LDFLAGS="%{rpmldflags}"
install -p linux_x/sndserv/linux/llsndserv ../bin
@@ -120,7 +124,7 @@ install -p linux_x/sndserv/linux/llsndserv ../bin
SMIF=SDL \
CC="%{__cc}" \
LDFLAGS="%{rpmldflags}" \
- OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+ OPTFLAGS="%{rpmcflags} %{rpmcppflags} -std=gnu11 %{!?debug:-fomit-frame-pointer}"
%endif
%if %{with x11}
@@ -129,7 +133,7 @@ install -p linux_x/sndserv/linux/llsndserv ../bin
SMIF=LINUX_X11 \
CC="%{__cc}" \
LDFLAGS="%{rpmldflags}" \
- OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+ OPTFLAGS="%{rpmcflags} %{rpmcppflags} -std=gnu11 %{!?debug:-fomit-frame-pointer}"
%endif
%install
diff --git a/doomlegacy-Makefile.patch b/doomlegacy-Makefile.patch
index ed9e2f4..b347f51 100644
--- a/doomlegacy-Makefile.patch
+++ b/doomlegacy-Makefile.patch
@@ -1,5 +1,5 @@
---- doomlegacy-1.44/src/linux_x/musserv/Makefile.linux~ 2009-09-24 08:04:44.000000000 +0300
-+++ doomlegacy-1.44/src/linux_x/musserv/Makefile.linux 2011-01-20 02:50:42.858632376 +0200
+--- doomlegacy-1.44/src/linux_x/musserv/Makefile.linux 2009-09-23 23:10:42.000000000 +0200
++++ doomlegacy-1.44/src/linux_x/musserv/Makefile.linux 2026-05-21 01:14:50.232885686 +0200
@@ -3,7 +3,7 @@
#
@@ -9,8 +9,8 @@
LDFLAGS =
#LDFLAGS = -static
---- doomlegacy-1.44/src/linux_x/sndserv/Makefile~ 2009-09-24 08:04:44.000000000 +0300
-+++ doomlegacy-1.44/src/linux_x/sndserv/Makefile 2011-01-20 02:52:40.272020598 +0200
+--- doomlegacy-1.44/src/linux_x/sndserv/Makefile 2009-09-23 23:10:42.000000000 +0200
++++ doomlegacy-1.44/src/linux_x/sndserv/Makefile 2026-05-21 01:14:50.233330085 +0200
@@ -30,7 +30,7 @@
#
@@ -20,8 +20,8 @@
ifdef FREEBSD
CFLAGS:=${CFLAGS} -DFREEBSD
endif
---- doomlegacy-1.42/doomlegacy_142_src/tools/makefile.orig Sat Feb 22 21:13:11 2003
-+++ doomlegacy-1.42/doomlegacy_142_src/tools/makefile Sat Feb 22 21:14:30 2003
+--- doomlegacy-1.44/src/tools/makefile 2009-09-23 23:10:42.000000000 +0200
++++ doomlegacy-1.44/src/tools/makefile 2026-05-21 01:14:50.233466235 +0200
@@ -1,24 +1,24 @@
default: dircomp2.c
@@ -54,8 +54,8 @@
- gcc -O6 -mpentium -Wall -s convert.c -o convert.exe
+ $(CC) $(OPTFLAGS) -Wall convert.c -o convert.exe
---- doomlegacy-1.44/src/Makefile~ 2011-03-13 22:41:25.000000000 +0200
-+++ doomlegacy-1.44/src/Makefile 2011-03-13 22:41:56.523480247 +0200
+--- doomlegacy-1.44/src/Makefile 2011-03-13 02:52:15.000000000 +0100
++++ doomlegacy-1.44/src/Makefile 2026-05-21 01:14:50.233659705 +0200
@@ -57,6 +57,9 @@
OPTLEV = -O3
#OPTLEV = -O5
@@ -74,7 +74,7 @@
# End of User tunable settings
-@@ -157,8 +157,7 @@
+@@ -153,8 +157,7 @@
X=1
ifdef X
@@ -84,7 +84,7 @@
LIBS=-lGL -lGLU -lXext -lX11 -lm -ldl -lXxf86vm
#WITH_DGA=1
-@@ -202,8 +205,7 @@
+@@ -209,8 +212,7 @@
endif
ifdef X
@@ -94,7 +94,7 @@
LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
# name of the exefile
EXENAME=llxdoom
-@@ -213,7 +215,7 @@
+@@ -220,7 +222,7 @@
$(O)/hw_md2.o $(O)/hw_cache.o $(O)/hw_trick.o
else #ifdef X
@@ -103,7 +103,7 @@
LDFLAGS=
LIBS=-lggi -lm -lipx
# name of the exefile
-@@ -294,7 +296,7 @@
+@@ -301,7 +303,7 @@
ifdef PROFILEMODE
# build with gprof profiling information
@@ -112,7 +112,7 @@
else
ifdef DEBUG
# No -fomit-frame-pointer because debugging on some machines depends upon it.
-@@ -303,7 +305,7 @@
+@@ -310,7 +312,7 @@
else
# build a normal optimized version
#CFLAGS += -O3
@@ -121,7 +121,7 @@
endif
endif
-@@ -464,13 +466,13 @@
+@@ -471,13 +473,13 @@
$(BIN)/wadtool: $(O)/wadtool.o $(O)/md5_cpp.o
@@ -138,7 +138,7 @@
wad : $(BIN)/wadtool
ifdef WAD
-@@ -507,7 +509,7 @@
+@@ -514,7 +516,7 @@
#dll
dll : $(O)/r_opengl.o $(O)/ogl_x11.o
@@ -147,7 +147,7 @@
musserv:
@mkdir -p $(MUSSERV)/linux
-@@ -533,7 +535,7 @@
+@@ -540,7 +542,7 @@
$(O)/ogl_x11.o: hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
diff --git a/doomlegacy-extern.patch b/doomlegacy-extern.patch
new file mode 100644
index 0000000..adce71d
--- /dev/null
+++ b/doomlegacy-extern.patch
@@ -0,0 +1,71 @@
+Fix multiple-definition errors caused by GCC 10+ defaulting to -fno-common.
+Several variables had tentative file-scope definitions either duplicated
+across translation units or placed in headers, which only linked under the
+pre-GCC-10 common-symbol behavior. Convert header decls to extern, drop
+duplicates in g_game.c that re-declared d_main.c globals, and make
+renderer-local clipping arrays static (each renderer keeps its own copy
+instead of accidentally sharing one via the common pool).
+
+--- doomlegacy_144_alpha2_src/w_wad.h.orig
++++ doomlegacy_144_alpha2_src/w_wad.h
+@@ -81,7 +81,7 @@
+
+
+ // [WDJ] Indicates cache miss, new lump read requires endian fixing.
+-boolean lump_read;
++extern boolean lump_read;
+
+ // ==============================================================
+ // WAD FILE STRUCTURE DEFINITIONS
+--- doomlegacy_144_alpha2_src/p_local.h.orig
++++ doomlegacy_144_alpha2_src/p_local.h
+@@ -174,7 +174,7 @@
+ typedef enum {
+ VM_vanilla, VM_multispawn, VM_target, VM_auto
+ } voodoo_mode_e;
+-voodoo_mode_e voodoo_mode;
++extern voodoo_mode_e voodoo_mode;
+ extern player_t * spechit_player; // last player to trigger switch or linedef
+ #endif
+
+--- doomlegacy_144_alpha2_src/g_game.c.orig
++++ doomlegacy_144_alpha2_src/g_game.c
+@@ -306,9 +306,9 @@
+ wbstartstruct_t wminfo; // parms for world map / intermission
+
+
+-// Background color fades for FS
+-unsigned long fadecolor;
+-int fadealpha;
++// Background color fades for FS (defined in d_main.c)
++extern unsigned long fadecolor;
++extern int fadealpha;
+
+
+ void ShowMessage_OnChange(void);
+--- doomlegacy_144_alpha2_src/r_bsp.c.orig
++++ doomlegacy_144_alpha2_src/r_bsp.c
+@@ -179,8 +179,8 @@
+ #define MAXSEGS MAXVIDWIDTH/2+1
+
+ // newend is one past the last valid seg
+-cliprange_t* newend;
+-cliprange_t solidsegs[MAXSEGS];
++static cliprange_t* newend;
++static cliprange_t solidsegs[MAXSEGS];
+
+
+ //
+--- doomlegacy_144_alpha2_src/hardware/hw_main.c.orig
++++ doomlegacy_144_alpha2_src/hardware/hw_main.c
+@@ -1850,8 +1850,8 @@
+ #define MAXSEGS MAXVIDWIDTH/2+1
+
+ // newend is one past the last valid seg
+-cliprange_t *newend;
+-cliprange_t gr_solidsegs[MAXSEGS];
++static cliprange_t *newend;
++static cliprange_t gr_solidsegs[MAXSEGS];
+
+ void printsolidsegs(void)
+ {
diff --git a/doomlegacy-paths.patch b/doomlegacy-paths.patch
index 4afcd92..595287e 100644
--- a/doomlegacy-paths.patch
+++ b/doomlegacy-paths.patch
@@ -1,6 +1,6 @@
---- doomlegacy_142_src/linux_x/musserv/musserver.c.orig Sat Feb 22 20:51:24 2003
-+++ doomlegacy_142_src/linux_x/musserv/musserver.c Sat Feb 22 20:52:15 2003
-@@ -122,9 +122,7 @@
+--- doomlegacy_144_alpha2_src/linux_x/musserv/musserver.c 2010-01-19 22:03:38.000000000 +0100
++++ doomlegacy_144_alpha2_src/linux_x/musserv/musserver.c 2026-05-21 01:13:25.659874387 +0200
+@@ -124,9 +124,7 @@
ppid = getpid();
if (verbose > 1)
printf("pid %d %s\n", ppid, pproc);
@@ -11,9 +11,9 @@
while ((x = getopt(argc, argv, "acd:fhi:lmt:u:Vv")) != -1)
switch (x)
---- doomlegacy_142_src/linux_x/musserv/readwad.c.orig Sat Feb 22 20:52:25 2003
-+++ doomlegacy_142_src/linux_x/musserv/readwad.c Sat Feb 22 20:53:03 2003
-@@ -213,7 +213,7 @@
+--- doomlegacy_144_alpha2_src/linux_x/musserv/readwad.c 2010-01-19 22:03:38.000000000 +0100
++++ doomlegacy_144_alpha2_src/linux_x/musserv/readwad.c 2026-05-21 01:13:25.660069785 +0200
+@@ -233,7 +233,7 @@
FILE *fp;
if (!(waddir = getenv("DOOMWADDIR")))
@@ -22,9 +22,9 @@
wadfilename = malloc(2 + strlen(s) + strlen(waddir));
if (*s != '/')
---- doomlegacy_142_src/linux_x/i_video_xshm.c.orig Sat Feb 22 20:45:02 2003
-+++ doomlegacy_142_src/linux_x/i_video_xshm.c Sat Feb 22 20:46:49 2003
-@@ -1984,7 +1984,7 @@
+--- doomlegacy_144_alpha2_src/linux_x/i_video_xshm.c 2011-03-13 02:52:15.000000000 +0100
++++ doomlegacy_144_alpha2_src/linux_x/i_video_xshm.c 2026-05-21 01:13:25.660377330 +0200
+@@ -2073,7 +2073,7 @@
rendermode = render_opengl;
// try to open library in CWD
@@ -32,10 +32,10 @@
+ dlptr = dlopen("/usr/lib/doomlegacy/r_opengl.so",RTLD_NOW | RTLD_GLOBAL);
if(!dlptr) {
- // try to open in LIBPATH
---- doomlegacy_142_src/linux_x/i_system.c.orig Sat Feb 22 20:48:37 2003
-+++ doomlegacy_142_src/linux_x/i_system.c Sat Feb 22 20:50:55 2003
-@@ -141,9 +141,9 @@
+ // try to open in LIBPATH
+--- doomlegacy_144_alpha2_src/linux_x/i_system.c 2011-03-13 02:52:15.000000000 +0100
++++ doomlegacy_144_alpha2_src/linux_x/i_system.c 2026-05-21 01:13:25.660642529 +0200
+@@ -146,9 +146,9 @@
extern int eventtail;
// Locations for searching the legacy.dat
@@ -48,8 +48,8 @@
#define DEFAULTSEARCHPATH2 "/usr/games"
#define WADKEYWORD "legacy.dat"
---- doomlegacy_142_src/linux_x/searchp.c.orig Sat Feb 22 20:53:41 2003
-+++ doomlegacy_142_src/linux_x/searchp.c Sat Feb 22 20:54:22 2003
+--- doomlegacy_144_alpha2_src/linux_x/searchp.c 2009-09-24 01:24:07.000000000 +0200
++++ doomlegacy_144_alpha2_src/linux_x/searchp.c 2026-05-21 01:13:25.660802037 +0200
@@ -22,6 +22,12 @@
static char b[2048];
struct stat s;
@@ -63,9 +63,9 @@
/* get PATH, if not set just return filename, might be in cwd */
/* added "./" for current path 19990416 by Kin */
---- doomlegacy-1.44/d_main.c~ 2010-09-20 23:00:51.000000000 +0300
-+++ doomlegacy-1.44/d_main.c 2011-01-20 02:38:22.202123940 +0200
-@@ -1264,11 +1264,7 @@
+--- doomlegacy_144_alpha2_src/d_main.c 2011-03-13 02:49:17.000000000 +0100
++++ doomlegacy_144_alpha2_src/d_main.c 2026-05-21 01:13:25.660996546 +0200
+@@ -1303,11 +1303,7 @@
char *doomwaddir = getenv("DOOMWADDIR");
if (!doomwaddir)
{
diff --git a/doomlegacy-signal-handlers.patch b/doomlegacy-signal-handlers.patch
new file mode 100644
index 0000000..56681de
--- /dev/null
+++ b/doomlegacy-signal-handlers.patch
@@ -0,0 +1,17 @@
+--- doomlegacy_144_alpha2_src/linux_x/musserv/playmus.c 2009-09-24 01:24:07.000000000 +0200
++++ doomlegacy_144_alpha2_src/linux_x/musserv/playmus.c 2026-05-21 01:16:29.722393965 +0200
+@@ -76,12 +76,12 @@
+ "D_E3M4", "D_E3M5", "D_E3M6", "D_E3M7", "D_E3M8", "D_E3M9", "D_INTROA",
+ "D_INTRO", "D_INTER", "D_VICTOR", "D_BUNNY" };
+
+-void quitmus()
++void quitmus(int sig)
+ {
+ returnval = TERMINATED;
+ }
+
+-void do_nothing()
++void do_nothing(int sig)
+ {
+ signal(SIGHUP, do_nothing);
+ }
diff --git a/doomlegacy-sound.patch b/doomlegacy-sound.patch
index 588b1be..c6e4ab9 100644
--- a/doomlegacy-sound.patch
+++ b/doomlegacy-sound.patch
@@ -1,6 +1,6 @@
---- doomlegacy_142_src/linux_x/i_sound.c.orig Sun Feb 23 01:03:54 2003
-+++ doomlegacy_142_src/linux_x/i_sound.c Sun Feb 23 01:19:30 2003
-@@ -880,7 +880,7 @@
+--- doomlegacy_144_alpha2_src/linux_x/i_sound.c 2009-09-24 01:24:07.000000000 +0200
++++ doomlegacy_144_alpha2_src/linux_x/i_sound.c 2026-05-21 01:14:58.911754292 +0200
+@@ -882,7 +882,7 @@
if (nosound)
return;
@@ -9,7 +9,7 @@
// start sound process
if (!access(fn_snd, X_OK))
-@@ -1004,7 +1004,7 @@
+@@ -1006,7 +1006,7 @@
return;
#ifdef MUSSERV
diff --git a/svnversion.patch b/svnversion.patch
index a620eee..22fe9c6 100644
--- a/svnversion.patch
+++ b/svnversion.patch
@@ -1,5 +1,5 @@
---- doomlegacy-1.44/src/Makefile 2011-03-13 23:16:45.655640054 +0200
-+++ doomlegacy-1.44/src/Makefile 2011-03-13 23:14:40.039898572 +0200
+--- doomlegacy-1.44/src/Makefile 2026-05-21 01:15:26.282057945 +0200
++++ doomlegacy-1.44/src/Makefile 2026-05-21 01:15:26.284275509 +0200
@@ -41,11 +41,6 @@
# SDL Mixer, to get music
HAVE_MIXER=1
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/doomlegacy.git/commitdiff/28b430dbe62faf4b04853d6004965c69b35fc1fb
More information about the pld-cvs-commit
mailing list