summaryrefslogtreecommitdiff
path: root/emulators/snes9x
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>2003-10-20 04:20:31 +0000
committerBrian Feldman <green@FreeBSD.org>2003-10-20 04:20:31 +0000
commit24830960a1793fb80dadba9940619df57e20ac81 (patch)
treee34b09529b0f3db4d04b11e87db7c0f966147129 /emulators/snes9x
parentUpdate port: net/linphone to 0.12.0 (fix ports/55665) (diff)
Update to Snes9x version 1.41-1, courtesy HIYAMA Takeshi-san.
Submitted by: HIYAMA Takeshi <hymtk7@yahoo.co.jp>
Diffstat (limited to 'emulators/snes9x')
-rw-r--r--emulators/snes9x/Makefile42
-rw-r--r--emulators/snes9x/distinfo2
-rw-r--r--emulators/snes9x/files/patch-2XSAI.CPP25
-rw-r--r--emulators/snes9x/files/patch-3d.h11
-rw-r--r--emulators/snes9x/files/patch-Makefile.in53
-rw-r--r--emulators/snes9x/files/patch-configure122
6 files changed, 205 insertions, 50 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile
index 7a90e2c59c6d..ad636aa2c4c5 100644
--- a/emulators/snes9x/Makefile
+++ b/emulators/snes9x/Makefile
@@ -6,63 +6,39 @@
#
PORTNAME= snes9x
-PORTVERSION= 1.40
+PORTVERSION= 1.41
CATEGORIES= emulators
MASTER_SITES= http://www.lysator.liu.se/snes9x/
-DISTNAME= ${PORTNAME}-${PORTVERSION}-src-2
+DISTNAME= ${PORTNAME}-${PORTVERSION}-1-src
MAINTAINER= green@FreeBSD.org
COMMENT= Super Nintendo Entertainment System(SNES) Emulator
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-src/snes9x
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-1-src/snes9x
USE_X_PREFIX= YES
+GNU_CONFIGURE= YES
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
.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"
+CONFIGURE_ARGS+= --with-assembler
.if defined(WITH_MMX)
-MAKE_ARGS+= ASMKREED=1
+CONFIGURE_ARGS+= --with-mmx
.endif
.endif
.if exists(/usr/lib/libusbhid.a)
-JOYDEFINES= -DJOYSTICK_SUPPORT
-SYSLIBS= -lusbhid
+CONFIGURE_ARGS+= --with-joystick
+.else
+CONFIGURE_ARGS+= --without-joystick
.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
diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo
index c440a415dee9..6114d7d0b670 100644
--- a/emulators/snes9x/distinfo
+++ b/emulators/snes9x/distinfo
@@ -1 +1 @@
-MD5 (snes9x-1.40-src-2.tar.gz) = 81c1f8c687fb45fc20d631dd17702a20
+MD5 (snes9x-1.41-1-src.tar.gz) = 9b3f0a07484379a8d276c08ab1bbdb87
diff --git a/emulators/snes9x/files/patch-2XSAI.CPP b/emulators/snes9x/files/patch-2XSAI.CPP
index 3a00cac91e40..1897cbb01189 100644
--- a/emulators/snes9x/files/patch-2XSAI.CPP
+++ b/emulators/snes9x/files/patch-2XSAI.CPP
@@ -1,21 +1,14 @@
---- 2XSAI.CPP.orig Fri Jul 25 23:20:19 2003
-+++ 2XSAI.CPP Sat Aug 9 00:54:02 2003
-@@ -81,12 +81,12 @@
+--- 2XSAI.CPP.orig Sun Oct 19 22:52:14 2003
++++ 2XSAI.CPP Sun Oct 19 22:52:56 2003
+@@ -81,8 +81,9 @@
#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"
- {
++#if (!defined(NOASM) && !defined (__FreeBSD__) && defined (__i386__) || \
++ defined (__i486__) || defined (__i586__) || defined (__WIN32__) || \
++ defined (__DJGPP))
+ # ifndef MMX
+ # define MMX
+ # endif
diff --git a/emulators/snes9x/files/patch-3d.h b/emulators/snes9x/files/patch-3d.h
new file mode 100644
index 000000000000..965e0c40b985
--- /dev/null
+++ b/emulators/snes9x/files/patch-3d.h
@@ -0,0 +1,11 @@
+--- 3d.h.orig Wed Aug 13 06:27:16 2003
++++ 3d.h Fri Sep 12 00:05:49 2003
+@@ -80,7 +80,7 @@
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ #include <GL/glx.h>
+ #endif
+
diff --git a/emulators/snes9x/files/patch-Makefile.in b/emulators/snes9x/files/patch-Makefile.in
new file mode 100644
index 000000000000..7bfff8547dba
--- /dev/null
+++ b/emulators/snes9x/files/patch-Makefile.in
@@ -0,0 +1,53 @@
+--- Makefile.in.orig Wed Aug 13 06:27:16 2003
++++ Makefile.in Sun Oct 12 14:13:49 2003
+@@ -74,8 +74,6 @@
+ CHEATS.O cheats2.o data.o unix/unix.o unix/config.o GLOBALS.O \
+ $(SPC7110OBJ) $(OBC1OBJ) $(SETAOBJ) $(KREEDOBJ)
+
+-OBJECTS += ../zlib/libz.a
+-
+ ifdef GUI
+ GUIOBJS = unix/snes9x_gui.o unix/moc_snes9x_gui.o
+ GUILIBS = -L$(QTDIR)/lib -lqt
+@@ -95,7 +93,6 @@
+
+ ifdef THREAD_SOUND
+ CPUDEFINES += -DUSE_THREADS
+-EXTRALIBS += -lpthread
+ endif
+
+ ifdef GLIDE
+@@ -132,7 +129,7 @@
+ CC = @CC@
+ NASM = @NASM@
+
+-INCLUDES = -I../zlib @XINCLUDES@
++INCLUDES = @XINCLUDES@
+
+ OPTIMISE = @OPTIMIZE@
+
+@@ -209,19 +206,19 @@
+ ../zlib/libz.a:
+ cd ../zlib && sh ./configure && make
+
+-snes9x: $(OBJECTS) ../zlib/libz.a unix/x11.o $(AIDOOBJS) $(GUIOBJS)
++snes9x: $(OBJECTS) unix/x11.o $(AIDOOBJS) $(GUIOBJS)
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(AIDOOBJS) $(GLIDEOBJS) $(OPENGLOBJS) unix/x11.o $(GUIOBJS) $(LDLIBS) $(GLIDELIBS) $(OPENGLLIBS) $(GUILIBS) @SYSLIBS@ -lXext -lX11 $(EXTRALIBS) -lz -lm
+
+-ssnes9x: $(OBJECTS) ../zlib/libz.a unix/svga.o
++ssnes9x: $(OBJECTS) unix/svga.o
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) unix/svga.o $(LDLIBS) $(GLIDELIBS) -lvga -lvgagl -lz $(EXTRALIBS) -lm
+
+-gsnes9x: $(OBJECTS) ../zlib/libz.a $(GLIDEOBJS)
++gsnes9x: $(OBJECTS) $(GLIDEOBJS)
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) $(GLIDEOBJS) $(LDLIBS) -lglide -lz $(EXTRALIBS) -lm
+
+-ggisnes9x: $(OBJECTS) ../zlib/libz.a unix/ggi.o
++ggisnes9x: $(OBJECTS) unix/ggi.o
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/ggi.o $(LDLIBS) -lggi -lz $(EXTRALIBS) -lm
+
+-osnes9x: $(OBJECTS) ../zlib/libz.a unix/x11.o $(OPENGLOBJS)
++osnes9x: $(OBJECTS) unix/x11.o $(OPENGLOBJS)
+ $(CCC) $(INCLUDES) -o $@ $(OBJECTS) unix/x11.o $(OPENGLOBJS) $(LDLIBS) $(OPENGLLIBS) @SYSLIBS@ -lXext -lX11 $(EXTRALIBS) -lz -lm
+
+ s9xserver: $(SERVER_OBJECTS)
diff --git a/emulators/snes9x/files/patch-configure b/emulators/snes9x/files/patch-configure
new file mode 100644
index 000000000000..1cbcb1a43917
--- /dev/null
+++ b/emulators/snes9x/files/patch-configure
@@ -0,0 +1,122 @@
+--- 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)
+ --with-x use the X Window System
+
+ Some influential environment variables:
+@@ -2515,6 +2516,14 @@
+ with_assembler=yes
+ fi;
+
++# Check whether --with-mmx or --without-mmx was given.
++if test "${with_mmx+set}" = set -a yes = "$with_assembler"; then
++ withval="$with_mmx"
++
++else
++ with_mmx=no
++fi;
++
+
+
+ OPTIMIZE="${OPTFLAGS-}"
+@@ -4855,6 +4864,59 @@
+ echo "$as_me:$LINENO: 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
++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 $LINENO "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
++
+ 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
+@@ -4920,7 +4982,9 @@
+ ZSNESFX='ZSNESFX=1'
+ ZSNESC4='ZSNESC4=1'
+ ASMCPU='ASMCPU=1'
++if test yes = "$with_mmx"; then
+ ASMKREED='ASMKREED=1'
++fi
+ # SPC700ASM='SPC700ASM=1'
+ I386SPC='i386/SPC.O'
+ CPUINC='-Ii386'
+@@ -4932,6 +4996,9 @@
+
+ if test yes = "$snes9x_cv_linux_os" -a yes = "$with_joystick"; then
+ JOYDEFINES=' -DJOYSTICK_SUPPORT'
++elif test yes = "$snes9x_cv_freebsd_os" -a yes = "$with_joystick"; then
++ JOYDEFINES=' -DJOYSTICK_SUPPORT'
++ SYSLIBS="$SYSLIBS"' -lusbhid'
+ else
+ with_joystick="no"
+ fi
+@@ -6408,7 +6475,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end 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 @@
+ display system.... $snes9x_info_display
+ joystick support.. $with_joystick
+ using asm cores... $with_assembler
++using mmx code... $with_mmx
+
+ EOF
+ cat config.info