summaryrefslogtreecommitdiff
path: root/emulators/tuxnes
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-03-07 15:52:40 +0000
committerhans <hans@pkgsrc.org>2012-03-07 15:52:40 +0000
commit6eb3ff4426a9c655edb88e2f2747e83e10a735ae (patch)
treea7ce7c3cc3ca2b3a8caef1e519b996ee653bf144 /emulators/tuxnes
parent6466b8339ab6d78e43d43bd2b0ad21a19ca75be0 (diff)
downloadpkgsrc-6eb3ff4426a9c655edb88e2f2747e83e10a735ae.tar.gz
Fix build on SunOS.
- buildlink against x11/xextproto for shmproto.h - endian defines - use GNU ld to build table.o
Diffstat (limited to 'emulators/tuxnes')
-rw-r--r--emulators/tuxnes/Makefile16
-rw-r--r--emulators/tuxnes/distinfo8
-rw-r--r--emulators/tuxnes/patches/patch-ac16
-rw-r--r--emulators/tuxnes/patches/patch-af24
-rw-r--r--emulators/tuxnes/patches/patch-ag14
5 files changed, 65 insertions, 13 deletions
diff --git a/emulators/tuxnes/Makefile b/emulators/tuxnes/Makefile
index 19dfd1c8df9..0a63d899d69 100644
--- a/emulators/tuxnes/Makefile
+++ b/emulators/tuxnes/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2011/03/15 09:00:24 obache Exp $
+# $NetBSD: Makefile,v 1.11 2012/03/07 15:52:40 hans Exp $
#
DISTNAME= tuxnes-0.75
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=tuxnes/}
@@ -24,6 +24,17 @@ SUBST_MESSAGE.dsp= Adjusting sound device path.
SUBST_FILES.dsp= consts.h
SUBST_SED.dsp= -e "s|/dev/dsp|${DEVOSSAUDIO}|"
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "SunOS"
+SUBST_CLASSES+= gld
+SUBST_STAGE.gld= post-patch
+SUBST_MESSAGE.gld= Using GNU ld to create table.o
+SUBST_FILES.gld= Makefile.in
+SUBST_SED.gld= -e "/ld -r/s/ld/gld/"
+.endif
+
+CPPFLAGS.SunOS+= -D_XOPEN_SOURCE=500
+
post-install:
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/tuxnes
.for doc in AUTHORS BUGS COPYING README THANKS
@@ -32,5 +43,6 @@ post-install:
.include "../../devel/zlib/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
+.include "../../x11/xextproto/buildlink3.mk"
.include "../../mk/oss.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/tuxnes/distinfo b/emulators/tuxnes/distinfo
index 8ff1ce4072b..5e1d491a60f 100644
--- a/emulators/tuxnes/distinfo
+++ b/emulators/tuxnes/distinfo
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.3 2006/01/12 21:03:20 joerg Exp $
+$NetBSD: distinfo,v 1.4 2012/03/07 15:52:40 hans Exp $
SHA1 (tuxnes-0.75.tar.gz) = 1729cb3a33a5a3e0c8fa81a1341f912cd0b8d18b
RMD160 (tuxnes-0.75.tar.gz) = d4a94e00f7c90cbf6fbf19537ede22aca05eeafd
Size (tuxnes-0.75.tar.gz) = 198735 bytes
SHA1 (patch-aa) = d907d8c64ffec0977160f61bf70eb5223a6fc1d2
SHA1 (patch-ab) = b2acfc6915f30f28aadc5a9ddf780596c8120f72
-SHA1 (patch-ac) = dc4bb8796812c3dd24f338f7c8b465199d80207e
+SHA1 (patch-ac) = c4545c6ae356755caf7a99922f123c3516b4bb46
SHA1 (patch-ad) = 25a937a0fcc0e52a42f8614656ca9e6eb08f02b9
SHA1 (patch-ae) = 4f988a7351a1bceb5eb5add4e11cd3d02d011908
-SHA1 (patch-af) = dd655363b844f0264879f8efd3e5efae6672b43c
-SHA1 (patch-ag) = 4afd1f53df82ddc229ff3c505be1133a3cb206d6
+SHA1 (patch-af) = 30cee85f028d6abad63cf2bd0893f2b6cf162771
+SHA1 (patch-ag) = 9cb25ce55b4c7020c2d5ad8dababae9387d109a5
diff --git a/emulators/tuxnes/patches/patch-ac b/emulators/tuxnes/patches/patch-ac
index e3c4567f456..8dc7d12a721 100644
--- a/emulators/tuxnes/patches/patch-ac
+++ b/emulators/tuxnes/patches/patch-ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-ac,v 1.2 2006/01/12 21:03:20 joerg Exp $
+$NetBSD: patch-ac,v 1.3 2012/03/07 15:52:40 hans Exp $
--- sound.c.orig 2001-04-11 21:45:47.000000000 +0000
+++ sound.c
-@@ -104,11 +104,12 @@
+@@ -104,12 +104,22 @@
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -14,9 +14,19 @@ $NetBSD: patch-ac,v 1.2 2006/01/12 21:03:20 joerg Exp $
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
++#elif defined(__sun)
++#include <sys/byteorder.h>
++#define LITTLE_ENDIAN 1234
++#define BIG_ENDIAN 4321
++#ifdef _BIG_ENDIAN
++#define BYTE_ORDER BIG_ENDIAN
++#else
++#define BYTE_ORDER LITTLE_ENDIAN
++#endif
#else /* Linux */
#include <endian.h>
-@@ -411,7 +412,7 @@ InitAudio(int argc, char **argv)
+ #endif
+@@ -411,7 +421,7 @@ InitAudio(int argc, char **argv)
{
int desired_fragmentsize = 0;
#ifdef SNDCTL_DSP_RESET
diff --git a/emulators/tuxnes/patches/patch-af b/emulators/tuxnes/patches/patch-af
index a4c483f76bd..1fdaae226cf 100644
--- a/emulators/tuxnes/patches/patch-af
+++ b/emulators/tuxnes/patches/patch-af
@@ -1,13 +1,33 @@
-$NetBSD: patch-af,v 1.1 2006/01/12 21:03:20 joerg Exp $
+$NetBSD: patch-af,v 1.2 2012/03/07 15:52:40 hans Exp $
--- x11.c.orig 2006-01-12 20:53:39.000000000 +0000
+++ x11.c
-@@ -31,7 +31,7 @@
+@@ -31,8 +31,18 @@
#include <unistd.h>
#if defined(__FreeBSD__)
#include <machine/endian.h>
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
++#elif defined(__sun)
++#include <sys/byteorder.h>
++#define LITTLE_ENDIAN 1234
++#define BIG_ENDIAN 4321
++#define PDP_ENDIAN 3412
++#ifdef _BIG_ENDIAN
++#define BYTE_ORDER BIG_ENDIAN
++#else
++#define BYTE_ORDER LITTLE_ENDIAN
++#endif
#else /* Linux */
#include <endian.h>
+ #endif
+@@ -93,6 +103,8 @@
+ #ifdef HAVE_SYS_SHM_H
+ #ifdef HAVE_X11_EXTENSIONS_XSHM_H
+ #define HAVE_SHM 1
++#include <X11/Xmd.h>
++#include <X11/extensions/shmproto.h>
+ #endif /* HAVE_X11_EXTENSIONS_XSHM_H */
+ #endif /* HAVE_SYS_SHM_H */
+ #endif /* HAVE_SYS_IPC_H */
diff --git a/emulators/tuxnes/patches/patch-ag b/emulators/tuxnes/patches/patch-ag
index 8cc03aeb645..7efed9c98d0 100644
--- a/emulators/tuxnes/patches/patch-ag
+++ b/emulators/tuxnes/patches/patch-ag
@@ -1,13 +1,23 @@
-$NetBSD: patch-ag,v 1.1 2006/01/12 21:03:20 joerg Exp $
+$NetBSD: patch-ag,v 1.2 2012/03/07 15:52:40 hans Exp $
--- w.c.orig 2006-01-12 20:48:51.000000000 +0000
+++ w.c
-@@ -29,7 +29,7 @@
+@@ -29,8 +29,17 @@
#include <unistd.h>
#if defined(__FreeBSD__)
#include <machine/endian.h>
-#elif defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/endian.h>
++#elif defined(__sun)
++#include <sys/byteorder.h>
++#define LITTLE_ENDIAN 1234
++#define BIG_ENDIAN 4321
++#ifdef _BIG_ENDIAN
++#define BYTE_ORDER BIG_ENDIAN
++#else
++#define BYTE_ORDER LITTLE_ENDIAN
++#endif
#else /* Linux */
#include <endian.h>
+ #endif