summaryrefslogtreecommitdiff
path: root/emulators/snes9x
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-10-18 13:11:58 +0000
committerrillig <rillig@pkgsrc.org>2006-10-18 13:11:58 +0000
commit161946be5200661507d861fe65f397e50ad23ff2 (patch)
treee4436c6fe009529f32af343d317f131510713491 /emulators/snes9x
parentdd10a2348176834a5595720cca7328a48d9addfb (diff)
downloadpkgsrc-161946be5200661507d861fe65f397e50ad23ff2.tar.gz
Fixed the package to build and install on Solaris with sunpro.
Diffstat (limited to 'emulators/snes9x')
-rw-r--r--emulators/snes9x/Makefile23
-rw-r--r--emulators/snes9x/distinfo8
-rw-r--r--emulators/snes9x/patches/patch-ag20
-rw-r--r--emulators/snes9x/patches/patch-aq25
-rw-r--r--emulators/snes9x/patches/patch-ba26
-rw-r--r--emulators/snes9x/patches/patch-bc16
6 files changed, 78 insertions, 40 deletions
diff --git a/emulators/snes9x/Makefile b/emulators/snes9x/Makefile
index b960f5eeddd..dcde23535bc 100644
--- a/emulators/snes9x/Makefile
+++ b/emulators/snes9x/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.38 2006/05/11 13:58:02 joerg Exp $
+# $NetBSD: Makefile,v 1.39 2006/10/18 13:11:58 rillig Exp $
SNESVER= 1.43
DISTNAME= snes9x-${SNESVER}-src
@@ -22,8 +22,8 @@ GNU_CONFIGURE= YES
SUBST_CLASSES+= nodos
SUBST_STAGE.nodos= pre-patch
SUBST_FILES.nodos= ../language.h
-SUBST_FILES.nodos+= dsp1.h dsp3emu.cpp dsp4emu.cpp
-SUBST_SED.nodos= -e 's| ||g'
+SUBST_FILES.nodos+= ../readme.txt dsp1.h dsp3emu.cpp dsp4emu.cpp
+SUBST_FILTER_CMD.nodos= tr -d '\r'
SUBST_CLASSES+= paircpp
SUBST_STAGE.paircpp= pre-patch
@@ -38,8 +38,7 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/changes.txt ${PREFIX}/share/doc/snes9x
${INSTALL_MAN} ${WRKSRC}/hardware.txt ${PREFIX}/share/doc/snes9x
${INSTALL_MAN} ${WRKSRC}/problems.txt ${PREFIX}/share/doc/snes9x
- ${TR} -d '\r' <${WRKDIR}/${DISTNAME}/readme.txt >${WRKSRC}/readme.txt
- ${INSTALL_MAN} ${WRKSRC}/readme.txt ${PREFIX}/share/doc/snes9x
+ ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/readme.txt ${PREFIX}/share/doc/snes9x
${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/readme.unix \
${PREFIX}/share/doc/snes9x
@@ -55,15 +54,15 @@ PKG_SUPPORTED_OPTIONS= mmx
.if ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+= --with-assembler
-.if !empty(PKG_OPTIONS:Mmmx)
+. if !empty(PKG_OPTIONS:Mmmx)
CONFIGURE_ARGS+= --with-mmx
-.endif
-.if ${OBJECT_FMT} == "a.out"
+. endif
+. if ${OBJECT_FMT} == "a.out"
MAKE_ENV+= FILEFORMAT=aoutb
MAKE_ENV+= _ASM_UNDERBARS=1
-.else
+. else
MAKE_ENV+= FILEFORMAT=elf
-.endif
+. endif
.endif
.if exists(${X11BASE}/lib/libXxf86dga.a)
@@ -72,9 +71,9 @@ CONFIGURE_ARGS+= --with-extensions
.if exists(/usr/include/usb.h) || exists(/usr/include/usbhid.h)
MAKE_ENV+= USBJOY=1
-.if exists(/usr/include/usbhid.h)
+. if exists(/usr/include/usbhid.h)
MAKE_ENV+= USBHID_H=1
-.endif
+. endif
.elif ${OPSYS} == "DragonFly" && exists(/usr/include/libusbhid.h)
MAKE_ENV+= USBJOY=1
MAKE_ENV+= USBHID_H=1
diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo
index 930a57b463d..69bb4e45cce 100644
--- a/emulators/snes9x/distinfo
+++ b/emulators/snes9x/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2006/07/05 21:21:36 wiz Exp $
+$NetBSD: distinfo,v 1.16 2006/10/18 13:11:58 rillig Exp $
SHA1 (snes9x-1.43-src.tar.gz) = c6883c451aeb442030862ec19a8dca25ee02d82c
RMD160 (snes9x-1.43-src.tar.gz) = d2003f7afb208109405b41f4eec586b93518f9b2
@@ -9,7 +9,7 @@ SHA1 (patch-ac) = c1e35daa7e53536d05c1633b78c00d511ae7feb5
SHA1 (patch-ad) = c5febcdd6b5bf0f3b4b5d8b0bc19c4716434a23e
SHA1 (patch-ae) = c4258835925ee3a6e3606ad895ff697f379cb22f
SHA1 (patch-af) = 19d86d23e3af2c0cef09b8eeff1303d6f100c2f8
-SHA1 (patch-ag) = b31e3840ff1245104d1bb093613eb793f4fb7a5a
+SHA1 (patch-ag) = 2d934957496d230ce2ec7cf88820254c2ccec36f
SHA1 (patch-ah) = eb5ff0fed972644f9c8599ec5eb6a3cd3ce160cb
SHA1 (patch-ai) = 06bd00790d1a84ee31114de4205bba22b48cd547
SHA1 (patch-aj) = f5cdf8e917f787d7e9fc657ed7197a2c28460375
@@ -19,6 +19,8 @@ SHA1 (patch-am) = 31d0ccf2e6124126929d9064ef2212d2a8bb963e
SHA1 (patch-an) = 3ae10526aa66ef235c223e891c67b4aed6fc48df
SHA1 (patch-ao) = b5b721563aee09909b7d6143bd699ec86ccaed3b
SHA1 (patch-ap) = 1c1b7f1b45d75688870a94dadadb6da055e99cd0
-SHA1 (patch-aq) = 6c591ec195bd06c2d0dfd6a947d0e57657fb306e
+SHA1 (patch-aq) = 31202122ec35997571c8df51871ff3c4034c701b
SHA1 (patch-ar) = 72a158e69b885b9ecf47245b9b83f8b50d48f96d
SHA1 (patch-as) = 64a9fb042f40a4a699bd4128d538fae1cb9cb810
+SHA1 (patch-ba) = 73dccd2fdab90760644af5bf7885c8d87d253a47
+SHA1 (patch-bc) = d43cdb435692b925347c192acb7c4ff5d8c1454d
diff --git a/emulators/snes9x/patches/patch-ag b/emulators/snes9x/patches/patch-ag
index 30e4e5f4142..852a056a540 100644
--- a/emulators/snes9x/patches/patch-ag
+++ b/emulators/snes9x/patches/patch-ag
@@ -1,7 +1,7 @@
-$NetBSD: patch-ag,v 1.9 2006/07/05 21:21:37 wiz Exp $
+$NetBSD: patch-ag,v 1.10 2006/10/18 13:11:59 rillig Exp $
---- unix/unix.cpp.orig 2004-12-30 22:15:47.000000000 +0000
-+++ unix/unix.cpp
+--- unix/unix.cpp.orig 2004-12-30 23:15:47.000000000 +0100
++++ unix/unix.cpp 2006-10-18 14:03:16.729013960 +0200
@@ -117,15 +117,25 @@
#ifdef USE_THREADS
@@ -300,6 +300,20 @@ $NetBSD: patch-ag,v 1.9 2006/07/05 21:21:37 wiz Exp $
#ifdef JSIOCGVERSION
struct js_event js_ev;
int i;
+@@ -1129,11 +1373,11 @@ void _splitpath (const char *path, char
+ {
+ *drive = 0;
+
+- char *slash = strrchr (path, '/');
++ const char *slash = strrchr (path, '/');
+ if (!slash)
+ slash = strrchr (path, '\\');
+
+- char *dot = strrchr (path, '.');
++ const char *dot = strrchr (path, '.');
+
+ if (dot && slash && dot < slash)
+ dot = NULL;
@@ -1646,7 +1890,7 @@ bool8 S9xOpenSoundDevice (int mode, bool
}
#endif
diff --git a/emulators/snes9x/patches/patch-aq b/emulators/snes9x/patches/patch-aq
index 8672ec5a3cf..a98177ee1af 100644
--- a/emulators/snes9x/patches/patch-aq
+++ b/emulators/snes9x/patches/patch-aq
@@ -1,7 +1,7 @@
-$NetBSD: patch-aq,v 1.1 2006/03/18 15:56:00 ben Exp $
+$NetBSD: patch-aq,v 1.2 2006/10/18 13:11:59 rillig Exp $
---- configure.orig 2004-12-30 14:15:48.000000000 -0800
-+++ configure
+--- configure.orig 2004-12-30 23:15:48.000000000 +0100
++++ configure 2006-10-18 13:51:14.687896164 +0200
@@ -23,7 +23,9 @@ ac_help="$ac_help
ac_help="$ac_help
--with(out)-aido Use a shared memory area for output (default: without)"
@@ -172,22 +172,3 @@ $NetBSD: patch-aq,v 1.1 2006/03/18 15:56:00 ben Exp $
/* */
#else
#error No sound for this platform
-@@ -4938,6 +5022,18 @@ for ac_option
- do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
-+ # Avoid regenerating for rechecks on pkgsrc
-+ exit 0
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
diff --git a/emulators/snes9x/patches/patch-ba b/emulators/snes9x/patches/patch-ba
new file mode 100644
index 00000000000..cfbb4837e2b
--- /dev/null
+++ b/emulators/snes9x/patches/patch-ba
@@ -0,0 +1,26 @@
+$NetBSD: patch-ba,v 1.1 2006/10/18 13:11:59 rillig Exp $
+
+SunPro interprets the original code as "extern C" pointer to "extern C"
+functions, which conflicts with the definition of the functions.
+
+--- apu.h.orig 2004-12-30 23:15:47.000000000 +0100
++++ apu.h 2006-10-18 13:50:59.265817188 +0200
+@@ -150,6 +150,9 @@ STATIC inline void S9xAPUPackStatus()
+ (IAPU._Zero & 0x80) | (IAPU._Overflow << 6);
+ }
+
++/* Note: This must be outside the "extern" block. */
++typedef void (*S9xApuOpcodeFunction)(void);
++
+ START_EXTERN_C
+ void S9xResetAPU (void);
+ bool8 S9xInitAPU ();
+@@ -167,7 +170,7 @@ void S9xOpenCloseSoundTracingFile (bool8
+ void S9xPrintAPUState ();
+ extern int32 S9xAPUCycles [256]; // Scaled cycle lengths
+ extern int32 S9xAPUCycleLengths [256]; // Raw data.
+-extern void (*S9xApuOpcodes [256]) (void);
++extern S9xApuOpcodeFunction S9xApuOpcodes[256];
+ END_EXTERN_C
+
+
diff --git a/emulators/snes9x/patches/patch-bc b/emulators/snes9x/patches/patch-bc
new file mode 100644
index 00000000000..6ddc0cb8f9c
--- /dev/null
+++ b/emulators/snes9x/patches/patch-bc
@@ -0,0 +1,16 @@
+$NetBSD: patch-bc,v 1.1 2006/10/18 13:11:59 rillig Exp $
+
+Type mismatch, caused by not using header files for function
+declarations.
+
+--- unix/x11.cpp.orig 2004-12-30 23:15:47.000000000 +0100
++++ unix/x11.cpp 2006-10-18 14:18:18.126928644 +0200
+@@ -209,7 +209,7 @@ int ErrorHandler (Display *, XErrorEvent
+ void TVMode (int width, int height);
+ void S9xDisplayStateChange (const char *str, bool8 on);
+
+-void Init_2xSaI (uint32);
++int Init_2xSaI (uint32);
+ void Super2xSaI (uint8 *srcPtr, uint32 srcPitch,
+ uint8 *deltaPtr, uint8 *dstPtr, uint32 dstPitch,
+ int width, int height);