Fri Feb 11 12:49:34 2011 UTC ()
All source files in mame.zip have CR-LF but are marked as binary, so
unzip -a does not help. Hence all patches must have CR-LF


(abs)
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/Makefile.common
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/distinfo
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-makefile
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-src_emu_debug_debugcpu.c
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-src_emu_emucore.h
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-src_lib_util_astring.h
diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-src_osd_sdl_sdlsync__ntc.c

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/Attic/Makefile.common (expand / switch to unified diff)

--- pkgsrc/emulators/mame/Attic/Makefile.common 2011/02/03 22:22:35 1.1.1.1
+++ pkgsrc/emulators/mame/Attic/Makefile.common 2011/02/11 12:49:33 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.1.1.1 2011/02/03 22:22:35 wiz Exp $ 1# $NetBSD: Makefile.common,v 1.2 2011/02/11 12:49:33 abs Exp $
2# 2#
3# used by emulators/mame/Makefile 3# used by emulators/mame/Makefile
4# used by emulators/mess/Makefile 4# used by emulators/mess/Makefile
5 5
6CATEGORIES= emulators 6CATEGORIES= emulators
7EXTRACT_SUFX= .zip 7EXTRACT_SUFX= .zip
8 8
9MAINTAINER= wiz@NetBSD.org 9MAINTAINER= wiz@NetBSD.org
10HOMEPAGE= http://www.mamedev.org/ 10HOMEPAGE= http://www.mamedev.org/
11LICENSE= mame-license 11LICENSE= mame-license
12 12
13RESTRICTED= selling is not allowed 13RESTRICTED= selling is not allowed
14NO_SRC_ON_CDROM= ${RESTRICTED} 14NO_SRC_ON_CDROM= ${RESTRICTED}
@@ -27,25 +27,27 @@ PATCHDIR= ${.CURDIR}/../../emulators/ma @@ -27,25 +27,27 @@ PATCHDIR= ${.CURDIR}/../../emulators/ma
27USE_LANGUAGES= c c++ 27USE_LANGUAGES= c c++
28USE_TOOLS+= gmake pkg-config 28USE_TOOLS+= gmake pkg-config
29UNLIMIT_RESOURCES+= datasize 29UNLIMIT_RESOURCES+= datasize
30MAKE_FILE= makefile 30MAKE_FILE= makefile
31# 0.141 has too many conversion warnings 31# 0.141 has too many conversion warnings
32MAKE_ENV= NOWERROR=1 32MAKE_ENV= NOWERROR=1
33 33
34. include "../../mk/endian.mk" 34. include "../../mk/endian.mk"
35.if ${MACHINE_ENDIAN:Mbig} 35.if ${MACHINE_ENDIAN:Mbig}
36MAKE_FLAGS+= BIGENDIAN=true 36MAKE_FLAGS+= BIGENDIAN=true
37.endif 37.endif
38 38
39# mame source is double-zipped 39# mame source is double-zipped
 40# Note all files have CR-LF but are marked as binary, so unzip -a
 41# does not help. Hence all patches must have CR-LF
40post-extract: 42post-extract:
41 cd ${WRKDIR} && ${.CURDIR}/../../mk/extract/extract mame.zip 43 cd ${WRKDIR} && ${.CURDIR}/../../mk/extract/extract mame.zip
42 rm ${WRKDIR}/mame.zip 44 rm ${WRKDIR}/mame.zip
43 45
44.include "../../devel/GConf/buildlink3.mk" 46.include "../../devel/GConf/buildlink3.mk"
45.include "../../devel/SDL/buildlink3.mk" 47.include "../../devel/SDL/buildlink3.mk"
46.include "../../devel/SDL_ttf/buildlink3.mk" 48.include "../../devel/SDL_ttf/buildlink3.mk"
47.include "../../devel/zlib/buildlink3.mk" 49.include "../../devel/zlib/buildlink3.mk"
48.include "../../textproc/expat/buildlink3.mk" 50.include "../../textproc/expat/buildlink3.mk"
49.include "../../x11/libXinerama/buildlink3.mk" 51.include "../../x11/libXinerama/buildlink3.mk"
50.include "../../x11/gtk2/buildlink3.mk" 52.include "../../x11/gtk2/buildlink3.mk"
51.include "../../mk/bsd.pkg.mk" 53.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/distinfo (expand / switch to unified diff)

--- pkgsrc/emulators/mame/distinfo 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/distinfo 2011/02/11 12:49:33 1.2
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: distinfo,v 1.2 2011/02/11 12:49:33 abs Exp $
2 2
3SHA1 (mame0141s.zip) = 80225e2694469dac39a75815f227b864a4992f5e 3SHA1 (mame0141s.zip) = 80225e2694469dac39a75815f227b864a4992f5e
4RMD160 (mame0141s.zip) = c09ef461280dfd7e45ca638caaa66d8752a9794b 4RMD160 (mame0141s.zip) = c09ef461280dfd7e45ca638caaa66d8752a9794b
5Size (mame0141s.zip) = 17092788 bytes 5Size (mame0141s.zip) = 17092788 bytes
6SHA1 (patch-makefile) = 59c3f439e3a250564e82ad6addc30b6c85dbc80c 6SHA1 (patch-makefile) = 87a66c19f0fd637bd90dec41b42940a5e516c2fd
7SHA1 (patch-src_emu_debug_debugcpu.c) = 1838cca446d62ebd824a540d30770fe56819cf03 7SHA1 (patch-src_emu_debug_debugcpu.c) = b980e28e4a97086a585577c68d1d331a146276bc
8SHA1 (patch-src_emu_emucore.h) = 096ae265c2b0eb1021bd9b04b0b8b26e73519a9c 8SHA1 (patch-src_emu_emucore.h) = 602eafc4d2439a206c9429495b4885672d49dc88
9SHA1 (patch-src_lib_util_astring.h) = 9cd5fbc7bd477707ba4de328e0429c0d6cbe6924 9SHA1 (patch-src_lib_util_astring.h) = c401491310c675996b5fb6c180e19c9c9289ab31
10SHA1 (patch-src_osd_sdl_sdlsync__ntc.c) = 1a8e940ad9cd59bd6bbc1850f24040a7d074b57a 10SHA1 (patch-src_osd_sdl_sdlsync__ntc.c) = 697e9b178783f2a8f8d8efe749a75e0023ef6a35

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/patch-makefile (expand / switch to unified diff)

--- pkgsrc/emulators/mame/patches/patch-makefile 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/patches/patch-makefile 2011/02/11 12:49:33 1.2
@@ -1,25 +1,23 @@ @@ -1,25 +1,23 @@
1$NetBSD: patch-makefile,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: patch-makefile,v 1.2 2011/02/11 12:49:33 abs Exp $
2 
3First chunk accepted upstream, second pkgsrc-only. 
4 2
5--- makefile.orig 2010-12-29 22:50:26.000000000 +0000 3--- makefile.orig 2010-12-29 22:50:26.000000000 +0000
6+++ makefile 4+++ makefile
7@@ -86,6 +88,9 @@ endif 5@@ -86,6 +86,9 @@ endif
8 ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD) 6 ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
9 TARGETOS = freebsd 7 TARGETOS = freebsd
10 endif 8 endif
11+ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD) 9+ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
12+TARGETOS = netbsd 10+TARGETOS = netbsd
13+endif 11+endif
14 ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD) 12 ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
15 TARGETOS = openbsd 13 TARGETOS = openbsd
16 endif 14 endif
17@@ -344,7 +349,7 @@ NAME = $(TARGET)$(SUBTARGET) 15@@ -344,7 +347,7 @@ NAME = $(TARGET)$(SUBTARGET)
18 endif 16 endif
19  17
20 # fullname is prefix+name+suffix+suffix64+suffixdebug 18 # fullname is prefix+name+suffix+suffix64+suffixdebug
21-FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(SUFFIXPROFILE) 19-FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(SUFFIXPROFILE)
22+FULLNAME = $(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIXDEBUG)$(SUFFIXPROFILE) 20+FULLNAME = $(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIXDEBUG)$(SUFFIXPROFILE)
23  21
24 # add an EXE suffix to get the final emulator name 22 # add an EXE suffix to get the final emulator name
25 EMULATOR = $(FULLNAME)$(EXE) 23 EMULATOR = $(FULLNAME)$(EXE)

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/Attic/patch-src_emu_debug_debugcpu.c (expand / switch to unified diff)

--- pkgsrc/emulators/mame/patches/Attic/patch-src_emu_debug_debugcpu.c 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/patches/Attic/patch-src_emu_debug_debugcpu.c 2011/02/11 12:49:33 1.2
@@ -1,15 +1,13 @@ @@ -1,15 +1,13 @@
1$NetBSD: patch-src_emu_debug_debugcpu.c,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: patch-src_emu_debug_debugcpu.c,v 1.2 2011/02/11 12:49:33 abs Exp $
2 
3Sent upstream and accepted. 
4 2
5--- src/emu/debug/debugcpu.c.orig 2010-12-31 16:41:26.000000000 +0000 3--- src/emu/debug/debugcpu.c.orig 2010-12-31 16:41:26.000000000 +0000
6+++ src/emu/debug/debugcpu.c 4+++ src/emu/debug/debugcpu.c
7@@ -51,7 +51,7 @@ 5@@ -51,7 +51,7 @@
8 #include "xmlfile.h" 6 #include "xmlfile.h"
9 #include <ctype.h> 7 #include <ctype.h>
10 #include <zlib.h> 8 #include <zlib.h>
11-#ifdef SDLMAME_FREEBSD 9-#ifdef SDLMAME_FREEBSD
12+#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_NETBSD) 10+#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_NETBSD)
13 # undef tolower 11 # undef tolower
14 #endif 12 #endif
15  13

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/Attic/patch-src_emu_emucore.h (expand / switch to unified diff)

--- pkgsrc/emulators/mame/patches/Attic/patch-src_emu_emucore.h 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/patches/Attic/patch-src_emu_emucore.h 2011/02/11 12:49:33 1.2
@@ -1,22 +1,20 @@ @@ -1,22 +1,20 @@
1$NetBSD: patch-src_emu_emucore.h,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: patch-src_emu_emucore.h,v 1.2 2011/02/11 12:49:33 abs Exp $
2 
3Sent upstream and accepted. 
4 2
5--- src/emu/emucore.h.orig 2010-12-31 14:59:46.000000000 +0000 3--- src/emu/emucore.h.orig 2010-12-31 14:59:46.000000000 +0000
6+++ src/emu/emucore.h 4+++ src/emu/emucore.h
7@@ -686,6 +686,7 @@ inline void fatalerror_exitcode(running_ 5@@ -686,6 +686,7 @@ inline void fatalerror_exitcode(running_
8 //************************************************************************** 6 //**************************************************************************
9  7
10 // population count 8 // population count
11+#ifndef SDLMAME_NETBSD 9+#ifndef SDLMAME_NETBSD
12 inline int popcount(UINT32 val) 10 inline int popcount(UINT32 val)
13 { 11 {
14 int count; 12 int count;
15@@ -694,6 +695,7 @@ inline int popcount(UINT32 val) 13@@ -694,6 +695,7 @@ inline int popcount(UINT32 val)
16 val &= val - 1; 14 val &= val - 1;
17 return count; 15 return count;
18 } 16 }
19+#endif 17+#endif
20  18
21  19
22 // convert a series of 32 bits into a float 20 // convert a series of 32 bits into a float

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/Attic/patch-src_lib_util_astring.h (expand / switch to unified diff)

--- pkgsrc/emulators/mame/patches/Attic/patch-src_lib_util_astring.h 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/patches/Attic/patch-src_lib_util_astring.h 2011/02/11 12:49:33 1.2
@@ -1,17 +1,15 @@ @@ -1,17 +1,15 @@
1$NetBSD: patch-src_lib_util_astring.h,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: patch-src_lib_util_astring.h,v 1.2 2011/02/11 12:49:33 abs Exp $
2 
3Sent upstream and accepted. 
4 2
5--- src/lib/util/astring.h.orig 2010-10-31 23:48:04.000000000 +0000 3--- src/lib/util/astring.h.orig 2010-10-31 23:48:04.000000000 +0000
6+++ src/lib/util/astring.h 4+++ src/lib/util/astring.h
7@@ -296,6 +296,10 @@ INLINE astring *astring_assemble_5(astri 5@@ -296,6 +296,10 @@ INLINE astring *astring_assemble_5(astri
8 ***************************************************************************/ 6 ***************************************************************************/
9  7
10 #ifdef __cplusplus 8 #ifdef __cplusplus
11+#ifdef SDLMAME_NETBSD 9+#ifdef SDLMAME_NETBSD
12+#undef toupper 10+#undef toupper
13+#undef tolower 11+#undef tolower
14+#endif 12+#endif
15  13
16 /* derived class for C++ */ 14 /* derived class for C++ */
17 class astring : public astring_base 15 class astring : public astring_base

cvs diff -r1.1.1.1 -r1.2 pkgsrc/emulators/mame/patches/Attic/patch-src_osd_sdl_sdlsync__ntc.c (expand / switch to unified diff)

--- pkgsrc/emulators/mame/patches/Attic/patch-src_osd_sdl_sdlsync__ntc.c 2011/02/03 22:22:36 1.1.1.1
+++ pkgsrc/emulators/mame/patches/Attic/patch-src_osd_sdl_sdlsync__ntc.c 2011/02/11 12:49:33 1.2
@@ -1,18 +1,16 @@ @@ -1,18 +1,16 @@
1$NetBSD: patch-src_osd_sdl_sdlsync__ntc.c,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $ 1$NetBSD: patch-src_osd_sdl_sdlsync__ntc.c,v 1.2 2011/02/11 12:49:33 abs Exp $
2 
3Sent upstream and accepted. 
4 2
5--- src/osd/sdl/sdlsync_ntc.c.orig 2010-01-15 20:12:06.000000000 +0000 3--- src/osd/sdl/sdlsync_ntc.c.orig 2010-01-15 20:12:06.000000000 +0000
6+++ src/osd/sdl/sdlsync_ntc.c 4+++ src/osd/sdl/sdlsync_ntc.c
7@@ -19,6 +19,11 @@ 5@@ -19,6 +19,11 @@
8 #include <mach/mach.h> 6 #include <mach/mach.h>
9 #endif 7 #endif
10  8
11+#ifdef SDLMAME_NETBSD 9+#ifdef SDLMAME_NETBSD
12+/* for SIGKILL */ 10+/* for SIGKILL */
13+#include <signal.h> 11+#include <signal.h>
14+#endif 12+#endif
15+ 13+
16 // standard C headers 14 // standard C headers
17 #include <math.h> 15 #include <math.h>
18 #include <unistd.h> 16 #include <unistd.h>