pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators Convert xmame and xmess to use bsd.options.mk.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ce3c71e683bc
branches:  trunk
changeset: 483117:ce3c71e683bc
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Mon Nov 08 10:03:41 2004 +0000

description:
Convert xmame and xmess to use bsd.options.mk.

Available options are: sdl opengl esound.

sdl and opengl options are used to specify default display method, if
none of them is specified, x11 is used as before.

diffstat:

 emulators/xmame/Makefile   |  12 ++----------
 emulators/xmame/options.mk |  25 +++++++++++++++++++++++++
 emulators/xmess/Makefile   |  12 ++----------
 3 files changed, 29 insertions(+), 20 deletions(-)

diffs (95 lines):

diff -r d03966551a97 -r ce3c71e683bc emulators/xmame/Makefile
--- a/emulators/xmame/Makefile  Mon Nov 08 08:22:02 2004 +0000
+++ b/emulators/xmame/Makefile  Mon Nov 08 10:03:41 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.120 2004/11/06 21:41:52 kristerw Exp $
+# $NetBSD: Makefile,v 1.121 2004/11/08 10:03:41 xtraeme Exp $
 #
 
 DISTNAME=              xmame-0.87
@@ -23,8 +23,7 @@
 UNLIMIT_RESOURCES=     datasize
 
 .include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+=           USE_ESOUND
+.include "options.mk"
 
 ROMPATH=               ${PREFIX}/share/${TARGET}
 SPOOLDIR=              ${VARBASE}/games/${TARGET}
@@ -37,13 +36,6 @@
 # Network support is broken in xmame-0.85
 #MAKE_FLAGS+=          XMAME_NET=1
 
-.if !empty(USE_ESOUND:M[Yy][Ee][Ss])
-MAKE_FLAGS+=           SOUND_ESOUND=1
-.include "../../audio/esound/buildlink3.mk"
-.endif
-
-MAME_DISP_METHOD?=     x11
-
 # Determine which CPU-specific code to use.
 .for MARCH in alpha m68k i386 ia64 mips
 MAME_CPU.${MARCH}?=    ${MARCH}
diff -r d03966551a97 -r ce3c71e683bc emulators/xmame/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xmame/options.mk        Mon Nov 08 10:03:41 2004 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: options.mk,v 1.1 2004/11/08 10:03:41 xtraeme Exp $
+#
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.xmame
+PKG_SUPPORTED_OPTIONS= sdl opengl esound
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msdl)
+MAME_DISP_METHOD?=     SDL
+.include "../../devel/SDL/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mopengl)
+MAME_DISP_METHOD?=     xgl
+.include "../../graphics/Mesa/buildlink3.mk"
+.else
+MAME_DISP_METHOD?=     x11
+.endif
+
+.if !empty(PKG_OPTIONS:Msdl) && !empty(PKG_OPTIONS:Mopengl)
+PKG_SKIP_REASON+=      "Only one display method is allowed."
+.endif
+
+.if !empty(PKG_OPTIONS:Mesound)
+MAKE_FLAGS+=           SOUND_ESOUND=1
+.inclUde "../../audio/esound/buildlink3.mk"
+.endif
diff -r d03966551a97 -r ce3c71e683bc emulators/xmess/Makefile
--- a/emulators/xmess/Makefile  Mon Nov 08 08:22:02 2004 +0000
+++ b/emulators/xmess/Makefile  Mon Nov 08 10:03:41 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.60 2004/11/07 16:11:48 kristerw Exp $
+# $NetBSD: Makefile,v 1.61 2004/11/08 10:03:41 xtraeme Exp $
 #
 
 DISTNAME=              xmame-0.87
@@ -24,8 +24,7 @@
 UNLIMIT_RESOURCES=     datasize
 
 .include "../../mk/bsd.prefs.mk"
-
-BUILD_DEFS+=           USE_ESOUND
+.include "${.CURDIR}/../../emulators/xmame/options.mk"
 
 ROMPATH=               ${PREFIX}/share/${TARGET}
 SPOOLDIR=              ${VARBASE}/games/${TARGET}
@@ -38,13 +37,6 @@
 # Network support is broken in xmame-0.85
 #MAKE_FLAGS+=          XMAME_NET=1
 
-.if !empty(USE_ESOUND:M[Yy][Ee][Ss])
-MAKE_FLAGS+=           SOUND_ESOUND=1
-.include "../../audio/esound/buildlink3.mk"
-.endif
-
-MAME_DISP_METHOD?=     x11
-
 # Determine which CPU-specific code to use.
 .for MARCH in alpha m68k i386 ia64 mips
 MAME_CPU.${MARCH}?=    ${MARCH}



Home | Main Index | Thread Index | Old Index