packages: doomlegacy/doomlegacy-Makefile.patch, doomlegacy/doomlegacy-nocma...

glen glen at pld-linux.org
Thu Jan 20 02:30:48 CET 2011


Author: glen                         Date: Thu Jan 20 01:30:48 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1.44-alpha1, sdl version runs fine!

---- Files affected:
packages/doomlegacy:
   doomlegacy-Makefile.patch (1.7 -> 1.8) , doomlegacy-nocmap.patch (1.2 -> 1.3) , doomlegacy-paths.patch (1.7 -> 1.8) , doomlegacy-sdl.desktop (1.7 -> 1.8) , doomlegacy-vidmodes.patch (1.2 -> 1.3) , doomlegacy-x11.desktop (1.7 -> 1.8) , doomlegacy.spec (1.40 -> 1.41) , i_sound-pow.patch (NONE -> 1.1)  (NEW), keytable.patch (NONE -> 1.1)  (NEW), doomlegacy-c.patch (1.1 -> NONE)  (REMOVED), doomlegacy-errno.patch (1.2 -> NONE)  (REMOVED)

---- Diffs:

================================================================
Index: packages/doomlegacy/doomlegacy-Makefile.patch
diff -u packages/doomlegacy/doomlegacy-Makefile.patch:1.7 packages/doomlegacy/doomlegacy-Makefile.patch:1.8
--- packages/doomlegacy/doomlegacy-Makefile.patch:1.7	Sat May 12 14:14:02 2007
+++ packages/doomlegacy/doomlegacy-Makefile.patch	Thu Jan 20 02:30:42 2011
@@ -1,21 +1,21 @@
---- doomlegacy-1.42/doomlegacy_142_src/linux_x/musserv/Makefile.linux.orig	Sat Feb 22 21:12:31 2003
-+++ doomlegacy-1.42/doomlegacy_142_src/linux_x/musserv/Makefile.linux	Sat Feb 22 21:12:52 2003
+--- 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
 @@ -3,7 +3,7 @@
  #
  
  CC	= gcc
--CFLAGS	= -I. -Wall -O2 -m486
-+CFLAGS = -I. -Wall $(OPTFLAGS)
+-CFLAGS	= -I. -Wall -O2 -march=pentium
++CFLAGS	= -I. -Wall $(OPTFLAGS)
  LDFLAGS	=
  #LDFLAGS	= -static
  
---- doomlegacy-1.42/doomlegacy_142_src/linux_x/sndserv/Makefile.orig	Sat Feb 22 21:11:50 2003
-+++ doomlegacy-1.42/doomlegacy_142_src/linux_x/sndserv/Makefile	Sat Feb 22 21:12:12 2003
-@@ -22,7 +22,7 @@
+--- 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
+@@ -30,7 +30,7 @@
  #
  
  CC=gcc
--CFLAGS=-O2 -m486 -Wall -DNORMALUNIX -DLINUX
+-CFLAGS=-O2 -march=pentium -Wall -DNORMALUNIX -DLINUX
 +CFLAGS=$(OPTFLAGS) -Wall -DNORMALUNIX -DLINUX
  ifdef FREEBSD
  CFLAGS:=${CFLAGS} -DFREEBSD
@@ -54,120 +54,95 @@
 -	gcc -O6 -mpentium -Wall -s convert.c -o convert.exe
 +	$(CC) $(OPTFLAGS) -Wall convert.c -o convert.exe
  	
---- doomlegacy-1.42/doomlegacy_142_src/makefile.orig	2004-04-18 23:02:24.000000000 +0200
-+++ doomlegacy-1.42/doomlegacy_142_src/makefile	2006-10-23 15:55:16.780971750 +0200
-@@ -328,7 +328,7 @@
- 
- 	SFLAGS=
- 
--    CFLAGS=-g
-+    CFLAGS=
- 
- 	OBJS=$(O)/i_video.o $(O)/vid_vesa.o
- 
-@@ -353,8 +353,7 @@
- 
- 	ifdef X
- 
--	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I. -I/usr/X11R6/include
--	    LDFLAGS=-L/usr/X11R6/lib
-+	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I.
- 	    LIBS=-lXext -lX11 -lm -ldl -lXxf86vm
- 	    ifdef WITH_DGA
- 		OPTS += -DWITH_DGA
-@@ -405,8 +404,7 @@
- 
- 	ifdef X
- 
--	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I. -I/usr/X11R6/include
--	    LDFLAGS=-L/usr/X11R6/lib
-+	    OPTS := $(OPTS) -DVID_X11 $(POLL_POINTER) -I.
- 	    LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
- 	    # name of the exefile
- 	    EXENAME=llxdoom
-@@ -490,9 +488,8 @@
- 		 $(O)/r_opengl.o $(O)/ogl_sdl.o $(O)/hwsym_sdl.o
- 
- 	DEBUGLIBS=$(LIBS)
--	OPTS := -DLINUX -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -I/usr/local/include/SDL -I/usr/X11R6/include -Wall
-+	OPTS := -DLINUX -DHWRENDER -DDIRECTFULLSCREEN -DHAVE_MIXER -DSDL -DVID_X11 $(POLL_POINTER) -I. -Wall
- 
--	LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib
- 	LIBS=-lm -lSDL -lSDL_mixer -lpthread -lGL -lGLU
- 	DEBUGLIBS=$(LIBS)
- 
-@@ -545,23 +542,23 @@
- 
- 	# build with profiling information
- 	ifdef PGCC
--		CFLAGS = -g -pg -DPARANOIA -fwritable-strings $(OPTS)
-+		CFLAGS = -g -pg $(OPTFLAGS) -DPARANOIA $(OPTS)
- 	else
--		CFLAGS = -g -pg $(M4) -O3 -ffast-math -fwritable-strings $(OPTS)
-+		CFLAGS = -g -pg $(OPTFLAGS) -ffast-math $(OPTS)
- 	endif
--	LDFLAGS = -g -pg -L/usr/X11R6/lib
-+	LDFLAGS = -g -pg
- else
+--- doomlegacy-1.44/src/Makefile~	2010-09-20 23:40:35.000000000 +0300
++++ doomlegacy-1.44/src/Makefile	2011-01-20 02:59:37.549960763 +0200
+@@ -78,6 +78,7 @@
+ 
+ # gcc or g++
+ CC=gcc
++CXX=g++
  
+ # End of User tunable settings
  
- 	# build a normal optimised version
- 	ifdef PGCC
--		CFLAGS = $(OPTS) $(M5) -O6 -ffast-math -fomit-frame-pointer -fwritable-strings
-+		CFLAGS = $(OPTS) $(OPTFLAGS) -ffast-math
- 		# -fgcse -fcse-follow-jumps -fcse-skip-blocks -frerun-cse-after-loop -ffunction-cse \
- 		# -fexpensive-optimizations -fforce-mem -fstrength-reduce -fthread-jumps  \
- 		# -fregmove -fschedule-insns -fschedule-insns2 -fmove-all-movables \
- 		# -fcaller-saves -finline-functions -mieee-fp -mfp-ret-in-387 -m80387 -mhard-float -finline
- 	else
--		CFLAGS = $(M4) -O3 -ffast-math -fomit-frame-pointer -fwritable-strings $(OPTS)
-+		CFLAGS = $(OPTFLAGS) -ffast-math $(OPTS)
- 	endif
+@@ -147,8 +148,7 @@
+   X=1
+ 
+   ifdef X
+-    OPTS := $(OPTS) $(POLL_POINTER) -I. -I/usr/X11R6/include
+-    LDFLAGS=-L/usr/X11R6/lib
++    OPTS := $(OPTS) $(POLL_POINTER) -I.
+     LIBS=-lXext -lX11 -lm -ldl -lXxf86vm
+ 
+     #WITH_DGA=1
+@@ -202,8 +202,7 @@
+   endif
+ 
+   ifdef X
+-    OPTS := $(OPTS) $(POLL_POINTER) -I. -I/usr/X11R6/include
+-    LDFLAGS=-L/usr/X11R6/lib
++    OPTS := $(OPTS) $(POLL_POINTER) -I.
+     LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
+     # name of the exefile
+     EXENAME=llxdoom
+@@ -213,7 +212,7 @@
+       $(O)/hw_md2.o $(O)/hw_cache.o $(O)/hw_trick.o
+ 
+   else #ifdef X
+-    OPTS := $(OPTS) -DVID_GGI -I. -I/usr/local/include
++    OPTS := $(OPTS) -DVID_GGI -I.
+     LDFLAGS=
+     LIBS=-lggi -lm -lipx
+     # name of the exefile
+@@ -294,7 +293,7 @@
+ 
+ ifdef PROFILEMODE
+ # build with gprof profiling information
+-  CFLAGS += -g -pg -fomit-frame-pointer
++  CFLAGS += -g -pg
+ else
+ ifdef DEBUG
+ # No -fomit-frame-pointer because debugging on some machines depends upon it.
+@@ -303,7 +302,7 @@
+ else
+ # build a normal optimized version
+   #CFLAGS += -O3
+-  CFLAGS += $(OPTLEV) -fomit-frame-pointer
++  CFLAGS += $(OPTLEV)
  endif
+ endif
+ 
+@@ -464,13 +463,13 @@
+ 
+ 
+ $(BIN)/wadtool: $(O)/wadtool.o $(O)/md5_cpp.o
+-	g++ $(LDFLAGS) $^ -o $@
++	$(CXX) $(LDFLAGS) $^ -o $@
+ 
+ $(O)/wadtool.o: common/tools/wadtool.cpp
+-	g++ $(CFLAGS) -std=c++0x -c $< -o $@
++	$(CXX) $(CFLAGS) -std=c++0x -c $< -o $@
  
-@@ -735,7 +732,7 @@
+ $(O)/md5_cpp.o: md5.c
+-	g++ $(CFLAGS) -std=c++0x -c $< -o $@
++	$(CXX) $(CFLAGS) -std=c++0x -c $< -o $@
+ 
+ wad	: $(BIN)/wadtool
+ ifdef WAD
+@@ -507,7 +506,7 @@
  
  #dll
  dll : $(O)/r_opengl.o $(O)/ogl_x11.o
--	$(CC) $(M5) -O6 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
+-	$(CC) -O3 -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lGL -lGLU -lm
 +	$(CC) $(OPTFLAGS) -o $(BIN)/r_opengl.so -shared -nostartfiles $(O)/r_opengl.o $(O)/ogl_x11.o -lX11 -lXext -lGL -lGLU -lm
  
  musserv:
  	@mkdir -p $(MUSSERV)/linux
-@@ -749,12 +746,12 @@
- 
- ifdef LINUX
- $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
--	$(CC) $(M5) -O6 -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
-+	$(CC) $(OPTFLAGS) -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -c hardware/r_opengl/r_opengl.c
- endif
- 
- ifdef SDL
- $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
--	$(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
-+	$(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -c $< -o $@
- endif
+@@ -533,7 +532,7 @@
  
- ifdef FREEBSD
-@@ -763,7 +760,7 @@
- 	$(CC) $(CFLAGS) $(LDFLAGS) $(WFLAGS) -I/usr/X11R6/include -c $< -o $@
- else  #FBSD_SDL
- $(O)/r_opengl.o:	hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h
--	$(CC) $(M5) -O6 -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/r_opengl.c
-+	$(CC) $(OPTFLAGS) -o $(O)/r_opengl.o	-DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -c hardware/r_opengl/r_opengl.c
- endif #FBSD_SDL
- endif #FREEBSD
- 
-@@ -774,10 +771,10 @@
  
- ifndef FREEBSD
  $(O)/ogl_x11.o:  hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
--	$(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
-+	$(CC) $(OPTFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX $(POLL_POINTER) -shared -nostartfiles -c hardware/r_opengl/ogl_x11.c
- else
- $(O)/ogl_x11.o:  hardware/r_opengl/ogl_x11.c hardware/r_opengl/r_opengl.h
--	$(CC) $(M5) -O6 -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -I/usr/X11R6/include -c hardware/r_opengl/ogl_x11.c
-+	$(CC) $(OPTFLAGS) -o $(O)/ogl_x11.o -DHWRENDER -DVID_X11 -DLINUX -DFREEBSD $(POLL_POINTER) -shared -nostartfiles -c hardware/r_opengl/ogl_x11.c
- endif
+-	$(CC) $(CFLAGS) -shared -nostartfiles -I/usr/X11R6/include -c $< -o $@ 
++	$(CC) $(CFLAGS) -shared -nostartfiles -c $< -o $@ 
  
  
+ #=======================================================

================================================================
Index: packages/doomlegacy/doomlegacy-nocmap.patch
diff -u packages/doomlegacy/doomlegacy-nocmap.patch:1.2 packages/doomlegacy/doomlegacy-nocmap.patch:1.3
--- packages/doomlegacy/doomlegacy-nocmap.patch:1.2	Sat Oct 30 00:06:51 2004
+++ packages/doomlegacy/doomlegacy-nocmap.patch	Thu Jan 20 02:30:42 2011
@@ -1,11 +1,11 @@
---- doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c.orig	Fri Mar  7 22:22:56 2003
-+++ doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c	Fri Mar  7 22:51:25 2003
-@@ -1619,14 +1619,14 @@
+--- doomlegacy-1.44/src/linux_x/i_video_xshm.c~	2011-01-20 03:01:17.000000000 +0200
++++ doomlegacy-1.44/src/linux_x/i_video_xshm.c	2011-01-20 03:02:46.595584187 +0200
+@@ -1626,14 +1626,14 @@
      if(rendermode==render_soft) {
      // setup attributes for main window
      if (vidmode_active) {
--       attribmask = CWColormap | CWSaveUnder | CWBackingStore | 
-+       attribmask = CWSaveUnder | CWBackingStore | 
+-       attribmask = CWColormap | CWSaveUnder | CWBackingStore |
++       attribmask = CWSaveUnder | CWBackingStore |
            CWEventMask | CWOverrideRedirect;
  
         attribs.override_redirect = True;
@@ -17,14 +17,15 @@
  
      attribs.event_mask = KeyPressMask | KeyReleaseMask
  #ifndef POLL_POINTER
-@@ -1634,7 +1634,10 @@
+@@ -1641,7 +1641,10 @@
  #endif
         | ExposureMask | StructureNotifyMask;
-     
-+    if( x_pseudo ) {
-+    attribmask |= CWColormap;
-     attribs.colormap = X_cmap;
+ 
+-    attribs.colormap = X_cmap;
++    if (x_pseudo) {
++        attribmask |= CWColormap;
++        attribs.colormap = X_cmap;
 +    }
      attribs.border_pixel = 0;
-     
+ 
      // create the main window

================================================================
Index: packages/doomlegacy/doomlegacy-paths.patch
diff -u packages/doomlegacy/doomlegacy-paths.patch:1.7 packages/doomlegacy/doomlegacy-paths.patch:1.8
--- packages/doomlegacy/doomlegacy-paths.patch:1.7	Thu Jan 20 00:47:17 2011
+++ packages/doomlegacy/doomlegacy-paths.patch	Thu Jan 20 02:30:42 2011
@@ -63,22 +63,18 @@
  
  	/* get PATH, if not set just return filename, might be in cwd */
          /* added "./" for current path 19990416 by Kin */
---- doomlegacy_142_src/d_main.c.orig	Sat Feb 22 20:47:20 2003
-+++ doomlegacy_142_src/d_main.c	Sat Feb 22 20:48:10 2003
-@@ -1022,16 +1022,8 @@
-     // change to the directory where 'legacy.dat' is found
-     I_LocateWad();
- #endif
--    doomwaddir = getenv("DOOMWADDIR");
--    if (!doomwaddir)
--    {
+--- 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 @@
+     char *doomwaddir = getenv("DOOMWADDIR");
+     if (!doomwaddir)
+     {
 -        // get the current directory (possible problem on NT with "." as current dir)
 -        if (getcwd(pathtemp, _MAX_PATH) != NULL)
 -            doomwaddir = pathtemp;
 -        else
 -            doomwaddir = ".";
--    }
-+    doomwaddir = getenv("DOOMWADDIR") ? getenv("DOOMWADDIR") : "/usr/share/doomlegacy";
- 
- #ifdef __MACOS__
-     // cwd is always "/" when app is dbl-clicked
++        doomwaddir = "/usr/share/doomlegacy";
+     }
+ #if 0
+ //[WDJ] disabled in 143beta_macosx

================================================================
Index: packages/doomlegacy/doomlegacy-sdl.desktop
diff -u packages/doomlegacy/doomlegacy-sdl.desktop:1.7 packages/doomlegacy/doomlegacy-sdl.desktop:1.8
--- packages/doomlegacy/doomlegacy-sdl.desktop:1.7	Wed Dec 26 14:39:35 2007
+++ packages/doomlegacy/doomlegacy-sdl.desktop	Thu Jan 20 02:30:42 2011
@@ -2,9 +2,9 @@
 Name=SDLdoom
 Comment=Doom - SDL version
 Comment[pl]=Doom - wersja SDL
-Exec=lsdldoom
+Exec=doomlegacy
 Icon=doomlegacy
 Terminal=false
 Type=Application
-Categories=Game;ActionGame;
+Categories=Game;ActionGame;FirstPersonGame;
 # vi: encoding=utf-8

================================================================
Index: packages/doomlegacy/doomlegacy-vidmodes.patch
diff -u packages/doomlegacy/doomlegacy-vidmodes.patch:1.2 packages/doomlegacy/doomlegacy-vidmodes.patch:1.3
--- packages/doomlegacy/doomlegacy-vidmodes.patch:1.2	Sat Oct 30 00:06:51 2004
+++ packages/doomlegacy/doomlegacy-vidmodes.patch	Thu Jan 20 02:30:42 2011
@@ -1,12 +1,10 @@
---- doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c~	Fri Mar 14 03:11:35 2003
-+++ doomlegacy-1.40/doomlegacy_142_src/linux_x/i_video_xshm.c	Fri Mar 14 03:11:35 2003
-@@ -182,7 +182,9 @@
- // resolution threshold for hires mode
+--- doomlegacy-1.44/src/linux_x/i_video_xshm.c~	2011-01-20 03:03:44.000000000 +0200
++++ doomlegacy-1.44/src/linux_x/i_video_xshm.c	2011-01-20 03:04:33.983926739 +0200
+@@ -189,6 +189,8 @@
  #define HIRES_HORIZ (640)
  #define HIRES_VERT  (400)
-- 
-+
-+#define MAX_NUM_VIDMODES (100) 
+ 
++#define MAX_NUM_VIDMODES (100)
 +
  static boolean haveVoodoo = false;
  
@@ -22,16 +20,16 @@
  
  // added for 1.27 19990220 by Kin
  rendermode_t    rendermode=render_soft;
-@@ -283,7 +285,8 @@
+@@ -291,7 +293,8 @@
     if(vidmode_ext) {
         // get fullscreen modes
         XF86VidModeGetAllModeLines(X_display, X_screen, &num_fullvidmodes, &vidmodes);
 -       num_vidmodes = num_fullvidmodes;
 +       num_vidmodes = (num_fullvidmodes > MAX_NUM_VIDMODES)
 +                        ? MAX_NUM_VIDMODES : num_fullvidmodes;
-        
+ 
         // initialize mapping
-        for(i=0; i<num_vidmodes; i++) 
+        for(i=0; i<num_vidmodes; i++)
 @@ -1824,7 +1827,8 @@
      if(haveVoodoo) // nothing to do
          return;

================================================================
Index: packages/doomlegacy/doomlegacy-x11.desktop
diff -u packages/doomlegacy/doomlegacy-x11.desktop:1.7 packages/doomlegacy/doomlegacy-x11.desktop:1.8
--- packages/doomlegacy/doomlegacy-x11.desktop:1.7	Wed Dec 26 14:39:35 2007
+++ packages/doomlegacy/doomlegacy-x11.desktop	Thu Jan 20 02:30:42 2011
@@ -6,5 +6,5 @@
 Icon=doomlegacy
 Terminal=false
 Type=Application
-Categories=Game;ActionGame;
+Categories=Game;ActionGame;FirstPersonGame;
 # vi: encoding=utf-8

================================================================
Index: packages/doomlegacy/doomlegacy.spec
diff -u packages/doomlegacy/doomlegacy.spec:1.40 packages/doomlegacy/doomlegacy.spec:1.41
--- packages/doomlegacy/doomlegacy.spec:1.40	Thu Jan 20 00:45:31 2011
+++ packages/doomlegacy/doomlegacy.spec	Thu Jan 20 02:30:42 2011
@@ -1,17 +1,24 @@
 # $Revision$, $Date$
+# TODO: 64bit version (review our patches too!)
+#
+# Conditional build:
+%bcond_with		x11	# build with System Media Interface (broken, seems unsupported)
+%bcond_without	sdl	# build with SDL System Media Interface
+
 Summary:	DOOM Legacy for Linux
 Summary(pl.UTF-8):	DOOM Legacy dla Linuksa
 Name:		doomlegacy
-Version:	1.42
-Release:	2
+Version:	1.44
+Release:	0.alpha1.5
 License:	GPL, perhaps except for doom3.wad
 Group:		Applications/Games
-Source0:	http://dl.sourceforge.net/doomlegacy/legacy_142_src.tar.gz
-# Source0-md5:	62f5cdad464463038d568a53b13c22f7
+Source0:	http://doomlegacy.sourceforge.net/releases/%{name}_144_alpha1_src_r752.zip
+# Source0-md5:	e1cc5039872dc70e506cd427a9015080
 Source1:	http://downloads.sourceforge.net/doomlegacy/doom3_wad_132.zip
 # Source1-md5:	3d737bb577bc4295af68d54988191344
-Source2:	http://ep09.pld-linux.org/~havner/legacy.dat
-# Source2-md5:	df5cac5c3d37849ceb432cbff4df2415
+# legacy wad extracted from binary archive: doomlegacy_144_alpha1_linux2.4_32bit.zip
+Source2:	http://carme.pld-linux.org/~glen/legacy.wad
+# Source2-md5:	2c29a4d7cedcf95d09dec71c41025aa5
 Source4:	%{name}-x11.desktop
 Source5:	%{name}-sdl.desktop
 Source6:	%{name}.png
@@ -19,13 +26,13 @@
 Patch1:		%{name}-Makefile.patch
 Patch2:		%{name}-nosndstat.patch
 Patch3:		%{name}-sound.patch
-Patch4:		%{name}-errno.patch
 Patch5:		%{name}-nocmap.patch
 Patch6:		%{name}-vidmodes.patch
-Patch7:		%{name}-c.patch
+Patch7:		i_sound-pow.patch
+Patch8:		keytable.patch
 URL:		http://doomlegacy.sourceforge.net/
 BuildRequires:	OpenGL-GLU-devel
-BuildRequires:	SDL_mixer-devel
+%{?with_sdl:BuildRequires:	SDL_mixer-devel}
 BuildRequires:	nasm
 BuildRequires:	rpmbuild(macros) >= 1.595
 BuildRequires:	unzip
@@ -33,7 +40,7 @@
 ExclusiveArch:	%{ix86}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		debugcflags	-O1 -g
+%define		debugcflags		-O1 -g
 %define		_noautoreqdep	libGL.so.1 libGLU.so.1
 
 %description
@@ -57,6 +64,7 @@
 Summary:	DOOM Legacy for Linux - X Window and OpenGL version
 Summary(pl.UTF-8):	DOOM Legacy dla Linuksa - wersja korzystająca z X Window i OpenGL
 Group:		X11/Applications/Games
+Requires:	%{name}-common = %{version}-%{release}
 Obsoletes:	doomlegacy-x11
 
 %description X11
@@ -70,6 +78,7 @@
 Summary:	DOOM Legacy for Linux - SDL version
 Summary(pl.UTF-8):	DOOM Legacy dla Linuksa - wersja korzystająca z SDL
 Group:		X11/Applications/Games
+Requires:	%{name}-common = %{version}-%{release}
 
 %description sdl
 This is DOOM Legacy for Linux - SDL version.
@@ -79,25 +88,21 @@
 
 %prep
 %setup -qc -a1
-mv doomlegacy_142_src src
+mv trunk src
 cd src
 %patch0 -p1
 %patch1 -p2
 %patch2 -p1
 %patch3 -p1
-%patch4 -p2
 %patch5 -p2
 %patch6 -p2
 %patch7 -p2
+%patch8 -p2
 
 %build
-install -d objs bin
+install -d objs bin src/linux_x/{mus,snd}serv/linux
 cd src
 
-# linux_x contains some precompiled binary objects (incompatible with glibc 2.3) - kill them
-%{__make} clean \
-	LINUX=1
-
 # build musserv/sndserv first. with our flags
 %{__make} -C linux_x/musserv -f Makefile.linux \
 	CC="%{__cc}" \
@@ -111,40 +116,43 @@
 	LDFLAGS="%{rpmldflags}"
 install -p linux_x/sndserv/linux/llsndserv ../bin
 
-# build llxdoom
-%{__make} \
-	PGCC=1 \
-	LINUX=1 \
+%if %{with sdl}
+%{__make} -j1 \
+	SMIF=SDL \
 	CC="%{__cc}" \
+	LDFLAGS="%{rpmldflags}"
 	OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+%endif
 
-%{__make} clean \
-	LINUX=1
-
-# build lsdldoom
+%if %{with x11}
+%{__make} clean
 %{__make} \
-	PGCC=1 \
-	LINUX=1 \
-	SDL=1 \
+	SMIF=LINUX_X11 \
 	CC="%{__cc}" \
+	LDFLAGS="%{rpmldflags}"
 	OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/doomlegacy,%{_datadir}/doomlegacy} \
 	$RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
 
-install -p bin/llxdoom	$RPM_BUILD_ROOT%{_bindir}
-install -p bin/lsdldoom	$RPM_BUILD_ROOT%{_bindir}
 install -p bin/llsndserv $RPM_BUILD_ROOT%{_libdir}/doomlegacy
 install -p bin/musserver $RPM_BUILD_ROOT%{_libdir}/doomlegacy
-install -p bin/r_opengl.so	$RPM_BUILD_ROOT%{_libdir}/doomlegacy
-
-cp -p doom3.wad	$RPM_BUILD_ROOT%{_datadir}/doomlegacy
-cp -p %{SOURCE2}	$RPM_BUILD_ROOT%{_datadir}/doomlegacy
 
+%if %{with x11}
+install -p bin/llxdoom	$RPM_BUILD_ROOT%{_bindir}
+install -p bin/r_opengl.so	$RPM_BUILD_ROOT%{_libdir}/doomlegacy
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
+%endif
+%if %{with sdl}
+install -p bin/doomlegacy $RPM_BUILD_ROOT%{_bindir}
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
+%endif
+
+cp -p doom3.wad	$RPM_BUILD_ROOT%{_datadir}/doomlegacy
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/doomlegacy/legacy.wad
 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
 
 %clean
@@ -164,18 +172,22 @@
 %dir %{_libdir}/doomlegacy
 %attr(755,root,root) %{_libdir}/doomlegacy/*serv*
 %{_datadir}/doomlegacy
-%{_pixmapsdir}/*
+%{_pixmapsdir}/*.png
 
+%if %{with x11}
 %files X11
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/llxdoom
 %attr(755,root,root) %{_libdir}/doomlegacy/r_opengl.so
 %{_desktopdir}/*x11.desktop
+%endif
 
+%if %{with sdl}
 %files sdl
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/lsdldoom
+%attr(755,root,root) %{_bindir}/doomlegacy
 %{_desktopdir}/*sdl.desktop
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -183,6 +195,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.41  2011/01/20 01:30:42  glen
+- up to 1.44-alpha1, sdl version runs fine!
+
 Revision 1.40  2011/01/19 23:45:31  glen
 - fix md5
 

================================================================
Index: packages/doomlegacy/i_sound-pow.patch
diff -u /dev/null packages/doomlegacy/i_sound-pow.patch:1.1
--- /dev/null	Thu Jan 20 02:30:48 2011
+++ packages/doomlegacy/i_sound-pow.patch	Thu Jan 20 02:30:42 2011
@@ -0,0 +1,13 @@
+i_sound.c needs -lm for pow()
+
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-Makefile.patch?r1=1.7&r2=1.8&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-nocmap.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-paths.patch?r1=1.7&r2=1.8&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-sdl.desktop?r1=1.7&r2=1.8&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-vidmodes.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy-x11.desktop?r1=1.7&r2=1.8&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/doomlegacy/doomlegacy.spec?r1=1.40&r2=1.41&f=u



More information about the pld-cvs-commit mailing list