summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2016-05-03 02:09:46 -0400
committerMichael Sterrett <mr_bones_@gentoo.org>2016-05-03 02:10:05 -0400
commit5c55743001f31c2d5de5da918bacbf2e9f20a55d (patch)
treecdf5bc9ed69c9c4d4d9e50f62fa3f6003c17e8ec /games-emulation
parentnet-im/kadu: (masked) version bump 3.0, remove now spurious inherit 'base', r... (diff)
downloadgentoo-5c55743001f31c2d5de5da918bacbf2e9f20a55d.tar.gz
gentoo-5c55743001f31c2d5de5da918bacbf2e9f20a55d.tar.bz2
gentoo-5c55743001f31c2d5de5da918bacbf2e9f20a55d.zip
games-emulation/sdlmame: version bump (bug #573154)
Package-Manager: portage-2.2.26
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/sdlmame/Manifest1
-rw-r--r--games-emulation/sdlmame/sdlmame-0.173.ebuild232
2 files changed, 233 insertions, 0 deletions
diff --git a/games-emulation/sdlmame/Manifest b/games-emulation/sdlmame/Manifest
index 27c42ad74732..95551bb4600d 100644
--- a/games-emulation/sdlmame/Manifest
+++ b/games-emulation/sdlmame/Manifest
@@ -1 +1,2 @@
DIST mame-0.168.zip 82770536 SHA256 f91e014c3d3bf3da790284a25437f231a84228a6adbf42db35ca34a57f8a3092 SHA512 14b0519682f8aeb2379cd29b9e0ad8f3c54866296ac158876435425b79c3bf19a2dc520df7a44fe301a8e8cbbc335185602f4998edf6e95324f527c50c72411e WHIRLPOOL 41ddbe191423e3653a52f7734cc85088f1c663fd9aefdbd00ceefbe86f27bde190d14505be7fa69f76c7a39c6bbb5ab196685c2e001c8517cb90f4f7f27e8a51
+DIST mame-0.173.zip 92387665 SHA256 45a31815838abfab10d4b0c13be013c24385f1ff07aaeafa8e86014b996376a5 SHA512 e4ca67cf313b23c49a30914299878270caddd24b5f26aefb6a5dc3ae0720847aff63e999237997edb01492afd60e3afd4be54ff885595e2f043ac4c0b647488b WHIRLPOOL d7065575ea842e63efd0494b1ba477524b4185b7ebd651bb7a60240b38b692245c53bf3a6044c251805bb80b7cd053f0f903259da36e9d109039579372255956
diff --git a/games-emulation/sdlmame/sdlmame-0.173.ebuild b/games-emulation/sdlmame/sdlmame-0.173.ebuild
new file mode 100644
index 000000000000..adc1cb718175
--- /dev/null
+++ b/games-emulation/sdlmame/sdlmame-0.173.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2016 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 qmake-utils 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="GPL-2+ BSD-2 MIT CC0-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa +arcade debug +mess opengl openmp tools"
+REQUIRED_USE="|| ( arcade mess )"
+
+# 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
+ virtual/opengl
+ alsa? ( media-libs/alsa-lib
+ media-libs/portmidi )
+ debug? ( dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5 )
+ x11-libs/libX11
+ x11-libs/libXinerama
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/unzip
+ virtual/pkgconfig
+ 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 debug && enable_feature DEBUG
+ use tools && enable_feature TOOLS
+ disable_feature NO_X11 # bgfx needs X
+ use openmp && enable_feature OPENMP
+
+ 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
+ PYTHON_EXECUTABLE=${PYTHON} \
+ OVERRIDE_CC=$(tc-getCC) \
+ OVERRIDE_CXX=$(tc-getCXX) \
+ OVERRIDE_LD=$(tc-getCXX) \
+ QT_HOME="$(qt5_get_libdir)/qt5" \
+ 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 docs/man/mess.6 sdlmess.6
+ doman docs/man/mess.6
+ }
+ if use arcade ; then
+ if use mess ; then
+ MAMEBIN="mame${suffix}"
+ mess_install
+ else
+ MAMEBIN="mamearcade${suffix}"
+ fi
+ doman docs/man/mame.6
+ newman docs/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 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 keymaps/km*.map ; 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 docs/man/${f}.1 ${PN}-${f}.1
+ done
+ newgamesbin ldplayer${suffix} ${PN}-ldplayer
+ newman docs/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
+}