[iortcw] 01/04: Bring back Q3's modified minizip

Simon McVittie smcv at debian.org
Wed Mar 18 23:47:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch master
in repository iortcw.

commit 5b730d56d5a7e5e4ba90bbd7fded69254c0ffc59
Author: Simon McVittie <smcv at debian.org>
Date:   Wed Mar 18 23:17:54 2015 +0000

    Bring back Q3's modified minizip
    
    It has been modified to use the Z_Malloc/Z_Free memory pool, whereas
    the system copy uses ordinary malloc/free.
---
 debian/changelog                                   |   3 +-
 debian/control                                     |   1 -
 debian/copyright                                   |   7 +-
 .../Allow-use-of-system-minizip-library.patch      | 255 ---------------------
 debian/patches/series                              |   1 -
 debian/rules                                       |   2 -
 6 files changed, 6 insertions(+), 263 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 4f11d68..3df53a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,7 @@ iortcw (1.42b+20150316+dfsg1-1) UNRELEASED; urgency=low
       from iortcw at the same time it downloads the official patch)
     - exclude Free third-party libraries too, to simplify license compliance,
       and use system copies of those libraries instead:
-      cURL, libjpeg, minizip, libogg, OpenAL, libopus, SDL2, libvorbis, zlib
-    - add patch (submitted to ioquake3) so we can use the system minizip
+      cURL, libjpeg, libogg, OpenAL, libopus, SDL2, libvorbis, zlib
     - add patch (submitted to ioquake3) to avoid stack overflow if the
       windowing system offers > 128 modes
     - run in a window by default per Games Team policy
diff --git a/debian/control b/debian/control
index b122146..e128cb2 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Build-Depends: debhelper (>= 9),
                imagemagick,
                libcurl4-gnutls-dev,
                libjpeg-dev,
-               libminizip-dev,
                libopenal-dev,
                libopus-dev,
                libopusfile-dev,
diff --git a/debian/copyright b/debian/copyright
index 495536f..fb9732a 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -11,8 +11,6 @@ Files-Excluded:
  */code/libvorbis-*
  */code/opus-*
  */code/opusfile-*
- */code/qcommon/ioapi.?
- */code/qcommon/unzip.?
  */code/tools/lcc
  */code/zlib
  */media
@@ -106,10 +104,15 @@ Copyright:
 License: snd_adpcm-permissive
 
 Files:
+  */code/qcommon/unzip.?
+  */code/qcommon/ioapi.?
   */code/qcommon/puff.?
   */code/client/libmumblelink.?
 Copyright:
+  © 1990-2000 Info-ZIP
   © 1995-2005 Mark Adler
+  © 1995-2005 Jean-loup Gailly
+  © 1998-2005 Gilles Vollant
   © 2006 Joerg Dietrich
   © 2008 Ludwig Nussel
 License: zlib
diff --git a/debian/patches/Allow-use-of-system-minizip-library.patch b/debian/patches/Allow-use-of-system-minizip-library.patch
deleted file mode 100644
index 1065c34..0000000
--- a/debian/patches/Allow-use-of-system-minizip-library.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-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/series b/debian/patches/series
index 3c2cdc3..7521a76 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 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 d08cc35..bc421d1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -142,8 +142,6 @@ get-orig-source:
 	rm -rf iortcw-${ORIG_VER}.orig/*/code/opusfile-*
 	rm -rf iortcw-${ORIG_VER}.orig/*/code/tools/lcc
 	rm -rf iortcw-${ORIG_VER}.orig/*/code/zlib
-	rm -rf iortcw-${ORIG_VER}.orig/*/code/qcommon/ioapi.[ch]
-	rm -rf iortcw-${ORIG_VER}.orig/*/code/qcommon/unzip.[ch]
 	rm -rf iortcw-${ORIG_VER}.orig/*/media
 	tar --xz -cvf iortcw_${ORIG_VER}.orig.tar.xz iortcw-${ORIG_VER}.orig
 	rm -rf iortcw-${ORIG_VER}.orig

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list