aboutsummaryrefslogtreecommitdiff
path: root/emulators/xmame
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2001-03-27 10:38:45 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2001-03-27 10:38:45 +0000
commit9f0183ed5afc8071a4ec34cbe4b0f9cc7416edcd (patch)
tree7ca17b19c37e2c24f7196a08dc048f2cbe626384 /emulators/xmame
parent6b3d543d569660e0d52a8c45de0be56025824d30 (diff)
downloadports-9f0183ed5afc8071a4ec34cbe4b0f9cc7416edcd.tar.gz
ports-9f0183ed5afc8071a4ec34cbe4b0f9cc7416edcd.zip
Notes
Diffstat (limited to 'emulators/xmame')
-rw-r--r--emulators/xmame/Makefile203
-rw-r--r--emulators/xmame/distinfo7
-rw-r--r--emulators/xmame/files/patch-ab31
-rw-r--r--emulators/xmame/files/patch-ac28
-rw-r--r--emulators/xmame/pkg-plist65
5 files changed, 248 insertions, 86 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index 754c9e22402a..cc74b3f58e62 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -5,30 +5,54 @@
# $FreeBSD$
#
-PORTNAME= xmame
-PORTVERSION= 0.37b11.2
+PORTNAME?= xmame
+PORTVERSION?= 0.37b12.1
CATEGORIES= emulators
MASTER_SITES= http://x.mame.net/download/ \
ftp://ftp.kaupp.cx/pub/xmame/ \
- http://www.ozemail.com.au/~knebauer/xmame/files/
+ http://www.ozemail.com.au/~knebauer/xmame/files/ \
+ http://www.mame.net/zips/ \
+ http://cheat.retrogames.com/ \
+ http://www.sys2064.com/files/mame/
+DISTNAME= xmame-${PORTVERSION:S/p/pre/}
+DIST_SUBDIR= xmame
+EXTRACT_SUFX= .tgz
-MAINTAINER= c9710216@studentmail.newcastle.edu.au
+MAINTAINER?= c9710216@studentmail.newcastle.edu.au
-USE_BZIP2= yes
USE_XPM= yes
USE_X_PREFIX= yes
USE_GMAKE= yes
MAKEFILE= makefile.unix
-MAN6= xmame.6
+MAN6= x${MAMEMESS}.6
-XMAMEDOCS= changes.mame \
- changes.unix \
+# Are we building MAME, MESS or WPCmame? (also set by slave ports)
+MAMEMESS?= mame
+
+PLIST_SUB+= MAMEMESS="x${MAMEMESS}" SPOOLGAMES="${SPOOLGAMES}"
+.if ${MAMEMESS} == "mame"
+PLIST_SUB+= MAMEONLY="" MESSONLY="@comment " WPCMAMEONLY="@comment "
+.else
+.if ${MAMEMESS} == "mess"
+PLIST_SUB+= MAMEONLY="@comment " MESSONLY="" WPCMAMEONLY="@comment "
+.else
+.if ${MAMEMESS} == "wpcmame"
+PLIST_SUB+= MAMEONLY="@comment " MESSONLY="@comment " WPCMAMEONLY=""
+.else
+.error MAMEMESS must be set to one of "mame", "mess" or "wpcmame".
+.endif
+.endif
+.endif
+
+# Where do we want game spool data?
+SPOOLGAMES?= /var/games
+
+# Docs list
+GENERALDOCS= changes.unix \
credits.txt \
- gamelist.mame \
liesmich.unix \
multiplayer-readme.txt \
- readme.mame \
xmame-doc-1.html \
xmame-doc-2.html \
xmame-doc-3.html \
@@ -41,29 +65,156 @@ XMAMEDOCS= changes.mame \
xmame-doc.ps \
xmame-doc.sgml \
xmame-doc.txt
+XMAMEDOCS= changes.mame \
+ gamelist.mame \
+ readme.mame
+XMESSDOCS= changes.mess \
+ gamelist.mess \
+ readme.mess \
+ messold.txt \
+ messroms.txt
+WPCMAMEDOCS= wpcmame/simulation.txt \
+ wpcmame/whatsnew.txt \
+ wpcmame/wpcmame.txt
+.if ${MAMEMESS} == "mame"
+ALLDOCS= ${GENERALDOCS} ${XMAMEDOCS}
+.else
+.if ${MAMEMESS} == "mess"
+ALLDOCS= ${GENERALDOCS} ${XMESSDOCS}
+.else
+ALLDOCS= ${GENERALDOCS} ${WPCMAMEDOCS}
+.endif
+.endif
+
+# CPS-2 patches - this enables extra games in MAME.
+.if ${MAMEMESS} == "mame"
+.if defined(WITH_CPS2) && ${WITH_CPS2} == "yes"
+CPS2VERSION= 20010309
+
+PATCH_SITES+= http://www.win.tue.nl/~stijn/xmame/
+PATCHFILES+= ${DISTNAME}-cps2-${CPS2VERSION}.patch.gz
+.else
+pre-everything::
+ @${ECHO_MSG} "===> If you want to compile MAME with CPS-2 support, use \"make WITH_CPS2=yes\""
+.endif
+.endif
+
+# Datfiles - for history/bugs/cheats/highscores in MAME
+.if ${MAMEMESS} == "mame"
+.if defined(WITH_DATFILES) && ${WITH_DATFILES} == "yes"
+PLIST_SUB+= DATFILES=""
-# the large number of sed regexes here is intended to make this port a whole
+BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
+
+HIVER= 7
+
+DISTFILES+= ${DISTNAME}${EXTRACT_SUFX} \
+ hsdat${HIVER}.zip history.zip cheat.zip
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+post-extract:
+ cd ${WRKDIR} && \
+ unzip -q ${DISTDIR}/${DIST_SUBDIR}/hsdat${HIVER}.zip hiscore.dat
+ cd ${WRKDIR} && \
+ unzip -q ${DISTDIR}/${DIST_SUBDIR}/history.zip history.dat
+ cd ${WRKDIR} && \
+ unzip -q ${DISTDIR}/${DIST_SUBDIR}/cheat.zip cheat.dat
+.else
+PLIST_SUB+= DATFILES="@comment "
+pre-everything::
+ @${ECHO_MSG} "===> If you want to install additional information with MAME (such as game"
+ @${ECHO_MSG} " history, cheats, and highscores) use \"make WITH_DATFILES=yes\""
+.endif
+.endif
+
+# ASM 68k cores - disabled by default, because they break things (pbobble2
+# being a prime example). These also only work on i386. Should be enabled
+# by default when ready for prime time.
+.if defined(WITH_ASM68K) && ${WITH_ASM68K} == "yes"
+ASM_COMMENT=
+.else
+ASM_COMMENT=\#
+.endif
+
+# Heavy optimization - enabled by default because it doesn't seem
+# to break things, and enables considerable speedup.
+.if !defined(WITH_OPTIMIZATION) || ${WITH_OPTIMIZATION} != "no"
+CFLAGS+= -O3 -march=i686 -Wall -Wno-unused -funroll-loops \
+ -fstrength-reduce -fomit-frame-pointer -ffast-math \
+ -malign-functions=4 -malign-jumps=4 -malign-loops=4
+.endif
+
+# SDL extension - enabled by default because x{mame,mess} can run full
+# screen without having to be setuid root.
+.if !defined(WITH_SDL) || ${WITH_SDL} != "no"
+LIB_DEPENDS= SDL-1.1.3:${PORTSDIR}/devel/sdl-devel
+SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
+MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG}
+DISPLAY_METHOD= SDL
+pre-everything::
+ @${ECHO_MSG} "===> If you don't want ${MAMEMESS:U} to be built with SDL support,"
+ @${ECHO_MSG} " use \"make WITH_SDL=no\""
+.else
+DISPLAY_METHOD= x11
+.endif
+
+# The large number of sed regexes here is intended to make this port a whole
# lot easier to maintain - please don't convert them into a patch.
-post-patch:
- ${PERL} -pi -e "s@%%PREFIX%%@${PREFIX}@g" ${WRKSRC}/doc/xmamerc.dist
+do-configure:
@${CP} ${WRKSRC}/makefile.unix ${WRKSRC}/makefile.unix.sed
- ${SED} -e "s@= gcc@?= ${CC}@g" -e "s@= -O -Wall@?= ${CFLAGS}@g" \
- -e "s@= cp@?= ${INSTALL} ${COPY}@g" -e "s@/usr/games@${PREFIX}/bin@g" \
- -e "s@/usr/local/man/man6@${PREFIX}/man/man6@g" \
- -e "s@/usr/games/lib/\$\(NAME\)@${PREFIX}/share/\$\(NAME\)@g" \
- -e "s@/usr/X11R6@${X11BASE}@g" -e "s@ARCH = linux@ARCH = freebsd@g" \
+ ${SED} -e "s@= gcc@?= ${CC}@g" \
+ -e "s@= -O2 -Wall@?= ${CFLAGS}@g" \
+ -e "s@= cp@?= ${INSTALL} ${COPY}@g" \
+ -e "s@lib/x\$$(TARGET)@share/x\$$(TARGET)@g" \
+ -e "s@/usr/X11R6@${X11BASE}@g" \
+ -e "s@ARCH = linux@ARCH = freebsd@g" \
+ -e "s@# X11_DGA@X11_DGA@g" \
+ -e "s@= x11@= ${DISPLAY_METHOD}@g" \
+ -e "s@= mame@= ${MAMEMESS}@g" \
+ -e "s@# X86_ASM@${ASM_COMMENT}X86_ASM@g" \
${WRKSRC}/makefile.unix.sed > ${WRKSRC}/makefile.unix
+.if !defined(WITH_SDL) || ${WITH_SDL} != "no"
+ ${PERL} -pi -e 's@SDL/@SDL11/@' ${WRKSRC}/src/unix/video-drivers/SDL.c
+.endif
+
+post-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} SDL_VIDEODRIVER=aalib \
+ ${GMAKE} -f ${MAKEFILE} doc/x${MAMEMESS}.6
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} SDL_VIDEODRIVER=aalib \
+ ${GMAKE} -f ${MAKEFILE} doc/x${MAMEMESS}rc.dist
+ @${CP} ${WRKSRC}/doc/x${MAMEMESS}rc.dist \
+ ${WRKSRC}/doc/x${MAMEMESS}rc.dist.sed
+ ${SED} -e "s@^spooldir.*\$$@spooldir ${SPOOLGAMES}/x${MAMEMESS}@" \
+ -e "s@^rompath.*\$$@rompath ${PREFIX}/share/x${MAMEMESS}/roms@" \
+ ${WRKSRC}/doc/x${MAMEMESS}rc.dist.sed > ${WRKSRC}/doc/x${MAMEMESS}rc.dist
post-install:
- ${MV} ${PREFIX}/bin/xmame.x11 ${PREFIX}/bin/xmame
- ${MKDIR} ${PREFIX}/share/xmame ${PREFIX}/share/xmame/hi ${PREFIX}/share/xmame/roms
- ${CHMOD} 777 ${PREFIX}/share/xmame/hi
- ${INSTALL_DATA} ${WRKSRC}/doc/xmamerc.dist ${PREFIX}/share/xmame/xmamerc
+ ${MV} ${PREFIX}/bin/x${MAMEMESS}.${DISPLAY_METHOD} \
+ ${PREFIX}/bin/x${MAMEMESS}
+ ${CHOWN} root:games ${PREFIX}/bin/x${MAMEMESS}
+ ${CHMOD} u-s,g+s ${PREFIX}/bin/x${MAMEMESS}
+ ${MKDIR} ${PREFIX}/share/x${MAMEMESS} ${PREFIX}/share/x${MAMEMESS}/roms
+ ${MKDIR} ${SPOOLGAMES}/x${MAMEMESS}
+ ${CHOWN} -R root:games ${SPOOLGAMES}/x${MAMEMESS}
+ ${CHMOD} 775 ${SPOOLGAMES}/x${MAMEMESS}
+ ${INSTALL_DATA} ${WRKSRC}/doc/x${MAMEMESS}rc.dist \
+ ${PREFIX}/etc/x${MAMEMESS}rc.sample
+ @if [ ! -e ${PREFIX}/etc/x${MAMEMESS}rc ]; then \
+ ( cd ${PREFIX}/etc && \
+ ${LN} -sf x${MAMEMESS}rc.sample x${MAMEMESS}rc ); \
+ fi
+ ${LN} -sf ${PREFIX}/etc/x${MAMEMESS}rc \
+ ${PREFIX}/share/x${MAMEMESS}/x${MAMEMESS}rc
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/xmame
-.for file in ${XMAMEDOCS}
- ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/xmame
+ ${MKDIR} ${PREFIX}/share/doc/x${MAMEMESS}
+.for file in ${ALLDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/x${MAMEMESS}
.endfor
.endif
-
+.if ${MAMEMESS} == "mame" && defined(WITH_DATFILES) && ${WITH_DATFILES} == "yes"
+ ${INSTALL_DATA} ${WRKDIR}/hiscore.dat ${PREFIX}/share/xmame
+ ${INSTALL_DATA} ${WRKDIR}/history.dat ${PREFIX}/share/xmame
+ ${INSTALL_DATA} ${WRKDIR}/cheat.dat ${PREFIX}/share/xmame
+.endif
+
.include <bsd.port.mk>
diff --git a/emulators/xmame/distinfo b/emulators/xmame/distinfo
index 09f36bc8877d..da7c70e2b5cf 100644
--- a/emulators/xmame/distinfo
+++ b/emulators/xmame/distinfo
@@ -1 +1,6 @@
-MD5 (xmame-0.37b11.2.tar.bz2) = 723caaa67908860b952f9df6e3744b05
+MD5 (xmame/xmame-0.37b12.1.tgz) = 8f08ef945ec49872397862d99676690f
+MD5 (xmame/cheat.zip) = dc380436c04780950cee07d3e31bfb0b
+MD5 (xmame/history.zip) = 69da5c33e6a78092c6cd75cbeb737c6a
+MD5 (xmame/hsdat7.zip) = 9e4a7e36448895f13128a675327e34e4
+MD5 (xmame/xmame-0.37b12.1-cps2-20010309.patch.gz) = 140c5891d70be13aef79d6702ee171ae
+MD5 (xmame/xmame-0.37b12.1-wpcmame-6.0.patch.gz) = c1bab845806bb13a3e24375701cd4a05
diff --git a/emulators/xmame/files/patch-ab b/emulators/xmame/files/patch-ab
deleted file mode 100644
index d123931c6c3e..000000000000
--- a/emulators/xmame/files/patch-ab
+++ /dev/null
@@ -1,31 +0,0 @@
---- doc/xmamerc.dist.orig Sun Nov 5 15:30:02 2000
-+++ doc/xmamerc.dist Sun Nov 5 15:32:12 2000
-@@ -60,7 +60,7 @@
- samples 1
- samplefreq 22050
- bufsize 3.000000
--volume -3
-+volume -13
- # audiodevice <NULL> (not set)
- # mixerdevice <NULL> (not set)
-
-@@ -70,13 +70,13 @@
- mouse 1
-
- ### Fileio Related ###
--rompath /usr/games/lib/xmame
--spooldir /usr/games/lib/xmame
-+rompath %%PREFIX%%/share/xmame/roms
-+spooldir %%PREFIX%%/share/xmame/hi
- screenshotdir .
--cheatfile /usr/games/lib/xmame/cheat.dat
--hiscorefile /usr/games/lib/xmame/hiscore.dat
--historyfile /usr/games/lib/xmame/history.dat
--mameinfofile /usr/games/lib/xmame/mameinfo.dat
-+cheatfile %%PREFIX%%/share/xmame/cheat.dat
-+hiscorefile %%PREFIX%%/share/xmame/hiscore.dat
-+historyfile %%PREFIX%%/share/xmame/history.dat
-+mameinfofile %%PREFIX%%/share/xmame/mameinfo.dat
-
- ### Mame Related ###
- defaultgame pacman
diff --git a/emulators/xmame/files/patch-ac b/emulators/xmame/files/patch-ac
new file mode 100644
index 000000000000..c7fbc9ba5e9f
--- /dev/null
+++ b/emulators/xmame/files/patch-ac
@@ -0,0 +1,28 @@
+--- src/unix/unix.mak.orig Sat Mar 10 09:11:54 2001
++++ src/unix/unix.mak Sun Mar 11 19:26:27 2001
+@@ -50,14 +50,14 @@
+ LIBS.xfx = $(X11LIB) $(JOY_X11_LIBS) -lX11 -lXext -lglide2x
+ LIBS.svgafx = $(X11LIB) -lvga -lvgagl -lglide2x
+ LIBS.openstep = -framework AppKit
+-LIBS.SDL = -ldl -lSDL -lpthread -D_REENTRANT
++LIBS.SDL = `$(SDL_CONFIG) --libs`
+ LIBS.photon2 = -L/usr/lib -lph -lphrender
+
+ CFLAGS.x11 = $(X11INC) $(JOY_X11_CFLAGS)
+ CFLAGS.xgl = $(X11INC) $(JOY_X11_CFLAGS) $(GLDRIVER)
+ CFLAGS.xfx = $(X11INC) $(JOY_X11_CFLAGS) -I/usr/include/glide
+ CFLAGS.svgafx = -I/usr/include/glide
+-CFLAGS.SDL = -D_REENTRANT
++CFLAGS.SDL = `$(SDL_CONFIG) --cflags`
+ CFLAGS.photon2 =
+
+ INST.x11 = doinstall
+@@ -326,7 +326,7 @@
+
+ doc/x$(TARGET).6: all src/unix/xmame.6-1 src/unix/xmame.6-3
+ cat src/unix/xmame.6-1 > doc/x$(TARGET).6
+- ./x$(TARGET).$(DISPLAY_METHOD) -manhelp >> doc/x$(TARGET).6
++ ./x$(TARGET).$(DISPLAY_METHOD) -noloadconfig -manhelp >> doc/x$(TARGET).6
+ cat src/unix/xmame.6-3 >> doc/x$(TARGET).6
+
+ install: $(INST.$(DISPLAY_METHOD)) install-man
diff --git a/emulators/xmame/pkg-plist b/emulators/xmame/pkg-plist
index 98a089f5dcf4..e99665a8870f 100644
--- a/emulators/xmame/pkg-plist
+++ b/emulators/xmame/pkg-plist
@@ -1,28 +1,37 @@
-bin/xmame
-share/xmame/xmamerc
-%%PORTDOCS%%share/doc/xmame/changes.mame
-%%PORTDOCS%%share/doc/xmame/changes.unix
-%%PORTDOCS%%share/doc/xmame/credits.txt
-%%PORTDOCS%%share/doc/xmame/gamelist.mame
-%%PORTDOCS%%share/doc/xmame/liesmich.unix
-%%PORTDOCS%%share/doc/xmame/multiplayer-readme.txt
-%%PORTDOCS%%share/doc/xmame/readme.mame
-%%PORTDOCS%%share/doc/xmame/xmame-doc-1.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-2.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-3.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-4.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-5.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-6.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc-7.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc.html
-%%PORTDOCS%%share/doc/xmame/xmame-doc.lyx
-%%PORTDOCS%%share/doc/xmame/xmame-doc.ps
-%%PORTDOCS%%share/doc/xmame/xmame-doc.sgml
-%%PORTDOCS%%share/doc/xmame/xmame-doc.txt
-@exec mkdir -p %D/share/xmame/hi
-@exec mkdir -p %D/share/xmame/roms
-@exec chmod 777 %D/share/xmame/hi
-@unexec rmdir %D/share/xmame/roms 2>/dev/null || true
-@unexec rmdir %D/share/xmame/hi 2>/dev/null || true
-@unexec rmdir %D/share/xmame 2>/dev/null || true
-%%PORTDOCS%%@dirrm share/doc/xmame
+bin/%%MAMEMESS%%
+etc/%%MAMEMESS%%rc.sample
+share/%%MAMEMESS%%/%%MAMEMESS%%rc
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/changes.unix
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/credits.txt
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/liesmich.unix
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/multiplayer-readme.txt
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-1.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-2.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-3.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-4.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-5.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-6.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc-7.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc.html
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc.lyx
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc.ps
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc.sgml
+%%PORTDOCS%%share/doc/%%MAMEMESS%%/xmame-doc.txt
+%%MAMEONLY%%%%DATFILES%%share/xmame/hiscore.dat
+%%MAMEONLY%%%%DATFILES%%share/xmame/history.dat
+%%MAMEONLY%%%%DATFILES%%share/xmame/cheat.dat
+%%MAMEONLY%%%%PORTDOCS%%share/doc/xmame/changes.mame
+%%MAMEONLY%%%%PORTDOCS%%share/doc/xmame/gamelist.mame
+%%MAMEONLY%%%%PORTDOCS%%share/doc/xmame/readme.mame
+%%MESSONLY%%%%PORTDOCS%%share/doc/xmess/changes.mess
+%%MESSONLY%%%%PORTDOCS%%share/doc/xmess/gamelist.mess
+%%MESSONLY%%%%PORTDOCS%%share/doc/xmess/readme.mess
+%%MESSONLY%%%%PORTDOCS%%share/doc/xmess/messold.txt
+%%MESSONLY%%%%PORTDOCS%%share/doc/xmess/messroms.txt
+%%WPCMAMEONLY%%%%PORTDOCS%%share/doc/xwpcmame/simulation.txt
+%%WPCMAMEONLY%%%%PORTDOCS%%share/doc/xwpcmame/whatsnew.txt
+%%WPCMAMEONLY%%%%PORTDOCS%%share/doc/xwpcmame/wpcmame.txt
+%%PORTDOCS%%@dirrm share/doc/%%MAMEMESS%%
+@dirrm share/%%MAMEMESS%%/roms
+@dirrm share/%%MAMEMESS%%
+@unexec rmdir %%SPOOLGAMES%%/%%MAMEMESS%% 2>/dev/null || true