diff options
author | wiz <wiz> | 2009-01-18 16:02:17 +0000 |
---|---|---|
committer | wiz <wiz> | 2009-01-18 16:02:17 +0000 |
commit | 53f8653a9bd7a70f88fa58b2550a13953b62daf3 (patch) | |
tree | 8af1b2fbec7d2d07f7c44dd323e752eb1bb66d11 /emulators/sdlmame | |
parent | 691c7d889f842909b5d2d7e4a11cd057f685e23a (diff) | |
download | pkgsrc-53f8653a9bd7a70f88fa58b2550a13953b62daf3.tar.gz |
Initial import of sdlmame-0.129, packaged by dillo for wip.
absd and I did some updates on it.
SDL mame is the SDL port of the MAME arcade game emulator.
MAME is a virtual machine emulator; it includes emulators for numerous
CPUs, sound and video chips used in arcade games, as well as special
purpose decoding PALs and detailed information about the memory layout of
each game.
To play games in MAME you must have a copy of the original game ROMs.
Diffstat (limited to 'emulators/sdlmame')
-rw-r--r-- | emulators/sdlmame/DESCR | 8 | ||||
-rw-r--r-- | emulators/sdlmame/Makefile | 28 | ||||
-rw-r--r-- | emulators/sdlmame/Makefile.common | 63 | ||||
-rw-r--r-- | emulators/sdlmame/PLIST | 10 | ||||
-rw-r--r-- | emulators/sdlmame/distinfo | 9 | ||||
-rw-r--r-- | emulators/sdlmame/patches/patch-aa | 120 | ||||
-rw-r--r-- | emulators/sdlmame/patches/patch-ab | 50 | ||||
-rw-r--r-- | emulators/sdlmame/patches/patch-ae | 14 | ||||
-rw-r--r-- | emulators/sdlmame/patches/patch-ah | 13 |
9 files changed, 315 insertions, 0 deletions
diff --git a/emulators/sdlmame/DESCR b/emulators/sdlmame/DESCR new file mode 100644 index 00000000000..1527e0ac823 --- /dev/null +++ b/emulators/sdlmame/DESCR @@ -0,0 +1,8 @@ +SDL mame is the SDL port of the MAME arcade game emulator. + +MAME is a virtual machine emulator; it includes emulators for numerous +CPUs, sound and video chips used in arcade games, as well as special +purpose decoding PALs and detailed information about the memory layout of +each game. + +To play games in MAME you must have a copy of the original game ROMs. diff --git a/emulators/sdlmame/Makefile b/emulators/sdlmame/Makefile new file mode 100644 index 00000000000..27cda44099b --- /dev/null +++ b/emulators/sdlmame/Makefile @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ +# + +# Don't update to 0.XXXuN, those are development snapshots. +DISTNAME= sdlmame0129 +PKGNAME= sdlmame-0.129 + +COMMENT= Multiple Arcade Machine Emulator, SDL port + +CONFLICTS= xmame-[0-9]* + +MAKE_FILE= makefile + +DOCDIR= share/doc/sdlmame +INSTALLATION_DIRS= bin ${DOCDIR} + +do-install: + set -e; \ + for prg in chdman jedutil mame romcmp; \ + do \ + ${INSTALL_PROGRAM} ${WRKSRC}/"$$prg" ${DESTDIR}${PREFIX}/bin; \ + done + ${INSTALL_DATA} ${WRKSRC}/SDLMAME.txt ${DESTDIR}${PREFIX}/${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/license.txt ${DESTDIR}${PREFIX}/${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/mame.txt ${DESTDIR}${PREFIX}/${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/windows.txt ${DESTDIR}${PREFIX}/${DOCDIR} + +.include "Makefile.common" diff --git a/emulators/sdlmame/Makefile.common b/emulators/sdlmame/Makefile.common new file mode 100644 index 00000000000..f54787505fb --- /dev/null +++ b/emulators/sdlmame/Makefile.common @@ -0,0 +1,63 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ +# +# used by emulators/sdlmess/Makefile + +CATEGORIES= emulators +MASTER_SITES= http://rbelmont.mameworld.info/ \ + http://dev.gentoo.org/~joker/sdlmame/distfiles/ +EXTRACT_SUFX= .zip + +MAINTAINER= dillo@NetBSD.org +HOMEPAGE= http://rbelmont.mameworld.info/?page_id=163 + +PKG_DESTDIR_SUPPORT= user-destdir + +RESTRICTED= selling is not allowed +NO_SRC_ON_CDROM= ${RESTRICTED} +NO_BIN_ON_CDROM= ${RESTRICTED} + +USE_TOOLS+= gmake pkg-config +UNLIMIT_RESOURCES+= datasize +LICENSE= mame-license + +.if ${MACHINE_ARCH:Mi386} +MAKE_FLAGS+= X86_MIPS3_DRC=1 +MAKE_FLAGS+= X86_PPC_DRC=1 +#MAKE_FLAGS+= X86_ASM=1 +.else +MAKE_FLAGS+= X86_MIPS3_DRC= +MAKE_FLAGS+= X86_PPC_DRC= +.endif +# XXX: PTR64 +.if ${MACHINE_ARCH:Mx86_64} +MAKE_FLAGS+= PTR64=true +# XXX: FORCE_DRC_C_BACKEND? +.endif + +. include "../../mk/endian.mk" +.if ${MACHINE_ENDIAN:Mbig} +MAKE_FLAGS+= BIGENDIAN=true +.endif + +MAKE_FLAGS+= SDLMAME_NO64BITIO=true + +# Pragma once is not needed, and creates warnings/errors on gcc +SUBST_CLASSES+= pragma +SUBST_STAGE.pragma= pre-configure +SUBST_FILES.pragma= src/*.h src/*/*.h +SUBST_SED.pragma= -e "s|\#pragma once||g" + +# Using LD with calling conventions of CC is wrong, use CC instead. +SUBST_CLASSES+= ldcc +SUBST_STAGE.ldcc= pre-configure +SUBST_FILES.ldcc= ${MAKE_FILE} +SUBST_FILES.ldcc+= *.mak */*.mak */*/*.mak */*/*/*.mak */*/*/*/*.mak +SUBST_SED.ldcc= -e "s|(LD)|(CC)|" + +.include "../../devel/GConf/buildlink3.mk" +.include "../../devel/SDL/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/sdlmame/PLIST b/emulators/sdlmame/PLIST new file mode 100644 index 00000000000..8ac853d89cd --- /dev/null +++ b/emulators/sdlmame/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ +bin/chdman +bin/jedutil +bin/mame +bin/romcmp +share/doc/sdlmame/SDLMAME.txt +share/doc/sdlmame/license.txt +share/doc/sdlmame/mame.txt +share/doc/sdlmame/windows.txt +@dirrm share/doc/sdlmame diff --git a/emulators/sdlmame/distinfo b/emulators/sdlmame/distinfo new file mode 100644 index 00000000000..824f2728345 --- /dev/null +++ b/emulators/sdlmame/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ + +SHA1 (sdlmame0129.zip) = bf65a6f428a6824872bfa557ca5ad2b2800a433c +RMD160 (sdlmame0129.zip) = 23a13fb73b90b0c3c173a9ac2808f568a0a09c9e +Size (sdlmame0129.zip) = 17329162 bytes +SHA1 (patch-aa) = a4e3a04bcb3288932c341d48dc8c5d4c46e8b59d +SHA1 (patch-ab) = 9854400aadac7848531ed242a03ae05d5747bb5f +SHA1 (patch-ae) = dbcf17c973733727a6e1cc7a18f879d2b90d7184 +SHA1 (patch-ah) = 6a8e0307a58114cfe59d066a4e5e6210895dcc9a diff --git a/emulators/sdlmame/patches/patch-aa b/emulators/sdlmame/patches/patch-aa new file mode 100644 index 00000000000..802377b73fe --- /dev/null +++ b/emulators/sdlmame/patches/patch-aa @@ -0,0 +1,120 @@ +$NetBSD: patch-aa,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ + +--- makefile.orig 2008-08-31 18:48:22.000000000 +0200 ++++ makefile +@@ -125,10 +125,10 @@ endif + # BIGENDIAN = 1 + + # uncomment next line to build expat as part of MAME build +-BUILD_EXPAT = 1 ++# BUILD_EXPAT = 1 + + # uncomment next line to build zlib as part of MAME build +-BUILD_ZLIB = 1 ++# BUILD_ZLIB = 1 + + # uncomment next line to include the symbols + # SYMBOLS = 1 +@@ -193,9 +193,9 @@ BUILD_EXE = $(EXE) + endif + + # compiler, linker and utilities +-AR = @ar +-CC = @gcc +-LD = @gcc ++#AR = @ar ++#CC = @gcc ++#LD = @gcc + MD = -mkdir$(EXE) + RM = @rm -f + +@@ -219,7 +219,8 @@ NAME = $(TARGET)$(SUBTARGET) + endif + + # fullname is prefix+name+suffix+debugsuffix +-FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX) ++#FULLNAME = $(PREFIX)$(NAME)$(SUFFIX)$(DEBUGSUFFIX) ++FULLNAME = $(NAME)$(SUFFIX)$(DEBUGSUFFIX) + + # add an EXE suffix to get the final emulator name + EMULATOR = $(FULLNAME)$(EXE) +@@ -284,10 +285,10 @@ endif + #------------------------------------------------- + + # we compile to C89 standard with GNU extensions +-CFLAGS = -std=gnu89 ++#CFLAGS = -std=gnu89 + + # this speeds it up a bit by piping between the preprocessor/compiler/assembler +-CFLAGS += -pipe ++#CFLAGS += -pipe + + # add -g if we need symbols + ifdef SYMBOLS +@@ -321,14 +322,14 @@ CFLAGS += -Wdeclaration-after-statement + endif + + # add the optimization flag +-CFLAGS += -O$(OPTIMIZE) ++#CFLAGS += -O$(OPTIMIZE) + + # if we are optimizing, include optimization options + # and make all errors into warnings + ifneq ($(OPTIMIZE),0) + CFLAGS += $(ARCHOPTS) -fno-strict-aliasing + ifneq ($(TARGETOS),os2) +-CFLAGS += -Werror ++#CFLAGS += -Werror + endif + endif + +@@ -344,7 +345,7 @@ endif + #------------------------------------------------- + + # add core include paths +-CFLAGS += \ ++CFLAGS := \ + -I$(SRC)/$(TARGET) \ + -I$(SRC)/$(TARGET)/includes \ + -I$(OBJ)/$(TARGET)/layout \ +@@ -354,7 +355,7 @@ CFLAGS += \ + -I$(SRC)/lib/util \ + -I$(SRC)/osd \ + -I$(SRC)/osd/$(OSD) \ +- ++ $(CFLAGS) + + + #------------------------------------------------- +@@ -363,11 +364,11 @@ CFLAGS += \ + + # LDFLAGS are used generally; LDFLAGSEMULATOR are additional + # flags only used when linking the core emulator +-LDFLAGS = ++#LDFLAGS = + ifneq ($(TARGETOS),macosx) + ifneq ($(TARGETOS),os2) + ifneq ($(TARGETOS),solaris) +-LDFLAGS = -Wl,--warn-common ++#LDFLAGS = -Wl,--warn-common + endif + endif + endif +@@ -382,7 +383,7 @@ endif + ifndef SYMBOLS + ifndef PROFILE + ifneq ($(TARGETOS),macosx) +-LDFLAGS += -s ++#LDFLAGS += -s + endif + endif + endif +@@ -535,7 +536,7 @@ $(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LI + + $(EMULATOR): $(VERSIONOBJ) $(DRVLIBS) $(LIBOSD) $(LIBEMU) $(LIBCPU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(LIBOCORE) $(RESFILE) + @echo Linking $@... +- $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@ ++ $(CC) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@ + + endif + diff --git a/emulators/sdlmame/patches/patch-ab b/emulators/sdlmame/patches/patch-ab new file mode 100644 index 00000000000..684e6acaf7c --- /dev/null +++ b/emulators/sdlmame/patches/patch-ab @@ -0,0 +1,50 @@ +$NetBSD: patch-ab,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ + +--- src/osd/sdl/sdlsync.c.orig 2008-12-12 04:55:30.000000000 +0100 ++++ src/osd/sdl/sdlsync.c +@@ -587,14 +587,27 @@ int osd_thread_adjust_priority(osd_threa + int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask) + { + #if !defined(NO_THREAD_COOPERATIVE) && !defined(NO_AFFINITY_NP) ++#if defined(__NetBSD__) ++ cpuset_t *cmask; ++#else + cpu_set_t cmask; ++#endif + pthread_t lthread; + int bitnum; ++ int ret; + ++#if defined(__NetBSD__) ++ cmask = cpuset_create(); /* initializes set as well */ ++#else + CPU_ZERO(&cmask); ++#endif + for (bitnum=0; bitnum<32; bitnum++) + if (mask & (1<<bitnum)) ++#if defined(__NetBSD__) ++ cpuset_set(bitnum, cmask); ++#else + CPU_SET(bitnum, &cmask); ++#endif + + if (thread == NULL) + lthread = pthread_self(); +@@ -605,10 +618,15 @@ int osd_thread_cpu_affinity(osd_thread * + { + /* Not available during link in all targets */ + fprintf(stderr, "error %d setting cpu affinity to mask %08x", errno, mask); +- return FALSE; ++ ret = FALSE; + } + else +- return TRUE; ++ ret = TRUE; ++ ++#if defined(__NetBSD__) ++ cpuset_destroy(cmask); ++#endif ++ return ret; + #else + return TRUE; + #endif diff --git a/emulators/sdlmame/patches/patch-ae b/emulators/sdlmame/patches/patch-ae new file mode 100644 index 00000000000..2b024208e56 --- /dev/null +++ b/emulators/sdlmame/patches/patch-ae @@ -0,0 +1,14 @@ +$NetBSD: patch-ae,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ + +--- src/osd/sdl/sdldir.c.orig 2007-09-23 01:06:04.000000000 +0200 ++++ src/osd/sdl/sdldir.c +@@ -28,6 +28,9 @@ + #define __USE_BSD // to get DT_xxx on Linux + #endif + #undef _POSIX_C_SOURCE // to get DT_xxx on OS X ++#if defined(__NetBSD__) ++#define _NETBSD_SOURCE // to get DT_xxx on NetBSD ++#endif + #include <dirent.h> + + #include "osdcore.h" diff --git a/emulators/sdlmame/patches/patch-ah b/emulators/sdlmame/patches/patch-ah new file mode 100644 index 00000000000..40999d73fdc --- /dev/null +++ b/emulators/sdlmame/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1.1.1 2009/01/18 16:02:17 wiz Exp $ + +--- src/osd/sdl/sdlprefix.h.orig 2008-02-05 21:09:55.000000000 +0000 ++++ src/osd/sdl/sdlprefix.h +@@ -30,7 +30,7 @@ + #elif defined(__linux__) + #define SDLMAME_LINUX 1 + +-#elif defined(__FreeBSD__) || defined(__DragonFly__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) + #define SDLMAME_FREEBSD 1 + #endif + |