r8349 - ! dirs' list truncated !
Bruno Fuddl-guestquot; Fuddl" Kleinert
fuddl-guest at alioth.debian.org
Sun Nov 9 21:29:30 UTC 2008
Author: fuddl-guest
Date: 2008-11-09 21:29:30 +0000 (Sun, 09 Nov 2008)
New Revision: 8349
Modified:
packages/branches/openarena/openarena-0.8.1/debian/patches/20_dont_build_shipped_jpeg.dpatch
Log:
* try another approach to use libjpeg. this needs more work
Modified: packages/branches/openarena/openarena-0.8.1/debian/patches/20_dont_build_shipped_jpeg.dpatch
===================================================================
--- packages/branches/openarena/openarena-0.8.1/debian/patches/20_dont_build_shipped_jpeg.dpatch 2008-11-09 08:03:13 UTC (rev 8348)
+++ packages/branches/openarena/openarena-0.8.1/debian/patches/20_dont_build_shipped_jpeg.dpatch 2008-11-09 21:29:30 UTC (rev 8349)
@@ -6,8 +6,8 @@
@DPATCH@
diff -urNad openarena-0.8.1~/Makefile openarena-0.8.1/Makefile
---- openarena-0.8.1~/Makefile 2008-11-07 19:14:03.000000000 +0100
-+++ openarena-0.8.1/Makefile 2008-11-07 19:14:03.000000000 +0100
+--- openarena-0.8.1~/Makefile 2008-11-09 22:15:33.534134600 +0100
++++ openarena-0.8.1/Makefile 2008-11-09 22:15:33.742134960 +0100
@@ -158,7 +158,7 @@
NDIR=$(MOUNT_DIR)/null
UIDIR=$(MOUNT_DIR)/ui
@@ -80,9 +80,9 @@
$(B)/client/%.o: $(SPEEXDIR)/%.c
$(DO_CC)
diff -urNad openarena-0.8.1~/code/renderer/tr_image_jpg.c openarena-0.8.1/code/renderer/tr_image_jpg.c
---- openarena-0.8.1~/code/renderer/tr_image_jpg.c 2008-11-07 19:06:49.000000000 +0100
-+++ openarena-0.8.1/code/renderer/tr_image_jpg.c 2008-11-07 19:15:39.000000000 +0100
-@@ -31,7 +31,9 @@
+--- openarena-0.8.1~/code/renderer/tr_image_jpg.c 2008-11-09 22:15:27.000000000 +0100
++++ openarena-0.8.1/code/renderer/tr_image_jpg.c 2008-11-09 22:15:50.385134040 +0100
+@@ -31,7 +31,25 @@
*/
#define JPEG_INTERNALS
@@ -90,30 +90,50 @@
+/*#include "../jpeg-6/jpeglib.h"*/
+#include <jpeglib.h>
+#include <jerror.h>
++
++
++static void LoadJPG_init_source(j_decompress_ptr cinfo) {
++}
++
++static void LoadJPG_fill_input_buffer(j_decompress_ptr cinfo) {
++}
++
++static void LoadJPG_skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
++}
++
++static void LoadJPG_resync_to_restart(j_decompress_ptr cinfo, int desired) {
++}
++
++static void LoadJPG_term_source(j_decompress_ptr cinfo) {
++}
void R_LoadJPG( const char *filename, unsigned char **pic, int *width, int *height ) {
/* This struct contains the JPEG decompression parameters and pointers to
-@@ -59,6 +61,7 @@
+@@ -59,6 +77,8 @@
int len;
byte *fbuffer;
byte *buf;
+ FILE *infile;
++ struct jpeg_source_mgr jpeg_src_mgr;
/* 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.
-@@ -70,6 +73,11 @@
+@@ -70,6 +90,14 @@
if (!fbuffer || len < 0) {
return;
}
-+ puts("USING DEBIAN PATCH");
-+ if((infile = fopen((char *) filename, "rb")) == NULL) {
-+ puts("DEBIAN PATCH: fopen() failed :-(");
-+ return;
-+ }
++ jpeg_src_mgr.next_input_byte = fbuffer;
++ jpeg_src_mgr.bytes_in_buffer = len;
++ jpeg_src_mgr.init_source = LoadJPG_init_source;
++ jpeg_src_mgr.fill_input_buffer = LoadJPG_fill_input_buffer;
++ jpeg_src_mgr.skip_input_data = LoadJPG_skip_input_data;
++ jpeg_src_mgr.resync_to_restart = LoadJPG_resync_to_restart;
++ jpeg_src_mgr.term_source = LoadJPG_term_source;
++ cinfo.src = &jpeg_src_mgr;
/* Step 1: allocate and initialize JPEG decompression object */
-@@ -85,7 +93,8 @@
+@@ -85,7 +113,8 @@
/* Step 2: specify data source (eg, a file) */
@@ -123,11 +143,3 @@
/* Step 3: read file parameters with jpeg_read_header() */
-@@ -210,6 +219,7 @@
- */
-
- /* And we're done! */
-+ fclose(infile);
- }
-
-
More information about the Pkg-games-commits
mailing list