summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2015-12-11 21:45:46 -0500
committerMichael Sterrett <mr_bones_@gentoo.org>2015-12-11 21:46:10 -0500
commit338cdf4d35e1e7a6965949e63a3f92b6300936a1 (patch)
tree837e09caedf114cf75dbe4578b52be0f5531867d /games-emulation/sdlmame
parentsys-fs/lxcfs: bump to 0.13 (diff)
downloadgentoo-338cdf4d35e1e7a6965949e63a3f92b6300936a1.tar.gz
gentoo-338cdf4d35e1e7a6965949e63a3f92b6300936a1.tar.bz2
gentoo-338cdf4d35e1e7a6965949e63a3f92b6300936a1.zip
version bump
Package-Manager: portage-2.2.24
Diffstat (limited to 'games-emulation/sdlmame')
-rw-r--r--games-emulation/sdlmame/Manifest1
-rw-r--r--games-emulation/sdlmame/sdlmame-0.168.ebuild233
2 files changed, 234 insertions, 0 deletions
diff --git a/games-emulation/sdlmame/Manifest b/games-emulation/sdlmame/Manifest
index 643a4dbdef51..86cf58da8545 100644
--- a/games-emulation/sdlmame/Manifest
+++ b/games-emulation/sdlmame/Manifest
@@ -1,4 +1,5 @@
DIST mame-0.167.zip 82926991 SHA256 9457dd6e56b508ace7d3ce3d4fa3407639b953bf2a2893bd47efa30ad8432a99 SHA512 0929ecfb8f63b15d35001a5a2aba4f9c845dab50f7d0de36af3243c2c4b2c541c923166e1b222e1958c092538d88511e70ae2c4c75632556d2b8864e859cee0b WHIRLPOOL eaa77124a8a7f6bb41f1265d8b1d8df54f077d0702621c7b125ddcc1702c4fe71d556a3079ee09e433cfa06cb5c663b8ddcc3f33e0b1279db3878cebfb737da0
+DIST mame-0.168.zip 82770536 SHA256 f91e014c3d3bf3da790284a25437f231a84228a6adbf42db35ca34a57f8a3092 SHA512 14b0519682f8aeb2379cd29b9e0ad8f3c54866296ac158876435425b79c3bf19a2dc520df7a44fe301a8e8cbbc335185602f4998edf6e95324f527c50c72411e WHIRLPOOL 41ddbe191423e3653a52f7734cc85088f1c663fd9aefdbd00ceefbe86f27bde190d14505be7fa69f76c7a39c6bbb5ab196685c2e001c8517cb90f4f7f27e8a51
DIST mame0148s.zip 33822494 SHA256 78d8a68ba53934fdfc895f450c08682dada81f7ec3e74a98fb042539506d9321 SHA512 a520115e2e82b2da3200ffa1fa56f668f95c3e26a927bcdb30a34e73053e55d26a6a6c1ec95eae1237bce1d2d0cd276b84466705fd5f53ac77827d06ea04bc03 WHIRLPOOL c6de71c198396977475110ab5840b7eaa6e5074519adffc286dd539ab916ea951fa1c307218b0d144cdc8aeeb096216106a3c21a6d53b42c04dc75e8103be04a
DIST mame0149s.zip 35160585 SHA256 0e41b5773bea217d3ca04002903ac5ef569e6f5b67c05c72496d2cd7993b0a6b SHA512 4b8bd72e93f71fdb52c643776ecefb87fe605effe3f8c1724156cf7fafb8107330d92914eb14208a170cd5a0ee2775e7ea8d8edd0b525a35bbb0d5514172c1c3 WHIRLPOOL c5821ffc0f640e93986cd88f9e530be36e5ba0405a5dbc69a5021c828248dc74541340d5d9d49ece19635b5239bbaeeeb93bad2800fc46e9f441d8ffd3751ca5
DIST sdlmame-ui.bdf.gz 114727 SHA256 f2ec11dd926bbeae8647e68607107516a30790239464939f3e99a0f62fc7f17e SHA512 67ba1bc632c1ac51b97acf8c1061477edd3519fea3d1233951723741c926ff72e259c274babb036abf4db92f217db507c58a6fc6e438db4b14c5fe5789b2ed64 WHIRLPOOL 2150053b38d8318804bf40cdcd9cdefdd2976c4cfab563c90021f0d9be0a0a57174166ece8b51658d9f2192e07343f198358299667a1db32f146c9fb9c528956
diff --git a/games-emulation/sdlmame/sdlmame-0.168.ebuild b/games-emulation/sdlmame/sdlmame-0.168.ebuild
new file mode 100644
index 000000000000..346fdc4c4186
--- /dev/null
+++ b/games-emulation/sdlmame/sdlmame-0.168.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-any-r1 toolchain-funcs games
+
+MY_PV="${PV/.}"
+
+DESCRIPTION="Multiple Arcade Machine Emulator + Multi Emulator Super System (MESS)"
+HOMEPAGE="http://mamedev.org/"
+SRC_URI="https://github.com/mamedev/mame/releases/download/mame${MY_PV}/mame${MY_PV}s.zip -> mame-${PV}.zip"
+
+LICENSE="XMAME"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X alsa +arcade debug +mess opengl tools"
+REQUIRED_USE="|| ( arcade mess )
+ debug? ( X )"
+
+# MESS (games-emulation/sdlmess) has been merged into MAME upstream since mame-0.162 (see below)
+# MAME/MESS build combined (default) +arcade +mess (mame)
+# MAME build only +arcade -mess (mamearcade)
+# MESS build only -arcade +mess (mess)
+# games-emulation/sdlmametools is dropped and enabled instead by the 'tools' useflag
+RDEPEND="!games-emulation/sdlmametools
+ !games-emulation/sdlmess
+ dev-db/sqlite:3
+ dev-libs/expat
+ media-libs/fontconfig
+ media-libs/flac
+ media-libs/libsdl2[joystick,opengl?,sound,video]
+ media-libs/portaudio
+ media-libs/sdl2-ttf
+ sys-libs/zlib
+ virtual/jpeg:0
+ alsa? ( media-libs/alsa-lib
+ media-libs/portmidi )
+ debug? ( dev-qt/qtcore:4
+ dev-qt/qtgui:4 )
+ X? ( x11-libs/libX11
+ x11-libs/libXinerama )
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/unzip
+ virtual/pkgconfig
+ X? ( x11-proto/xineramaproto )"
+
+S=${WORKDIR}
+
+# Function to disable a makefile option
+disable_feature() {
+ sed -i -e "/$1.*=/s:^:# :" makefile || die
+}
+
+# Function to enable a makefile option
+enable_feature() {
+ sed -i -e "/^#.*$1.*=/s:^#::" makefile || die
+}
+
+pkg_setup() {
+ games_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ unpack ./mame.zip
+ rm -f mame.zip || die
+}
+
+src_prepare() {
+ # Disable using bundled libraries
+ enable_feature USE_SYSTEM_LIB_EXPAT
+ enable_feature USE_SYSTEM_LIB_FLAC
+ enable_feature USE_SYSTEM_LIB_JPEG
+# Use bundled lua for now to ensure correct compilation (ref. b.g.o #407091)
+# enable_feature USE_SYSTEM_LIB_LUA
+ enable_feature USE_SYSTEM_LIB_PORTAUDIO
+ enable_feature USE_SYSTEM_LIB_SQLITE3
+ enable_feature USE_SYSTEM_LIB_ZLIB
+
+ # Disable warnings being treated as errors and enable verbose build output
+ enable_feature NOWERROR
+ enable_feature VERBOSE
+
+ use amd64 && enable_feature PTR64
+ use ppc && enable_feature BIGENDIAN
+ use debug && enable_feature DEBUG
+ use opengl || enable_feature NO_OPENGL
+ use tools && enable_feature TOOLS
+ use X || enable_feature NO_X11
+
+ if use alsa ; then
+ enable_feature USE_SYSTEM_LIB_PORTMIDI
+ else
+ enable_feature NO_USE_MIDI
+ fi
+
+ sed -i \
+ -e 's/-Os//' \
+ -e '/^\(CC\|CXX\|AR\) /s/=/?=/' \
+ 3rdparty/genie/build/gmake.linux/genie.make || die
+}
+
+src_compile() {
+ local targetargs
+ local qtdebug=$(usex debug 1 0)
+
+ use arcade && ! use mess && targetargs="SUBTARGET=arcade"
+ ! use arcade && use mess && targetargs="SUBTARGET=mess"
+
+ function my_emake() {
+ # Workaround conflicting $ARCH variable used by both Gentoo's
+ # portage and by Mame's build scripts
+ # turn off bgfx for now since it's an embedded library (bug #556642)
+ PYTHON_EXECUTABLE=${PYTHON} \
+ OVERRIDE_CC=$(tc-getCC) \
+ OVERRIDE_CXX=$(tc-getCXX) \
+ OVERRIDE_LD=$(tc-getCXX) \
+ USE_BGFX= \
+ ARCH= \
+ emake "$@" \
+ AR=$(tc-getAR)
+ }
+ my_emake -j1 generate
+
+ my_emake ${targetargs} \
+ SDL_INI_PATH="\$\$\$\$HOME/.sdlmame;${GAMES_SYSCONFDIR}/${PN}" \
+ USE_QTDEBUG=${qtdebug}
+
+ if use tools ; then
+ my_emake -j1 TARGET=ldplayer USE_QTDEBUG=${qtdebug}
+ fi
+}
+
+src_install() {
+ local MAMEBIN
+ local suffix="$(use amd64 && echo 64)$(use debug && echo d)"
+ local f
+
+ function mess_install() {
+ dosym ${MAMEBIN} "${GAMES_BINDIR}"/mess${suffix}
+ dosym ${MAMEBIN} "${GAMES_BINDIR}"/sdlmess
+ newman src/osd/sdl/man/mess.6 sdlmess.6
+ doman src/osd/sdl/man/mess.6
+ }
+ if use arcade ; then
+ if use mess ; then
+ MAMEBIN="mame${suffix}"
+ mess_install
+ else
+ MAMEBIN="mamearcade${suffix}"
+ fi
+ doman src/osd/sdl/man/mame.6
+ newman src/osd/sdl/man/mame.6 ${PN}.6
+ elif use mess ; then
+ MAMEBIN="mess${suffix}"
+ mess_install
+ fi
+ dogamesbin ${MAMEBIN}
+ dosym ${MAMEBIN} "${GAMES_BINDIR}/${PN}"
+
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins -r src/osd/sdl/keymaps $(use mess && echo hash)
+
+ # Create default mame.ini and inject Gentoo settings into it
+ # Note that '~' does not work and '$HOME' must be used
+ ./${MAMEBIN} -noreadconfig -showconfig > "${T}/mame.ini" || die
+ # -- Paths --
+ for f in {rom,hash,sample,art,font,crosshair} ; do
+ sed -i \
+ -e "s:\(${f}path\)[ \t]*\(.*\):\1 \t\t\$HOME/.${PN}/\2;${GAMES_DATADIR}/${PN}/\2:" \
+ "${T}/mame.ini" || die
+ done
+ for f in {ctrlr,cheat} ; do
+ sed -i \
+ -e "s:\(${f}path\)[ \t]*\(.*\):\1 \t\t\$HOME/.${PN}/\2;${GAMES_SYSCONFDIR}/${PN}/\2;${GAMES_DATADIR}/${PN}/\2:" \
+ "${T}/mame.ini" || die
+ done
+ # -- Directories
+ for f in {cfg,nvram,memcard,input,state,snapshot,diff,comment} ; do
+ sed -i \
+ -e "s:\(${f}_directory\)[ \t]*\(.*\):\1 \t\t\$HOME/.${PN}/\2:" \
+ "${T}/mame.ini" || die
+ done
+ # -- Keymaps --
+ sed -i \
+ -e "s:\(keymap_file\)[ \t]*\(.*\):\1 \t\t\$HOME/.${PN}/\2:" \
+ "${T}/mame.ini" || die
+ for f in src/osd/sdl/keymaps/km*.txt ; do
+ sed -i \
+ -e "/^keymap_file/a \#keymap_file \t\t${GAMES_DATADIR}/${PN}/keymaps/${f##*/}" \
+ "${T}/mame.ini" || die
+ done
+ insinto "${GAMES_SYSCONFDIR}/${PN}"
+ doins "${T}/mame.ini"
+
+ insinto "${GAMES_SYSCONFDIR}/${PN}"
+ doins "${FILESDIR}/vector.ini"
+
+ dodoc docs/{config,mame,newvideo}.txt
+ keepdir \
+ "${GAMES_DATADIR}/${PN}"/{ctrlr,cheat,roms,samples,artwork,crosshair} \
+ "${GAMES_SYSCONFDIR}/${PN}"/{ctrlr,cheat}
+
+ if use tools ; then
+ for f in castool chdman floptool imgtool jedutil ldresample ldverify romcmp testkeys ; do
+ newgamesbin ${f} ${PN}-${f}
+ newman src/osd/sdl/man/${f}.1 ${PN}-${f}.1
+ done
+ newgamesbin ldplayer${suffix} ${PN}-ldplayer
+ newman src/osd/sdl/man/ldplayer.1 ${PN}-ldplayer.1
+ fi
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "It is strongly recommended to change either the system-wide"
+ elog " ${GAMES_SYSCONFDIR}/${PN}/mame.ini or use a per-user setup at ~/.${PN}/mame.ini"
+ elog
+ if use opengl ; then
+ elog "You built ${PN} with opengl support and should set"
+ elog "\"video\" to \"opengl\" in mame.ini to take advantage of that"
+ elog
+ elog "For more info see http://wiki.mamedev.org"
+ fi
+}