This is an automated email from the git hooks/post-receive script. ecsv-guest pushed a commit to branch master in repository mupen64plus.
commit 9f1f90f7c1939ff0050ea56bd8a2d8341080dc57 Author: Sven Eckelmann <[email protected]> Date: Tue Sep 1 23:11:40 2009 +0200 Revert "Remove 117-system-liblzma.patch due to missing xz-utils in unstable" This reverts commit 1ea60c58f1715c9cc5d1dd95026e28cdc4f19416. Conflicts: debian/changelog debian/patches/series --- debian/changelog | 4 + debian/control | 3 +- debian/patches/series | 1 + debian/patches/system-liblzma.patch | 181 ++++++++++++++++++++++++++++++++++++ 4 files changed, 188 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 51ada1c..904c5af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,10 @@ mupen64plus (1.5+dfsg1-5) UNRELEASED; urgency=low - Add rice_nodebug.patch, Don't enable excessive debug functionality in rice_video - Add interpreter_x86_fldcw.patch, Correctly set floating point control word + - Add system-liblzma.patch, use liblzma from debian instead of buildin + (Closes: #543552) + * debian/control: + - Depend on liblzma-dev for lzma and xz support -- Sven Eckelmann <[email protected]> Fri, 11 Sep 2009 00:37:19 +0200 diff --git a/debian/control b/debian/control index fdb839a..89a51d3 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7), libsdl1.2-dev, libsdl-ttf2.0-dev, libfreetype6-dev, libglib2.0-dev, libgtk2.0-dev, libsamplerate0-dev, libpng12-dev | libpng-dev, libbz2-dev, zlib1g-dev | libz-dev, libgl1-mesa-dev | libgl-dev, - libglu1-mesa-dev | libglu-dev, binutils-dev, pkg-config, libxdg-basedir-dev + libglu1-mesa-dev | libglu-dev, binutils-dev, pkg-config, liblzma-dev, + libxdg-basedir-dev Package: mupen64plus Architecture: any diff --git a/debian/patches/series b/debian/patches/series index 8631f20..d4318cd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,4 @@ fix_readpng.patch jttl_fix_romclosed.patch rice_nodebug.patch interpreter_x86_fldcw.patch +system-liblzma.patch diff --git a/debian/patches/system-liblzma.patch b/debian/patches/system-liblzma.patch new file mode 100644 index 0000000..e51f44a --- /dev/null +++ b/debian/patches/system-liblzma.patch @@ -0,0 +1,181 @@ +Description: Use liblzma from system instead of buildin one +Bug: http://code.google.com/p/mupen64plus/issues/detail?id=255 +Bug-Debian: http://bugs.debian.org/543552 +Author: Sven Eckelmann <[email protected]> + +--- +diff --git a/Makefile b/Makefile +index 2368afa38816069f4fd176c1936c23f40d277095..59e0f4cefe29e702c894bea5edb321d3681a76e5 100644 +--- a/Makefile ++++ b/Makefile +@@ -103,9 +103,6 @@ OBJ_CORE = \ + main/savestates.o \ + main/zip/ioapi.o \ + main/zip/unzip.o \ +- main/lzma/buffer.o \ +- main/lzma/io.o \ +- main/lzma/main.o \ + main/7zip/7zAlloc.o \ + main/7zip/7zBuffer.o \ + main/7zip/7zCrc.o \ +@@ -232,9 +229,9 @@ SHARE = $(shell grep CONFIG_PATH config.h | cut -d '"' -f 2) + # set primary objects and libraries for all outputs + ALL = mupen64plus $(PLUGINS) + OBJECTS = $(OBJ_CORE) $(OBJ_DYNAREC) $(OBJ_OPENGL) +-LIBS = $(SDL_LIBS) $(LIBGL_LIBS) $(XDGBASEDIR_LIBS) -lbz2 ++LIBS = $(SDL_LIBS) $(LIBGL_LIBS) $(LZMA_LIBS) $(XDGBASEDIR_LIBS) -lbz2 + STATIC_LIBS = +-CFLAGS+= $(XDGBASEDIR_FLAGS) ++CFLAGS+= $(LZMA_FLAGS) $(XDGBASEDIR_FLAGS) + + # add extra objects and libraries for selected options + ifeq ($(DBG), 1) +@@ -330,7 +327,7 @@ endif + clean-core: + ifneq ($(OS), WINDOWS) + $(RM_F) ./r4300/*.o ./r4300/x86/*.o ./r4300/x86_64/*.o ./memory/*.o ./debugger/*.o ./opengl/*.o +- $(RM_F) ./main/*.o ./main/version.h ./main/zip/*.o ./main/lzma/*.o ./main/7zip/*.o ./main/gui_gtk/*.o ./main/gui_gtk/debugger/*.o ++ $(RM_F) ./main/*.o ./main/version.h ./main/zip/*.o ./main/7zip/*.o ./main/gui_gtk/*.o ./main/gui_gtk/debugger/*.o + $(RM_F) mupen64plus mupen64plus.desktop + $(RM_F) main/gui_qt4/moc_* main/gui_qt4/ui_*.h main/gui_qt4/*.o main/gui_qt4/*.a main/gui_qt4/Makefile + $(RM_F) translations/*.qm +diff --git a/main/gui_gtk/main_gtk.c b/main/gui_gtk/main_gtk.c +index 41d382ebd2650dd48f5b93bf788ee32fca26e807..2583533e75d6e1379b814517a571d5748100b622 100644 +--- a/main/gui_gtk/main_gtk.c ++++ b/main/gui_gtk/main_gtk.c +@@ -423,13 +423,14 @@ static void callback_open_rom(GtkWidget* widget, gpointer data) + + /* Add filter for rom file types. */ + GtkFileFilter* file_filter = gtk_file_filter_new(); +- gtk_file_filter_set_name(file_filter, "N64 ROM (*.z64, *.v64, *.n64, *.gz, *.zip. *.bz2, *.lzma *.7z)"); ++ gtk_file_filter_set_name(file_filter, "N64 ROM (*.z64, *.v64, *.n64, *.gz, *.zip. *.bz2, *.lzma *.xz *.7z)"); + gtk_file_filter_add_mime_type(file_filter, "application/x-gzip"); + gtk_file_filter_add_mime_type(file_filter, "application/zip"); + gtk_file_filter_add_mime_type(file_filter, "application/x-bzip2"); + gtk_file_filter_add_mime_type(file_filter, "application/x-7z"); + gtk_file_filter_add_pattern(file_filter, "*.[zZnNvV]64"); + gtk_file_filter_add_pattern(file_filter, "*.lzma"); ++ gtk_file_filter_add_pattern(file_filter, "*.xz"); + gtk_file_filter_add_pattern(file_filter, "*.7z"); + + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(file_chooser), file_filter); +diff --git a/main/gui_qt4/globals.h b/main/gui_qt4/globals.h +index 3532951d78a97f259ec5db55cd2ce068aa91c0de..62cd91e96d4b4d6a47a9a36c5a2d172200a881c7 100644 +--- a/main/gui_qt4/globals.h ++++ b/main/gui_qt4/globals.h +@@ -34,6 +34,7 @@ const QStringList RomExtensions = QStringList() << "*.rom" + << "*.n64" + << "*.bz2" + << "*.lzma" ++ << "*.xz" + << "*.7z"; + QStringList romDirectories(); + QIcon icon(QString iconName); +diff --git a/main/rom.c b/main/rom.c +index 2772545a45eda189f88476f6097aef3a065a663e..0f2e95ff3a35e5cab25d95c175d5b1b2daa18613 100644 +--- a/main/rom.c ++++ b/main/rom.c +@@ -29,7 +29,7 @@ + + #include "zip/unzip.h" + #include <bzlib.h> +-#include "lzma/lzmadec.h" ++#include <lzma.h> + #include "7zip/7zExtract.h" + #include "7zip/7zCrc.h" + +@@ -188,18 +188,14 @@ unsigned char* load_single_rom(const char* filename, int* romsize, unsigned char + /* LZMA roms. */ + fseek(romfile, 0L, SEEK_SET); + int lzmastatus; +- lzmadec_stream stream; +- stream.lzma_alloc = NULL; +- stream.lzma_free = NULL; +- stream.opaque = NULL; +- stream.avail_in = 0; +- stream.next_in = NULL; ++ lzma_stream stream = LZMA_STREAM_INIT; ++ const uint64_t MAX_LZMA_BYTES = 256*1024*1024; + + /* Minimum size to get decoded blocks back is 45. + LZMA has 13 byte headers, likely 32 byte internal buffer. */ + unsigned char* buffer_in = (unsigned char*)malloc(45*sizeof(unsigned char)); + unsigned char* buffer_out = (unsigned char*)malloc(45*128*sizeof(unsigned char)); +- if(buffer_in==NULL||buffer_out==NULL||lzmadec_init(&stream)!=LZMADEC_OK) ++ if(buffer_in==NULL||buffer_out==NULL||lzma_auto_decoder(&stream, MAX_LZMA_BYTES, 0)!=LZMA_OK) + { + fprintf(stderr, "%s, %d: Out of memory!\n", __FILE__, __LINE__); + return NULL; +@@ -212,8 +208,8 @@ unsigned char* load_single_rom(const char* filename, int* romsize, unsigned char + stream.next_out = buffer_out; + stream.avail_out = 45; + +- lzmastatus = lzmadec_decode (&stream, (stream.avail_in==0)); +- if(lzmastatus==LZMADEC_OK&&is_valid_rom(buffer_out)) ++ lzmastatus = lzma_code (&stream, (stream.avail_in==0)?LZMA_FINISH:LZMA_RUN); ++ if(lzmastatus==LZMA_OK&&is_valid_rom(buffer_out)) + { + *compressiontype = LZMA_COMPRESSION; + int oldsize; +@@ -229,14 +225,14 @@ unsigned char* load_single_rom(const char* filename, int* romsize, unsigned char + } + + memcpy(localrom,buffer_out, *romsize); +- while(lzmastatus==LZMADEC_OK) ++ while(lzmastatus==LZMA_OK) + { + fread(buffer_in, sizeof(unsigned char), CHUNKSIZE, romfile); + stream.next_in = buffer_in; + stream.avail_in = CHUNKSIZE; + stream.next_out = buffer_out; + stream.avail_out = CHUNKSIZE*128; +- lzmastatus = lzmadec_decode (&stream, (stream.avail_in==0)); ++ lzmastatus = lzma_code (&stream, (stream.avail_in==0)?LZMA_FINISH:LZMA_RUN); + + oldsize = *romsize; + *romsize += CHUNKSIZE*128-stream.avail_out; +@@ -250,9 +246,9 @@ unsigned char* load_single_rom(const char* filename, int* romsize, unsigned char + memcpy(localrom+oldsize,buffer_out,CHUNKSIZE*128-stream.avail_out); + } + +- if(lzmastatus==LZMADEC_STREAM_END) ++ if(lzmastatus==LZMA_STREAM_END) + { +- lzmadec_end(&stream); ++ lzma_end(&stream); + localrom = (unsigned char*)realloc(localrom,*loadlength*sizeof(unsigned char)); + romread = 1; + } +diff --git a/main/romcache.c b/main/romcache.c +index 5ec3f4024173f940f0d1168e588561271dda48c3..2b41bdf25dc5c7952191586ed83c34cf7465ab97 100644 +--- a/main/romcache.c ++++ b/main/romcache.c +@@ -76,7 +76,7 @@ static char cache_filename[PATH_MAX]; + + static const char* romextensions[] = + { +- ".v64", ".z64", ".n64", ".gz", ".zip", ".bz2", ".lzma", ".7z", NULL ++ ".v64", ".z64", ".n64", ".gz", ".zip", ".bz2", ".lzma", ".xz",".7z", NULL + }; + + static void scan_dir(const char* dirname, int* romcounter); +diff --git a/pre.mk b/pre.mk +index d2083403872123c8cd2a87e050cf850e208dfa0a..dd6e58fb421deb770402288d1af6da4c2cdc0a17 100644 +--- a/pre.mk ++++ b/pre.mk +@@ -212,6 +212,15 @@ GTK_FLAGS = $(shell pkg-config gtk+-2.0 --cflags) + GTK_LIBS = $(shell pkg-config gtk+-2.0 --libs) + GTHREAD_LIBS = $(shell pkg-config gthread-2.0 --libs) + ++# test for presence of liblzma ++ifeq ("$(shell pkg-config liblzma --modversion )", "") ++ $(error No liblzma development libraries found!) ++endif ++ ++# set LZMA flags and libraries ++LZMA_FLAGS = $(shell pkg-config liblzma --cflags) ++LZMA_LIBS = $(shell pkg-config liblzma --libs) ++ + # test for presence of libxdg-basedir + ifeq ("$(shell pkg-config libxdg-basedir --modversion )", "") + $(error No libxdg-basedir development libraries found!) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

