diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2007-10-04 05:43:04 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2007-10-04 05:43:04 +0000 |
commit | 1f1bf1968c025be7f08b3e9ef798e9fbbe27e4f2 (patch) | |
tree | 4413ca2537deab5f28b8ed2c9df5329a696bd942 /emulators | |
parent | 4172c0b8c3bfd14b48d46b2a82d8265fbb064dcb (diff) | |
download | ports-1f1bf1968c025be7f08b3e9ef798e9fbbe27e4f2.tar.gz ports-1f1bf1968c025be7f08b3e9ef798e9fbbe27e4f2.zip |
- Update to 1.51
- Clean patch files
- Add NETPLAY Option
Notes
Notes:
svn path=/head/; revision=200787
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/snes9x/Makefile | 16 | ||||
-rw-r--r-- | emulators/snes9x/distinfo | 6 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-ad | 29 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-af | 106 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-ah | 30 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-configure | 114 |
6 files changed, 149 insertions, 152 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile index 3a335891e661..275dc51d54b3 100644 --- a/emulators/snes9x/Makefile +++ b/emulators/snes9x/Makefile @@ -6,8 +6,7 @@ # PORTNAME= snes9x -PORTVERSION= 1.5 -PORTREVISION= 2 +PORTVERSION= 1.51 CATEGORIES= emulators MASTER_SITES= http://files.ipherswipsite.com/snes9x/ \ http://www.geocities.co.jp/SiliconValley-PaloAlto/2560/release/ \ @@ -40,7 +39,8 @@ OPTIONS= DEBUG "Enable debug information" off \ SCREENSHOT "Enable screenshot support" on \ X86_ASM "Use i386 optimization (only for i386)" on \ MMX "Enable MMX (only for i386)" off \ - JMA "Enable JMA archive decompression support" on + JMA "Enable JMA archive decompression support" on \ + NETPLAY "Enable network support" on .include <bsd.port.pre.mk> @@ -50,7 +50,7 @@ BROKEN= Does not compile with GCC 4.2 .if !defined(NOPORTDOCS) PORTDOCS= controls.txt control-inputs.txt changes.txt hardware.txt \ - porting.html problems.txt snapshots.txt snes9x.conf.default \ + porting.html faqs.txt snapshots.txt snes9x.conf.default \ README .endif @@ -96,6 +96,12 @@ CONFIGURE_ARGS+= --with-jma-decomp CONFIGURE_ARGS+= --without-jma-decomp .endif +.if !defined(WITHOUT_NETPLAY) +CONFIGURE_ARGS+= --with-netplay +.else +CONFIGURE_ARGS+= --without-netplay +.endif + .if exists(/usr/lib/libusbhid.a) CONFIGURE_ARGS+= --with-joystick .else @@ -108,7 +114,7 @@ post-patch: do-install: .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} -.for FILE in control* changes.txt hardware.txt porting.html problems.txt \ +.for FILE in control* changes.txt hardware.txt porting.html faqs.txt \ snapshots.txt snes9x.conf.default ${INSTALL_DATA} ${WRKSRC}/doc/${FILE} ${DOCSDIR} .endfor diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo index d482cf44797f..2b8500e6c649 100644 --- a/emulators/snes9x/distinfo +++ b/emulators/snes9x/distinfo @@ -1,3 +1,3 @@ -MD5 (snes9x-1.5-src.tar.bz2) = b51fb463687f812f68116b33abbf0427 -SHA256 (snes9x-1.5-src.tar.bz2) = 56ff80f24eb506ba713a258e6bfa65febdda02d3c582b1a12d05008e2a9ce48a -SIZE (snes9x-1.5-src.tar.bz2) = 1456821 +MD5 (snes9x-1.51-src.tar.bz2) = a1038cc761f400318cdced960972f8a7 +SHA256 (snes9x-1.51-src.tar.bz2) = 70c8f41fc7f1e000605127e0f4261e3eb52c72019b3cbf9bc8061b0b8ccdf687 +SIZE (snes9x-1.51-src.tar.bz2) = 1707256 diff --git a/emulators/snes9x/files/patch-ad b/emulators/snes9x/files/patch-ad index 7d2df3fffa3f..138e6414fde7 100644 --- a/emulators/snes9x/files/patch-ad +++ b/emulators/snes9x/files/patch-ad @@ -1,20 +1,29 @@ ---- memmap.cpp.orig Fri Jul 25 23:20:19 2003 -+++ memmap.cpp Sat Aug 9 01:08:05 2003 -@@ -79,7 +79,7 @@ - #endif +--- memmap.cpp 2007-10-03 11:11:07.000000000 -0500 ++++ memmap.cpp 2007-10-03 11:11:34.000000000 -0500 +@@ -169,7 +169,7 @@ #include <ctype.h> + #include <assert.h> -#ifdef __linux +#if defined(__linux) || defined(__FreeBSD__) #include <unistd.h> #endif -@@ -1443,7 +1443,7 @@ +@@ -1473,7 +1473,7 @@ + { + fwrite((char *) Multi.sramB, size, 1, file); + fclose(file); +-#ifdef __linux ++#if defined(__linux) || defined(__FreeBSD__) + chown(name, getuid(), getgid()); + #endif + } +@@ -1502,7 +1502,7 @@ { - fwrite ((char *) ::SRAM, size, 1, file); - fclose (file); --#if defined(__linux) + fwrite((char *) SRAM, size, 1, file); + fclose(file); +-#ifdef __linux +#if defined(__linux) || defined(__FreeBSD__) - chown (filename, getuid (), getgid ()); + chown(sramName, getuid(), getgid()); #endif - if(Settings.SPC7110RTC) + if (Settings.SPC7110RTC) diff --git a/emulators/snes9x/files/patch-af b/emulators/snes9x/files/patch-af index b3cb734cedce..4f6d59b7a753 100644 --- a/emulators/snes9x/files/patch-af +++ b/emulators/snes9x/files/patch-af @@ -1,20 +1,24 @@ ---- unix/unix.cpp Fri Jun 30 08:34:57 2006 -+++ unix/unix.cpp Wed Dec 27 00:07:21 2006 -@@ -178,8 +178,12 @@ +--- unix/unix.cpp 2007-04-28 19:51:08.000000000 -0500 ++++ unix/unix.cpp 2007-10-03 16:53:16.000000000 -0500 +@@ -173,7 +173,7 @@ + #include <fcntl.h> + #include <sys/time.h> + /* FIXME: Linux alpha (aristocat) has a broken timercmp. Make testcase */ +-#if defined(__linux) ++#if defined(__linux) || defined(__FreeBSD__) + # ifndef timercmp + # define timercmp(tvp, uvp, cmp)\ + ((tvp)->tv_sec cmp (uvp)->tv_sec ||\ +@@ -197,7 +197,7 @@ pthread_mutex_t mutex; #endif -#if !defined(NOSOUND) && defined(__linux) -+#ifndef __sun +#if !defined(NOSOUND) && (defined(__linux) || defined(__FreeBSD__)) #include <sys/soundcard.h> -+#else -+#include <machine/soundcard.h> -+#endif #include <sys/mman.h> #endif - -@@ -191,6 +195,11 @@ +@@ -210,6 +210,11 @@ #endif #endif @@ -26,16 +30,35 @@ //Breaks sol9 and probably others. //#if defined(__sun) && defined(__GNUC__) //typedef void (*SIG_PF)(); -@@ -222,13 +231,78 @@ +@@ -233,11 +238,12 @@ + + #ifdef NETPLAY_SUPPORT + #include "netplay.h" +- + #ifdef _DEBUG + #define NP_DEBUG 2 + #endif ++#endif + ++#if defined(NETPLAY_SUPPORT) || defined(JOYSTICK_SUPPORT) + /* accessors into controls.cpp static variables */ + uint16 MovieGetJoypad(int i); + void MovieSetJoypad(int i, uint16 buttons); +@@ -245,22 +251,86 @@ + /* Joypads status information */ + uint32 old_joypads[8]; + uint32 joypads[8]; +- #endif #ifdef JOYSTICK_SUPPORT +#define JOYSTICK_MAX_DEVICES 4 -+int JoystickShift = 0 ++int JoystickShift = 0; ++uint8 js_mod [8] = {0, 0, 0, 0, 0, 0, 0, 0}; #if defined(__linux) +#define JOYSTICK_MAX_BUTTONS 4 #include <linux/joystick.h> - uint8 js_mod [8] = {0, 0, 0, 0, 0, 0, 0, 0}; +-uint8 js_mod [8] = {0, 0, 0, 0, 0, 0, 0, 0}; int js_fd [8] = {-1, -1, -1, -1, -1, -1, -1, -1}; char *js_device [8] = {"/dev/js0", "/dev/js1", "/dev/js2", "/dev/js3", "/dev/js4", "/dev/js5", "/dev/js6", "/dev/js7" }; #endif @@ -105,7 +128,13 @@ void InitJoysticks (); void ReadJoysticks (); #endif -@@ -249,7 +323,7 @@ + +-#if !defined(NOSOUND) && defined (__linux) ++#if !defined(NOSOUND) && (defined (__linux) || defined(__FreeBSD__)) + #define CONFIGURABLE_SOUND_DEVICE + char *sound_device = "/dev/dsp"; + #endif +@@ -285,7 +355,7 @@ const char *inc_format="%03d"; //FIXME: I see no reason not to configureenable this for all Unixen @@ -114,7 +143,7 @@ static void sigbrkhandler(int) { CPU.Flags |= DEBUG_MODE_FLAG; -@@ -287,22 +361,54 @@ +@@ -326,22 +396,54 @@ void S9xParseArg (char **argv, int &i, int argc) { @@ -122,17 +151,7 @@ if (strcmp (argv [i], "-j") == 0 || strcasecmp (argv [i], "-nojoy") == 0) { -#ifdef JOYSTICK_SUPPORT -- Settings.JoystickEnabled = FALSE; --#endif -- } else if (strncasecmp (argv [i], "-joydev", 7) == 0 && argv[i][7]>='1' && argv[i][7]<='8' && argv[i][8]=='\0') -- { -- int j = argv[i][7]-'1'; -- if (i + 1 < argc) { --#ifdef JOYSTICK_SUPPORT -- js_device[j] = argv[++i]; --#else -- S9xMessage(S9X_WARNING, S9X_USAGE, "Joystick support is not available!"); -+ Settings.JoystickEnabled = FALSE; + Settings.JoystickEnabled = FALSE; + } + +#ifdef __FreeBSD__ @@ -176,13 +195,22 @@ + + else #endif +- } else if (strncasecmp (argv [i], "-joydev", 7) == 0 && argv[i][7]>='1' && argv[i][7]<='8' && argv[i][8]=='\0') +- { +- int j = argv[i][7]-'1'; +- if (i + 1 < argc) { +-#ifdef JOYSTICK_SUPPORT +- js_device[j] = argv[++i]; +-#else +- S9xMessage(S9X_WARNING, S9X_USAGE, "Joystick support is not available!"); +-#endif - } else S9xUsage (); -- } else if (strcasecmp (argv [i], "-b") == 0 || -+ if (strcasecmp (argv [i], "-b") == 0 || - strcasecmp (argv [i], "-bs") == 0 || - strcasecmp (argv [i], "-buffersize") == 0) - { -@@ -413,7 +519,7 @@ +- } else if (strcasecmp (argv [i], "-sounddev") == 0) { ++ if (strcasecmp (argv [i], "-sounddev") == 0) { + if (i + 1 < argc) { + #if defined(CONFIGURABLE_SOUND_DEVICE) + sound_device = argv[++i]; +@@ -552,7 +654,7 @@ #if !defined(__MSDOS) && defined(DEBUGGER) #if defined(__unix) && !defined(__NeXT__) struct sigaction sa; @@ -191,7 +219,7 @@ sa.sa_handler = sigbrkhandler; #else sa.sa_handler = (SIG_PF) sigbrkhandler; -@@ -613,6 +719,7 @@ +@@ -770,6 +872,7 @@ } #ifdef JOYSTICK_SUPPORT @@ -199,7 +227,7 @@ void InitJoysticks () { #ifdef JSIOCGVERSION -@@ -697,6 +804,189 @@ +@@ -854,6 +957,189 @@ } #endif } @@ -389,7 +417,7 @@ #endif // defined (JOYSTICK_SUPPORT) START_EXTERN_C -@@ -1522,7 +1812,7 @@ +@@ -1716,7 +2002,7 @@ } #endif @@ -398,7 +426,7 @@ static int Rates[8] = { 0, 8000, 11025, 16000, 22050, 32000, 44100, 48000 -@@ -1644,7 +1934,7 @@ +@@ -1847,7 +2133,7 @@ #endif @@ -407,7 +435,7 @@ void S9xUnixProcessSound (void) { } -@@ -1687,7 +1977,7 @@ +@@ -1890,7 +2176,7 @@ } #endif @@ -416,10 +444,10 @@ void S9xGenerateSound () { /* Linux and Sun versions */ -@@ -1779,7 +2069,7 @@ - /* If threads in use, this is to loop indefinitely */ +@@ -1985,7 +2271,7 @@ /* If not, this will be called by timer */ - + if (Settings.Mute) + return NULL; -#ifdef __linux +#if defined(__linux) || defined(__FreeBSD__) audio_buf_info info; diff --git a/emulators/snes9x/files/patch-ah b/emulators/snes9x/files/patch-ah index 8c2c145d6143..dcd11e451271 100644 --- a/emulators/snes9x/files/patch-ah +++ b/emulators/snes9x/files/patch-ah @@ -1,24 +1,24 @@ -diff -ru ../../work/release/unzip/unzip.h ./unzip/unzip.h ---- ../../work/release/unzip/unzip.h Wed Aug 25 05:52:56 1999 -+++ ./unzip/unzip.h Wed Dec 29 01:54:04 1999 -@@ -41,13 +41,17 @@ +--- unzip/unzip.h 2007-10-03 12:28:47.000000000 -0500 ++++ unzip/unzip.h 2007-10-03 12:30:22.000000000 -0500 +@@ -41,14 +41,18 @@ #ifndef _unz_H #define _unz_H +-#ifdef __cplusplus +-extern "C" { +-#endif +#include <sys/types.h> -+ -+#ifndef _ZLIB_H -+#include <zlib.h> -+#endif -+ - #ifdef __cplusplus - extern "C" { + + #ifndef _ZLIB_H + #include <zlib.h> #endif --#ifndef _ZLIB_H --#include "zlib.h" --#endif ++#ifdef __cplusplus ++extern "C" { ++#endif ++ +#define ZEXPORT - ++ #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) /* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ diff --git a/emulators/snes9x/files/patch-configure b/emulators/snes9x/files/patch-configure index 0e7ec37927f2..146fa141fc0a 100644 --- a/emulators/snes9x/files/patch-configure +++ b/emulators/snes9x/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig Tue Dec 26 23:42:54 2006 -+++ configure Tue Dec 26 23:52:49 2006 -@@ -1268,6 +1268,7 @@ +--- configure.orig 2007-04-29 16:03:52.000000000 -0500 ++++ configure 2007-10-03 14:33:44.000000000 -0500 +@@ -860,6 +860,7 @@ --with(out)-opengl Use OpenGL for output (default: without) --with(out)-aido Use a shared memory area for output (default: without) --with(out)-assembler Use assembler cores if available (default: with) @@ -8,9 +8,19 @@ --with(out)-zsnesc4 Use ZSNES C4 core if available (default: same as --with-assembler) --with(out)-zsnesfx Use ZSNES SuperFX core if available (default: same as --with-assembler) --with(out)-correct-vram-reads Use Correct VRAM read logic (default: with) -@@ -7182,6 +7183,59 @@ - { echo "$as_me:$LINENO: result: $snes9x_cv_hpux_os" >&5 - echo "${ECHO_T}$snes9x_cv_hpux_os" >&6; } +@@ -5873,7 +5874,9 @@ + ZSNESFX='#ZSNESFX=1' + ZSNESC4='#ZSNESC4=1' + ASMCPU='' ++if test yes = "$with_mmx"; then + ASMKREED='#ASMKREED=1' ++fi + SDD1_DECOMP='#SDD1_DECOMP=1' + JMA='#JMA=1' + SPC700ASM='' +@@ -5995,6 +5998,60 @@ + echo "$as_me:$LINENO: result: $snes9x_cv_i386_cpu" >&5 + echo "${ECHO_T}$snes9x_cv_i386_cpu" >&6 +echo "$as_me:$LINENO: checking if the OS is FreeBSD" >&5 +echo $ECHO_N "checking if the OS is FreeBSD... $ECHO_C" >&6 @@ -65,20 +75,23 @@ +echo "$as_me:$LINENO: result: $snes9x_cv_freebsd_os" >&5 +echo "${ECHO_T}$snes9x_cv_freebsd_os" >&6 + - { echo "$as_me:$LINENO: checking if the OS is MS Windows" >&5 - echo $ECHO_N "checking if the OS is MS Windows... $ECHO_C" >&6; } - if test "${snes9x_cv_win32_os+set}" = set; then -@@ -7437,6 +7491,9 @@ - # Check whether --with-joystick was given. - if test "${with_joystick+set}" = set; then - withval=$with_joystick; -+elif test yes = "$snes9x_cv_freebsd_os" -a yes = "$with_joystick"; then ++ + echo "$as_me:$LINENO: checking if the OS is Linux" >&5 + echo $ECHO_N "checking if the OS is Linux... $ECHO_C" >&6 + if test "${snes9x_cv_linux_os+set}" = set; then +@@ -6365,7 +6422,10 @@ + with_joystick=yes + fi; + +-if test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then ++if test yes = "$snes9x_cv_freebsd_os" -a yes = "$with_joystick"; then + JOYDEFINES=' -DJOYSTICK_SUPPORT' + SYSLIBS="$SYSLIBS"' -lusbhid' ++elif test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then + JOYDEFINES=' -DJOYSTICK_SUPPORT' else - with_joystick=yes - fi -@@ -7473,6 +7530,13 @@ + with_joystick="no" +@@ -6396,6 +6456,13 @@ CPUINC='-Ish' fi @@ -90,68 +103,9 @@ + with_mmx=no +fi; - # Check whether --with-sdd1-decomp was given. + # Check whether --with-sdd1-decomp or --without-sdd1-decomp was given. if test "${with_sdd1_decomp+set}" = set; then -@@ -11190,6 +11254,58 @@ - echo "${ECHO_T}Defining _XOPEN_SOURCE_EXTENDED since HP-UX needs it." >&6; } - fi - -+echo "$as_me:$LINENO: checking if the OS is FreeBSD" >&5 -+echo $ECHO_N "checking if the OS is FreeBSD... $ECHO_C" >&6 -+if test "${snes9x_cv_freebsd_os+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+ cat >conftest.$ac_ext <<_ACEOF -+#line 3885 "configure" -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#ifdef __FreeBSD__ -+/* */ -+#else -+#error Not FreeBSD. -+#endif -+ -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ snes9x_cv_freebsd_os=yes -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+snes9x_cv_freebsd_os=no -+fi -+rm -f conftest.$ac_objext conftest.$ac_ext -+fi -+ -+echo "$as_me:$LINENO: result: $snes9x_cv_freebsd_os" >&5 -+echo "${ECHO_T}$snes9x_cv_freebsd_os" >&6 - - THREAD_SOUND='#THREAD_SOUND=1' - if test "${ac_cv_header_pthread_h+set}" = set; then -@@ -11372,7 +11488,7 @@ +@@ -9758,7 +9825,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @@ -160,11 +114,11 @@ /* */ #else #error No sound for this platform -@@ -11665,6 +11781,7 @@ +@@ -10013,6 +10080,7 @@ sound support....... $snes9x_cv_sound display system...... $snes9x_info_display joystick support.... $with_joystick +using mmx code.... $with_mmx + netplay support..... $with_netplay SDD1 decompression.. $with_sdd1_decomp JMA decompression... $with_jma_decomp - debugger............ $with_debugger |