diff -urN --exclude=CVS /usr/ports/emulators/xmame/Makefile xmame/Makefile --- /usr/ports/emulators/xmame/Makefile Sat Feb 9 05:33:28 2002 +++ xmame/Makefile Tue Mar 19 18:28:17 2002 @@ -6,7 +6,7 @@ # PORTNAME?= xmame -PORTVERSION?= 0.58.1 +PORTVERSION?= 0.58.3 CATEGORIES= emulators MASTER_SITES= http://x.mame.net/download/ \ http://www.mame.net/zips/ \ @@ -24,11 +24,6 @@ XMAMEVERSION?= ${PORTVERSION} -.if !defined(WITH_SVGALIB) || ${WITH_SVGALIB} != "yes" -USE_XPM= yes -USE_X_PREFIX= yes -.endif - # Are we building MAME, MESS or PinMAME? (also set by slave ports) MAMEMESS?= mame @@ -103,9 +98,20 @@ .endif .endif -# Datfiles - for history/bugs/cheats/highscores in MAME +PKGOPTS= ${FILESDIR}/pkg-opts + +# +# Various options are processed here. Note that due to a bug in make(1), at +# present the conditionals are suboptimal. See PR bin/34032. +# + +# Option WITH_DATFILES .if ${MAMEMESS} == "mame" -.if defined(WITH_DATFILES) && ${WITH_DATFILES} == "yes" +.if !defined(WITH_DATFILES) +WITH_DATFILES= yes +.endif + +.if ${WITH_DATFILES:L} != "no" PLIST_SUB+= DATFILES="" BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip @@ -125,52 +131,35 @@ unzip -q ${DISTDIR}/${DIST_SUBDIR}/cheat.zip cheat.dat .else PLIST_SUB+= DATFILES="@comment " -.if !defined(WITH_DATFILES) -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 + +# Option WITH_ASM68K +.if !defined(WITH_ASM68K) +WITH_ASM68K= no .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" +.if ${WITH_ASM68K:L} == "yes" ASM_COMMENT= .else ASM_COMMENT=\# .endif -# Heavy optimization - disabled by default because it breaks things. It's -# still available because it enables considerable speedup. -.if defined(WITH_OPTIMIZATION) && ${WITH_OPTIMIZATION} == "yes" +# Option WITH_OPTIMIZATION +.if defined(WITH_OPTIMIZATION) +.if ${WITH_OPTIMIZATION:L} == "yes" CFLAGS+= -O3 -Wall -Wno-unused -funroll-loops \ -fstrength-reduce -fomit-frame-pointer -ffast-math \ -malign-functions=4 -malign-jumps=4 -malign-loops=4 -.else -.if !defined(WITH_OPTIMIZATION) -pre-everything:: - @${ECHO_MSG} "===> If you want to enable high optimization levels, use " - @${ECHO_MSG} " \"make WITH_OPTIMIZATION=yes\". Be warned that this is known to" - @${ECHO_MSG} " break some games though." .endif .endif -# Choose one of several display targets: -# WITH_GL OpenGL based, displays vector games with hardware -# acceleration -# WITH_SDL Uses the SDL library to be able to play fullscreen -# without root rights -# WITH_SVGALIB Uses the svgalib library to allow playing without X. This -# has not been extensively tested; patches welcome to make -# this actually work. -# WITH_X11 The standard display target, should work without -# dependancies other than X -# -# WITH_SDL is enabled by default because x{mame,mess} can run full -# screen without having to be setuid root. -.if defined(WITH_GL) && ${WITH_GL} == "yes" +# Option DISPLAY_TARGET +.if !defined(DISPLAY_TARGET) +DISPLAY_TARGET=sdl +.endif + +.if ${DISPLAY_TARGET:L} == "opengl" CFLAGS+= ${PTHREAD_CFLAGS} USE_MESA= yes DISPLAY_METHOD= xgl @@ -178,69 +167,90 @@ ALL_DOCS+= ${GLDOCS} .else PLIST_SUB+= OPENGL="@comment " -.if defined(WITH_SVGALIB) && ${WITH_SVGALIB} == "yes" + +.if ${DISPLAY_TARGET:L} == "svgalib" LIB_DEPENDS= vga.1:${PORTSDIR}/graphics/svgalib CFLAGS+= -I${LOCALBASE}/include MAKE_ENV+= LOCALBASE=${LOCALBASE} DISPLAY_METHOD= svgalib .else -.if !defined(WITH_SDL) || ${WITH_SDL} != "no" + +.if ${DISPLAY_TARGET:L} == "x11" +DISPLAY_METHOD= x11 +.else + +.if ${DISPLAY_TARGET:L} != "sdl" +pre-everything:: + @${ECHO_MSG} "You must select a valid DISPLAY_TARGET. Refer to" + @${ECHO_MSG} "'make options' for more information." + @exit 1 +.endif LIB_DEPENDS= SDL-1.1.3:${PORTSDIR}/devel/sdl12 SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG} DISPLAY_METHOD= SDL -.if !defined(WITH_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\"" - @${ECHO_MSG} "===> If you want to build ${MAMEMESS:U} with OpenGL support for vector games," - @${ECHO_MSG} " use \"make WITH_GL=yes\"" .endif -.else -DISPLAY_METHOD= x11 .endif .endif + +.if ${DISPLAY_TARGET:L} != "svgalib" +USE_XPM= yes +USE_X_PREFIX= yes .endif -PKGNAMESUFFIX=-${DISPLAY_METHOD:L} -# USB joysticks - only enabled on -STABLE because of conflicting USB -# prototypes in -STABLE & -CURRENT. -.include +PKGNAMESUFFIX=-${DISPLAY_METHOD:L} -.if ${OSVERSION} >= 500000 -JOYUSBCOMMENT=\#\ -.else -JOYUSBCOMMENT= +# Option WITH_ESOUND +.if !defined(WITH_ESOUND) +WITH_ESOUND= no .endif -# Esound audio - handy for a GNOME environment -.if defined(WITH_ESOUND) && ${WITH_ESOUND} == "yes" +.if ${WITH_ESOUND:L} == "yes" ESOUNDCOMMENT= USE_ESOUND= yes .else ESOUNDCOMMENT=\#\ -.if !defined(WITH_ESOUND) -pre-everything:: - @echo "===> If you want to build ${MAMEMESS:U} with support for ESound," - @echo " use \"make WITH_ESOUND=yes\"" -.endif .endif +# Option WITH_NETWORK .if ${MAMEMESS} == "mame" -# Network support - enabled by default because the penalty is low. There might -# be a speedup without it though, so I've made it (yet another) option. -.if !defined(WITH_NETWORK) || ${WITH_NETWORK} != "no" +.if !defined(WITH_NETWORK) +WITH_NETWORK= yes +.endif + +.if ${WITH_NETWORK:L} != "no" NETWORK= .else NETWORK=\#\ .endif -.if !defined(WITH_NETWORK) -pre-everything:: - @echo "===> If you want to build ${MAMEMESS:U} without network support," - @echo " use \"make WITH_NETWORK=no\"" .endif + +# USB joysticks are only enabled on -STABLE because of conflicting USB +# prototypes in -STABLE & -CURRENT. +.include + +.if ${OSVERSION} >= 500000 +JOYUSBCOMMENT=\#\ .else -NETWORK=\#\ +JOYUSBCOMMENT= +.endif + +# +# Regular targets +# + +options: + @(${ECHO_MSG} "===> Build options for ${PKGNAME}:"; \ + ${PERL} -ne '/^#/ || /^\s/ && print || \ + print sprintf "* %s [%s]\n %s", split(/\|/)' ${PKGOPTS}) | \ + $${PAGER:-/usr/bin/more} + +pre-everything:: +.if !defined(BATCH) + @${TEST} -r ${PKGOPTS} && \ + (${ECHO_MSG} '-------------------------------------------------------------------------'; \ + ${ECHO_MSG} 'Perform a "make options" to see a list of available installation options.'; \ + ${ECHO_MSG} '-------------------------------------------------------------------------';) .endif # Some simple patches that don't warrant a separate patch diff -urN --exclude=CVS /usr/ports/emulators/xmame/distinfo xmame/distinfo --- /usr/ports/emulators/xmame/distinfo Sat Feb 9 05:33:28 2002 +++ xmame/distinfo Tue Mar 19 17:50:21 2002 @@ -1,4 +1,4 @@ -MD5 (xmame/xmame-0.58.1.tar.bz2) = d85e54b760ec796d11a0b04e782bd69f +MD5 (xmame/xmame-0.58.3.tar.bz2) = 9cda8e3289dee78872fe75c113d6b427 MD5 (xmame/xmame-0.56.2.tar.bz2) = e43dd5e087f954351948fb9848485924 MD5 (xmame/xmame-0.37b14.2.tar.bz2) = 34bfba3d1412a8f8e1abd4d738de3f27 MD5 (xmame/cheat.zip) = b745ea4df1a3a517c00fedae1ee49a14 diff -urN --exclude=CVS /usr/ports/emulators/xmame/files/patch-ac xmame/files/patch-ac --- /usr/ports/emulators/xmame/files/patch-ac Fri Nov 23 05:33:06 2001 +++ xmame/files/patch-ac Tue Mar 19 18:05:36 2002 @@ -1,9 +1,9 @@ ---- src/unix/unix.mak.orig Thu Nov 15 07:15:47 2001 -+++ src/unix/unix.mak Thu Nov 22 11:11:35 2001 -@@ -45,20 +45,20 @@ +--- src/unix/unix.mak.orig Mon Mar 18 02:41:37 2002 ++++ src/unix/unix.mak Tue Mar 19 18:05:20 2002 +@@ -50,20 +50,20 @@ # svga and ggi also use $(X11LIB) since that's where zlib often is - LIBS.x11 = $(X11LIB) $(JOY_X11_LIBS) -lX11 -lXext + LIBS.x11 = $(X11LIB) $(JOY_X11_LIBS) $(XINPUT_DEVICES_LIBS) -lX11 -lXext -LIBS.svgalib = $(X11LIB) -lvga -lvgagl +LIBS.svgalib = -L$(LOCALBASE)/lib -lvga -lvgagl LIBS.ggi = $(X11LIB) -lggi @@ -16,17 +16,17 @@ +LIBS.SDL = `$(SDL_CONFIG) --libs` LIBS.photon2 = -L/usr/lib -lph -lphrender - CFLAGS.x11 = $(X11INC) $(JOY_X11_CFLAGS) + CFLAGS.x11 = $(X11INC) $(JOY_X11_CFLAGS) $(XINPUT_DEVICES_CFLAGS) -CFLAGS.xgl = $(X11INC) $(JOY_X11_CFLAGS) $(GLCFLAGS) +CFLAGS.xgl = -DGLU_VERSION_1_2 $(X11INC) $(JOY_X11_CFLAGS) $(GLCFLAGS) -I$(LOCALBASE)/include $(PTHREAD_CFLAGS) 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.SDL = $(X11INC) `$(SDL_CONFIG) --cflags` CFLAGS.photon2 = INST.x11 = doinstall -@@ -340,7 +340,7 @@ +@@ -357,7 +357,7 @@ doc/x$(TARGET)rc.dist: all src/unix/xmamerc-keybinding-notes.txt ./x$(TARGET).$(DISPLAY_METHOD) -noloadconfig -showconfig | \ @@ -35,7 +35,7 @@ cat src/unix/xmamerc-keybinding-notes.txt >> doc/x$(TARGET)rc.dist doc/gamelist.$(TARGET): all -@@ -349,7 +349,8 @@ +@@ -366,7 +366,8 @@ 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 diff -urN --exclude=CVS /usr/ports/emulators/xmame/files/pkg-opts xmame/files/pkg-opts --- /usr/ports/emulators/xmame/files/pkg-opts Thu Jan 1 01:00:00 1970 +++ xmame/files/pkg-opts Tue Feb 19 15:36:27 2002 @@ -0,0 +1,30 @@ +# Variable|Default value|Short description +# Multi-line/long description (optional). +# Multi-line/long description lines must start with whitespace! +# +DISPLAY_TARGET|sdl|Set this to one of the following: + sdl Uses the SDL library to be able to play fullscreen + games without having to have root rights. + opengl Uses OpenGL libraries for hardware accelerrated screen + scaling. + x11 Use the standard X11 libraries. Need to be root to + play fullscreen games. + svgalib Uses the svgalib library for console play. This + target is not working yet; patches to make it work + most warmly welcomed. +WITH_ASM68K|no|If set to 'yes', this will enable the speedier but buggy + assembler 68x00 CPU emulation cores. This will only work on x86. + Note that some games are known to break with this option, among + them pbobble2. +WITH_OPTIMIZATION|no|If set to 'yes', this will enable maximum C compiler + optimization. Due to the fact that these optimization levels + sometimes uncover hidden GCC bugs, this is disabled by default. + Enable at your own risk. +WITH_ESOUND|no|If set to 'yes', compile with the esound libraries for + nice behaviour in a GNOME environment. +WITH_DATFILES|yes|If set to 'yes', this installs additional information + with MAME, including cheats, history of games, and highscores. + This is a MAME-only option. +WITH_NETWORK|yes|If set to 'yes', include support for network play. + This can be disabled because there might be a speed increase + without it.