Date: Sat, 31 Jan 2004 23:00:19 +0900 From: KATO Tsuguru <tkato@prontomail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/62158: Update port: emulators/snes9x to 1.42 Message-ID: <20040131230019.270055ec.tkato@prontomail.com> Resent-Message-ID: <200401311410.i0VEANMo046770@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 62158 >Category: ports >Synopsis: Update port: emulators/snes9x to 1.42 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 31 06:10:23 PST 2004 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 4.9-RELEASE-p1 i386 >Organization: >Environment: >Description: - Update to version 1.42 Remove file: files/patch-aj files/patch-ak >How-To-Repeat: >Fix: diff -urN /usr/ports/emulators/snes9x/Makefile emulators/snes9x/Makefile --- /usr/ports/emulators/snes9x/Makefile Tue Oct 21 20:20:43 2003 +++ emulators/snes9x/Makefile Sun Jan 25 01:24:15 2004 @@ -6,10 +6,10 @@ # PORTNAME= snes9x -PORTVERSION= 1.41.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 @@ -17,11 +17,12 @@ 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> @@ -31,9 +32,12 @@ .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 -urN /usr/ports/emulators/snes9x/distinfo emulators/snes9x/distinfo --- /usr/ports/emulators/snes9x/distinfo Tue Oct 21 00:51:47 2003 +++ emulators/snes9x/distinfo Thu Jan 29 20:29:01 2004 @@ -1 +1 @@ -MD5 (snes9x-1.41-1-src.tar.gz) = 9b3f0a07484379a8d276c08ab1bbdb87 +MD5 (snes9x-1.42-src.tar.gz) = 1e8af4c590e35352ddac58d25a468676 diff -urN /usr/ports/emulators/snes9x/files/patch-2XSAI.CPP emulators/snes9x/files/patch-2XSAI.CPP --- /usr/ports/emulators/snes9x/files/patch-2XSAI.CPP Tue Oct 21 00:51:47 2003 +++ emulators/snes9x/files/patch-2XSAI.CPP Sun Jan 25 01:41:25 2004 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-ad emulators/snes9x/files/patch-ad --- /usr/ports/emulators/snes9x/files/patch-ad Sun Aug 10 04:26:40 2003 +++ emulators/snes9x/files/patch-ad Sun Jan 25 00:26:42 2004 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-ae emulators/snes9x/files/patch-ae --- /usr/ports/emulators/snes9x/files/patch-ae Sun Aug 10 04:26:40 2003 +++ emulators/snes9x/files/patch-ae Sun Jan 25 00:27:21 2004 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-af emulators/snes9x/files/patch-af --- /usr/ports/emulators/snes9x/files/patch-af Tue Aug 12 01:46:52 2003 +++ emulators/snes9x/files/patch-af Sun Jan 25 00:53:06 2004 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-aj emulators/snes9x/files/patch-aj --- /usr/ports/emulators/snes9x/files/patch-aj Sun Aug 10 04:26:40 2003 +++ emulators/snes9x/files/patch-aj Thu Jan 1 09:00:00 1970 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-ak emulators/snes9x/files/patch-ak --- /usr/ports/emulators/snes9x/files/patch-ak Sun Aug 10 04:26:40 2003 +++ emulators/snes9x/files/patch-ak Thu Jan 1 09:00:00 1970 @@ -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 -urN /usr/ports/emulators/snes9x/files/patch-configure emulators/snes9x/files/patch-configure --- /usr/ports/emulators/snes9x/files/patch-configure Mon Oct 20 13:20:31 2003 +++ emulators/snes9x/files/patch-configure Sun Jan 25 01:10:37 2004 @@ -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 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040131230019.270055ec.tkato>