games-emulation/sdlmame: got it working again for current releases
This commit is contained in:
4
games-emulation/sdlmame/Manifest
Normal file
4
games-emulation/sdlmame/Manifest
Normal file
@@ -0,0 +1,4 @@
|
||||
AUX mame.png 15733 SHA256 e660c1cc75a94adc7aa62539f9dfd31a0edebd7105cd9a972a745d8d162fab56 SHA512 2610fdf6768fab6ca16b7f2bd2b32abf11de4fa57e77c025b0857f213f26ab3b1d6220722f742092d818564b553e8444d0e6a06676b3a16997910113b271a7f5 WHIRLPOOL c73b82729f1a221f9dfab58b9a4c2194a5d1d1d96e8f1cd4b8a6e4c3beb95e4e9aaec7e4dc2777ad14ff9a4263c9957d29de0e47613314dfef421baa199cd9ea
|
||||
AUX vector.ini 116 SHA256 408aeaaffcb2ecccd20db457f22d2d5efa930c0f62a92987b0fbefaf6c038c23 SHA512 6d84eb7b9c4e9f134b57e64ba9ae30dcaaa620296830f7c9858611fde9064f803bd7d230a989a5cce34d8b815b5a98d323b19d3eef3d4c688b5c32b96b299f5f WHIRLPOOL f60543015a0195487917c696640cc66e29109298ac8f9bd1309346f6ab1b46d8e2ce83d00506c17a9ea588f6b3bac82f0f66d7e75bbf88656ba897cd50fa3dac
|
||||
DIST mame-0.249.tar.gz 185957630 SHA256 93df1b954c2e6c0fe8b54b3662f642f77d7d460f42c0de0bac0b03ccb86756c4 SHA512 bb769afe0abd6d3e07d2491a376185cc0cc6e1f79f6d4e1a66435355ca025cd7639bbd45a1fcb7db5cc35c19e9519dfb6f117cf4d0c675ad2e365c61d7fa14bb WHIRLPOOL 3a68488b951b87efd12b25823e2e8f5b0744e05dfb7a30ba95ad6df8a1b50c5bba6c964459ef49ad83ee3ece929ce8c594d27e582ae6ce92cbd3a85d2941efa4
|
||||
EBUILD sdlmame-0.249.ebuild 5655 SHA256 a8b1c196e60d22af776710ad1b9261eef062181978890818e1857143cc397bb9 SHA512 1e60ddfb9fbf7c4b3c7f51e34fb4008757c25c97752474210ae0d4694fa8f50ffedb7ec942e8fd5c2950e10b8ba22b9e55633d3c5c229cdc5a554cb7a3befed1 WHIRLPOOL a039a1fdc7d6fb4c4f2fd1c6e34a0f5aeebe72a4456eb8f2c1161e3b7219771ec085beb43c3204d4b08ff732babbee98b6f22d82eeaa8fddcc7c959dc6355c2b
|
||||
BIN
games-emulation/sdlmame/files/mame.png
Normal file
BIN
games-emulation/sdlmame/files/mame.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
9
games-emulation/sdlmame/files/vector.ini
Normal file
9
games-emulation/sdlmame/files/vector.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Specific options file for vector games
|
||||
#
|
||||
|
||||
#
|
||||
# VIDEO OPTIONS
|
||||
#
|
||||
video soft
|
||||
yuvmode yv12
|
||||
222
games-emulation/sdlmame/sdlmame-0.249.ebuild
Normal file
222
games-emulation/sdlmame/sdlmame-0.249.ebuild
Normal file
@@ -0,0 +1,222 @@
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{8,9,10,11})
|
||||
inherit desktop eutils python-any-r1 toolchain-funcs qmake-utils xdg-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/archive/mame${MY_PV}.tar.gz -> mame-${PV}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+ BSD-2 MIT CC0-1.0"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE="alsa +arcade debug +mess opengl openmp tools"
|
||||
REQUIRED_USE="|| ( arcade mess )"
|
||||
|
||||
# MAME and MESS: +arcade +mess
|
||||
# MAME only: +arcade -mess
|
||||
# MESS only: -arcade +mess
|
||||
|
||||
RDEPEND="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
|
||||
dev-cpp/asio
|
||||
dev-libs/libutf8proc
|
||||
media-libs/glm
|
||||
dev-libs/rapidjson
|
||||
dev-libs/pugixml"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
x11-base/xorg-proto"
|
||||
S=${WORKDIR}/mame-mame${MY_PV}
|
||||
|
||||
# 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_prepare() {
|
||||
default
|
||||
# Disable using bundled libraries
|
||||
enable_feature USE_SYSTEM_LIB_ASIO
|
||||
enable_feature USE_SYSTEM_LIB_UTF8PROC
|
||||
enable_feature USE_SYSTEM_LIB_GLM
|
||||
enable_feature USE_SYSTEM_LIB_RAPIDJSON
|
||||
enable_feature USE_SYSTEM_LIB_PUGIXML
|
||||
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
|
||||
enable_feature IGNORE_GIT
|
||||
|
||||
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_SELECT=qt5 \
|
||||
QT_HOME="$(qt5_get_libdir)/qt5" \
|
||||
ARCH= \
|
||||
emake "$@" \
|
||||
AR=$(tc-getAR)
|
||||
}
|
||||
my_emake -j1 generate
|
||||
|
||||
my_emake ${targetargs} \
|
||||
SDL_INI_PATH="\$\$\$\$HOME/.sdlmame;/etc/${PN}" \
|
||||
USE_QTDEBUG=${qtdebug}
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
if use mess; then
|
||||
MAMEBIN=mamemess
|
||||
if use arcade; then
|
||||
MAMEBIN=mame
|
||||
else
|
||||
newbin $MAMEBIN mess
|
||||
fi
|
||||
newman docs/man/mame.6 mess.6
|
||||
fi
|
||||
if use arcade; then
|
||||
MAMEBIN=mamearcade
|
||||
if use mess; then
|
||||
MAMEBIN=mame
|
||||
fi
|
||||
newbin $MAMEBIN mame
|
||||
if use mess; then
|
||||
dosym mame /usr/bin/mess
|
||||
fi
|
||||
doman docs/man/mame.6
|
||||
fi
|
||||
|
||||
insinto "/usr/share/${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;/usr/share/${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;/etc/${PN}/\2;/usr/share/${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/usr/share/${PN}/keymaps/${f##*/}" \
|
||||
"${T}/mame.ini" || die
|
||||
done
|
||||
insinto "/etc/${PN}"
|
||||
doins "${T}/mame.ini"
|
||||
|
||||
insinto "/etc/${PN}"
|
||||
doins "${FILESDIR}/vector.ini"
|
||||
|
||||
#dodoc docs/{config,mame,newvideo}.txt
|
||||
keepdir \
|
||||
"/usr/share/${PN}"/{ctrlr,cheat,roms,samples,artwork,crosshair} \
|
||||
"/etc/${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() {
|
||||
xdg_desktop_database_update
|
||||
|
||||
elog "It is strongly recommended to change either the system-wide"
|
||||
elog " /etc/${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
|
||||
}
|
||||
|
||||
pkg_postrm(){
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user