diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-29 23:59:56 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-05-29 23:59:56 +0000 |
commit | f91291e082d2d2577204dd799f9091eb5706ce16 (patch) | |
tree | 1ad7b1f5e3e48b6f5f61e2979a40986969ee44c0 /emulators/snes9x | |
parent | - Rename knobs: ENABLE_* -> WITH_*, DISABLE_* -> WITHOUT_* (diff) |
- Update to 1.42
PR: ports/62158
Submitted by: Ports Fury
Approved by: maintainer timeout (4 months)
Diffstat (limited to 'emulators/snes9x')
-rw-r--r-- | emulators/snes9x/Makefile | 17 | ||||
-rw-r--r-- | emulators/snes9x/distinfo | 2 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-2XSAI.CPP | 16 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-ad | 4 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-ae | 25 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-af | 91 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-aj | 41 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-ak | 22 | ||||
-rw-r--r-- | emulators/snes9x/files/patch-configure | 50 |
9 files changed, 84 insertions, 184 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile index ea538928aa31..40906f066332 100644 --- a/emulators/snes9x/Makefile +++ b/emulators/snes9x/Makefile @@ -6,11 +6,10 @@ # PORTNAME= snes9x -PORTVERSION= 1.41.1 -PORTREVISION= 1 +PORTVERSION= 1.42 CATEGORIES= emulators -MASTER_SITES= http://www.lysator.liu.se/snes9x/ -DISTNAME= ${PORTNAME}-${PORTVERSION:R}-${PORTVERSION:E}-src +MASTER_SITES= http://www.lysator.liu.se/snes9x/${PORTVERSION}/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-src MAINTAINER= green@FreeBSD.org COMMENT= Super Nintendo Entertainment System(SNES) Emulator @@ -19,11 +18,12 @@ PLIST_FILES= bin/snes9x WRKSRC= ${WRKDIR}/${DISTNAME}/${PORTNAME} USE_X_PREFIX= YES -GNU_CONFIGURE= YES USE_GMAKE= YES -MAKE_ARGS= CC="${CC} ${CFLAGS}" CCC="${CXX} ${CXXFLAGS}" \ - INCLUDES="-I${X11BASE}/include ${PTHREAD_CFLAGS}" \ +GNU_CONFIGURE= YES +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +MAKE_ARGS= INCLUDES="-I${X11BASE}/include ${PTHREAD_CFLAGS}" \ LDLIBS="-L${X11BASE}/lib ${PTHREAD_LIBS}" \ + OPTIMISE="${CXXFLAGS}" .include <bsd.port.pre.mk> @@ -33,9 +33,12 @@ CONFIGURE_ARGS+= --with-assembler .if defined(WITH_MMX) CONFIGURE_ARGS+= --with-mmx .endif +.else +CONFIGURE_ARGS+= --without-assembler .endif .if defined(WITH_OPENGL) +USE_GL= yes CONFIGURE_ARGS+= --with-opengl SNES9X_BIN= osnes9x .else diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo index 97c628e61f98..1a6eeaf25d75 100644 --- a/emulators/snes9x/distinfo +++ b/emulators/snes9x/distinfo @@ -1,2 +1,2 @@ -MD5 (snes9x-1.41-1-src.tar.gz) = 9b3f0a07484379a8d276c08ab1bbdb87 +MD5 (snes9x-1.42-src.tar.gz) = 1e8af4c590e35352ddac58d25a468676 SIZE (snes9x-1.41-1-src.tar.gz) = 997469 diff --git a/emulators/snes9x/files/patch-2XSAI.CPP b/emulators/snes9x/files/patch-2XSAI.CPP index 1897cbb01189..b308133e9ae5 100644 --- a/emulators/snes9x/files/patch-2XSAI.CPP +++ b/emulators/snes9x/files/patch-2XSAI.CPP @@ -1,14 +1,12 @@ ---- 2XSAI.CPP.orig Sun Oct 19 22:52:14 2003 -+++ 2XSAI.CPP Sun Oct 19 22:52:56 2003 -@@ -81,8 +81,9 @@ +--- 2xsai.cpp.orig Fri Dec 5 02:03:08 2003 ++++ 2xsai.cpp Sun Jan 25 01:41:08 2004 +@@ -81,7 +81,8 @@ #include "port.h" #include "gfx.h" --#if (!defined(NOASM) && defined (__i386__) || defined (__i486__) || \ -- defined (__i586__) || defined (__WIN32__) || defined (__DJGPP)) -+#if (!defined(NOASM) && !defined (__FreeBSD__) && defined (__i386__) || \ -+ defined (__i486__) || defined (__i586__) || defined (__WIN32__) || \ -+ defined (__DJGPP)) +-#if (defined(USE_X86_ASM) && (defined (__i386__) || defined (__i486__) || \ ++#if (defined(USE_X86_ASM) && defined(ASMKREED) && \ ++ (defined (__i386__) || defined (__i486__) || \ + defined (__i586__) || defined (__WIN32__) || defined (__DJGPP))) # ifndef MMX # define MMX - # endif diff --git a/emulators/snes9x/files/patch-ad b/emulators/snes9x/files/patch-ad index eb743156a502..7d2df3fffa3f 100644 --- a/emulators/snes9x/files/patch-ad +++ b/emulators/snes9x/files/patch-ad @@ -1,5 +1,5 @@ ---- MEMMAP.CPP.orig Fri Jul 25 23:20:19 2003 -+++ MEMMAP.CPP Sat Aug 9 01:08:05 2003 +--- memmap.cpp.orig Fri Jul 25 23:20:19 2003 ++++ memmap.cpp Sat Aug 9 01:08:05 2003 @@ -79,7 +79,7 @@ #endif #include <ctype.h> diff --git a/emulators/snes9x/files/patch-ae b/emulators/snes9x/files/patch-ae index d5d078ee1a01..5e322bf43321 100644 --- a/emulators/snes9x/files/patch-ae +++ b/emulators/snes9x/files/patch-ae @@ -1,30 +1,5 @@ --- port.h.orig Fri Jul 25 23:20:20 2003 +++ port.h Sat Aug 9 01:14:02 2003 -@@ -124,16 +124,16 @@ - #ifndef snes9x_types_defined - #define snes9x_types_defined - --typedef unsigned char bool8; -+typedef u_int8_t bool8; - - #ifndef __WIN32__ --typedef unsigned char uint8; --typedef unsigned short uint16; --typedef signed char int8; --typedef short int16; --typedef int int32; --typedef unsigned int uint32; --typedef long long int64; -+typedef u_int8_t uint8; -+typedef u_int16_t uint16; -+typedef int8_t int8; -+typedef int16_t int16; -+typedef int32_t int32; -+typedef u_int32_t uint32; -+typedef int64_t int64; - #else /* __WIN32__ */ - - #ifdef __BORLANDC__ @@ -255,6 +255,10 @@ #ifdef __linux diff --git a/emulators/snes9x/files/patch-af b/emulators/snes9x/files/patch-af index 1474e405c474..b407c62131ea 100644 --- a/emulators/snes9x/files/patch-af +++ b/emulators/snes9x/files/patch-af @@ -1,19 +1,6 @@ ---- unix/unix.cpp.orig Fri Jul 25 23:20:19 2003 -+++ unix/unix.cpp Sat Aug 9 00:58:34 2003 -@@ -97,9 +97,11 @@ - #include <ctype.h> - #include <dirent.h> - --#if defined(__linux) || defined(__sun) -+#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) -+#if !defined(__FreeBSD__) - #undef USE_THREADS - #define USE_THREADS -+#endif - #include <unistd.h> - #include <sys/types.h> - #include <sys/ioctl.h> -@@ -114,8 +116,12 @@ +--- unix/unix.cpp.orig Fri Dec 5 02:03:08 2003 ++++ unix/unix.cpp Sun Jan 25 00:52:36 2004 +@@ -109,8 +109,12 @@ pthread_mutex_t mutex; #endif @@ -27,7 +14,7 @@ #include <sys/mman.h> #endif -@@ -132,6 +138,11 @@ +@@ -127,6 +131,11 @@ //typedef void (*SIG_PF)(); //#endif @@ -37,9 +24,9 @@ +#endif + #include "snes9x.h" - #include "MEMMAP.H" + #include "memmap.h" #include "debug.h" -@@ -158,7 +169,10 @@ +@@ -153,7 +162,10 @@ int NumControllers = 5; #ifdef JOYSTICK_SUPPORT @@ -50,7 +37,7 @@ #include <linux/joystick.h> int js_fd [4] = {-1, -1, -1, -1}; int js_map_button [4][16] = { -@@ -205,6 +219,68 @@ +@@ -200,6 +212,68 @@ char *js_device [4] = {"/dev/js0", "/dev/js1", "/dev/js2", "/dev/js3"}; #endif @@ -119,16 +106,16 @@ void InitJoysticks (); void ReadJoysticks (); #endif -@@ -215,7 +291,7 @@ - char *rom_filename = NULL; - char *snapshot_filename = NULL; +@@ -212,7 +286,7 @@ + char *SDD1_pack = NULL; --#if defined(__linux) || defined(__sun) -+#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) + //FIXME: I see no reason not to configureenable this for all Unixen +-#if defined(DEBUGGER) && (defined(__linux) || defined(__sun)) ++#if defined(DEBUGGER) && (defined(__linux) || defined(__sun) || defined(__FreeBSD__)) static void sigbrkhandler(int) { - #ifdef DEBUGGER -@@ -242,91 +318,43 @@ + CPU.Flags |= DEBUG_MODE_FLAG; +@@ -237,91 +311,43 @@ if (strcmp (argv [i], "-j") == 0 || strcasecmp (argv [i], "-nojoy") == 0) Settings.JoystickEnabled = FALSE; @@ -136,9 +123,23 @@ - { - if (i + 1 < argc) - js_device[0] = argv[++i]; -- else ++#ifdef __FreeBSD__ ++ else if (strcasecmp(argv[i], "-joyshift") == 0) ++ JoystickShift = 1; ++#endif ++ else if (strncasecmp(argv[i], "-joydev", sizeof("-joydev") - 1) == 0) { ++ char *end, *snum = argv[i] + sizeof("-joydev") - 1; ++ unsigned long num; ++ ++ if (*snum == '\0' || argc < i + 1) ++ S9xUsage(); ++ if ((num = strtoul(snum, &end, 10)) < JOYSTICK_MAX_DEVICES && ++ num > 0 && *end == '\0') ++ js_device[num - 1] = argv[++i]; + else - S9xUsage (); -- } ++ S9xUsage(); + } - else if (strcasecmp (argv [i], "-joydev2") == 0) - { - if (i + 1 < argc) @@ -197,23 +198,9 @@ - if ((t = atoi (argv [++i])) < 15) js_map_button [2][t] = SNES_START_MASK; - if ((t = atoi (argv [++i])) < 15) js_map_button [2][t] = SNES_SELECT_MASK; - } -+#ifdef __FreeBSD__ -+ else if (strcasecmp(argv[i], "-joyshift") == 0) -+ JoystickShift = 1; -+#endif -+ else if (strncasecmp(argv[i], "-joydev", sizeof("-joydev") - 1) == 0) { -+ char *end, *snum = argv[i] + sizeof("-joydev") - 1; -+ unsigned long num; -+ -+ if (*snum == '\0' || argc < i + 1) -+ S9xUsage(); -+ if ((num = strtoul(snum, &end, 10)) < JOYSTICK_MAX_DEVICES && -+ num > 0 && *end == '\0') -+ js_device[num - 1] = argv[++i]; - else +- else - S9xUsage (); -+ S9xUsage(); - } +- } - else if (strcasecmp (argv [i], "-joymap4") == 0) - { - if (i + 8 < argc) @@ -255,7 +242,7 @@ } else #endif -@@ -469,7 +497,7 @@ +@@ -472,7 +498,7 @@ #if !defined(__MSDOS) && defined(DEBUGGER) #if defined(__unix) && !defined(__NeXT__) struct sigaction sa; @@ -264,7 +251,7 @@ sa.sa_handler = sigbrkhandler; #else sa.sa_handler = (SIG_PF) sigbrkhandler; -@@ -661,6 +689,7 @@ +@@ -664,6 +690,7 @@ } #ifdef JOYSTICK_SUPPORT @@ -272,7 +259,7 @@ void InitJoysticks () { #ifdef JSIOCGVERSION -@@ -781,6 +810,189 @@ +@@ -784,6 +811,189 @@ } #endif } @@ -462,7 +449,7 @@ #endif // defined (JOYSTICK_SUPPORT) const char *GetHomeDirectory () -@@ -1568,7 +1780,7 @@ +@@ -1575,7 +1785,7 @@ } #endif @@ -471,7 +458,7 @@ static int Rates[8] = { 0, 8000, 11025, 16000, 22050, 32000, 44100, 48000 -@@ -1688,7 +1900,7 @@ +@@ -1696,7 +1906,7 @@ #endif @@ -480,7 +467,7 @@ void S9xUnixProcessSound (void) { } -@@ -1729,7 +1941,7 @@ +@@ -1737,7 +1947,7 @@ } #endif @@ -489,7 +476,7 @@ void S9xGenerateSound () { int bytes_so_far = so.sixteen_bit ? (so.samples_mixed_so_far << 1) : -@@ -1814,7 +2026,7 @@ +@@ -1822,7 +2032,7 @@ void *S9xProcessSound (void *) { diff --git a/emulators/snes9x/files/patch-aj b/emulators/snes9x/files/patch-aj deleted file mode 100644 index 09cbf1e05c4b..000000000000 --- a/emulators/snes9x/files/patch-aj +++ /dev/null @@ -1,41 +0,0 @@ ---- NETPLAY.CPP.orig Fri Jul 25 23:20:20 2003 -+++ NETPLAY.CPP Sat Aug 9 01:16:22 2003 -@@ -719,22 +719,24 @@ - return; - } - char fname [L_tmpnam]; -- FILE *tmp; -- if (tmpnam (fname)) -+ int tmp; -+ int flen = snprintf(fname, sizeof(fname), "%s/snes9x.XXXXXX", -+ getenv("TMPDIR") ? getenv("TMPDIR") : P_tmpdir); -+ if (flen == -1 || flen >= sizeof(fname) || (tmp = mkstemp(fname)) == -1) - { -- if ((tmp = fopen (fname, "wb"))) -- { -- if (fwrite (data, 1, len, tmp) == len) -- { -- fclose (tmp); -- if (!S9xUnfreezeGame (fname)) -- S9xNPSetError ("Unable to load freeze file just received."); -- } -- else -- fclose (tmp); -- } -- remove (fname); -+ S9xNPSetError("Unable to open a temporary freeze file."); -+ delete data; -+ return; - } -+ if (write(tmp, data, len) == len) -+ { -+ close(tmp); -+ if (!S9xUnfreezeGame (fname)) -+ S9xNPSetError ("Unable to load freeze file just received."); -+ } -+ else -+ close(tmp); -+ remove(fname); - delete data; - } - diff --git a/emulators/snes9x/files/patch-ak b/emulators/snes9x/files/patch-ak deleted file mode 100644 index 9eb539267827..000000000000 --- a/emulators/snes9x/files/patch-ak +++ /dev/null @@ -1,22 +0,0 @@ ---- SERVER.CPP.orig Fri Jul 25 23:20:20 2003 -+++ SERVER.CPP Sat Aug 9 01:17:35 2003 -@@ -976,11 +976,18 @@ - void S9xNPSyncClient (int client) - { - char fname [L_tmpnam]; -+ int fd; - - S9xNPWaitForEmulationToComplete (); - -+ int flen = snprintf(fname, sizeof(fname), "%s/snes9x.XXXXXX", -+ getenv("TMPDIR") ? getenv("TMPDIR") : P_tmpdir); -+ if (flen == -1 || flen >= sizeof(fname) || (fd = mkstemp(fname)) == -1) -+ return; -+ close(fd); -+ - S9xNPSetAction ("SERVER: Freezing game...", TRUE); -- if (tmpnam (fname) && S9xFreezeGame (fname)) -+ if (S9xFreezeGame (fname)) - { - uint8 *data; - uint32 len; diff --git a/emulators/snes9x/files/patch-configure b/emulators/snes9x/files/patch-configure index 1cbcb1a43917..579ec0dd54a2 100644 --- a/emulators/snes9x/files/patch-configure +++ b/emulators/snes9x/files/patch-configure @@ -1,14 +1,14 @@ ---- configure.orig Wed Aug 13 06:27:17 2003 -+++ configure Sun Oct 12 14:15:50 2003 -@@ -857,6 +857,7 @@ - --with(out)-aido Use a shared memory area for output (default: without) - --with(out)-joystick Enable joystick support if available (default: with) - --with(out)-assembler Use assembler cores if available (default: with) -+ --with(out)-mmx Use mmx assembly code (default: with) +--- configure.orig Fri Dec 5 02:03:08 2003 ++++ configure Sun Jan 25 00:50:04 2004 +@@ -646,6 +646,7 @@ + --with(out)-aido Use a shared memory area for output (default: without) + --with(out)-joystick Enable joystick support if available (default: with) + --with(out)-assembler Use assembler cores if available (default: with) ++ --with(out)-mmx Use mmx assembly code (default: with) + --with(out)-sdd1-decomp Use SDD1 decompression (default: with) + --with(out)-screenshot Screenshot support through libpng if available (default: with) --with-x use the X Window System - - Some influential environment variables: -@@ -2515,6 +2516,14 @@ +@@ -1992,6 +1993,14 @@ with_assembler=yes fi; @@ -20,11 +20,11 @@ + with_mmx=no +fi; + - - - OPTIMIZE="${OPTFLAGS-}" -@@ -4855,6 +4864,59 @@ - echo "$as_me:$LINENO: result: $snes9x_cv_hpux_os" >&5 + # Check whether --with-sdd1-decomp or --without-sdd1-decomp was given. + if test "${with_sdd1_decomp+set}" = set; then + withval="$with_sdd1_decomp" +@@ -3866,6 +3875,59 @@ + echo "$as_me:3866: result: $snes9x_cv_hpux_os" >&5 echo "${ECHO_T}$snes9x_cv_hpux_os" >&6 +echo "$as_me:$LINENO: checking if the OS is FreeBSD" >&5 @@ -80,10 +80,10 @@ +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 "$as_me:3869: 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 -@@ -4920,7 +4982,9 @@ +@@ -3970,7 +4032,9 @@ ZSNESFX='ZSNESFX=1' ZSNESC4='ZSNESC4=1' ASMCPU='ASMCPU=1' @@ -93,7 +93,7 @@ # SPC700ASM='SPC700ASM=1' I386SPC='i386/SPC.O' CPUINC='-Ii386' -@@ -4932,6 +4996,9 @@ +@@ -3985,6 +4049,9 @@ if test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then JOYDEFINES=' -DJOYSTICK_SUPPORT' @@ -103,20 +103,20 @@ else with_joystick="no" fi -@@ -6408,7 +6475,7 @@ - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ +@@ -5141,7 +5208,7 @@ + #line 5141 "configure" + #include "confdefs.h" -#if defined(__linux) || defined(__sun) || defined(__sgi) +#if defined(__linux) || defined(__sun) || defined(__sgi) || defined(__FreeBSD__) /* */ #else #error No sound for this platform -@@ -6617,6 +6684,7 @@ +@@ -5320,6 +5387,7 @@ display system.... $snes9x_info_display joystick support.. $with_joystick using asm cores... $with_assembler -+using mmx code... $with_mmx ++using mmx code.... $with_mmx + SDD1 decompession. $with_sdd1_decomp + debugger.......... $with_debugger - EOF - cat config.info |