[svn] r4836 - trunk/rpms/snes9x
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Tue Oct 17 18:05:44 CEST 2006
Author: thias
Date: 2006-10-17 18:05:43 +0200 (Tue, 17 Oct 2006)
New Revision: 4836
Added:
trunk/rpms/snes9x/snes9x-1.5-src-externc.patch
Removed:
trunk/rpms/snes9x/snes9x-1.43-src-gcc4.patch
trunk/rpms/snes9x/snes9x-1.43-usagemsg.patch
Modified:
trunk/rpms/snes9x/snes9x.spec
Log:
Update snes9x to 1.5 (aka 1.50).
Deleted: trunk/rpms/snes9x/snes9x-1.43-src-gcc4.patch
===================================================================
--- trunk/rpms/snes9x/snes9x-1.43-src-gcc4.patch 2006-10-17 14:21:04 UTC (rev 4835)
+++ trunk/rpms/snes9x/snes9x-1.43-src-gcc4.patch 2006-10-17 16:05:43 UTC (rev 4836)
@@ -1,170 +0,0 @@
-diff -Naupr snes9x-1.43-src.orig/snes9x/getset.h snes9x-1.43-src/snes9x/getset.h
---- snes9x-1.43-src.orig/snes9x/getset.h 2004-12-30 23:15:45.000000000 +0100
-+++ snes9x-1.43-src/snes9x/getset.h 2005-05-05 17:09:08.000000000 +0200
-@@ -120,7 +120,7 @@ INLINE uint8 S9xGetByte (uint32 Address)
- return (*(GetAddress + (Address & 0xffff)));
- }
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_PPU:
- return (S9xGetPPU (Address & 0xffff));
-@@ -222,7 +222,7 @@ INLINE uint16 S9xGetWord (uint32 Address
- #endif
- }
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_PPU:
- return (S9xGetPPU (Address & 0xffff) |
-@@ -346,7 +346,7 @@ INLINE void S9xSetByte (uint8 Byte, uint
- return;
- }
-
-- switch ((int) SetAddress)
-+ switch ((long) SetAddress)
- {
- case CMemory::MAP_PPU:
- S9xSetPPU (Byte, Address & 0xffff);
-@@ -479,7 +479,7 @@ INLINE void S9xSetWord (uint16 Word, uin
- return;
- }
-
-- switch ((int) SetAddress)
-+ switch ((long) SetAddress)
- {
- case CMemory::MAP_PPU:
- S9xSetPPU ((uint8) Word, Address & 0xffff);
-@@ -600,7 +600,7 @@ INLINE uint8 *GetBasePointer (uint32 Add
- {
- return s7r.bank50;
- }
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_SPC7110_DRAM:
- #ifdef SPC7110_DEBUG
-@@ -666,7 +666,7 @@ INLINE uint8 *S9xGetMemPointer (uint32 A
- if(Settings.SPC7110&&((Address&0x7FFFFF)==0x4800))
- return s7r.bank50;
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_SPC7110_DRAM:
- #ifdef SPC7110_DEBUG
-@@ -726,7 +726,7 @@ INLINE void S9xSetPCBase (uint32 Address
- return;
- }
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_PPU:
- CPU.PCBase = Memory.FillRAM;
-diff -Naupr snes9x-1.43-src.orig/snes9x/offsets.cpp snes9x-1.43-src/snes9x/offsets.cpp
---- snes9x-1.43-src.orig/snes9x/offsets.cpp 2004-12-30 23:15:47.000000000 +0100
-+++ snes9x-1.43-src/snes9x/offsets.cpp 2005-05-05 17:09:08.000000000 +0200
-@@ -100,30 +100,30 @@
- #endif
-
- #define OFFSET(N,F) \
--fprintf (S9xSTREAM, "#define " #N " CPU + %d\n", (int) &((struct SCPUState *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " CPU + %ld\n", (long) &((struct SCPUState *) 0)->F);
- #define OFFSET2(N,F) \
--fprintf (S9xSTREAM, "#define " #N " Registers + %d\n", (int) &((struct SRegisters *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " Registers + %ld\n", (long) &((struct SRegisters *) 0)->F);
- #define OFFSET3(F) \
--fprintf (S9xSTREAM, "#define " #F " Memory + %d\n", (int) &((class CMemory *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #F " Memory + %ld\n", (long) &((class CMemory *) 0)->F);
- #define OFFSET4(N,F) \
--fprintf (S9xSTREAM, "#define " #N " APU + %d\n", (int) &((struct SAPU *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " APU + %ld\n", (long) &((struct SAPU *) 0)->F);
- #define OFFSET5(N,F) \
--fprintf (S9xSTREAM, "#define " #N " IAPU + %d\n", (int) &((struct SIAPU *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " IAPU + %ld\n", (long) &((struct SIAPU *) 0)->F);
- #define OFFSET6(N,F) \
--fprintf (S9xSTREAM, "#define " #N " ICPU + %d\n", (int) &((struct SICPU *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " ICPU + %ld\n", (long) &((struct SICPU *) 0)->F);
- #define OFFSET7(N,F) \
--fprintf (S9xSTREAM, "#define " #N " Settings + %d\n", (int) &((struct SSettings *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " Settings + %ld\n", (long) &((struct SSettings *) 0)->F);
- #define OFFSET8(N, F) \
--fprintf (S9xSTREAM, "#define " #N " APURegisters + %d\n", (int) &((struct SAPURegisters *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " APURegisters + %ld\n", (long) &((struct SAPURegisters *) 0)->F);
-
- #define OFFSET9(N, F) \
--fprintf (S9xSTREAM, "#define " #N " PPU + %d\n", (int) &((struct SPPU *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " PPU + %ld\n", (long) &((struct SPPU *) 0)->F);
- #define OFFSET10(N, F) \
--fprintf (S9xSTREAM, "#define " #N " IPPU + %d\n", (int) &((struct InternalPPU *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " IPPU + %ld\n", (long) &((struct InternalPPU *) 0)->F);
- #define OFFSET11(N, F) \
--fprintf (S9xSTREAM, "#define " #N " SA1 + %d\n", (int) &((struct SSA1 *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " SA1 + %dl\n", (long) &((struct SSA1 *) 0)->F);
- #define OFFSET12(N, F) \
--fprintf (S9xSTREAM, "#define " #N " SA1Registers + %d\n", (int) &((struct SSA1Registers *) 0)->F);
-+fprintf (S9xSTREAM, "#define " #N " SA1Registers + %ld\n", (long) &((struct SSA1Registers *) 0)->F);
-
- int main (int /*argc*/, char ** /*argv*/)
- {
-diff -Naupr snes9x-1.43-src.orig/snes9x/sa1.cpp snes9x-1.43-src/snes9x/sa1.cpp
---- snes9x-1.43-src.orig/snes9x/sa1.cpp 2004-12-30 23:15:47.000000000 +0100
-+++ snes9x-1.43-src/snes9x/sa1.cpp 2005-05-05 17:09:08.000000000 +0200
-@@ -201,7 +201,7 @@ uint8 S9xSA1GetByte (uint32 address)
- if (GetAddress >= (uint8 *) CMemory::MAP_LAST)
- return (*(GetAddress + (address & 0xffff)));
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_PPU:
- return (S9xGetSA1 (address & 0xffff));
-@@ -248,7 +248,7 @@ void S9xSA1SetByte (uint8 byte, uint32 a
- return;
- }
-
-- switch ((int) Setaddress)
-+ switch ((long) Setaddress)
- {
- case CMemory::MAP_PPU:
- S9xSetSA1 (byte, address & 0xffff);
-@@ -310,7 +310,7 @@ void S9xSA1SetPCBase (uint32 address)
- return;
- }
-
-- switch ((int) GetAddress)
-+ switch ((long) GetAddress)
- {
- case CMemory::MAP_PPU:
- SA1.PCBase = Memory.FillRAM - 0x2000;
-diff -Naupr snes9x-1.43-src.orig/snes9x/server.cpp snes9x-1.43-src/snes9x/server.cpp
---- snes9x-1.43-src.orig/snes9x/server.cpp 2004-12-30 23:15:47.000000000 +0100
-+++ snes9x-1.43-src/snes9x/server.cpp 2005-05-05 17:09:08.000000000 +0200
-@@ -820,9 +820,9 @@ void S9xNPServerLoop (void *)
- S9xNPSendROMImageToAllClients ();
- break;
- case NP_SERVER_SYNC_CLIENT:
-- NPServer.Clients [(int) task_data].Ready = FALSE;
-+ NPServer.Clients [(long) task_data].Ready = FALSE;
- S9xNPRecomputePause ();
-- S9xNPSyncClient ((int) task_data);
-+ S9xNPSyncClient ((long) task_data);
- break;
- case NP_SERVER_SYNC_ALL:
- S9xNPSyncClients ();
-@@ -855,10 +855,10 @@ void S9xNPServerLoop (void *)
- }
- break;
- case NP_SERVER_SEND_SRAM:
-- NPServer.Clients [(int) task_data].Ready = FALSE;
-+ NPServer.Clients [(long) task_data].Ready = FALSE;
- S9xNPRecomputePause ();
- S9xNPWaitForEmulationToComplete ();
-- S9xNPSendSRAMToClient ((int) task_data);
-+ S9xNPSendSRAMToClient ((long) task_data);
- break;
-
- case NP_SERVER_SEND_SRAM_ALL:
Deleted: trunk/rpms/snes9x/snes9x-1.43-usagemsg.patch
===================================================================
--- trunk/rpms/snes9x/snes9x-1.43-usagemsg.patch 2006-10-17 14:21:04 UTC (rev 4835)
+++ trunk/rpms/snes9x/snes9x-1.43-usagemsg.patch 2006-10-17 16:05:43 UTC (rev 4836)
@@ -1,87 +0,0 @@
---- snes9x/snes9x.cpp~ 2004-12-31 00:15:47.000000000 +0200
-+++ snes9x/snes9x.cpp 2005-01-01 18:20:52.699687431 +0200
-@@ -107,14 +107,15 @@
- S9xMessage (S9X_INFO, S9X_USAGE, "Where <options> can be:\n");
-
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---cycles or -h <num> Percentage of CPU cycles to execute every scan line (default 90)\n");
-+-cycles or -h <num> Percentage of CPU cycles to execute every scan line\n\
-+ (default: 90)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---frameskip or -f <num> Screen update frame skip rate (default 2)\n");
-+-frameskip or -f <num> Screen update frame skip rate (default: 2)\n");
- S9xExtraUsage ();
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---hirom or -fh or -hr Force Hi-ROM memory map, useful for hacked ROM images.\n");
-+-hirom or -fh or -hr Force Hi-ROM memory map, useful for hacked ROM images\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---lorom or -fl or -lr Force Lo-ROM memory map, useful for hacked ROM images.\n");
-+-lorom or -fl or -lr Force Lo-ROM memory map, useful for hacked ROM images\n");
- //FIXME: -old bsolete?
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -old or -o Enable old-style SNES joypad emulation\n");
-@@ -122,13 +123,13 @@
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -noold or -no Disbale old-style SNES joypad emulation\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---soundskip or -ss <num> Sound CPU skip-waiting method, 0 - 3 (default 0)\n");
-+-soundskip or -ss <num> Sound CPU skip-waiting method, 0 - 3 (default: 0)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -sound or -s Enable digital sound output (default: enabled)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -nosound or -ns Disable digital sound output\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---soundquality or -r <num> Sound sample playback rate/quality, 0-7 (default 4)\n");
-+-soundquality or -r <num> Sound sample playback rate/quality, 0-7 (default: 4)\n");
-
- #ifdef __sgi
- /* BS: changed the sample rate values to match the IRIX options */
-@@ -148,9 +149,10 @@
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -mono Enable mono sound (default: mono sound)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---buffersize or -B Sound playback buffer size (default auto for playback rate)\n");
-+-buffersize or -B Sound playback buffer size (default: auto for\n\
-+ playback rate)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---nospeedhacks or -N Disable some internal speed ups that break a few ROMs\n");
-+-nospeedhacks or -N Disable some internal speed ups that break a few ROMs\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -speedhacks or -SH Enable some internal speed ups that break a few ROMs\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
-@@ -162,9 +164,9 @@
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -pal or -p Fool ROM into thinking that this is a PAL SNES system\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---ntsc or -n Fool ROM into thinking that this is a NTCS SNES system\n");
-+-ntsc or -n Fool ROM into thinking that this is a NTSC SNES system\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---interleaved or -i ROM image is in interleaved format.\n");
-+-interleaved or -i ROM image is in interleaved format\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -interleaved2 or -i2 ROM image is in interleaved 2 format\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
-@@ -174,7 +176,8 @@
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -hdma or -NH Enable H-DMA emulation (default: enabled)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---layering or -L Swap some background priority levels - helps some games\n");
-+-layering or -L Swap some background priority levels - helps some\n\
-+ games\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -graphicwindows Enable graphic window effects (default: enabled)\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
-@@ -197,9 +200,11 @@
- #ifdef JOYSTICK_SUPPORT
- #ifdef __linux
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---joydevX /dev/jsY Use joystick device /dev/jsY for emulation of gamepad X\n");
-+-joydevX /dev/jsY Use joystick device /dev/jsY for emulation of\n\
-+ gamepad X\n");
- S9xMessage (S9X_INFO, S9X_USAGE, "\
---joymapX 0 1 2 3 4 5 6 7 Joystick buttons which should be assigned to gamepad X - A B X Y TL TR Start and Select\n");
-+-joymapX 0 1 2 3 4 5 6 7 Joystick buttons which should be assigned to\n\
-+ gamepad X - A B X Y TL TR Start and Select\n");
- #else
- S9xMessage (S9X_INFO, S9X_USAGE, "\
- -four or -4 Single standard PC joystick has four buttons\n");
Added: trunk/rpms/snes9x/snes9x-1.5-src-externc.patch
===================================================================
--- trunk/rpms/snes9x/snes9x-1.5-src-externc.patch (rev 0)
+++ trunk/rpms/snes9x/snes9x-1.5-src-externc.patch 2006-10-17 16:05:43 UTC (rev 4836)
@@ -0,0 +1,39 @@
+diff -Naupr snes9x-1.5-src.orig/bsx.h snes9x-1.5-src/bsx.h
+--- snes9x-1.5-src.orig/bsx.h 2006-06-30 15:40:56.000000000 +0200
++++ snes9x-1.5-src/bsx.h 2006-10-17 17:38:47.000000000 +0200
+@@ -164,7 +164,7 @@ struct SBSX
+ uint8 test2192[32];
+ };
+
+-extern struct SBSX BSX;
++extern "C" struct SBSX BSX;
+
+ uint8 S9xGetBSX(uint32);
+ void S9xSetBSX(uint8, uint32);
+diff -Naupr snes9x-1.5-src.orig/dsp1.h snes9x-1.5-src/dsp1.h
+--- snes9x-1.5-src.orig/dsp1.h 2006-06-30 15:40:56.000000000 +0200
++++ snes9x-1.5-src/dsp1.h 2006-10-17 17:38:31.000000000 +0200
+@@ -180,6 +180,6 @@ uint8 S9xGetDSP (uint16 Address);
+ void S9xSetDSP (uint8 Byte, uint16 Address);
+ END_EXTERN_C
+
+-extern struct SDSP1 DSP1;
++extern "C" struct SDSP1 DSP1;
+
+ #endif
+diff -Naupr snes9x-1.5-src.orig/ppu.h snes9x-1.5-src/ppu.h
+--- snes9x-1.5-src.orig/ppu.h 2006-06-30 15:40:56.000000000 +0200
++++ snes9x-1.5-src/ppu.h 2006-10-17 17:39:13.000000000 +0200
+@@ -409,9 +409,9 @@ typedef struct{
+ uint8 _5A22;
+ } SnesModel;
+
+-extern SnesModel* Model;
+-extern SnesModel M1SNES;
+-extern SnesModel M2SNES;
++extern "C" SnesModel* Model;
++extern "C" SnesModel M1SNES;
++extern "C" SnesModel M2SNES;
+
+ #define MAX_5C77_VERSION 0x01
+ #define MAX_5C78_VERSION 0x03
Modified: trunk/rpms/snes9x/snes9x.spec
===================================================================
--- trunk/rpms/snes9x/snes9x.spec 2006-10-17 14:21:04 UTC (rev 4835)
+++ trunk/rpms/snes9x/snes9x.spec 2006-10-17 16:05:43 UTC (rev 4836)
@@ -9,27 +9,24 @@
%{?fc5: %define _with_modxorg 1}
#define prever -WIP1
+%define real_version 1.5
Summary: Portable, freeware Super Nintendo Entertainment System (TM) emulator
Name: snes9x
-Version: 1.43
-Release: 7
+Version: 1.50
+Release: 1
License: Other
Group: Applications/Emulators
URL: http://www.snes9x.com/
-Source: http://www.lysator.liu.se/snes9x/%{version}%{?prever}/snes9x-%{version}%{?prever}-src.tar.gz
-Patch0: snes9x-1.43-src-gcc4.patch
-Patch1: snes9x-1.43-usagemsg.patch
-Patch2: snes9x-1.43-wmclass.patch
+Source: http://files.ipherswipsite.com/snes9x/snes9x-%{real_version}%{?prever}-src.tar.bz2
+Patch0: snes9x-1.5-src-externc.patch
+Patch1: snes9x-1.43-wmclass.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gcc-c++, zlib-devel, libpng-devel
-%{?_with_opengl:BuildRequires: %{_libdir}/libGL.so}
+%{?_with_opengl:BuildRequires: libGL-devel}
%{?_with_modxorg:BuildRequires: libXt-devel, libXext-devel, libXxf86dga-devel, libXxf86vm-devel}
%{!?_with_modxorg:BuildRequires: XFree86-devel}
-%ifarch %{ix86} x86_64
BuildRequires: nasm
-%endif
-BuildRequires: autoconf, automake, libtool
%description
Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
@@ -38,27 +35,21 @@
%prep
-%setup -n %{name}-%{version}%{?prever:-dev}-src
-%patch0 -p1 -b .gcc4
-%patch1 -p0 -b .usagemsg
-%patch2 -p1 -b .wmclass
+%setup -n %{name}-%{real_version}%{?prever:-dev}-src
+%patch0 -p1 -b .externc
+%patch1 -p2 -b .wmclass
%build
-pushd snes9x
-autoreconf
-%configure \
- --without-assembler \
- %{?_with_opengl}
+%configure %{?_with_opengl}
# Replace OPTIMISE here, it's the best I've found...
%{__perl} -pi.orig -e 's|^OPTIMISE.*|OPTIMISE = %{optflags}|g' Makefile
%{__make} %{?_smp_mflags}
-popd
%install
%{__rm} -rf %{buildroot}
-%{__install} -D -m 0755 snes9x/snes9x %{buildroot}%{_bindir}/snes9x
+%{__install} -D -m 0755 snes9x %{buildroot}%{_bindir}/snes9x
%clean
@@ -67,12 +58,21 @@
%files
%defattr(-, root, root, 0755)
-%doc faqs.txt license.txt readme.txt readme.unix
-%doc snes9x_default_config.cfg
+%doc doc/*
%{_bindir}/snes9x
%changelog
+* Tue Oct 17 2006 Matthias Saou <http://freshrpms.net/> 1.50-1
+- Update to 1.5... well, luckily it's also called 1.50 in some places, ugh.
+- Update source URL.
+- Include patch to fix C++ and C extern declarations.
+- Remove no longer needed gcc4 patch.
+- Remove no longer needed autoreconf and its build requirements.
+- Remove no longer needed usagemsg patch, all now fits fine in 80 columns.
+- Remove --without-assembler since build works again on i386 with it.
+- Note : --with opengl doesn't work... some error in unix/opengl.cpp.
+
* Wed Mar 22 2006 Matthias Saou <http://freshrpms.net/> 1.43-7
- Add missing modular X build requirement.
- Add autoreconf call to fix configure's X detection.
More information about the svn-commits
mailing list