[SCM] Quake 3 engine branch, debian-experimental, updated. debian/1.36+svn1933-1

Simon McVittie smcv at debian.org
Wed Mar 16 16:05:49 UTC 2011


The following commit has been merged in the debian-experimental branch:
commit 7b16688b3e4d07ce5c88f72802ad2b5cd23478e6
Author: Simon McVittie <smcv at debian.org>
Date:   Wed Mar 16 15:38:26 2011 +0000

    New upstream svn snapshot
    
      - contains a fix for FTBFS on powerpc, hopefully (Closes: #617769)
      - support merged for system libjpeg; drop the Fedora-originated patch
      - add a smaller patch to use jpeg_mem_src from the bundled libjpeg 8 with
        the system libjpeg 6b (a necessary evil for now)

diff --git a/debian/changelog b/debian/changelog
index c48d930..cef6d11 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ioquake3 (1.36+svn1933-1) UNRELEASED; urgency=low
+
+  * New upstream svn snapshot
+    - contains a fix for FTBFS on powerpc, hopefully (Closes: #617769)
+    - support merged for system libjpeg; drop the Fedora-originated patch
+    - add a smaller patch to use jpeg_mem_src from the bundled libjpeg 8 with
+      the system libjpeg 6b (a necessary evil for now)
+
+ -- Simon McVittie <smcv at debian.org>  Sun, 13 Mar 2011 21:36:48 +0000
+
 ioquake3 (1.36+svn1921-1) experimental; urgency=low
 
   * New upstream svn snapshot
diff --git a/debian/patches/0001-Allow-use-of-system-libjpeg-version-6b.patch b/debian/patches/0001-Allow-use-of-system-libjpeg-version-6b.patch
new file mode 100644
index 0000000..57d46b7
--- /dev/null
+++ b/debian/patches/0001-Allow-use-of-system-libjpeg-version-6b.patch
@@ -0,0 +1,36 @@
+From 2c923b4df0f648d4bcc84eb9dfe784a8e537d755 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Sun, 13 Mar 2011 18:26:55 +0000
+Subject: [PATCH] Allow use of system libjpeg version 6b (the LSB-blessed version)
+
+For this version we need to supply a jpeg_mem_src implementation; the one
+from our bundled jpeg-8c seems to work fine.
+---
+ code/renderer/tr_image_jpg.c |   11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/code/renderer/tr_image_jpg.c b/code/renderer/tr_image_jpg.c
+index c6c632e..8cdb441 100644
+--- a/code/renderer/tr_image_jpg.c
++++ b/code/renderer/tr_image_jpg.c
+@@ -37,8 +37,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ #include <jpeglib.h>
+ 
+ #ifndef USE_INTERNAL_JPEG
+-#  if JPEG_LIB_VERSION < 80
+-#    error Need system libjpeg >= 80
++#  if JPEG_LIB_VERSION >= 80
++     /* nothing special to do */
++#  elif JPEG_LIB_VERSION == 62
++     /* libjpeg 6b is the version required by the LSB. It doesn't have
++      * jpeg_mem_src so we need to supply our own. (Confirmed to work with
++      * Debian's libjpeg62.) */
++#    include "../jpeg-8c/jdatasrc.c"
++#  else
++#    error Need system libjpeg, either version 6b, or version 8 or later
+ #  endif
+ #endif
+ 
+-- 
+1.7.4.1
+
diff --git a/debian/patches/0001-Import-syslib-JPEG-patch-from-fedora.patch b/debian/patches/0001-Import-syslib-JPEG-patch-from-fedora.patch
deleted file mode 100644
index 3ff619e..0000000
--- a/debian/patches/0001-Import-syslib-JPEG-patch-from-fedora.patch
+++ /dev/null
@@ -1,429 +0,0 @@
-From: Bruno Kleinert <fuddl at tauware.de>
-Date: Thu, 11 Mar 2010 19:09:03 +0100
-Subject: Import syslib JPEG patch from fedora
-
-Origin: vendor, Fedora
-Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4564
-Forwarded: yes
----
- Makefile                     |   86 +++++++++++++---------
- code/jpeg-6b/jmemnobs.c      |   21 ++++++
- code/renderer/jpeg_memsrc.c  |  163 ++++++++++++++++++++++++++++++++++++++++++
- code/renderer/jpeg_memsrc.h  |    5 ++
- code/renderer/tr_image_jpg.c |   26 +++++++-
- 5 files changed, 266 insertions(+), 35 deletions(-)
- create mode 100644 code/renderer/jpeg_memsrc.c
- create mode 100644 code/renderer/jpeg_memsrc.h
-
-diff --git a/Makefile b/Makefile
-index bfba8fd..04ead1e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -111,6 +111,10 @@ ifndef GENERATE_DEPENDENCIES
- GENERATE_DEPENDENCIES=1
- endif
- 
-+ifndef USE_SYSTEM_JPEG
-+USE_SYSTEM_JPEG=1
-+endif
-+
- ifndef USE_OPENAL
- USE_OPENAL=1
- endif
-@@ -265,6 +269,10 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
-   CLIENT_CFLAGS = $(SDL_CFLAGS)
-   SERVER_CFLAGS =
- 
-+  ifeq ($(USE_SYSTEM_JPEG),1)
-+    BASE_CFLAGS += -DUSE_SYSTEM_JPEG=1
-+  endif
-+
-   ifeq ($(USE_OPENAL),1)
-     CLIENT_CFLAGS += -DUSE_OPENAL
-     ifeq ($(USE_OPENAL_DLOPEN),1)
-@@ -334,6 +342,10 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
- 
-   CLIENT_LIBS=$(SDL_LIBS) -lGL
- 
-+  ifeq ($(USE_SYSTEM_JPEG),1)
-+    CLIENT_LIBS += -ljpeg
-+  endif
-+
-   ifeq ($(USE_OPENAL),1)
-     ifneq ($(USE_OPENAL_DLOPEN),1)
-       CLIENT_LIBS += -lopenal
-@@ -1399,41 +1411,7 @@ Q3OBJ = \
-   $(B)/client/l_script.o \
-   $(B)/client/l_struct.o \
-   \
--  $(B)/client/jcapimin.o \
--  $(B)/client/jcapistd.o \
--  $(B)/client/jccoefct.o  \
--  $(B)/client/jccolor.o \
--  $(B)/client/jcdctmgr.o \
--  $(B)/client/jchuff.o   \
--  $(B)/client/jcinit.o \
--  $(B)/client/jcmainct.o \
--  $(B)/client/jcmarker.o \
--  $(B)/client/jcmaster.o \
--  $(B)/client/jcomapi.o \
--  $(B)/client/jcparam.o \
--  $(B)/client/jcphuff.o \
--  $(B)/client/jcprepct.o \
--  $(B)/client/jcsample.o \
--  $(B)/client/jdapimin.o \
--  $(B)/client/jdapistd.o \
--  $(B)/client/jdatasrc.o \
--  $(B)/client/jdcoefct.o \
--  $(B)/client/jdcolor.o \
--  $(B)/client/jddctmgr.o \
--  $(B)/client/jdhuff.o \
--  $(B)/client/jdinput.o \
--  $(B)/client/jdmainct.o \
--  $(B)/client/jdmarker.o \
--  $(B)/client/jdmaster.o \
--  $(B)/client/jdpostct.o \
--  $(B)/client/jdsample.o \
--  $(B)/client/jdtrans.o \
--  $(B)/client/jerror.o \
--  $(B)/client/jfdctflt.o \
--  $(B)/client/jidctflt.o \
--  $(B)/client/jmemmgr.o \
-   $(B)/client/jmemnobs.o \
--  $(B)/client/jutils.o \
-   \
-   $(B)/client/tr_animation.o \
-   $(B)/client/tr_backend.o \
-@@ -1472,6 +1450,46 @@ Q3OBJ = \
-   $(B)/client/con_log.o \
-   $(B)/client/sys_main.o
- 
-+ifneq ($(USE_SYSTEM_JPEG),1)
-+  Q3OBJ += \
-+    $(B)/client/jcapimin.o \
-+    $(B)/client/jcapistd.o \
-+    $(B)/client/jccoefct.o  \
-+    $(B)/client/jccolor.o \
-+    $(B)/client/jcdctmgr.o \
-+    $(B)/client/jchuff.o   \
-+    $(B)/client/jcinit.o \
-+    $(B)/client/jcmainct.o \
-+    $(B)/client/jcmarker.o \
-+    $(B)/client/jcmaster.o \
-+    $(B)/client/jcomapi.o \
-+    $(B)/client/jcparam.o \
-+    $(B)/client/jcphuff.o \
-+    $(B)/client/jcprepct.o \
-+    $(B)/client/jcsample.o \
-+    $(B)/client/jdapimin.o \
-+    $(B)/client/jdapistd.o \
-+    $(B)/client/jdatasrc.o \
-+    $(B)/client/jdcoefct.o \
-+    $(B)/client/jdcolor.o \
-+    $(B)/client/jddctmgr.o \
-+    $(B)/client/jdhuff.o \
-+    $(B)/client/jdinput.o \
-+    $(B)/client/jdmainct.o \
-+    $(B)/client/jdmarker.o \
-+    $(B)/client/jdmaster.o \
-+    $(B)/client/jdpostct.o \
-+    $(B)/client/jdsample.o \
-+    $(B)/client/jdtrans.o \
-+    $(B)/client/jerror.o \
-+    $(B)/client/jfdctflt.o \
-+    $(B)/client/jidctflt.o \
-+    $(B)/client/jmemmgr.o \
-+    $(B)/client/jutils.o
-+else
-+  Q3OBJ += $(B)/client/jpeg_memsrc.o
-+endif
-+
- ifeq ($(ARCH),i386)
-   Q3OBJ += \
-     $(B)/client/snd_mixa.o \
-diff --git a/code/jpeg-6b/jmemnobs.c b/code/jpeg-6b/jmemnobs.c
-index cbd6081..40fa646 100644
---- a/code/jpeg-6b/jmemnobs.c
-+++ b/code/jpeg-6b/jmemnobs.c
-@@ -17,11 +17,26 @@
- 
- #include "../renderer/tr_local.h"
- 
-+#ifdef USE_SYSTEM_JPEG
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <jpeglib.h>
-+
-+#undef GLOBAL
-+#define GLOBAL(x) x
-+#define FAR
-+
-+typedef void * backing_store_ptr;
-+
-+#else
-+
- #define JPEG_INTERNALS
- #include "jinclude.h"
- #include "jpeglib.h"
- #include "jmemsys.h"		/* import the system-dependent declarations */
- 
-+#endif
-+
- /*
-  * Memory allocation and freeing are controlled by the regular library
-  * routines ri.Malloc() and ri.Free().
-@@ -83,7 +98,13 @@ GLOBAL(void)
- jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
- 			 long total_bytes_needed)
- {
-+#ifdef USE_SYSTEM_JPEG
-+  fprintf(stderr,
-+    "jmemnobs.c: jpeg_open_backing_store() call, this should never happen!\n");
-+  exit(1);
-+#else
-   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
-+#endif
- }
- 
- 
-diff --git a/code/renderer/jpeg_memsrc.c b/code/renderer/jpeg_memsrc.c
-new file mode 100644
-index 0000000..33c7bd8
---- /dev/null
-+++ b/code/renderer/jpeg_memsrc.c
-@@ -0,0 +1,163 @@
-+/*
-+* memsrc.c
-+*
-+* Copyright (C) 1994-1996, Thomas G. Lane.
-+* This file is part of the Independent JPEG Group's software.
-+* For conditions of distribution and use, see the accompanying README file.
-+*
-+* This file contains decompression data source routines for the case of
-+* reading JPEG data from a memory buffer that is preloaded with the entire
-+* JPEG file. This would not seem especially useful at first sight, but
-+* a number of people have asked for it.
-+* This is really just a stripped-down version of jdatasrc.c. Comparison
-+* of this code with jdatasrc.c may be helpful in seeing how to make
-+* custom source managers for other purposes.
-+*/
-+
-+/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
-+#include <stdio.h>
-+#include <jpeglib.h>
-+#include <jerror.h>
-+
-+
-+/* Expanded data source object for memory input */
-+
-+typedef struct {
-+struct jpeg_source_mgr pub; /* public fields */
-+
-+JOCTET eoi_buffer[2]; /* a place to put a dummy EOI */
-+} my_source_mgr;
-+
-+typedef my_source_mgr * my_src_ptr;
-+
-+
-+/*
-+* Initialize source --- called by jpeg_read_header
-+* before any data is actually read.
-+*/
-+
-+METHODDEF(void)
-+init_source (j_decompress_ptr cinfo)
-+{
-+/* No work, since jpeg_mem_src set up the buffer pointer and count.
-+* Indeed, if we want to read multiple JPEG images from one buffer,
-+* this *must* not do anything to the pointer.
-+*/
-+}
-+
-+
-+/*
-+* Fill the input buffer --- called whenever buffer is emptied.
-+*
-+* In this application, this routine should never be called; if it is called,
-+* the decompressor has overrun the end of the input buffer, implying we
-+* supplied an incomplete or corrupt JPEG datastream. A simple error exit
-+* might be the most appropriate response.
-+*
-+* But what we choose to do in this code is to supply dummy EOI markers
-+* in order to force the decompressor to finish processing and supply
-+* some sort of output image, no matter how corrupted.
-+*/
-+
-+METHODDEF(boolean)
-+fill_input_buffer (j_decompress_ptr cinfo)
-+{
-+my_src_ptr src = (my_src_ptr) cinfo->src;
-+
-+WARNMS(cinfo, JWRN_JPEG_EOF);
-+
-+/* Create a fake EOI marker */
-+src->eoi_buffer[0] = (JOCTET) 0xFF;
-+src->eoi_buffer[1] = (JOCTET) JPEG_EOI;
-+src->pub.next_input_byte = src->eoi_buffer;
-+src->pub.bytes_in_buffer = 2;
-+
-+return TRUE;
-+}
-+
-+
-+/*
-+* Skip data --- used to skip over a potentially large amount of
-+* uninteresting data (such as an APPn marker).
-+*
-+* If we overrun the end of the buffer, we let fill_input_buffer deal with
-+* it. An extremely large skip could cause some time-wasting here, but
-+* it really isn't supposed to happen ... and the decompressor will never
-+* skip more than 64K anyway.
-+*/
-+
-+METHODDEF(void)
-+skip_input_data (j_decompress_ptr cinfo, long num_bytes)
-+{
-+my_src_ptr src = (my_src_ptr) cinfo->src;
-+
-+if (num_bytes > 0) {
-+while (num_bytes > (long) src->pub.bytes_in_buffer) {
-+num_bytes -= (long) src->pub.bytes_in_buffer;
-+(void) fill_input_buffer(cinfo);
-+/* note we assume that fill_input_buffer will never return FALSE,
-+* so suspension need not be handled.
-+*/
-+}
-+src->pub.next_input_byte += (size_t) num_bytes;
-+src->pub.bytes_in_buffer -= (size_t) num_bytes;
-+}
-+}
-+
-+
-+/*
-+* An additional method that can be provided by data source modules is the
-+* resync_to_restart method for error recovery in the presence of RST markers.
-+* For the moment, this source module just uses the default resync method
-+* provided by the JPEG library. That method assumes that no backtracking
-+* is possible.
-+*/
-+
-+
-+/*
-+* Terminate source --- called by jpeg_finish_decompress
-+* after all data has been read. Often a no-op.
-+*
-+* NB: *not* called by jpeg_abort or jpeg_destroy; surrounding
-+* application must deal with any cleanup that should happen even
-+* for error exit.
-+*/
-+
-+METHODDEF(void)
-+term_source (j_decompress_ptr cinfo)
-+{
-+/* no work necessary here */
-+}
-+
-+
-+/*
-+* Prepare for input from a memory buffer.
-+*/
-+
-+GLOBAL(void)
-+jpeg_mem_src (j_decompress_ptr cinfo, const JOCTET * buffer, size_t bufsize)
-+{
-+my_src_ptr src;
-+
-+/* The source object is made permanent so that a series of JPEG images
-+* can be read from a single buffer by calling jpeg_mem_src
-+* only before the first one.
-+* This makes it unsafe to use this manager and a different source
-+* manager serially with the same JPEG object. Caveat programmer.
-+*/
-+if (cinfo->src == NULL) { /* first time for this JPEG object? */
-+cinfo->src = (struct jpeg_source_mgr *)
-+(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
-+sizeof(my_source_mgr));
-+}
-+
-+src = (my_src_ptr) cinfo->src;
-+src->pub.init_source = init_source;
-+src->pub.fill_input_buffer = fill_input_buffer;
-+src->pub.skip_input_data = skip_input_data;
-+src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
-+src->pub.term_source = term_source;
-+
-+src->pub.next_input_byte = buffer;
-+src->pub.bytes_in_buffer = bufsize;
-+}
-diff --git a/code/renderer/jpeg_memsrc.h b/code/renderer/jpeg_memsrc.h
-new file mode 100644
-index 0000000..542425c
---- /dev/null
-+++ b/code/renderer/jpeg_memsrc.h
-@@ -0,0 +1,5 @@
-+#include <stdio.h>
-+#include <jpeglib.h>
-+
-+void jpeg_mem_src (j_decompress_ptr cinfo, const JOCTET * buffer,
-+  size_t bufsize);
-diff --git a/code/renderer/tr_image_jpg.c b/code/renderer/tr_image_jpg.c
-index 2e1a52a..422b223 100644
---- a/code/renderer/tr_image_jpg.c
-+++ b/code/renderer/tr_image_jpg.c
-@@ -30,8 +30,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-  * You may also wish to include "jerror.h".
-  */
- 
-+#ifdef USE_SYSTEM_JPEG
-+#include <jpeglib.h>
-+#include "jpeg_memsrc.h"
-+#else
- #define JPEG_INTERNALS
- #include "../jpeg-6b/jpeglib.h"
-+#endif
- 
- void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
-   /* This struct contains the JPEG decompression parameters and pointers to
-@@ -62,6 +67,10 @@ void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *heig
- 		void *v;
- 	} fbuffer;
-   byte  *buf;
-+#ifdef USE_SYSTEM_JPEG
-+  int i,j;
-+  byte *inptr, *outptr;
-+#endif
- 
-   /* In this example we want to open the input file before doing anything else,
-    * so that the setjmp() error recovery below can assume the file is open.
-@@ -131,7 +140,7 @@ void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *heig
-   }
- 
-   memcount = pixelcount * 4;
--  row_stride = cinfo.output_width * cinfo.output_components;
-+  row_stride = cinfo.output_width * 4;
- 
-   out = ri.Malloc(memcount);
- 
-@@ -152,6 +161,21 @@ void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *heig
- 	buf = ((out+(row_stride*cinfo.output_scanline)));
- 	buffer = &buf;
-     (void) jpeg_read_scanlines(&cinfo, buffer, 1);
-+#ifdef USE_SYSTEM_JPEG
-+    /* we have RGB data, we need to expand this out to ARGB */
-+    inptr = buf + cinfo.output_width * 3 - 1;
-+    outptr = buf + row_stride - 1;
-+
-+    for (i = 0; i < cinfo.output_width; i++) {
-+      /* endian dependent? maybe for big endian this must be done after the
-+         color/pixel copy? */
-+      *outptr-- = 255;
-+      for (j = 0; j < 3; j++) {
-+        JOCTET color = *inptr--;
-+        *outptr-- = color;
-+      }
-+    }
-+#endif
-   }
-   
-   buf = out;
--- 
diff --git a/debian/patches/0006-If-using-system-OpenAL-include-alext.h-for-ALC_ALL_D.patch b/debian/patches/0006-If-using-system-OpenAL-include-alext.h-for-ALC_ALL_D.patch
deleted file mode 100644
index 5ed5b93..0000000
--- a/debian/patches/0006-If-using-system-OpenAL-include-alext.h-for-ALC_ALL_D.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Thu, 10 Mar 2011 23:41:26 +0000
-Subject: If using system OpenAL, include alext.h for ALC_ALL_DEVICES_SPECIFIER
-
-This assumes OpenAL Soft, which more or less supersedes Creative's OpenAL,
-as far as I understand it.
----
- code/client/qal.h |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/code/client/qal.h b/code/client/qal.h
-index 1a2284a..964fff1 100644
---- a/code/client/qal.h
-+++ b/code/client/qal.h
-@@ -44,6 +44,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- #else
-   #include <AL/al.h>
-   #include <AL/alc.h>
-+  #include <AL/alext.h>
- #endif
- #endif
- 
--- 
diff --git a/debian/patches/series b/debian/patches/series
index c708345..913a2ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,6 @@
-0001-Import-syslib-JPEG-patch-from-fedora.patch
+0001-Allow-use-of-system-libjpeg-version-6b.patch
 0002-Add-a-special-vmMagic-that-causes-equivalent-native-.patch
 0003-Double-the-maximum-number-of-cvars.patch
 0004-Increase-the-command-buffer-from-16K-to-128K-followi.patch
 0005-Double-the-default-com_hunkMegs-to-128M.patch
-0006-If-using-system-OpenAL-include-alext.h-for-ALC_ALL_D.patch
 0007-potential-fix-for-an-OpenArena-crash.patch
diff --git a/debian/rules b/debian/rules
index 8a19a86..9e4cf82 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,7 +59,7 @@ override_dh_strip:
 # ---------------------------------------------------------------------------
 
 ORIG_REL = 1.36
-ORIG_REV = 1921
+ORIG_REV = 1933
 # SUFFIX can be made non-empty for re-repacks
 ORIG_SUFFIX =
 

-- 
Quake 3 engine



More information about the Pkg-games-commits mailing list