Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2002 20:36:28 +0100 (CET)
From:      stijn@win.tue.nl
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/35154: [MAINTAINER UPDATE]: emulators/xmame
Message-ID:  <200202201936.g1KJaS656429@pcwin002.win.tue.nl>

next in thread | raw e-mail | index | archive | help

>Number:         35154
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE]: emulators/xmame
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 20 11:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stijn Hoop
>Release:        FreeBSD 4.5-RC i386
>Organization:
>Environment:

System: FreeBSD 4.5-RC #0: Wed Jan 16 04:30:08 CET 2002

>Description:

- Update to xmame-0.58.2
- Adopt recent mail/mailman 'make options' scheme, files/pkg-opts
- General cleanup of the Makefile
- Remove vendor integrated patch-ak

>How-To-Repeat:

N/A

>Fix:

- Apply the following patch
- cvs rm -f files/patch-ak
- cvs add files/pkg-opts

diff -urN --exclude=CVS /usr/ports/emulators/xmame/Makefile xmame/Makefile
--- /usr/ports/emulators/xmame/Makefile	Sat Feb  9 05:33:29 2002
+++ xmame/Makefile	Wed Feb 20 20:31:02 2002
@@ -6,7 +6,7 @@
 #
 
 PORTNAME?=	xmame
-PORTVERSION?=	0.58.1
+PORTVERSION?=	0.58.2
 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 <bsd.port.pre.mk>
+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 <bsd.port.pre.mk>
+
+.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:29 2002
+++ xmame/distinfo	Wed Feb 20 19:48:22 2002
@@ -1,4 +1,4 @@
-MD5 (xmame/xmame-0.58.1.tar.bz2) = d85e54b760ec796d11a0b04e782bd69f
+MD5 (xmame/xmame-0.58.2.tar.bz2) = a73ad6d5d44e0d69acb68523a10dbfaa
 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-ak xmame/files/patch-ak
--- /usr/ports/emulators/xmame/files/patch-ak	Fri Feb  8 05:16:21 2002
+++ xmame/files/patch-ak	Thu Jan  1 01:00:00 1970
@@ -1,10 +0,0 @@
---- src/unix/network.c.orig	Wed Feb  6 04:33:30 2002
-+++ src/unix/network.c	Thu Feb  7 15:14:28 2002
-@@ -361,6 +361,7 @@
- 	   master_hostent->h_addr,
- 	   master_hostent->h_length);
-     _master_info.addr.sin_port = htons(MASTER_INPUT_PORT);
-+    _master_info.addr.sin_family = AF_INET;
- 
-     gethostname(scratch, MAX_MSG_LEN);
- 
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	Wed Feb 20 08:58:43 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.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202201936.g1KJaS656429>