From 89235d4af9890bae647564c31c27d5b313390662 Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Tue, 24 Apr 2018 22:41:21 +0200 Subject: Avoid /usr/share/games --- games-emulation/sdlmame/sdlmame-0.174-r1.ebuild | 234 ++++++++++++++++++++++++ games-emulation/sdlmame/sdlmame-0.174.ebuild | 234 ------------------------ games-emulation/xmame/xmame-0.106-r2.ebuild | 233 ----------------------- games-emulation/xmame/xmame-0.106-r3.ebuild | 232 +++++++++++++++++++++++ games-emulation/xmess/xmess-0.106-r1.ebuild | 233 ----------------------- games-emulation/xmess/xmess-0.106-r2.ebuild | 232 +++++++++++++++++++++++ 6 files changed, 698 insertions(+), 700 deletions(-) create mode 100644 games-emulation/sdlmame/sdlmame-0.174-r1.ebuild delete mode 100644 games-emulation/sdlmame/sdlmame-0.174.ebuild delete mode 100644 games-emulation/xmame/xmame-0.106-r2.ebuild create mode 100644 games-emulation/xmame/xmame-0.106-r3.ebuild delete mode 100644 games-emulation/xmess/xmess-0.106-r1.ebuild create mode 100644 games-emulation/xmess/xmess-0.106-r2.ebuild (limited to 'games-emulation') diff --git a/games-emulation/sdlmame/sdlmame-0.174-r1.ebuild b/games-emulation/sdlmame/sdlmame-0.174-r1.ebuild new file mode 100644 index 00000000..0a8aa8e0 --- /dev/null +++ b/games-emulation/sdlmame/sdlmame-0.174-r1.ebuild @@ -0,0 +1,234 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) +inherit python-any-r1 toolchain-funcs qmake-utils + +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 )" + +: ${GAMES_SYSCONFDIR:=/etc} +: ${GAMES_BINDIR:=/usr/bin} +: ${GAMES_DATADIR:=/usr/share} + +# 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,X] + 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() { + python-any-r1_pkg_setup +} + +src_unpack() { + default + unpack ./mame.zip + rm -f mame.zip || die +} + +src_prepare() { + eapply \ + "${FILESDIR}"/${P}-qt.patch \ + "${FILESDIR}"/${P}-cxx14.patch + # 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 + default +} + +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 + dobin ${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 ; do + newbin ${f} ${PN}-${f} + newman docs/man/${f}.1 ${PN}-${f}.1 + done + newbin ldplayer${suffix} ${PN}-ldplayer + newman docs/man/ldplayer.1 ${PN}-ldplayer.1 + fi +} + +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 +} diff --git a/games-emulation/sdlmame/sdlmame-0.174.ebuild b/games-emulation/sdlmame/sdlmame-0.174.ebuild deleted file mode 100644 index 0df94a89..00000000 --- a/games-emulation/sdlmame/sdlmame-0.174.ebuild +++ /dev/null @@ -1,234 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -PYTHON_COMPAT=( python2_7 ) -inherit python-any-r1 toolchain-funcs qmake-utils - -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 )" - -: ${GAMES_SYSCONFDIR:=/etc/games} -: ${GAMES_BINDIR:=/usr/bin} -: ${GAMES_DATADIR:=/usr/share/games} - -# 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,X] - 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() { - python-any-r1_pkg_setup -} - -src_unpack() { - default - unpack ./mame.zip - rm -f mame.zip || die -} - -src_prepare() { - eapply \ - "${FILESDIR}"/${P}-qt.patch \ - "${FILESDIR}"/${P}-cxx14.patch - # 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 - default -} - -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 - dobin ${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 ; do - newbin ${f} ${PN}-${f} - newman docs/man/${f}.1 ${PN}-${f}.1 - done - newbin ldplayer${suffix} ${PN}-ldplayer - newman docs/man/ldplayer.1 ${PN}-ldplayer.1 - fi -} - -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 -} diff --git a/games-emulation/xmame/xmame-0.106-r2.ebuild b/games-emulation/xmame/xmame-0.106-r2.ebuild deleted file mode 100644 index f99f68f5..00000000 --- a/games-emulation/xmame/xmame-0.106-r2.ebuild +++ /dev/null @@ -1,233 +0,0 @@ -# Copyright 2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit flag-o-matic toolchain-funcs -RESTRICT="mirror" - -TARGET="${PN}" - -DESCRIPTION="Multiple Arcade Machine Emulator for X11" -HOMEPAGE="http://x.mame.net/" -SRC_URI="http://gentoo.osuosl.org/distfiles/xmame-${PV}.tar.bz2" - -LICENSE="XMAME" -SLOT="0" -KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86" -IUSE="alsa bundled-libs cpu_flags_x86_mmx dga ggi joystick lirc net opengl sdl svga X xinerama xv" - -RDEPEND=" - alsa? ( media-libs/alsa-lib ) - dga? ( - x11-libs/libXxf86dga - x11-libs/libXxf86vm ) - !bundled-libs? ( dev-libs/expat ) - ggi? ( media-libs/libggi ) - lirc? ( app-misc/lirc ) - opengl? ( - virtual/opengl - virtual/glu ) - sdl? ( >=media-libs/libsdl-1.2.0 ) - svga? ( media-libs/svgalib ) - xinerama? ( x11-libs/libXinerama ) - xv? ( x11-libs/libXv ) - X? ( x11-libs/libXext )" -DEPEND="${RDEPEND} - dga? ( - x11-proto/xf86dgaproto - x11-proto/xf86vidmodeproto ) - xinerama? ( x11-proto/xineramaproto ) - xv? ( x11-proto/videoproto ) - x86? ( dev-lang/nasm )" -# Icc sucks. bug #41342 -# icc? ( dev-lang/icc ) - -S=${WORKDIR}/xmame-${PV} -PATCHES=( "${FILESDIR}/fix-zn1-looping-sound.patch" ) - -toggle_feature() { - if use $1 ; then - sed -i \ - -e "/$2.*=/s:#::" Makefile \ - || die "sed Makefile ($1 / $2) failed" - fi -} - -toggle_feature2() { - use $1 && toggle_feature $2 $3 -} - -src_prepare() { - local mycpu - - case ${ARCH} in - x86) mycpu="i386";; - ia64) mycpu="ia64";; - amd64) mycpu="amd64";; - ppc) mycpu="risc";; - sparc) mycpu="risc";; - hppa) mycpu="risc";; - alpha) mycpu="alpha";; - mips) mycpu="mips";; - esac - - sed -i \ - -e "/^PREFIX/s:=.*:=/usr:" \ - -e "/^MY_CPU/s:i386:${mycpu}:" \ - -e "/^MANDIR/s:man/man:share/man/man:" \ - -e "/^XMAMEROOT/s:share:share/games:" \ - -e "/^TARGET/s:mame:${TARGET:1}:" \ - -e "/^INSTALL_GROUP/s:bin:root:" \ - -e "/^CFLAGS =/d" \ - -e 's/-s,//' \ - -e 's/-Wl,-s//' \ - -e "/\bCFLAGS +=/d" \ - Makefile \ - || die "sed Makefile failed" - - if use ppc ; then - sed -i \ - -e '/LD.*--relax/s:^# ::' Makefile \ - || die "sed Makefile (ppc/LD) failed" - fi - - if use cpu_flags_x86_mmx ; then - cat >> src/unix/effect_asm.asm </dev/null - fi - done - - insinto "/usr/share/games/${PN}" - doins -r ctrlr - dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo - docinto html - dodoc -r doc/img doc/mess doc/*.html doc/*.css - - # default to sdl since the client is a bit more featureful - if use sdl ; then - dosym "${TARGET}.SDL" "/usr/bin/${TARGET}" - elif [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then - dosym "${TARGET}.x11" "/usr/bin/${TARGET}" - elif use svga ; then - dosym ${TARGET}.svgalib "/usr/bin/${TARGET}" - #elif use ggi ; then - #dosym ${TARGET}.ggi "/usr/bin/${TARGET}" - fi -} - -pkg_postinst() { - elog "Your available MAME binaries are: ${TARGET}" - if use opengl || use X || use dga || use xv ; then - elog " ${TARGET}.x11" - fi - use sdl && elog " ${TARGET}.SDL" - #use ggi && elog " ${TARGET}.ggi" - use svga && elog " ${TARGET}.svgalib" - - elog "Helper utilities are located in /usr/$(get_libdir)/${PN}." -} diff --git a/games-emulation/xmame/xmame-0.106-r3.ebuild b/games-emulation/xmame/xmame-0.106-r3.ebuild new file mode 100644 index 00000000..3ddee75e --- /dev/null +++ b/games-emulation/xmame/xmame-0.106-r3.ebuild @@ -0,0 +1,232 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs +RESTRICT="mirror" + +TARGET="${PN}" + +DESCRIPTION="Multiple Arcade Machine Emulator for X11" +HOMEPAGE="http://x.mame.net/" +SRC_URI="http://gentoo.osuosl.org/distfiles/xmame-${PV}.tar.bz2" + +LICENSE="XMAME" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86" +IUSE="alsa bundled-libs cpu_flags_x86_mmx dga ggi joystick lirc net opengl sdl svga X xinerama xv" + +RDEPEND=" + alsa? ( media-libs/alsa-lib ) + dga? ( + x11-libs/libXxf86dga + x11-libs/libXxf86vm ) + !bundled-libs? ( dev-libs/expat ) + ggi? ( media-libs/libggi ) + lirc? ( app-misc/lirc ) + opengl? ( + virtual/opengl + virtual/glu ) + sdl? ( >=media-libs/libsdl-1.2.0 ) + svga? ( media-libs/svgalib ) + xinerama? ( x11-libs/libXinerama ) + xv? ( x11-libs/libXv ) + X? ( x11-libs/libXext )" +DEPEND="${RDEPEND} + dga? ( + x11-proto/xf86dgaproto + x11-proto/xf86vidmodeproto ) + xinerama? ( x11-proto/xineramaproto ) + xv? ( x11-proto/videoproto ) + x86? ( dev-lang/nasm )" +# Icc sucks. bug #41342 +# icc? ( dev-lang/icc ) + +S=${WORKDIR}/xmame-${PV} +PATCHES=( "${FILESDIR}/fix-zn1-looping-sound.patch" ) + +toggle_feature() { + if use $1 ; then + sed -i \ + -e "/$2.*=/s:#::" Makefile \ + || die "sed Makefile ($1 / $2) failed" + fi +} + +toggle_feature2() { + use $1 && toggle_feature $2 $3 +} + +src_prepare() { + local mycpu + + case ${ARCH} in + x86) mycpu="i386";; + ia64) mycpu="ia64";; + amd64) mycpu="amd64";; + ppc) mycpu="risc";; + sparc) mycpu="risc";; + hppa) mycpu="risc";; + alpha) mycpu="alpha";; + mips) mycpu="mips";; + esac + + sed -i \ + -e "/^PREFIX/s:=.*:=/usr:" \ + -e "/^MY_CPU/s:i386:${mycpu}:" \ + -e "/^MANDIR/s:man/man:share/man/man:" \ + -e "/^TARGET/s:mame:${TARGET:1}:" \ + -e "/^INSTALL_GROUP/s:bin:root:" \ + -e "/^CFLAGS =/d" \ + -e 's/-s,//' \ + -e 's/-Wl,-s//' \ + -e "/\bCFLAGS +=/d" \ + Makefile \ + || die "sed Makefile failed" + + if use ppc ; then + sed -i \ + -e '/LD.*--relax/s:^# ::' Makefile \ + || die "sed Makefile (ppc/LD) failed" + fi + + if use cpu_flags_x86_mmx ; then + cat >> src/unix/effect_asm.asm </dev/null + fi + done + + insinto "/usr/share/games/${PN}" + doins -r ctrlr + dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo + docinto html + dodoc -r doc/img doc/mess doc/*.html doc/*.css + + # default to sdl since the client is a bit more featureful + if use sdl ; then + dosym "${TARGET}.SDL" "/usr/bin/${TARGET}" + elif [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then + dosym "${TARGET}.x11" "/usr/bin/${TARGET}" + elif use svga ; then + dosym ${TARGET}.svgalib "/usr/bin/${TARGET}" + #elif use ggi ; then + #dosym ${TARGET}.ggi "/usr/bin/${TARGET}" + fi +} + +pkg_postinst() { + elog "Your available MAME binaries are: ${TARGET}" + if use opengl || use X || use dga || use xv ; then + elog " ${TARGET}.x11" + fi + use sdl && elog " ${TARGET}.SDL" + #use ggi && elog " ${TARGET}.ggi" + use svga && elog " ${TARGET}.svgalib" + + elog "Helper utilities are located in /usr/$(get_libdir)/${PN}." +} diff --git a/games-emulation/xmess/xmess-0.106-r1.ebuild b/games-emulation/xmess/xmess-0.106-r1.ebuild deleted file mode 100644 index 643a9060..00000000 --- a/games-emulation/xmess/xmess-0.106-r1.ebuild +++ /dev/null @@ -1,233 +0,0 @@ -# Copyright 2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit flag-o-matic toolchain-funcs -RESTRICT="mirror" - -TARGET="${PN}" - -DESCRIPTION="Multiple Arcade Machine Emulator for X11" -HOMEPAGE="http://x.mame.net/" -SRC_URI="http://gentoo.osuosl.org/distfiles/xmame-${PV}.tar.bz2" - -LICENSE="XMAME" -SLOT="0" -KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86" -IUSE="alsa bundled-libs cpu_flags_x86_mmx dga ggi joystick lirc net opengl sdl svga X xinerama xv" - -RDEPEND="sys-libs/zlib - alsa? ( media-libs/alsa-lib ) - dga? ( - x11-libs/libXxf86dga - x11-libs/libXxf86vm ) - !bundled-libs? ( dev-libs/expat ) - ggi? ( media-libs/libggi ) - lirc? ( app-misc/lirc ) - opengl? ( - virtual/opengl - virtual/glu ) - sdl? ( >=media-libs/libsdl-1.2.0 ) - svga? ( media-libs/svgalib ) - xinerama? ( x11-libs/libXinerama ) - xv? ( x11-libs/libXv ) - X? ( x11-libs/libXext )" -DEPEND="${RDEPEND} - dga? ( - x11-proto/xf86dgaproto - x11-proto/xf86vidmodeproto ) - xinerama? ( x11-proto/xineramaproto ) - xv? ( x11-proto/videoproto ) - x86? ( dev-lang/nasm )" -# Icc sucks. bug #41342 -# icc? ( dev-lang/icc ) - -S=${WORKDIR}/xmame-${PV} -PATCHES=("${FILESDIR}"/${P}-overflow.patch) - -toggle_feature() { - if use $1 ; then - sed -i \ - -e "/$2.*=/s:#::" Makefile \ - || die "sed Makefile ($1 / $2) failed" - fi -} - -toggle_feature2() { - use $1 && toggle_feature $2 $3 -} - -src_prepare() { - local mycpu - - case ${ARCH} in - x86) mycpu="i386";; - ia64) mycpu="ia64";; - amd64) mycpu="amd64";; - ppc) mycpu="risc";; - sparc) mycpu="risc";; - hppa) mycpu="risc";; - alpha) mycpu="alpha";; - mips) mycpu="mips";; - esac - - sed -i \ - -e "/^PREFIX/s:=.*:=/usr:" \ - -e "/^MY_CPU/s:i386:${mycpu}:" \ - -e "/^MANDIR/s:man/man:share/man/man:" \ - -e "/^XMAMEROOT/s:share:share/games:" \ - -e "/^TARGET/s:mame:${TARGET:1}:" \ - -e "/^INSTALL_GROUP/s:bin:root:" \ - -e "/^CFLAGS =/d" \ - -e 's/-s,//' \ - -e 's/-Wl,-s//' \ - -e "/\bCFLAGS +=/d" \ - Makefile \ - || die "sed Makefile failed" - - if use ppc ; then - sed -i \ - -e '/LD.*--relax/s:^# ::' Makefile \ - || die "sed Makefile (ppc/LD) failed" - fi - - if use cpu_flags_x86_mmx ; then - cat >> src/unix/effect_asm.asm </dev/null - fi - done - - insinto "/usr/share/games/${PN}" - doins -r ctrlr - dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo - docinto html - dodoc -r doc/img doc/mess doc/*.html doc/*.css - - # default to sdl since the client is a bit more featureful - if use sdl ; then - dosym "${TARGET}.SDL" "/usr/bin/${TARGET}" - elif [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then - dosym "${TARGET}.x11" "/usr/bin/${TARGET}" - elif use svga ; then - dosym ${TARGET}.svgalib "/usr/bin/${TARGET}" - #elif use ggi ; then - #dosym ${TARGET}.ggi "/usr/bin/${TARGET}" - fi -} - -pkg_postinst() { - elog "Your available MAME binaries are: ${TARGET}" - if use opengl || use X || use dga || use xv ; then - elog " ${TARGET}.x11" - fi - use sdl && elog " ${TARGET}.SDL" - #use ggi && elog " ${TARGET}.ggi" - use svga && elog " ${TARGET}.svgalib" - - elog "Helper utilities are located in /usr/$(get_libdir)/${PN}." -} diff --git a/games-emulation/xmess/xmess-0.106-r2.ebuild b/games-emulation/xmess/xmess-0.106-r2.ebuild new file mode 100644 index 00000000..831b0ff6 --- /dev/null +++ b/games-emulation/xmess/xmess-0.106-r2.ebuild @@ -0,0 +1,232 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit flag-o-matic toolchain-funcs +RESTRICT="mirror" + +TARGET="${PN}" + +DESCRIPTION="Multiple Arcade Machine Emulator for X11" +HOMEPAGE="http://x.mame.net/" +SRC_URI="http://gentoo.osuosl.org/distfiles/xmame-${PV}.tar.bz2" + +LICENSE="XMAME" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ppc sparc x86" +IUSE="alsa bundled-libs cpu_flags_x86_mmx dga ggi joystick lirc net opengl sdl svga X xinerama xv" + +RDEPEND="sys-libs/zlib + alsa? ( media-libs/alsa-lib ) + dga? ( + x11-libs/libXxf86dga + x11-libs/libXxf86vm ) + !bundled-libs? ( dev-libs/expat ) + ggi? ( media-libs/libggi ) + lirc? ( app-misc/lirc ) + opengl? ( + virtual/opengl + virtual/glu ) + sdl? ( >=media-libs/libsdl-1.2.0 ) + svga? ( media-libs/svgalib ) + xinerama? ( x11-libs/libXinerama ) + xv? ( x11-libs/libXv ) + X? ( x11-libs/libXext )" +DEPEND="${RDEPEND} + dga? ( + x11-proto/xf86dgaproto + x11-proto/xf86vidmodeproto ) + xinerama? ( x11-proto/xineramaproto ) + xv? ( x11-proto/videoproto ) + x86? ( dev-lang/nasm )" +# Icc sucks. bug #41342 +# icc? ( dev-lang/icc ) + +S=${WORKDIR}/xmame-${PV} +PATCHES=("${FILESDIR}"/${P}-overflow.patch) + +toggle_feature() { + if use $1 ; then + sed -i \ + -e "/$2.*=/s:#::" Makefile \ + || die "sed Makefile ($1 / $2) failed" + fi +} + +toggle_feature2() { + use $1 && toggle_feature $2 $3 +} + +src_prepare() { + local mycpu + + case ${ARCH} in + x86) mycpu="i386";; + ia64) mycpu="ia64";; + amd64) mycpu="amd64";; + ppc) mycpu="risc";; + sparc) mycpu="risc";; + hppa) mycpu="risc";; + alpha) mycpu="alpha";; + mips) mycpu="mips";; + esac + + sed -i \ + -e "/^PREFIX/s:=.*:=/usr:" \ + -e "/^MY_CPU/s:i386:${mycpu}:" \ + -e "/^MANDIR/s:man/man:share/man/man:" \ + -e "/^TARGET/s:mame:${TARGET:1}:" \ + -e "/^INSTALL_GROUP/s:bin:root:" \ + -e "/^CFLAGS =/d" \ + -e 's/-s,//' \ + -e 's/-Wl,-s//' \ + -e "/\bCFLAGS +=/d" \ + Makefile \ + || die "sed Makefile failed" + + if use ppc ; then + sed -i \ + -e '/LD.*--relax/s:^# ::' Makefile \ + || die "sed Makefile (ppc/LD) failed" + fi + + if use cpu_flags_x86_mmx ; then + cat >> src/unix/effect_asm.asm </dev/null + fi + done + + insinto "/usr/share/games/${PN}" + doins -r ctrlr + dodoc doc/{changes.*,*.txt,mame/*,${TARGET}rc.dist} README todo + docinto html + dodoc -r doc/img doc/mess doc/*.html doc/*.css + + # default to sdl since the client is a bit more featureful + if use sdl ; then + dosym "${TARGET}.SDL" "/usr/bin/${TARGET}" + elif [[ ${disp} -eq 0 ]] || use opengl || use X || use dga || use xv ; then + dosym "${TARGET}.x11" "/usr/bin/${TARGET}" + elif use svga ; then + dosym ${TARGET}.svgalib "/usr/bin/${TARGET}" + #elif use ggi ; then + #dosym ${TARGET}.ggi "/usr/bin/${TARGET}" + fi +} + +pkg_postinst() { + elog "Your available MAME binaries are: ${TARGET}" + if use opengl || use X || use dga || use xv ; then + elog " ${TARGET}.x11" + fi + use sdl && elog " ${TARGET}.SDL" + #use ggi && elog " ${TARGET}.ggi" + use svga && elog " ${TARGET}.svgalib" + + elog "Helper utilities are located in /usr/$(get_libdir)/${PN}." +} -- cgit v1.2.3-18-g5258