summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-02-03 22:22:35 +0000
committerwiz <wiz@pkgsrc.org>2011-02-03 22:22:35 +0000
commit6f80d8bbfbda9f242d238900be58d6a198dc50a3 (patch)
treed5f0c847d5dfcacb2b1dc164bb02f6ffa4f5493f /emulators
parent919ff948ea1d6852396cf14325ada40948e9b060 (diff)
downloadpkgsrc-6f80d8bbfbda9f242d238900be58d6a198dc50a3.tar.gz
Initial import of mame-0.141:
MAME stands for Multiple Arcade Machine Emulator. When used in conjunction with images of the original arcade game's ROM and disk data, MAME attempts to reproduce that game as faithfully as possible on a more modern general-purpose computer. MAME can currently emulate several thousand different classic arcade video games from the late 1970s through the modern era. ROMs are needed to play the games. Some are freely available on the MAME homepage.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/mame/DESCR9
-rw-r--r--emulators/mame/Makefile35
-rw-r--r--emulators/mame/Makefile.common51
-rw-r--r--emulators/mame/PLIST16
-rw-r--r--emulators/mame/distinfo10
-rw-r--r--emulators/mame/patches/patch-makefile25
-rw-r--r--emulators/mame/patches/patch-src_emu_debug_debugcpu.c15
-rw-r--r--emulators/mame/patches/patch-src_emu_emucore.h22
-rw-r--r--emulators/mame/patches/patch-src_lib_util_astring.h17
-rw-r--r--emulators/mame/patches/patch-src_osd_sdl_sdlsync__ntc.c18
10 files changed, 218 insertions, 0 deletions
diff --git a/emulators/mame/DESCR b/emulators/mame/DESCR
new file mode 100644
index 00000000000..0dd9e45a74d
--- /dev/null
+++ b/emulators/mame/DESCR
@@ -0,0 +1,9 @@
+MAME stands for Multiple Arcade Machine Emulator. When used in
+conjunction with images of the original arcade game's ROM and disk
+data, MAME attempts to reproduce that game as faithfully as possible
+on a more modern general-purpose computer. MAME can currently
+emulate several thousand different classic arcade video games from
+the late 1970s through the modern era.
+
+ROMs are needed to play the games. Some are freely available on the
+MAME homepage.
diff --git a/emulators/mame/Makefile b/emulators/mame/Makefile
new file mode 100644
index 00000000000..b9e42aaacf1
--- /dev/null
+++ b/emulators/mame/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1.1.1 2011/02/03 22:22:35 wiz Exp $
+#
+
+DISTNAME= mame0141s
+PKGNAME= ${DISTNAME:S/0/-0./:S/s$//}
+MASTER_SITES= http://mamedev.org/downloader.php?file=releases/
+
+COMMENT= Multiple Arcade Machine Emulator
+
+CONFLICTS= xmame-[0-9]* sdlmame-[0-9]*
+
+DOCDIR= share/doc/mame
+INSTALLATION_DIRS= bin ${DOCDIR} ${PKGMANDIR}/man1
+
+# not installed, because not found necessary so far:
+# regrep, split, src2html, srcclean, testkeys
+do-install:
+ set -e; \
+ for prg in chdman jedutil ldresample ldverify mame romcmp unidasm; \
+ do \
+ ${INSTALL_PROGRAM} ${WRKSRC}/"$$prg" ${DESTDIR}${PREFIX}/bin; \
+ done
+ set -e; \
+ for doc in config.txt license.txt mame.txt; do \
+ ${INSTALL_DATA} ${WRKSRC}/docs/"$$doc" ${DESTDIR}${PREFIX}/${DOCDIR}; \
+ done
+# skipped: ldplayer man page exists, but no binary?
+# skipped: testkeys, binary not installed
+ set -e; \
+ for man in chdman.1 jedutil.1 ldverify.1 mame.1 romcmp.1; \
+ do \
+ ${INSTALL_DATA} ${WRKSRC}/src/osd/sdl/man/"$$man" ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \
+ done
+
+.include "Makefile.common"
diff --git a/emulators/mame/Makefile.common b/emulators/mame/Makefile.common
new file mode 100644
index 00000000000..18fbb0e60f4
--- /dev/null
+++ b/emulators/mame/Makefile.common
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2011/02/03 22:22:35 wiz Exp $
+#
+# used by emulators/mame/Makefile
+# used by emulators/mess/Makefile
+
+CATEGORIES= emulators
+EXTRACT_SUFX= .zip
+
+MAINTAINER= wiz@NetBSD.org
+HOMEPAGE= http://www.mamedev.org/
+LICENSE= mame-license
+
+RESTRICTED= selling is not allowed
+NO_SRC_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_CDROM= ${RESTRICTED}
+
+DEPENDS+= liberation-ttf-[0-9]*:../../fonts/liberation-ttf
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+WRKSRC= ${WRKDIR}
+
+# separate distinfos though, so don't forget 'make mdi' when
+# adding or changing patches
+PATCHDIR= ${.CURDIR}/../../emulators/mame/patches
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake pkg-config
+UNLIMIT_RESOURCES+= datasize
+MAKE_FILE= makefile
+# 0.141 has too many conversion warnings
+MAKE_ENV= NOWERROR=1
+
+. include "../../mk/endian.mk"
+.if ${MACHINE_ENDIAN:Mbig}
+MAKE_FLAGS+= BIGENDIAN=true
+.endif
+
+# mame source is double-zipped
+post-extract:
+ cd ${WRKDIR} && ${.CURDIR}/../../mk/extract/extract mame.zip
+ rm ${WRKDIR}/mame.zip
+
+.include "../../devel/GConf/buildlink3.mk"
+.include "../../devel/SDL/buildlink3.mk"
+.include "../../devel/SDL_ttf/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/mame/PLIST b/emulators/mame/PLIST
new file mode 100644
index 00000000000..be166d501e9
--- /dev/null
+++ b/emulators/mame/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2011/02/03 22:22:35 wiz Exp $
+bin/chdman
+bin/jedutil
+bin/ldresample
+bin/ldverify
+bin/mame
+bin/romcmp
+bin/unidasm
+man/man1/chdman.1
+man/man1/jedutil.1
+man/man1/ldverify.1
+man/man1/mame.1
+man/man1/romcmp.1
+share/doc/mame/config.txt
+share/doc/mame/license.txt
+share/doc/mame/mame.txt
diff --git a/emulators/mame/distinfo b/emulators/mame/distinfo
new file mode 100644
index 00000000000..6d460c33213
--- /dev/null
+++ b/emulators/mame/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+SHA1 (mame0141s.zip) = 80225e2694469dac39a75815f227b864a4992f5e
+RMD160 (mame0141s.zip) = c09ef461280dfd7e45ca638caaa66d8752a9794b
+Size (mame0141s.zip) = 17092788 bytes
+SHA1 (patch-makefile) = 59c3f439e3a250564e82ad6addc30b6c85dbc80c
+SHA1 (patch-src_emu_debug_debugcpu.c) = 1838cca446d62ebd824a540d30770fe56819cf03
+SHA1 (patch-src_emu_emucore.h) = 096ae265c2b0eb1021bd9b04b0b8b26e73519a9c
+SHA1 (patch-src_lib_util_astring.h) = 9cd5fbc7bd477707ba4de328e0429c0d6cbe6924
+SHA1 (patch-src_osd_sdl_sdlsync__ntc.c) = 1a8e940ad9cd59bd6bbc1850f24040a7d074b57a
diff --git a/emulators/mame/patches/patch-makefile b/emulators/mame/patches/patch-makefile
new file mode 100644
index 00000000000..74f3e17f05d
--- /dev/null
+++ b/emulators/mame/patches/patch-makefile
@@ -0,0 +1,25 @@
+$NetBSD: patch-makefile,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+First chunk accepted upstream, second pkgsrc-only.
+
+--- makefile.orig 2010-12-29 22:50:26.000000000 +0000
++++ makefile
+@@ -86,6 +88,9 @@ endif
+ ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
+ TARGETOS = freebsd
+ endif
++ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
++TARGETOS = netbsd
++endif
+ ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
+ TARGETOS = openbsd
+ endif
+@@ -344,7 +349,7 @@ NAME = $(TARGET)$(SUBTARGET)
+ endif
+
+ # fullname is prefix+name+suffix+suffix64+suffixdebug
+-FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(SUFFIXPROFILE)
++FULLNAME = $(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIXDEBUG)$(SUFFIXPROFILE)
+
+ # add an EXE suffix to get the final emulator name
+ EMULATOR = $(FULLNAME)$(EXE)
diff --git a/emulators/mame/patches/patch-src_emu_debug_debugcpu.c b/emulators/mame/patches/patch-src_emu_debug_debugcpu.c
new file mode 100644
index 00000000000..5687ba359ed
--- /dev/null
+++ b/emulators/mame/patches/patch-src_emu_debug_debugcpu.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_emu_debug_debugcpu.c,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+Sent upstream and accepted.
+
+--- src/emu/debug/debugcpu.c.orig 2010-12-31 16:41:26.000000000 +0000
++++ src/emu/debug/debugcpu.c
+@@ -51,7 +51,7 @@
+ #include "xmlfile.h"
+ #include <ctype.h>
+ #include <zlib.h>
+-#ifdef SDLMAME_FREEBSD
++#if defined(SDLMAME_FREEBSD) || defined(SDLMAME_NETBSD)
+ # undef tolower
+ #endif
+
diff --git a/emulators/mame/patches/patch-src_emu_emucore.h b/emulators/mame/patches/patch-src_emu_emucore.h
new file mode 100644
index 00000000000..087652e7c4b
--- /dev/null
+++ b/emulators/mame/patches/patch-src_emu_emucore.h
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_emu_emucore.h,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+Sent upstream and accepted.
+
+--- src/emu/emucore.h.orig 2010-12-31 14:59:46.000000000 +0000
++++ src/emu/emucore.h
+@@ -686,6 +686,7 @@ inline void fatalerror_exitcode(running_
+ //**************************************************************************
+
+ // population count
++#ifndef SDLMAME_NETBSD
+ inline int popcount(UINT32 val)
+ {
+ int count;
+@@ -694,6 +695,7 @@ inline int popcount(UINT32 val)
+ val &= val - 1;
+ return count;
+ }
++#endif
+
+
+ // convert a series of 32 bits into a float
diff --git a/emulators/mame/patches/patch-src_lib_util_astring.h b/emulators/mame/patches/patch-src_lib_util_astring.h
new file mode 100644
index 00000000000..48807e98b9d
--- /dev/null
+++ b/emulators/mame/patches/patch-src_lib_util_astring.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_lib_util_astring.h,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+Sent upstream and accepted.
+
+--- src/lib/util/astring.h.orig 2010-10-31 23:48:04.000000000 +0000
++++ src/lib/util/astring.h
+@@ -296,6 +296,10 @@ INLINE astring *astring_assemble_5(astri
+ ***************************************************************************/
+
+ #ifdef __cplusplus
++#ifdef SDLMAME_NETBSD
++#undef toupper
++#undef tolower
++#endif
+
+ /* derived class for C++ */
+ class astring : public astring_base
diff --git a/emulators/mame/patches/patch-src_osd_sdl_sdlsync__ntc.c b/emulators/mame/patches/patch-src_osd_sdl_sdlsync__ntc.c
new file mode 100644
index 00000000000..ba966723a2e
--- /dev/null
+++ b/emulators/mame/patches/patch-src_osd_sdl_sdlsync__ntc.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_osd_sdl_sdlsync__ntc.c,v 1.1.1.1 2011/02/03 22:22:36 wiz Exp $
+
+Sent upstream and accepted.
+
+--- src/osd/sdl/sdlsync_ntc.c.orig 2010-01-15 20:12:06.000000000 +0000
++++ src/osd/sdl/sdlsync_ntc.c
+@@ -19,6 +19,11 @@
+ #include <mach/mach.h>
+ #endif
+
++#ifdef SDLMAME_NETBSD
++/* for SIGKILL */
++#include <signal.h>
++#endif
++
+ // standard C headers
+ #include <math.h>
+ #include <unistd.h>