aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/snes9x
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2003-08-09 21:21:14 +0800
committergreen <green@FreeBSD.org>2003-08-09 21:21:14 +0800
commit4397e5cf59b974a0e80d7f821ccddcb81a38d6a8 (patch)
treeb681c02e656ae8b7134c5ffc40c81285cf6e9ec6 /emulators/snes9x
parent2d902b91bf7756bdaa3329384e7b1b0ec26c3197 (diff)
downloadfreebsd-ports-gnome-4397e5cf59b974a0e80d7f821ccddcb81a38d6a8.tar.gz
freebsd-ports-gnome-4397e5cf59b974a0e80d7f821ccddcb81a38d6a8.tar.zst
freebsd-ports-gnome-4397e5cf59b974a0e80d7f821ccddcb81a38d6a8.zip
Now that there's a download site again, upgrade to version 1.40.
Submitted by: KATO Tsuguru <tkato@prontomail.com> PR: ports/44225
Diffstat (limited to 'emulators/snes9x')
-rw-r--r--emulators/snes9x/Makefile76
-rw-r--r--emulators/snes9x/distinfo2
-rw-r--r--emulators/snes9x/files/patch-2XSAI.CPP21
-rw-r--r--emulators/snes9x/files/patch-aa83
-rw-r--r--emulators/snes9x/files/patch-ad21
-rw-r--r--emulators/snes9x/files/patch-ae31
-rw-r--r--emulators/snes9x/files/patch-af55
-rw-r--r--emulators/snes9x/files/patch-aj6
-rw-r--r--emulators/snes9x/files/patch-ak6
9 files changed, 132 insertions, 169 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile
index 2045fda18739..7a90e2c59c6d 100644
--- a/emulators/snes9x/Makefile
+++ b/emulators/snes9x/Makefile
@@ -6,48 +6,64 @@
#
PORTNAME= snes9x
-PORTVERSION= 1.37c
+PORTVERSION= 1.40
CATEGORIES= emulators
-# MASTER_SITES= http://www.snes9x.com/zips/ is nonexistant right now
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= green
-DISTNAME= s9xs137c
+MASTER_SITES= http://www.lysator.liu.se/snes9x/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src-2
MAINTAINER= green@FreeBSD.org
COMMENT= Super Nintendo Entertainment System(SNES) Emulator
-.if ${MACHINE_ARCH} == i386
-BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
-.elif ${MACHINE_ARCH} == alpha
-MAKEFILE= Makefile.alpha
-BROKEN= currently does not work on alpha
-.endif
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src/snes9x
-USE_GMAKE= YES
USE_X_PREFIX= YES
-MAKE_ENV= CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}"
-USE_ZIP= YES
-WRKSRC= ${WRKDIR}/release
+USE_GMAKE= YES
+MAKE_ARGS= CC="${CC} ${CFLAGS}" CCC="${CXX} ${CXXFLAGS}" \
+ INCLUDES="-I${X11BASE}/include ${PTHREAD_CFLAGS}" \
+ LDLIBS="-L${X11BASE}/lib ${PTHREAD_LIBS}" \
+ THREAD_SOUND=1 NETPLAY=1 UNZIP=1
-.if exists(/usr/lib/libusbhid.a)
-MAKE_ENV+= USB_JOYSTICK_SUPPORT=yes
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "i386"
+BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
+MAKE_ARGS+= ZSNESFX=1 ZSNESC4=1 ASMCPU=1 NASM="nasm" I386SPC="i386/SPC.O"
+.if defined(WITH_MMX)
+MAKE_ARGS+= ASMKREED=1
+.endif
.endif
-ONLY_FOR_ARCHS= i386
-
-.if ${MACHINE_ARCH} == alpha
-post-patch:
- @${SED} -e '/^ZSNESFX/d' \
- -e '/^ASMCPU/d' \
- -e '/^OPTIMISE/s/-mpentium //' \
- -e '/^-Ii386/d' \
- -e '/offsets >/s:i386/::' \
- < ${WRKSRC}/Makefile \
- > ${WRKSRC}/Makefile.alpha
+.if exists(/usr/lib/libusbhid.a)
+JOYDEFINES= -DJOYSTICK_SUPPORT
+SYSLIBS= -lusbhid
.endif
+do-configure:
+ @cd ${WRKSRC} && ${SED} \
+ 's:@ZSNESFX@:: ; \
+ s:@ZSNESC4@::g ; \
+ s:@ASMCPU@::g ; \
+ s:@SPC700ASM@::g ; \
+ s:@GLIDE@::g ; \
+ s:@OPENGL@::g ; \
+ s:@AIDO@::g ; \
+ s:@THREAD_SOUND@::g ; \
+ s:@ASMKREED@::g ; \
+ s:@I386SPC@:$${I386SPC}:g ; \
+ s:@JOYDEFINES@:${JOYDEFINES}:g ; \
+ s:@CXX@::g ; \
+ s:@RTTIFLAG@::g ; \
+ s:@CC@::g ; \
+ s:@NASM@::g ; \
+ s:@XINCLUDES@::g ; \
+ s:@OPTIMIZE@::g ; \
+ s:@CPUINC@::g ; \
+ s:@SYSDEFINES@:-DZLIB:g ; \
+ s:@SYSLIBS@:${SYSLIBS}:g ; \
+ s: -lpthread::g ; \
+ s: \.\./zlib/libz\.a::g' < Makefile.in > Makefile
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/snes9x ${PREFIX}/bin
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo
index 465d5020bbf4..c440a415dee9 100644
--- a/emulators/snes9x/distinfo
+++ b/emulators/snes9x/distinfo
@@ -1 +1 @@
-MD5 (s9xs137c.zip) = 45a29cb3ba2354c3fa7ad936ac655a07
+MD5 (snes9x-1.40-src-2.tar.gz) = 81c1f8c687fb45fc20d631dd17702a20
diff --git a/emulators/snes9x/files/patch-2XSAI.CPP b/emulators/snes9x/files/patch-2XSAI.CPP
new file mode 100644
index 000000000000..3a00cac91e40
--- /dev/null
+++ b/emulators/snes9x/files/patch-2XSAI.CPP
@@ -0,0 +1,21 @@
+--- 2XSAI.CPP.orig Fri Jul 25 23:20:19 2003
++++ 2XSAI.CPP Sat Aug 9 00:54:02 2003
+@@ -81,12 +81,12 @@
+ #include "port.h"
+ #include "gfx.h"
+
+-#if (!defined(NOASM) && defined (__i386__) || defined (__i486__) || \
+- defined (__i586__) || defined (__WIN32__) || defined (__DJGPP))
+-# ifndef MMX
+-# define MMX
+-# endif
+-#endif
++//#if (!defined(NOASM) && defined (__i386__) || defined (__i486__) || \
++// defined (__i586__) || defined (__WIN32__) || defined (__DJGPP))
++//# ifndef MMX
++//# define MMX
++//# endif
++//#endif
+
+ extern "C"
+ {
diff --git a/emulators/snes9x/files/patch-aa b/emulators/snes9x/files/patch-aa
deleted file mode 100644
index b86fedec824e..000000000000
--- a/emulators/snes9x/files/patch-aa
+++ /dev/null
@@ -1,83 +0,0 @@
---- Makefile.orig Wed Feb 28 12:29:58 2001
-+++ Makefile Sat Sep 28 20:50:19 2002
-@@ -4,7 +4,6 @@
- #SPC700ASM=1
- NETPLAY=1
- UNZIP=1
--GLIDE=1
- #GUI=1
- THREAD_SOUND=1
- ASMKREED=1
-@@ -81,11 +80,6 @@
- UNZIPDEFINES=-DUNZIP_SUPPORT
- endif
-
--ifdef THREAD_SOUND
--CPUDEFINES += -DUSE_THREADS
--EXTRALIBS += -lpthread
--endif
--
- ifdef GLIDE
- GLIDEOBJS = unix/glide.o
- GLIDEDEFINES = -DUSE_GLIDE -I/usr/include/glide
-@@ -98,13 +92,13 @@
- endif
-
- MOC = $(QTDIR)/bin/moc
--CCC = g++ -fno-rtti
-+CCC = $(CXX) -fno-rtti
- CC = gcc
- NASM = nasm
-
--INCLUDES=-I/usr/X11R6/include -I/usr/local/include
-+INCLUDES=-I$(X11BASE)/include -I$(LOCALBASE)/include
-
--OPTIMISE= -O6 -mpentium -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe
-+OPTIMISE= $(CFLAGS) -fomit-frame-pointer -fno-exceptions -Wall -W -pedantic -pipe
-
- #OPTIMISE=-g -fno-exceptions
- #-DMITSHM
-@@ -119,6 +113,7 @@
- -DDEBUGGER \
- -DCPU_SHUTDOWN \
- -DSPC700_SHUTDOWN \
-+-DSOUND \
- $(LINUXDEFINES) \
- $(FXDEFINES) \
- $(C4DEFINES) \
-@@ -131,6 +126,11 @@
- $(KREEDDEFINES)
- #-DNO_INLINE_SET_GET
-
-+ifdef USB_JOYSTICK_SUPPORT
-+CCFLAGS += -DJOYSTICK_SUPPORT
-+EXTRALIBS += -lusbhid
-+endif
-+
- #-DSOUND
- #-DDEBUGGER
- #-DNO_INLINE_SET_GET
-@@ -138,12 +138,10 @@
- #-DCPU_SHUTDOWN
- #-DSPC700_SHUTDOWN
-
--CFLAGS=$(CCFLAGS)
--
- .SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj
--LDLIBS = -L/usr/X11R6/lib frame.o
-+LDLIBS = -L$(X11BASE)/lib
-
--all: offsets snes9x ssnes9x
-+all: offsets snes9x
-
- #ggisnes9x
- #xf86snes9x
-@@ -165,7 +163,7 @@
- ./offsets >i386/offsets.h
-
- snes9x: $(OBJECTS) unix/x11.o $(GLIDEOBJS) $(GUIOBJS)
-- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm
-+ $(CCC) $(INCLUDES) $(OPTIMISE) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(GUILIBS) -lXxf86dga -lXxf86vm -lXext -lX11 $(EXTRALIBS) -lz -lm
-
- ssnes9x: $(OBJECTS) unix/svga.o $(GLIDEOBJS)
- $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/svga.o $(LDLIBS) $(GLIDELIBS) -lvga -lvgagl -lz $(EXTRALIBS) -lm
diff --git a/emulators/snes9x/files/patch-ad b/emulators/snes9x/files/patch-ad
index 3c75d946a057..eb743156a502 100644
--- a/emulators/snes9x/files/patch-ad
+++ b/emulators/snes9x/files/patch-ad
@@ -1,8 +1,7 @@
-diff -ru ../../work/release/memmap.cpp ./memmap.cpp
---- ../../work/release/memmap.cpp Thu Sep 23 19:56:48 1999
-+++ ./memmap.cpp Wed Dec 29 01:54:04 1999
-@@ -39,7 +39,7 @@
- #include <string.h>
+--- 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>
-#ifdef __linux
@@ -10,12 +9,12 @@ diff -ru ../../work/release/memmap.cpp ./memmap.cpp
#include <unistd.h>
#endif
-@@ -737,7 +737,7 @@
- {
- fwrite ((char *) ::SRAM, size, 1, file);
- fclose (file);
+@@ -1443,7 +1443,7 @@
+ {
+ fwrite ((char *) ::SRAM, size, 1, file);
+ fclose (file);
-#if defined(__linux)
+#if defined(__linux) || defined(__FreeBSD__)
- chown (filename, getuid (), getgid ());
+ chown (filename, getuid (), getgid ());
#endif
- return (TRUE);
+ if(Settings.SPC7110RTC)
diff --git a/emulators/snes9x/files/patch-ae b/emulators/snes9x/files/patch-ae
index b7b120bf16dd..d5d078ee1a01 100644
--- a/emulators/snes9x/files/patch-ae
+++ b/emulators/snes9x/files/patch-ae
@@ -1,30 +1,31 @@
---- port.h.orig Fri Oct 6 17:02:39 2000
-+++ port.h Fri Oct 13 18:37:38 2000
-@@ -56,15 +56,15 @@
-
+--- 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 unsigned int uint32;
--typedef unsigned char bool8;
-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 u_int32_t uint32;
-+typedef u_int8_t bool8;
+typedef int8_t int8;
+typedef int16_t int16;
- #ifndef __WIN32__
--typedef int int32;
--typedef long long int64;
+typedef int32_t int32;
++typedef u_int32_t uint32;
+typedef int64_t int64;
- #else
- #ifndef WSAAPI
- // winsock2.h typedefs int32 as well.
-@@ -162,6 +162,10 @@
+ #else /* __WIN32__ */
+
+ #ifdef __BORLANDC__
+@@ -255,6 +255,10 @@
#ifdef __linux
#define TITLE "Snes9X: Linux"
diff --git a/emulators/snes9x/files/patch-af b/emulators/snes9x/files/patch-af
index 881ab83aa813..5c68e30ab73e 100644
--- a/emulators/snes9x/files/patch-af
+++ b/emulators/snes9x/files/patch-af
@@ -1,8 +1,8 @@
---- unix/unix.cpp.orig Wed Feb 28 16:12:23 2001
-+++ unix/unix.cpp Tue May 13 13:07:48 2003
-@@ -51,9 +51,11 @@
+--- 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__)
@@ -13,7 +13,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-@@ -68,8 +70,12 @@
+@@ -114,8 +116,12 @@
pthread_mutex_t mutex;
#endif
@@ -27,9 +27,9 @@
#include <sys/mman.h>
#endif
-@@ -85,6 +91,11 @@
- typedef void (*SIG_PF)();
- #endif
+@@ -132,6 +138,11 @@
+ //typedef void (*SIG_PF)();
+ //#endif
+#if defined(__FreeBSD__)
+typedef sig_t SIG_PF;
@@ -37,9 +37,9 @@
+#endif
+
#include "snes9x.h"
- #include "memmap.h"
+ #include "MEMMAP.H"
#include "debug.h"
-@@ -111,7 +122,10 @@
+@@ -158,7 +169,10 @@
int NumControllers = 5;
#ifdef JOYSTICK_SUPPORT
@@ -50,7 +50,7 @@
#include <linux/joystick.h>
int js_fd [4] = {-1, -1, -1, -1};
int js_map_button [4][16] = {
-@@ -158,6 +172,68 @@
+@@ -205,6 +219,68 @@
char *js_device [4] = {"/dev/js0", "/dev/js1", "/dev/js2", "/dev/js3"};
#endif
@@ -119,7 +119,7 @@
void InitJoysticks ();
void ReadJoysticks ();
#endif
-@@ -168,7 +244,7 @@
+@@ -215,7 +291,7 @@
char *rom_filename = NULL;
char *snapshot_filename = NULL;
@@ -128,7 +128,7 @@
static void sigbrkhandler(int)
{
#ifdef DEBUGGER
-@@ -195,91 +271,43 @@
+@@ -242,91 +318,43 @@
if (strcmp (argv [i], "-j") == 0 ||
strcasecmp (argv [i], "-nojoy") == 0)
Settings.JoystickEnabled = FALSE;
@@ -255,7 +255,7 @@
}
else
#endif
-@@ -418,7 +446,7 @@
+@@ -469,7 +497,7 @@
#if !defined(__MSDOS) && defined(DEBUGGER)
#if defined(__unix) && !defined(__NeXT__)
struct sigaction sa;
@@ -264,7 +264,7 @@
sa.sa_handler = sigbrkhandler;
#else
sa.sa_handler = (SIG_PF) sigbrkhandler;
-@@ -610,6 +638,7 @@
+@@ -661,6 +689,7 @@
}
#ifdef JOYSTICK_SUPPORT
@@ -272,7 +272,7 @@
void InitJoysticks ()
{
#ifdef JSIOCGVERSION
-@@ -730,6 +759,189 @@
+@@ -781,6 +810,189 @@
}
#endif
}
@@ -462,7 +462,7 @@
#endif // defined (JOYSTICK_SUPPORT)
const char *GetHomeDirectory ()
-@@ -1422,7 +1634,7 @@
+@@ -1568,7 +1780,7 @@
}
#endif
@@ -470,17 +470,26 @@
+#if defined(__linux) || defined(__FreeBSD__)
static int Rates[8] =
{
- 0, 8192, 11025, 16500, 22050, 29300, 36600, 44000
-@@ -1541,7 +1753,7 @@
- }
+ 0, 8000, 11025, 16000, 22050, 32000, 44100, 48000
+@@ -1688,7 +1900,7 @@
#endif
--#if defined (__linux) || defined (__sun)
-+#if defined (__linux) || defined (__sun) || defined(__FreeBSD__)
+
+-#if defined (__linux) || defined (__sun) || defined(NOSOUND)
++#if defined(__linux) || defined(__sun) || defined(__FreeBSD__) || defined(NOSOUND)
void S9xUnixProcessSound (void)
{
}
-@@ -1640,7 +1852,7 @@
+@@ -1729,7 +1941,7 @@
+ }
+ #endif
+
+-#if defined (__linux) || defined (__sun)
++#if defined(__linux) || defined(__sun) || defined(__FreeBSD__)
+ void S9xGenerateSound ()
+ {
+ int bytes_so_far = so.sixteen_bit ? (so.samples_mixed_so_far << 1) :
+@@ -1814,7 +2026,7 @@
void *S9xProcessSound (void *)
{
diff --git a/emulators/snes9x/files/patch-aj b/emulators/snes9x/files/patch-aj
index 1230887f0cb2..09cbf1e05c4b 100644
--- a/emulators/snes9x/files/patch-aj
+++ b/emulators/snes9x/files/patch-aj
@@ -1,6 +1,6 @@
---- netplay.cpp.orig Fri Oct 13 18:44:41 2000
-+++ netplay.cpp Fri Oct 13 18:56:53 2000
-@@ -682,22 +682,24 @@
+--- 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];
diff --git a/emulators/snes9x/files/patch-ak b/emulators/snes9x/files/patch-ak
index f91abc7d2a31..9eb539267827 100644
--- a/emulators/snes9x/files/patch-ak
+++ b/emulators/snes9x/files/patch-ak
@@ -1,6 +1,6 @@
---- server.cpp.orig Fri Oct 13 18:57:43 2000
-+++ server.cpp Fri Oct 13 19:02:56 2000
-@@ -940,11 +940,18 @@
+--- 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];