summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Birchinger <joker@gentoo.org>2008-04-24 20:26:29 +0000
committerChristian Birchinger <joker@gentoo.org>2008-04-24 20:26:29 +0000
commit177f3e5a5b95775c1937e20daa8121e6f49cc7df (patch)
tree46a0210f1f2d7c99d31ba916ade4e85f9e37f444 /games-emulation
parentStable for HPPA (bug #214285). (diff)
downloadgentoo-2-177f3e5a5b95775c1937e20daa8121e6f49cc7df.tar.gz
gentoo-2-177f3e5a5b95775c1937e20daa8121e6f49cc7df.tar.bz2
gentoo-2-177f3e5a5b95775c1937e20daa8121e6f49cc7df.zip
Initial release
(Portage version: 2.1.4.4)
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/sdlmame/ChangeLog12
-rw-r--r--games-emulation/sdlmame/Manifest10
-rw-r--r--games-emulation/sdlmame/files/joymap.dat9
-rw-r--r--games-emulation/sdlmame/files/mame.ini.in260
-rw-r--r--games-emulation/sdlmame/files/vector.ini9
-rw-r--r--games-emulation/sdlmame/metadata.xml24
-rw-r--r--games-emulation/sdlmame/sdlmame-0.124.ebuild155
-rw-r--r--games-emulation/sdlmame/sdlmame-0.124_p3.ebuild155
8 files changed, 634 insertions, 0 deletions
diff --git a/games-emulation/sdlmame/ChangeLog b/games-emulation/sdlmame/ChangeLog
new file mode 100644
index 000000000000..aeaa2ae91a8b
--- /dev/null
+++ b/games-emulation/sdlmame/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for games-emulation/sdlmame
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/ChangeLog,v 1.1 2008/04/24 20:26:29 joker Exp $
+
+*sdlmame-0.124_p3 (24 Apr 2008)
+*sdlmame-0.124 (24 Apr 2008)
+
+ 24 Apr 2008; Christian Birchinger <joker@gentoo.org> +files/joymap.dat,
+ +files/mame.ini.in, +files/vector.ini, +metadata.xml,
+ +sdlmame-0.124.ebuild, +sdlmame-0.124_p3.ebuild:
+ Initial release
+
diff --git a/games-emulation/sdlmame/Manifest b/games-emulation/sdlmame/Manifest
new file mode 100644
index 000000000000..a1fb1e695d50
--- /dev/null
+++ b/games-emulation/sdlmame/Manifest
@@ -0,0 +1,10 @@
+AUX joymap.dat 223 RMD160 d86c536a5d33bec9ecd6efbee2f7389835495328 SHA1 011d631b844316ea5b113ac01407665ea674d1f9 SHA256 bf6e7473b2b1ed573aacf697446e4bdb61e0f63b6e3d55c5b8fac93fb49059f9
+AUX mame.ini.in 5962 RMD160 6eb4c315b29d5e6da24a40ad94a646bb56b27998 SHA1 fadb0546bdac23e7162833fad60533c0a4fcf772 SHA256 6205c738b7e57ead9c05885bdaeb3ebfb143bec9dc1de7a97016b791bea532d8
+AUX vector.ini 116 RMD160 e63ed40b21a2426b28571d514933efab6ccce7e8 SHA1 c6615ce44d08b89a65435dfe7e0af9ac6d8459df SHA256 408aeaaffcb2ecccd20db457f22d2d5efa930c0f62a92987b0fbefaf6c038c23
+DIST sdlmame-manpages.tar.gz 14400 RMD160 14660470488458a8897a8a924c12f7ab961d6729 SHA1 279fbf37668282c0e4e86d62a29f5ec53fa0ab1a SHA256 507240258dfb816fbfddc674c5995a126c7a975158c2aad1ada8cb064c5e3d08
+DIST sdlmame0124.zip 16248845 RMD160 3fe3f0d2762a0170bd2553445df75d3adf06721e SHA1 b5bfa179b4ae2d66dd4094163b8d11beaabe545e SHA256 b0f993878b7ad72fa8905701a40ce631a6500774b11011711003c4101ab2ed54
+DIST sdlmame0124u3.zip 16376327 RMD160 bb8a9d0b142314ead25d6fbb73a37beaa7f5713f SHA1 820fef70246620d211dd62e25a4746f6b50011b1 SHA256 9d4179aae9eec588e5fcc19ccbeb88e49c0cb1ab3eaeb13414d4881147a8d695
+EBUILD sdlmame-0.124.ebuild 3652 RMD160 b55fb7110079f262b004a8894dae25f866d7e4c2 SHA1 5ffa321db4c334933a4ab5bc52017961b8694785 SHA256 0223dfb2144b531f968be8f939a3e79474c198330f6d2422757a93a30e3a7d9a
+EBUILD sdlmame-0.124_p3.ebuild 3652 RMD160 b55fb7110079f262b004a8894dae25f866d7e4c2 SHA1 5ffa321db4c334933a4ab5bc52017961b8694785 SHA256 0223dfb2144b531f968be8f939a3e79474c198330f6d2422757a93a30e3a7d9a
+MISC ChangeLog 386 RMD160 a86328efe981380295da8fcd96d33313ef33a571 SHA1 290c19e071bac2ffa61a8b1725f93b2b2850a795 SHA256 ea59717b56f351e0b534a6d58df5059c786d2a3a183ba42b217db87f518ce25e
+MISC metadata.xml 1259 RMD160 2d811f69affdc305f497d50546e6ba71aaea1d6f SHA1 0f6dfc168b13e49315006e80ae031a933535fb26 SHA256 0f528e867cb2e2350ee31faa9c532f8c4c579a9fe8d79d47c07e787a839f1251
diff --git a/games-emulation/sdlmame/files/joymap.dat b/games-emulation/sdlmame/files/joymap.dat
new file mode 100644
index 000000000000..ec6490d5e4b3
--- /dev/null
+++ b/games-emulation/sdlmame/files/joymap.dat
@@ -0,0 +1,9 @@
+# Joystick mapping file
+# =====================
+#
+# Contains mapping between name and logical (i.e. mame) joystick index
+#
+# Index Name
+# ----- ----
+# 1 MOSIC USB 2A4K GamePad
+# 0 Logitech Logitech Attack 3
diff --git a/games-emulation/sdlmame/files/mame.ini.in b/games-emulation/sdlmame/files/mame.ini.in
new file mode 100644
index 000000000000..9cc0351a9bf5
--- /dev/null
+++ b/games-emulation/sdlmame/files/mame.ini.in
@@ -0,0 +1,260 @@
+#
+# CORE CONFIGURATION OPTIONS
+#
+readconfig 1
+
+#
+# CORE SEARCH PATH OPTIONS
+#
+rompath $HOME/.sdlmame/roms;@GAMES_SYSCONFDIR@/sdlmame/roms
+samplepath $HOME/.sdlmame/samples;@GAMES_SYSCONFDIR@/sdlmame/samples
+artpath $HOME/.sdlmame/artwork;@GAMES_SYSCONFDIR@/sdlmame/artwork
+ctrlrpath $HOME/.sdlmame/ctrlr;@GAMES_SYSCONFDIR@/sdlmame/ctrlr
+inipath $HOME/.sdlmame;@GAMES_SYSCONFDIR@/sdlmame
+fontpath $HOME/.sdlmame;@GAMES_DATADIR@/sdlmame
+
+#
+# CORE OUTPUT DIRECTORY OPTIONS
+#
+cfg_directory $HOME/.sdlmame/cfg
+nvram_directory $HOME/.sdlmame/nvram
+memcard_directory $HOME/.sdlmame/memcard
+input_directory $HOME/.sdlmame/inp
+state_directory $HOME/.sdlmame/sta
+snapshot_directory $HOME/.sdlmame/snap
+diff_directory $HOME/.sdlmame/diff
+comment_directory $HOME/.sdlmame/comments
+
+#
+# CORE FILENAME OPTIONS
+#
+cheat_file @GAMES_DATADIR@/sdlmame/cheat.dat
+
+#
+# CORE STATE/PLAYBACK OPTIONS
+#
+state
+autosave 0
+playback
+record
+mngwrite
+wavwrite
+
+#
+# CORE PERFORMANCE OPTIONS
+#
+autoframeskip 0
+frameskip 0
+seconds_to_run 0
+throttle 1
+sleep 1
+speed 1.0
+
+#
+# CORE ROTATION OPTIONS
+#
+rotate 1
+ror 0
+rol 0
+autoror 0
+autorol 0
+flipx 0
+flipy 0
+
+#
+# CORE ARTWORK OPTIONS
+#
+artwork_crop 0
+use_backdrops 1
+use_overlays 1
+use_bezels 1
+
+#
+# CORE SCREEN OPTIONS
+#
+brightness 1.0
+contrast 1.0
+gamma 1.0
+pause_brightness 0.65
+
+#
+# CORE VECTOR OPTIONS
+#
+antialias 1
+beam 1.0
+flicker 0
+
+#
+# CORE SOUND OPTIONS
+#
+sound 1
+samplerate 48000
+samples 1
+volume 0
+
+#
+# CORE INPUT OPTIONS
+#
+ctrlr
+mouse 1
+joystick 1
+lightgun 0
+multikeyboard 0
+multimouse 0
+steadykey 0
+offscreen_reload 0
+joystick_map auto
+joystick_deadzone 0.3
+joystick_saturation 0.85
+
+#
+# CORE INPUT AUTOMATIC ENABLE OPTIONS
+#
+paddle_device keyboard
+adstick_device keyboard
+pedal_device keyboard
+dial_device keyboard
+trackball_device keyboard
+lightgun_device keyboard
+positional_device keyboard
+mouse_device mouse
+
+#
+# CORE DEBUGGING OPTIONS
+#
+log 0
+verbose 0
+
+#
+# CORE MISC OPTIONS
+#
+bios default
+cheat 0
+skip_gameinfo 0
+
+#
+# DEBUGGING OPTIONS
+#
+oslog 0
+
+#
+# PERFORMANCE OPTIONS
+#
+multithreading 0
+sdlvideofps 0
+
+#
+# VIDEO OPTIONS
+#
+video soft
+numscreens 1
+window 0
+keepaspect 1
+unevenstretch 1
+effect none
+centerh 1
+centerv 1
+waitvsync 0
+yuvmode none
+
+#
+# OpenGL-SPECIFIC OPTIONS
+#
+filter 1
+prescale 1
+gl_forcepow2texture 0
+gl_notexturerect 0
+gl_vbo 1
+gl_pbo 1
+gl_glsl 0
+gl_glsl_filter 1
+glsl_shader_mame0 none
+glsl_shader_mame1 none
+glsl_shader_mame2 none
+glsl_shader_mame3 none
+glsl_shader_mame4 none
+glsl_shader_mame5 none
+glsl_shader_mame6 none
+glsl_shader_mame7 none
+glsl_shader_mame8 none
+glsl_shader_mame9 none
+glsl_shader_screen0 none
+glsl_shader_screen1 none
+glsl_shader_screen2 none
+glsl_shader_screen3 none
+glsl_shader_screen4 none
+glsl_shader_screen5 none
+glsl_shader_screen6 none
+glsl_shader_screen7 none
+glsl_shader_screen8 none
+glsl_shader_screen9 none
+gl_glsl_vid_attr 1
+
+#
+# PER-WINDOW VIDEO OPTIONS
+#
+screen auto
+aspect auto
+resolution auto
+view auto
+screen0 auto
+aspect0 auto
+resolution0 auto
+view0 auto
+screen1 auto
+aspect1 auto
+resolution1 auto
+view1 auto
+screen2 auto
+aspect2 auto
+resolution2 auto
+view2 auto
+screen3 auto
+aspect3 auto
+resolution3 auto
+view3 auto
+
+#
+# FULL SCREEN OPTIONS
+#
+switchres 0
+useallheads 0
+
+#
+# SOUND OPTIONS
+#
+audio_latency 3
+
+#
+# INPUT DEVICE OPTIONS
+#
+
+#
+# SDL KEYBOARD MAPPING
+#
+# If you are using one of the available non-us keyboard layouts
+# set keymap to 1 and uncomment the appropriate line below
+keymap 0
+#keymap_file @GAMES_DATADIR@/sdlmame/keymaps/km-be.txt
+#keymap_file @GAMES_DATADIR@/sdlmame/keymaps/km-ch.txt
+#keymap_file @GAMES_DATADIR@/sdlmame/keymaps/km-de.txt
+#keymap_file @GAMES_DATADIR@/sdlmame/keymaps/km-fr.txt
+#keymap_file @GAMES_DATADIR@/sdlmame/keymaps/km_it.txt
+
+#
+# SDL JOYSTICK MAPPING
+#
+remapjoys 0
+remapjoyfile @GAMES_SYSCONFDIR@/sdlmame/joymap.dat
+
+#
+# CORE COMMANDS
+#
+
+#
+# CONFIGURATION COMMANDS
+#
+
+#
+# FRONTEND COMMANDS
+#
diff --git a/games-emulation/sdlmame/files/vector.ini b/games-emulation/sdlmame/files/vector.ini
new file mode 100644
index 000000000000..d4906e34ccd7
--- /dev/null
+++ b/games-emulation/sdlmame/files/vector.ini
@@ -0,0 +1,9 @@
+#
+# Specific options file for vector games
+#
+
+#
+# VIDEO OPTIONS
+#
+video soft
+yuvmode yv12
diff --git a/games-emulation/sdlmame/metadata.xml b/games-emulation/sdlmame/metadata.xml
new file mode 100644
index 000000000000..dafe76d57e11
--- /dev/null
+++ b/games-emulation/sdlmame/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+<email>joker@gentoo.org</email>
+<name>Christian Birchinger</name>
+<description>Please assign bugs to games@gentoo.org and CC me.</description>
+</maintainer>
+<longdescription>
+SDLMAME is a port of the popular MAME[tm]. There are a few principles that guide it's development:
+
+1) run on Linux/Unix, Mac OS X, and other SDL supported operating systems with as few changes as
+possible to the base Win32 code. This means we can track changes faster than larger more conventional
+ports such as MacMAME, and we also maintain what I call "Firefox compatibilty" where learning a major
+app only needs to be done once per application, and it then applies across many operating systems. If
+you can use the command-line Win32 MAME, you already know how to use SDLMAME on any platform you may
+encounter it on.
+
+2) MAME developers are important. By keeping quickly up to date, we make it easy for people on
+non-Windows platforms to make and submit changes to the core MAME code, and we offer native
+implementations of MAME's multi-window GUI debugger on both Linux/Unix and Mac OS X.
+</longdescription>
+</pkgmetadata>
diff --git a/games-emulation/sdlmame/sdlmame-0.124.ebuild b/games-emulation/sdlmame/sdlmame-0.124.ebuild
new file mode 100644
index 000000000000..a482e301c750
--- /dev/null
+++ b/games-emulation/sdlmame/sdlmame-0.124.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/sdlmame-0.124.ebuild,v 1.1 2008/04/24 20:26:29 joker Exp $
+
+inherit eutils flag-o-matic games
+
+DESCRIPTION="Multiple Arcade Machine Emulator (SDL)"
+HOMEPAGE="http://rbelmont.mameworld.info/?page_id=163"
+
+MY_PV=${PV/.}
+MY_PV=${MY_PV/_p/u}
+MY_P=${PN}${MY_PV}
+
+# Upstream doesn't allow fetching with unknown User-Agent such as wget
+SRC_URI="mirror://gentoo/${MY_P}.zip
+ mirror://gentoo/${PN}-manpages.tar.gz"
+
+# Same as xmame. Should it be renamed to MAME?
+LICENSE="XMAME"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug opengl"
+
+RDEPEND=">=media-libs/libsdl-1.2.10
+ sys-libs/zlib
+ dev-libs/expat
+ x11-libs/libXinerama
+ debug? (
+ >gnome-base/gconf-2
+ >=x11-libs/gtk+-2 )"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-proto/xineramaproto"
+
+S="${WORKDIR}/${MY_P}"
+
+# Function to disable a makefile option
+disable_feature() {
+ sed -i \
+ -e "/$1.*=/s:^:# :" \
+ "${S}"/makefile \
+ || die "sed failed"
+}
+
+# Function to enable a makefile option
+enable_feature() {
+ sed -i \
+ -e "/^#.*$1.*=/s:^# ::" \
+ "${S}"/makefile \
+ || die "sed failed"
+}
+
+pkg_setup() {
+ if use opengl && ! built_with_use media-libs/libsdl opengl ; then
+ die "Please emerge media-libs/libsdl with USE=opengl"
+ fi
+ games_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ sed -i \
+ -e '/CFLAGS += -O$(OPTIMIZE)/s:^:# :' \
+ -e '/CFLAGS += -pipe/s:^:# :' \
+ -e '/LDFLAGS += -s/s:^:# :' \
+ "${S}"/makefile \
+ || die "sed failed"
+
+ # CFLAGS and build debugging help
+ #sed -i \
+ # -e "/^\(AR\|CC\|LD\|RM\) =/s:@::" \
+ # -i "${S}"/makefile
+}
+
+src_compile() {
+ local make_opts
+
+ # Don't compile zlib and expat
+ einfo "Disabling embedded libraries: zlib and expat"
+ disable_feature BUILD_ZLIB
+ disable_feature BUILD_EXPAT
+
+ if use amd64; then
+ einfo "Enabling 64-bit support"
+ enable_feature PTR64
+ fi
+
+ if use ppc; then
+ einfo "Enabling PPC support"
+ enable_feature BIGENDIAN
+ fi
+
+ if use debug ; then
+ ewarn "Building with DEBUG support is not recommended for normal use"
+ enable_feature DEBUG
+ enable_feature PROFILE
+ enable_feature SYMBOLS
+ make_opts="${make_opts} DEBUGGER=1"
+ fi
+
+ use opengl || make_opts="${make_opts} NO_OPENGL=1"
+
+ emake \
+ NAME="${PN}" \
+ OPT_FLAGS='-DINI_PATH=\"\$$HOME/.sdlmame\;'"${GAMES_SYSCONFDIR}/${PN}"'\"'" ${CFLAGS}" \
+ SUFFIX="" \
+ ${make_opts} \
+ || die "emake failed"
+}
+
+src_install() {
+ dogamesbin "${PN}" || die "dogamesbin "${PN}" failed"
+
+ # Follows xmame ebuild, avoiding collision on /usr/games/bin/jedutil
+ exeinto "$(games_get_libdir)/${PN}"
+ local f
+ for f in chdman makemeta jedutil romcmp testkeys; do
+ doexe "${f}" || die "doexe ${f} failed"
+ done
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins ui.bdf || die "doins ui.bdf failed"
+ doins -r keymaps || die "doins -r keymaps failed"
+
+ insinto "${GAMES_SYSCONFDIR}/${PN}"
+ doins "${FILESDIR}"/{joymap.dat,vector.ini} || die "doins joymap.dat vector.ini failed"
+
+ sed \
+ -e "s:@GAMES_SYSCONFDIR@:${GAMES_SYSCONFDIR}:" \
+ -e "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \
+ "${FILESDIR}"/mame.ini.in > "${D}/${GAMES_SYSCONFDIR}/${PN}/"mame.ini \
+ || die "sed failed"
+
+ dodoc docs/{config,mame,newvideo}.txt *.txt
+ doman "${WORKDIR}/${PN}-manpages"/*
+
+ keepdir "${GAMES_DATADIR}/${PN}"/{roms,samples,artwork}
+ keepdir "${GAMES_SYSCONFDIR}/${PN}"/ctrlr
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "It's strongly recommended that you change either the system-wide"
+ elog "mame.ini at ${GAMES_SYSCONFDIR}/${PN} or use a per-user setup at \$HOME/.${PN}"
+
+ if use opengl; then
+ echo
+ elog "You built ${PN} with opengl support and should set"
+ elog "\"video\" to \"opengl\" in mame.ini to take advantage of that"
+ fi
+}
diff --git a/games-emulation/sdlmame/sdlmame-0.124_p3.ebuild b/games-emulation/sdlmame/sdlmame-0.124_p3.ebuild
new file mode 100644
index 000000000000..9922766dabb0
--- /dev/null
+++ b/games-emulation/sdlmame/sdlmame-0.124_p3.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/sdlmame/sdlmame-0.124_p3.ebuild,v 1.1 2008/04/24 20:26:29 joker Exp $
+
+inherit eutils flag-o-matic games
+
+DESCRIPTION="Multiple Arcade Machine Emulator (SDL)"
+HOMEPAGE="http://rbelmont.mameworld.info/?page_id=163"
+
+MY_PV=${PV/.}
+MY_PV=${MY_PV/_p/u}
+MY_P=${PN}${MY_PV}
+
+# Upstream doesn't allow fetching with unknown User-Agent such as wget
+SRC_URI="mirror://gentoo/${MY_P}.zip
+ mirror://gentoo/${PN}-manpages.tar.gz"
+
+# Same as xmame. Should it be renamed to MAME?
+LICENSE="XMAME"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug opengl"
+
+RDEPEND=">=media-libs/libsdl-1.2.10
+ sys-libs/zlib
+ dev-libs/expat
+ x11-libs/libXinerama
+ debug? (
+ >gnome-base/gconf-2
+ >=x11-libs/gtk+-2 )"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ x11-proto/xineramaproto"
+
+S="${WORKDIR}/${MY_P}"
+
+# Function to disable a makefile option
+disable_feature() {
+ sed -i \
+ -e "/$1.*=/s:^:# :" \
+ "${S}"/makefile \
+ || die "sed failed"
+}
+
+# Function to enable a makefile option
+enable_feature() {
+ sed -i \
+ -e "/^#.*$1.*=/s:^# ::" \
+ "${S}"/makefile \
+ || die "sed failed"
+}
+
+pkg_setup() {
+ if use opengl && ! built_with_use media-libs/libsdl opengl ; then
+ die "Please emerge media-libs/libsdl with USE=opengl"
+ fi
+ games_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ sed -i \
+ -e '/CFLAGS += -O$(OPTIMIZE)/s:^:# :' \
+ -e '/CFLAGS += -pipe/s:^:# :' \
+ -e '/LDFLAGS += -s/s:^:# :' \
+ "${S}"/makefile \
+ || die "sed failed"
+
+ # CFLAGS and build debugging help
+ #sed -i \
+ # -e "/^\(AR\|CC\|LD\|RM\) =/s:@::" \
+ # -i "${S}"/makefile
+}
+
+src_compile() {
+ local make_opts
+
+ # Don't compile zlib and expat
+ einfo "Disabling embedded libraries: zlib and expat"
+ disable_feature BUILD_ZLIB
+ disable_feature BUILD_EXPAT
+
+ if use amd64; then
+ einfo "Enabling 64-bit support"
+ enable_feature PTR64
+ fi
+
+ if use ppc; then
+ einfo "Enabling PPC support"
+ enable_feature BIGENDIAN
+ fi
+
+ if use debug ; then
+ ewarn "Building with DEBUG support is not recommended for normal use"
+ enable_feature DEBUG
+ enable_feature PROFILE
+ enable_feature SYMBOLS
+ make_opts="${make_opts} DEBUGGER=1"
+ fi
+
+ use opengl || make_opts="${make_opts} NO_OPENGL=1"
+
+ emake \
+ NAME="${PN}" \
+ OPT_FLAGS='-DINI_PATH=\"\$$HOME/.sdlmame\;'"${GAMES_SYSCONFDIR}/${PN}"'\"'" ${CFLAGS}" \
+ SUFFIX="" \
+ ${make_opts} \
+ || die "emake failed"
+}
+
+src_install() {
+ dogamesbin "${PN}" || die "dogamesbin "${PN}" failed"
+
+ # Follows xmame ebuild, avoiding collision on /usr/games/bin/jedutil
+ exeinto "$(games_get_libdir)/${PN}"
+ local f
+ for f in chdman makemeta jedutil romcmp testkeys; do
+ doexe "${f}" || die "doexe ${f} failed"
+ done
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins ui.bdf || die "doins ui.bdf failed"
+ doins -r keymaps || die "doins -r keymaps failed"
+
+ insinto "${GAMES_SYSCONFDIR}/${PN}"
+ doins "${FILESDIR}"/{joymap.dat,vector.ini} || die "doins joymap.dat vector.ini failed"
+
+ sed \
+ -e "s:@GAMES_SYSCONFDIR@:${GAMES_SYSCONFDIR}:" \
+ -e "s:@GAMES_DATADIR@:${GAMES_DATADIR}:" \
+ "${FILESDIR}"/mame.ini.in > "${D}/${GAMES_SYSCONFDIR}/${PN}/"mame.ini \
+ || die "sed failed"
+
+ dodoc docs/{config,mame,newvideo}.txt *.txt
+ doman "${WORKDIR}/${PN}-manpages"/*
+
+ keepdir "${GAMES_DATADIR}/${PN}"/{roms,samples,artwork}
+ keepdir "${GAMES_SYSCONFDIR}/${PN}"/ctrlr
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "It's strongly recommended that you change either the system-wide"
+ elog "mame.ini at ${GAMES_SYSCONFDIR}/${PN} or use a per-user setup at \$HOME/.${PN}"
+
+ if use opengl; then
+ echo
+ elog "You built ${PN} with opengl support and should set"
+ elog "\"video\" to \"opengl\" in mame.ini to take advantage of that"
+ fi
+}