This is an automated email from the git hooks/post-receive script. smcv pushed a commit to branch master in repository iortcw.
commit 45e7b1632c9dc10ded149abfb63f59c2a4796613 Author: Simon McVittie <[email protected]> Date: Tue Mar 17 23:54:32 2015 +0000 Copy over some Debian patches from ioquake3 --- .../Allow-use-of-system-minizip-library.patch | 255 +++++++++++++++++++++ ...rash-if-more-than-128-modes-are-available.patch | 102 +++++++++ debian/patches/series | 2 + debian/rules | 2 +- 4 files changed, 360 insertions(+), 1 deletion(-) diff --git a/debian/patches/Allow-use-of-system-minizip-library.patch b/debian/patches/Allow-use-of-system-minizip-library.patch new file mode 100644 index 0000000..1065c34 --- /dev/null +++ b/debian/patches/Allow-use-of-system-minizip-library.patch @@ -0,0 +1,255 @@ +From: Simon McVittie <[email protected]> +Date: Tue, 17 Mar 2015 23:30:34 +0000 +Subject: Allow use of system minizip library + +This is packaged separately in at least Debian and Ubuntu, and packaged +as a zlib subpackage in Fedora. + +This requires moving Q3's copy from code/qcommon into a new directory +so that it isn't necessarily in the -I path; I used code/minizip here. + +Forwarded: https://github.com/ioquake/ioq3/pull/116 +[patch adapted from ioquake3 to iortcw; ioapi.*, unzip.* excluded] +--- + MP/Makefile | 40 ++++++++++++++++++++++++++++++++++------ + MP/code/qcommon/files.c | 3 ++- + SP/Makefile | 40 ++++++++++++++++++++++++++++++++++------ + SP/code/qcommon/files.c | 3 ++- + 4 files changed, 72 insertions(+), 14 deletions(-) + +diff --git a/MP/Makefile b/MP/Makefile +index 56e1eef..627ca74 100644 +--- a/MP/Makefile ++++ b/MP/Makefile +@@ -231,6 +231,10 @@ ifndef USE_INTERNAL_ZLIB + USE_INTERNAL_ZLIB=$(USE_INTERNAL_LIBS) + endif + ++ifndef USE_INTERNAL_MINIZIP ++USE_INTERNAL_MINIZIP=$(USE_INTERNAL_LIBS) ++endif ++ + ifndef USE_INTERNAL_JPEG + USE_INTERNAL_JPEG=$(USE_INTERNAL_LIBS) + endif +@@ -1142,12 +1146,22 @@ endif + + ifeq ($(USE_INTERNAL_ZLIB),1) + ZLIB_CFLAGS = -DNO_GZIP -I$(ZDIR) ++ ++ ifneq ($(USE_INTERNAL_MINIZIP),1) ++ $(error Cannot use internal zlib with external minizip) ++ endif + else + ZLIB_CFLAGS ?= $(shell pkg-config --silence-errors --cflags zlib || true) + ZLIB_LIBS ?= $(shell pkg-config --silence-errors --libs zlib || echo -lz) + endif +-BASE_CFLAGS += $(ZLIB_CFLAGS) +-LIBS += $(ZLIB_LIBS) ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++ MINIZIP_CFLAGS = -DUSE_INTERNAL_MINIZIP -I$(MOUNT_DIR)/minizip ++else ++ MINIZIP_CFLAGS ?= $(shell pkg-config --cflags minizip) ++ MINIZIP_LIBS ?= $(shell pkg-config --libs minizip) ++endif ++BASE_CFLAGS += $(ZLIB_CFLAGS) $(MINIZIP_CFLAGS) ++LIBS += $(ZLIB_LIBS) $(MINIZIP_LIBS) + + ifeq ($(USE_INTERNAL_JPEG),1) + BASE_CFLAGS += -DUSE_INTERNAL_JPEG +@@ -1660,8 +1674,6 @@ Q3OBJ = \ + $(B)/client/q_math.o \ + $(B)/client/q_shared.o \ + \ +- $(B)/client/unzip.o \ +- $(B)/client/ioapi.o \ + $(B)/client/puff.o \ + $(B)/client/vm.o \ + $(B)/client/vm_interpreted.o \ +@@ -2108,6 +2120,12 @@ ifeq ($(USE_ANTIWALLHACK),1) + $(B)/client/sv_wallhack.o + endif + ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++Q3OBJ += \ ++ $(B)/client/unzip.o \ ++ $(B)/client/ioapi.o ++endif ++ + ifeq ($(HAVE_VM_COMPILED),true) + ifneq ($(findstring $(ARCH),x86 x86_64),) + Q3OBJ += \ +@@ -2213,8 +2231,6 @@ Q3DOBJ = \ + $(B)/ded/q_math.o \ + $(B)/ded/q_shared.o \ + \ +- $(B)/ded/unzip.o \ +- $(B)/ded/ioapi.o \ + $(B)/ded/vm.o \ + $(B)/ded/vm_interpreted.o \ + \ +@@ -2281,6 +2297,12 @@ Q3DOBJ += \ + $(B)/ded/zutil.o + endif + ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++Q3DOBJ += \ ++ $(B)/ded/unzip.o \ ++ $(B)/ded/ioapi.o ++endif ++ + ifeq ($(HAVE_VM_COMPILED),true) + ifneq ($(findstring $(ARCH),x86 x86_64),) + Q3DOBJ += \ +@@ -2528,6 +2550,9 @@ $(B)/client/%.o: $(OPUSFILEDIR)/src/%.c + $(B)/client/%.o: $(ZDIR)/%.c + $(DO_CC) + ++$(B)/client/%.o: $(MOUNT_DIR)/minizip/%.c ++ $(DO_CC) ++ + $(B)/client/%.o: $(SDLDIR)/%.c + $(DO_CC) + +@@ -2581,6 +2606,9 @@ $(B)/ded/%.o: $(CMDIR)/%.c + $(B)/ded/%.o: $(ZDIR)/%.c + $(DO_DED_CC) + ++$(B)/ded/%.o: $(MOUNT_DIR)/minizip/%.c ++ $(DO_DED_CC) ++ + $(B)/ded/%.o: $(BLIBDIR)/%.c + $(DO_BOT_CC) + +diff --git a/MP/code/qcommon/files.c b/MP/code/qcommon/files.c +index f9d2ea3..ab072fc 100644 +--- a/MP/code/qcommon/files.c ++++ b/MP/code/qcommon/files.c +@@ -38,7 +38,8 @@ If you have questions concerning this license or the applicable additional terms + + #include "q_shared.h" + #include "qcommon.h" +-#include "unzip.h" ++ ++#include <unzip.h> + + /* + ============================================================================= +diff --git a/SP/Makefile b/SP/Makefile +index 64450ca..3358bba 100644 +--- a/SP/Makefile ++++ b/SP/Makefile +@@ -231,6 +231,10 @@ ifndef USE_INTERNAL_ZLIB + USE_INTERNAL_ZLIB=$(USE_INTERNAL_LIBS) + endif + ++ifndef USE_INTERNAL_MINIZIP ++USE_INTERNAL_MINIZIP=$(USE_INTERNAL_LIBS) ++endif ++ + ifndef USE_INTERNAL_JPEG + USE_INTERNAL_JPEG=$(USE_INTERNAL_LIBS) + endif +@@ -1134,12 +1138,22 @@ endif + + ifeq ($(USE_INTERNAL_ZLIB),1) + ZLIB_CFLAGS = -DNO_GZIP -I$(ZDIR) ++ ++ ifneq ($(USE_INTERNAL_MINIZIP),1) ++ $(error Cannot use internal zlib with external minizip) ++ endif + else + ZLIB_CFLAGS ?= $(shell pkg-config --silence-errors --cflags zlib || true) + ZLIB_LIBS ?= $(shell pkg-config --silence-errors --libs zlib || echo -lz) + endif +-BASE_CFLAGS += $(ZLIB_CFLAGS) +-LIBS += $(ZLIB_LIBS) ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++ MINIZIP_CFLAGS = -DUSE_INTERNAL_MINIZIP -I$(MOUNT_DIR)/minizip ++else ++ MINIZIP_CFLAGS ?= $(shell pkg-config --cflags minizip) ++ MINIZIP_LIBS ?= $(shell pkg-config --libs minizip) ++endif ++BASE_CFLAGS += $(ZLIB_CFLAGS) $(MINIZIP_CFLAGS) ++LIBS += $(ZLIB_LIBS) $(MINIZIP_LIBS) + + ifeq ($(USE_INTERNAL_JPEG),1) + BASE_CFLAGS += -DUSE_INTERNAL_JPEG +@@ -1643,8 +1657,6 @@ Q3OBJ = \ + $(B)/client/q_math.o \ + $(B)/client/q_shared.o \ + \ +- $(B)/client/unzip.o \ +- $(B)/client/ioapi.o \ + $(B)/client/puff.o \ + $(B)/client/vm.o \ + $(B)/client/vm_interpreted.o \ +@@ -2086,6 +2098,12 @@ Q3OBJ += \ + $(B)/client/zutil.o + endif + ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++Q3OBJ += \ ++ $(B)/client/unzip.o \ ++ $(B)/client/ioapi.o ++endif ++ + ifeq ($(HAVE_VM_COMPILED),true) + ifneq ($(findstring $(ARCH),x86 x86_64),) + Q3OBJ += \ +@@ -2191,8 +2209,6 @@ Q3DOBJ = \ + $(B)/ded/q_math.o \ + $(B)/ded/q_shared.o \ + \ +- $(B)/ded/unzip.o \ +- $(B)/ded/ioapi.o \ + $(B)/ded/vm.o \ + $(B)/ded/vm_interpreted.o \ + \ +@@ -2255,6 +2271,12 @@ Q3DOBJ += \ + $(B)/ded/zutil.o + endif + ++ifeq ($(USE_INTERNAL_MINIZIP),1) ++Q3DOBJ += \ ++ $(B)/ded/unzip.o \ ++ $(B)/ded/ioapi.o ++endif ++ + ifeq ($(HAVE_VM_COMPILED),true) + ifneq ($(findstring $(ARCH),x86 x86_64),) + Q3DOBJ += \ +@@ -2501,6 +2523,9 @@ $(B)/client/%.o: $(OPUSFILEDIR)/src/%.c + $(B)/client/%.o: $(ZDIR)/%.c + $(DO_CC) + ++$(B)/client/%.o: $(MOUNT_DIR)/minizip/%.c ++ $(DO_CC) ++ + $(B)/client/%.o: $(SDLDIR)/%.c + $(DO_CC) + +@@ -2554,6 +2579,9 @@ $(B)/ded/%.o: $(CMDIR)/%.c + $(B)/ded/%.o: $(ZDIR)/%.c + $(DO_DED_CC) + ++$(B)/ded/%.o: $(MOUNT_DIR)/minizip/%.c ++ $(DO_DED_CC) ++ + $(B)/ded/%.o: $(BLIBDIR)/%.c + $(DO_BOT_CC) + +diff --git a/SP/code/qcommon/files.c b/SP/code/qcommon/files.c +index 0d20647..1573b54 100644 +--- a/SP/code/qcommon/files.c ++++ b/SP/code/qcommon/files.c +@@ -38,7 +38,8 @@ If you have questions concerning this license or the applicable additional terms + + #include "q_shared.h" + #include "qcommon.h" +-#include "unzip.h" ++ ++#include <unzip.h> + + /* + ============================================================================= diff --git a/debian/patches/Don-t-crash-if-more-than-128-modes-are-available.patch b/debian/patches/Don-t-crash-if-more-than-128-modes-are-available.patch new file mode 100644 index 0000000..acac01f --- /dev/null +++ b/debian/patches/Don-t-crash-if-more-than-128-modes-are-available.patch @@ -0,0 +1,102 @@ +From: Simon McVittie <[email protected]> +Date: Tue, 17 Mar 2015 23:20:02 +0000 +Subject: Don't crash if more than 128 modes are available + +Forwarded: https://github.com/ioquake/ioq3/pull/105 +--- + MP/code/sdl/sdl_glimp.c | 14 ++++++++++++-- + SP/code/sdl/sdl_glimp.c | 14 ++++++++++++-- + 2 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/MP/code/sdl/sdl_glimp.c b/MP/code/sdl/sdl_glimp.c +index 1f3cb63..ec92466 100644 +--- a/MP/code/sdl/sdl_glimp.c ++++ b/MP/code/sdl/sdl_glimp.c +@@ -157,7 +157,8 @@ static void GLimp_DetectAvailableModes(void) + { + int i, j; + char buf[ MAX_STRING_CHARS ] = { 0 }; +- SDL_Rect modes[ 128 ]; ++ size_t numSDLModes; ++ SDL_Rect *modes; + int numModes = 0; + + int display = SDL_GetWindowDisplayIndex( SDL_window ); +@@ -169,7 +170,14 @@ static void GLimp_DetectAvailableModes(void) + return; + } + +- for( i = 0; i < SDL_GetNumDisplayModes( display ); i++ ) ++ numSDLModes = SDL_GetNumDisplayModes( display ); ++ modes = SDL_calloc( numSDLModes, sizeof( SDL_Rect )); ++ if ( !modes ) ++ { ++ ri.Error( ERR_FATAL, "Out of memory\n" ); ++ } ++ ++ for( i = 0; i < numSDLModes; i++ ) + { + SDL_DisplayMode mode; + +@@ -179,6 +187,7 @@ static void GLimp_DetectAvailableModes(void) + if( !mode.w || !mode.h ) + { + ri.Printf( PRINT_ALL, "Display supports any resolution\n" ); ++ SDL_free( modes ); + return; + } + +@@ -220,6 +229,7 @@ static void GLimp_DetectAvailableModes(void) + ri.Printf( PRINT_ALL, "Available modes: '%s'\n", buf ); + ri.Cvar_Set( "r_availableModes", buf ); + } ++ SDL_free( modes ); + } + + /* +diff --git a/SP/code/sdl/sdl_glimp.c b/SP/code/sdl/sdl_glimp.c +index 1f3cb63..ec92466 100644 +--- a/SP/code/sdl/sdl_glimp.c ++++ b/SP/code/sdl/sdl_glimp.c +@@ -157,7 +157,8 @@ static void GLimp_DetectAvailableModes(void) + { + int i, j; + char buf[ MAX_STRING_CHARS ] = { 0 }; +- SDL_Rect modes[ 128 ]; ++ size_t numSDLModes; ++ SDL_Rect *modes; + int numModes = 0; + + int display = SDL_GetWindowDisplayIndex( SDL_window ); +@@ -169,7 +170,14 @@ static void GLimp_DetectAvailableModes(void) + return; + } + +- for( i = 0; i < SDL_GetNumDisplayModes( display ); i++ ) ++ numSDLModes = SDL_GetNumDisplayModes( display ); ++ modes = SDL_calloc( numSDLModes, sizeof( SDL_Rect )); ++ if ( !modes ) ++ { ++ ri.Error( ERR_FATAL, "Out of memory\n" ); ++ } ++ ++ for( i = 0; i < numSDLModes; i++ ) + { + SDL_DisplayMode mode; + +@@ -179,6 +187,7 @@ static void GLimp_DetectAvailableModes(void) + if( !mode.w || !mode.h ) + { + ri.Printf( PRINT_ALL, "Display supports any resolution\n" ); ++ SDL_free( modes ); + return; + } + +@@ -220,6 +229,7 @@ static void GLimp_DetectAvailableModes(void) + ri.Printf( PRINT_ALL, "Available modes: '%s'\n", buf ); + ri.Cvar_Set( "r_availableModes", buf ); + } ++ SDL_free( modes ); + } + + /* diff --git a/debian/patches/series b/debian/patches/series index a06a8f1..3c2cdc3 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ +Don-t-crash-if-more-than-128-modes-are-available.patch +Allow-use-of-system-minizip-library.patch Default-to-non-fullscreen.patch diff --git a/debian/rules b/debian/rules index 558c1c8..d08cc35 100755 --- a/debian/rules +++ b/debian/rules @@ -110,7 +110,7 @@ ORIG_REL = 1.42b ORIG_REV = ec3318172a827f75c60940ed1a798273db5db72b # Empty if ORIG_REV is ORIG_DATE = 20150316 -ORIG_SUFFIX = +dfsg1 +ORIG_SUFFIX = +dfsg2 ifeq (${ORIG_REV},) ORIG_VER := ${ORIG_REL}${ORIG_SUFFIX} -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

