summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2004-11-08 10:03:41 +0000
committerxtraeme <xtraeme>2004-11-08 10:03:41 +0000
commit720508e61a01dc405a70a9d30ec041c39addab44 (patch)
treeb7f0e20825ed39a7ddb530e629b79a22e4416df7 /emulators
parentb8f506c25754047d594dd645a24410779376cb82 (diff)
downloadpkgsrc-720508e61a01dc405a70a9d30ec041c39addab44.tar.gz
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 (limited to 'emulators')
-rw-r--r--emulators/xmame/Makefile12
-rw-r--r--emulators/xmame/options.mk25
-rw-r--r--emulators/xmess/Makefile12
3 files changed, 29 insertions, 20 deletions
diff --git a/emulators/xmame/Makefile b/emulators/xmame/Makefile
index aa656cc9076..4d3000fdbff 100644
--- a/emulators/xmame/Makefile
+++ b/emulators/xmame/Makefile
@@ -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 @@ TARGET= ${PKGBASE}
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 @@ MAKE_FLAGS+= X11INC= X11LIB=
# 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 --git a/emulators/xmame/options.mk b/emulators/xmame/options.mk
new file mode 100644
index 00000000000..0f9f4787fd8
--- /dev/null
+++ b/emulators/xmame/options.mk
@@ -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 --git a/emulators/xmess/Makefile b/emulators/xmess/Makefile
index 51a4f080358..3ebb98aa753 100644
--- a/emulators/xmess/Makefile
+++ b/emulators/xmess/Makefile
@@ -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 @@ TARGET= ${PKGBASE}
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 @@ MAKE_FLAGS+= X11INC= X11LIB=
# 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}