rpms/bsnes/F-13 bsnes-0.064-systemlibs.patch, NONE, 1.1 bsnes.spec, 1.32, 1.33

Julian Sikorski belegdol at rpmfusion.org
Thu May 20 00:05:11 CEST 2010


Author: belegdol

Update of /cvs/free/rpms/bsnes/F-13
In directory se02.es.rpmfusion.net:/tmp/cvs-serv4621

Modified Files:
	bsnes.spec 
Added Files:
	bsnes-0.064-systemlibs.patch 
Log Message:
* Wed May 19 2010 Julian Sikorski <belegdol at fedoraproject.org> - 0.064-2
- Enabled snesreader unconditionally (#1214). Credit goes to Chris Moeller.


bsnes-0.064-systemlibs.patch:
 Makefile            |   14 +++++++-------
 fex/Zlib_Inflater.h |    2 +-
 fex/blargg_config.h |    6 +-----
 snesreader.cpp      |   16 +++++++++-------
 4 files changed, 18 insertions(+), 20 deletions(-)

--- NEW FILE bsnes-0.064-systemlibs.patch ---
diff -up bsnes-0.064/snesreader/fex/blargg_config.h.systemlibs bsnes-0.064/snesreader/fex/blargg_config.h
--- bsnes-0.064/snesreader/fex/blargg_config.h.systemlibs	2009-10-14 06:03:47.000000000 +0200
+++ bsnes-0.064/snesreader/fex/blargg_config.h	2010-05-19 23:34:40.000000000 +0200
@@ -8,7 +8,7 @@
 
 // Enable RAR archive support. Doing so adds extra licensing restrictions
 // to this library (see unrar/readme.txt for more information).
-#define FEX_ENABLE_RAR 1
+#define FEX_ENABLE_RAR 0
 
 // Accept file paths encoded as UTF-8. Currently only affects Windows,
 // as Unix/Linux/Mac OS X already use UTF-8 paths.
@@ -18,13 +18,9 @@
 //#define BLARGG_BUILD_DLL 1
 
 // Support only the listed archive types. Remove any you don't need.
-/*
 #define FEX_TYPE_LIST \
-	fex_7z_type,\
 	fex_gz_type,\
-	fex_rar_type,\
 	fex_zip_type,
-*/
 
 // Use standard config.h if present
 #ifdef HAVE_CONFIG_H
diff -up bsnes-0.064/snesreader/fex/Zlib_Inflater.h.systemlibs bsnes-0.064/snesreader/fex/Zlib_Inflater.h
--- bsnes-0.064/snesreader/fex/Zlib_Inflater.h.systemlibs	2009-10-14 06:03:38.000000000 +0200
+++ bsnes-0.064/snesreader/fex/Zlib_Inflater.h	2010-05-19 23:34:40.000000000 +0200
@@ -6,7 +6,7 @@
 
 #include "blargg_common.h"
 #include "Data_Reader.h"
-#include "zlib/zlib.h"
+#include <zlib.h>
 
 class Zlib_Inflater {
 public:
diff -up bsnes-0.064/snesreader/Makefile.systemlibs bsnes-0.064/snesreader/Makefile
--- bsnes-0.064/snesreader/Makefile.systemlibs	2010-03-24 03:10:26.000000000 +0100
+++ bsnes-0.064/snesreader/Makefile	2010-05-19 23:34:40.000000000 +0200
@@ -6,7 +6,7 @@ include nall/qt/Makefile
 c     := $(compiler) -std=gnu99
 cpp   := $(subst cc,++,$(compiler)) -std=gnu++0x
 flags := -O3 -I. -Iobj -fomit-frame-pointer
-link  :=
+link  := -lz
 
 ifeq ($(platform),x)
   flags := -fPIC $(flags)
@@ -18,17 +18,17 @@ endif
 objects := snesreader
 
 # fex
-objects += Binary_Extractor blargg_common blargg_errors Data_Reader fex File_Extractor Gzip_Extractor Gzip_Reader Rar_Extractor Zip7_Extractor Zip_Extractor Zlib_Inflater
+objects += Binary_Extractor blargg_common blargg_errors Data_Reader fex File_Extractor Gzip_Extractor Gzip_Reader Zip_Extractor Zlib_Inflater
 # zlib
-objects += adler32 crc32 inffast inflate inftrees zutil
+#objects += adler32 crc32 inffast inflate inftrees zutil
 # 7-zip
-objects += 7zAlloc 7zBuf 7zCrc 7zDecode 7zExtract 7zHeader 7zIn 7zItem 7zStream Bcj2 Bra86 LzmaDec
+#objects += 7zAlloc 7zBuf 7zCrc 7zDecode 7zExtract 7zHeader 7zIn 7zItem 7zStream Bcj2 Bra86 LzmaDec
 # unrar
-objects += archive arcread coder crc encname extract getbits model rarvm rarvmtbl rawread suballoc unicode unpack unpack15 unpack20 unrar unrar_misc unrar_open
+#objects += archive arcread coder crc encname extract getbits model rarvm rarvmtbl rawread suballoc unicode unpack unpack15 unpack20 unrar unrar_misc unrar_open
 # micro-bunzip
-objects += micro-bunzip
+#objects += micro-bunzip
 # jma
-objects += jma jcrc32 lzmadecode 7zlzma iiostrm inbyte lzma winout
+#objects += jma jcrc32 lzmadecode 7zlzma iiostrm inbyte lzma winout
 
 compile = \
   $(strip \
diff -up bsnes-0.064/snesreader/snesreader.cpp.systemlibs bsnes-0.064/snesreader/snesreader.cpp
--- bsnes-0.064/snesreader/snesreader.cpp.systemlibs	2010-04-13 07:21:07.000000000 +0200
+++ bsnes-0.064/snesreader/snesreader.cpp	2010-05-19 23:34:40.000000000 +0200
@@ -7,8 +7,8 @@
 #endif
 
 #include "fex/fex.h"
-#include "libjma/jma.h"
-extern "C" char* uncompressStream(int, int);  //micro-bunzip
+//#include "libjma/jma.h"
+//extern "C" char* uncompressStream(int, int);  //micro-bunzip
 
 #define QT_CORE_LIB
 #include <QtGui>
@@ -18,7 +18,7 @@ extern "C" char* uncompressStream(int, i
 using namespace nall;
 
 dllexport const char* snesreader_supported() {
-  return "*.zip *.z *.7z *.rar *.gz *.bz2 *.jma";
+  return "*.zip *.z *.gz";
 }
 
 void snesreader_apply_ips(const char *filename, uint8_t *&data, unsigned &size) {
@@ -147,6 +147,7 @@ bool snesreader_load_fex(string &filenam
   return false;
 }
 
+#if 0
 bool snesreader_load_bz2(const char *filename, uint8_t *&data, unsigned &size) {
   //TODO: need a way to get the size of a bzip2 file, so we can pre-allocate
   //a buffer to decompress into memory. for now, use a temporary file.
@@ -191,6 +192,7 @@ bool snesreader_load_jma(const char *fil
     return false;
   }
 }
+#endif
 
 dllexport bool snesreader_load(string &filename, uint8_t *&data, unsigned &size) {
   if(file::exists(filename) == false) return false;
@@ -198,15 +200,15 @@ dllexport bool snesreader_load(string &f
   bool success = false;
   if(striend(filename, ".zip")
   || striend(filename, ".z")
-  || striend(filename, ".7z")
-  || striend(filename, ".rar")
+  /*|| striend(filename, ".7z")
+  || striend(filename, ".rar")*/
   || striend(filename, ".gz")) {
     success = snesreader_load_fex(filename, data, size);
-  } else if(striend(filename, ".bz2")) {
+  } /*else if(striend(filename, ".bz2")) {
     success = snesreader_load_bz2(filename, data, size);
   } else if(striend(filename, ".jma")) {
     success = snesreader_load_jma(filename, data, size);
-  } else {
+  }*/ else {
     success = snesreader_load_normal(filename, data, size);
   }
 


Index: bsnes.spec
===================================================================
RCS file: /cvs/free/rpms/bsnes/F-13/bsnes.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- bsnes.spec	25 Apr 2010 09:35:59 -0000	1.32
+++ bsnes.spec	19 May 2010 22:05:10 -0000	1.33
@@ -1,10 +1,8 @@
-%bcond_with snesreader
-
 %global vernumber 064
 
 Name:           bsnes
 Version:        0.%{vernumber}
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        SNES emulator focused on accuracy
 
 Group:          Applications/Emulators
@@ -16,6 +14,7 @@
 Source2:        README.bsnes
 Patch1:         bsnes-0.064-newppcelf.patch
 Patch2:         bsnes-0.064-noppcelfppc64.patch
+Patch3:         bsnes-0.064-systemlibs.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 #bsnes does not use system snes_ntsc because the modified video processing
@@ -47,7 +46,6 @@
 %description    snesfilter
 This subpackage contains various video filters for bsnes.
 
-%if %{with snesreader}
 %package        snesreader
 Summary:        Compressed ROM images support for %{name}
 Group:          Applications/Emulators
@@ -56,7 +54,6 @@
 %description    snesreader
 This subpackage enables support for various compressed images, like .zip, .7z,
 .rar and others.
-%endif
 
 %package        supergameboy
 Summary:        Super Game Boy emulation for %{name}
@@ -71,6 +68,7 @@
 %setup -qc
 %patch1 -p1 -b .newppcelf
 %patch2 -p1 -b .noppcelfppc64
+%patch3 -p1 -b .systemlibs
 
 #fix permissions
 find . -type f -not -name \*.sh -exec chmod 644 {} \;
@@ -101,11 +99,7 @@
 
 
 %build
-%if %{with snesreader}
 for sourcedir in snesfilter snesreader supergameboy
-%else
-for sourcedir in snesfilter supergameboy
-%endif
 do
     pushd $sourcedir
     make %{?_smp_mflags} moc=moc-qt4
@@ -126,11 +120,7 @@
 popd
 install -d $RPM_BUILD_ROOT%{_libdir}
 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
-%if %{with snesreader}
 for sourcedir in snesfilter snesreader supergameboy
-%else
-for sourcedir in snesfilter supergameboy
-%endif
 do
     pushd $sourcedir
     install -pm 755 lib$sourcedir.so $RPM_BUILD_ROOT%{_libdir}/lib$sourcedir.so
@@ -173,11 +163,9 @@
 %defattr(-,root,root,-)
 %{_libdir}/libsnesfilter.so
 
-%if %{with snesreader}
 %files snesreader
 %defattr(-,root,root,-)
 %{_libdir}/libsnesreader.so
-%endif
 
 %files supergameboy
 %defattr(-,root,root,-)
@@ -185,6 +173,9 @@
 
 
 %changelog
+* Wed May 19 2010 Julian Sikorski <belegdol at fedoraproject.org> - 0.064-2
+- Enabled snesreader unconditionally (#1214). Credit goes to Chris Moeller.
+
 * Sat Apr 17 2010 Julian Sikorski <belegdol[at]gmail[dot]com> - 0.064-1
 - Updated to 0.064
 - Rediffed the patches



More information about the rpmfusion-commits mailing list