summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-03-31 15:26:46 +0000
committerjoerg <joerg@pkgsrc.org>2015-03-31 15:26:46 +0000
commit9ebccb0496467d5965a21526431971e001f98baf (patch)
tree310b1accc77d5cdf2c6820af035b82051507bfaa
parentb4370cc4ddbb14862d48f75d506833f789daa922 (diff)
downloadpkgsrc-9ebccb0496467d5965a21526431971e001f98baf.tar.gz
Don't hard-code use of x86 asm or little endian, but properly detect
suppoprt for either.
-rw-r--r--emulators/sms_sdl/Makefile12
-rw-r--r--emulators/sms_sdl/distinfo4
-rw-r--r--emulators/sms_sdl/patches/patch-makefile14
-rw-r--r--emulators/sms_sdl/patches/patch-sdl_Makefile14
4 files changed, 42 insertions, 2 deletions
diff --git a/emulators/sms_sdl/Makefile b/emulators/sms_sdl/Makefile
index a20f04d7354..c3dc5e432b0 100644
--- a/emulators/sms_sdl/Makefile
+++ b/emulators/sms_sdl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2014/08/21 16:20:43 jperkin Exp $
+# $NetBSD: Makefile,v 1.14 2015/03/31 15:26:46 joerg Exp $
#
DISTNAME= sms_sdl-0.9.4a-r7.1-src
@@ -20,6 +20,16 @@ INSTALLATION_DIRS= bin
LDFLAGS.DragonFly= -lm
LDFLAGS.SunOS+= -lm
+.include "../../mk/endian.mk"
+
+.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
+CFLAGS+= -DX86_ASM
+.endif
+
+.if ${MACHINE_ENDIAN} == "little"
+CFLAGS+= -DLSB_FIRST
+.endif
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/sdl/sms_sdl ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/sms_sdl
diff --git a/emulators/sms_sdl/distinfo b/emulators/sms_sdl/distinfo
index e24afa8fca9..5b89ea54c6a 100644
--- a/emulators/sms_sdl/distinfo
+++ b/emulators/sms_sdl/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.2 2007/06/17 18:53:26 minskim Exp $
+$NetBSD: distinfo,v 1.3 2015/03/31 15:26:46 joerg Exp $
SHA1 (sms_sdl-0.9.4a-r7.1-src.zip) = 66147e5b9d69eca64924093ca26c580acf20c493
RMD160 (sms_sdl-0.9.4a-r7.1-src.zip) = 98a7b6101a496f80b5c5b54231816d39a69e40f5
Size (sms_sdl-0.9.4a-r7.1-src.zip) = 113154 bytes
SHA1 (patch-aa) = 80a6ee341b8b3e4d5c92bcd42ef26164dac3e9f6
+SHA1 (patch-makefile) = 870393cc8b598af1f57bb78b63906988e28e78d5
+SHA1 (patch-sdl_Makefile) = 22e92498d263a443e6421b93c830bf6391fa74af
diff --git a/emulators/sms_sdl/patches/patch-makefile b/emulators/sms_sdl/patches/patch-makefile
new file mode 100644
index 00000000000..e62d64de059
--- /dev/null
+++ b/emulators/sms_sdl/patches/patch-makefile
@@ -0,0 +1,14 @@
+$NetBSD: patch-makefile,v 1.1 2015/03/31 15:26:46 joerg Exp $
+
+--- makefile.orig 2015-03-25 15:03:24.000000000 +0000
++++ makefile
+@@ -8,8 +8,7 @@ CC = gcc
+ AS = nasm -f coff
+ LDFLAGS =
+ FLAGS = -I. -Icpu -Idos -Isound \
+- -Werror -Wall \
+- -O6 -mcpu=pentium -fomit-frame-pointer \
++ -Werror -Wall ${CFLAGS} \
+ -DLSB_FIRST -DX86_ASM
+
+ LIBS = -lalleg -laudio -lz
diff --git a/emulators/sms_sdl/patches/patch-sdl_Makefile b/emulators/sms_sdl/patches/patch-sdl_Makefile
new file mode 100644
index 00000000000..e8977db8ed4
--- /dev/null
+++ b/emulators/sms_sdl/patches/patch-sdl_Makefile
@@ -0,0 +1,14 @@
+$NetBSD: patch-sdl_Makefile,v 1.1 2015/03/31 15:26:46 joerg Exp $
+
+--- sdl/Makefile.orig 2015-03-25 15:04:19.000000000 +0000
++++ sdl/Makefile
+@@ -12,8 +12,7 @@
+ NAME = sms_sdl
+
+ CC = gcc
+-CFLAGS = `sdl-config --cflags` -O2
+-DEFINES = -DLSB_FIRST -DX86_ASM
++CFLAGS += `sdl-config --cflags`
+ INCLUDES = -I. -I.. -I../cpu -I../sound
+ LIBS = `sdl-config --libs`
+