summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bernhard Frauendienst <exherbo@nospam.obeliks.de> 2016-07-09 18:06:59 +0200
committerAvatar Wulf C. Krueger <philantrop@exherbo.org> 2016-07-16 12:15:27 +0200
commitf3359e95af4a672e22246b5a641d047b64c4543d (patch)
tree7d33bd7634f767ac4963ad829a6eaa7bbf23a37f
parent4591adb8436c84e472884ec663913753dbc7dc97 (diff)
downloadgames-f3359e95af4a672e22246b5a641d047b64c4543d.tar.gz
games-f3359e95af4a672e22246b5a641d047b64c4543d.tar.xz
mame: update to 0.175 and scm
Now supports libjpeg-turbo, SDL:2, Qt5, unpacking and building required some minor adjustments Mess support is now always compiled as it is no longer a separate build target Change-Id: I19f70d2e264bd8a0adb2f654f07b5692c2124105 Reviewed-on: https://galileo.mailstation.de/gerrit/6641 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Wulf C. Krueger <philantrop@exherbo.org>
-rw-r--r--metadata/repository_mask.conf7
-rw-r--r--packages/games-emulation/mame/files/0001-use-pkg-config-env.patch123
-rw-r--r--packages/games-emulation/mame/files/mame-0175-use-pkg-config-env.patch122
-rw-r--r--packages/games-emulation/mame/mame-0.175.exheres-0 (renamed from packages/games-emulation/mame/mame-0.154.exheres-0)0
-rw-r--r--packages/games-emulation/mame/mame-scm.exheres-07
-rw-r--r--packages/games-emulation/mame/mame.exlib69
6 files changed, 307 insertions, 21 deletions
diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf
index 200cc8c..e257b64 100644
--- a/metadata/repository_mask.conf
+++ b/metadata/repository_mask.conf
@@ -67,3 +67,10 @@ games-strategy/wesnoth[<1.12.4] [[
token = security
description = [ CVE-2015-50{69,70} ]
]]
+
+games-emulation/mame[~scm] [[
+ author = [ Bernhard Frauendienst <exherbo@nospam.obeliks.de> ]
+ date = [ 09 July 2016 ]
+ token = scm
+ description = [ Mask live version ]
+]]
diff --git a/packages/games-emulation/mame/files/0001-use-pkg-config-env.patch b/packages/games-emulation/mame/files/0001-use-pkg-config-env.patch
new file mode 100644
index 0000000..af20f0c
--- /dev/null
+++ b/packages/games-emulation/mame/files/0001-use-pkg-config-env.patch
@@ -0,0 +1,123 @@
+From 5492b5f7d8db9350b05ec6011efcdb0658a255d0 Mon Sep 17 00:00:00 2001
+From: Bernhard Frauendienst <git@nospam.obeliks.de>
+Date: Sat, 9 Jul 2016 21:31:01 +0200
+Subject: [PATCH] Take pkg-config path from env if defined
+Upstream: submitted, https://github.com/mamedev/mame/pull/1072
+
+---
+ scripts/src/osd/modules.lua | 14 +++++++++++---
+ scripts/src/osd/sdl.lua | 4 ++--
+ scripts/src/osd/sdl_cfg.lua | 8 +++++---
+ 3 files changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
+index 7b24531..ed03ecd 100644
+--- a/scripts/src/osd/modules.lua
++++ b/scripts/src/osd/modules.lua
+@@ -35,6 +35,14 @@ function addoptionsfromstring(str)
+ end
+ end
+
++function pkgconfigcmd()
++ local pkgconfig = os.getenv("PKG_CONFIG")
++ if pkgconfig == nil then
++ return "pkg-config"
++ end
++ return pkgconfig
++end
++
+ function osdmodulesbuild()
+
+ removeflags {
+@@ -343,7 +351,7 @@ function qtdebuggerbuild()
+ }
+ else
+ buildoptions {
+- backtick("pkg-config --cflags Qt5Widgets"),
++ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
+ }
+ end
+ end
+@@ -378,7 +386,7 @@ function osdmodulestargetconf()
+
+ if _OPTIONS["NO_USE_MIDI"]~="1" then
+ if _OPTIONS["targetos"]=="linux" then
+- local str = backtick("pkg-config --libs alsa")
++ local str = backtick(pkgconfigcmd() .. " --libs alsa")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ elseif _OPTIONS["targetos"]=="macosx" then
+@@ -419,7 +427,7 @@ function osdmodulestargetconf()
+ "Qt5Widgets",
+ }
+ else
+- local str = backtick("pkg-config --libs Qt5Widgets")
++ local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ end
+diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
+index 4094e48..94c938b 100644
+--- a/scripts/src/osd/sdl.lua
++++ b/scripts/src/osd/sdl.lua
+@@ -42,7 +42,7 @@ function maintargetosdoptions(_target,_subtarget)
+ links {
+ "SDL2_ttf",
+ }
+- local str = backtick("pkg-config --libs fontconfig")
++ local str = backtick(pkgconfigcmd() .. " --libs fontconfig")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ end
+@@ -132,7 +132,7 @@ function sdlconfigcmd()
+ if _OPTIONS["targetos"]=="asmjs" then
+ return "sdl2-config"
+ elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
+- return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
++ return pkgconfigcmd() .. " sdl2"
+ else
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
+ end
+diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
+index 0fd15e5..b73c925 100644
+--- a/scripts/src/osd/sdl_cfg.lua
++++ b/scripts/src/osd/sdl_cfg.lua
+@@ -1,6 +1,8 @@
+ -- license:BSD-3-Clause
+ -- copyright-holders:MAMEdev Team
+
++dofile('modules.lua')
++
+ forcedincludes {
+ MAME_DIR .. "src/osd/sdl/sdlprefix.h"
+ }
+@@ -52,7 +54,7 @@ end
+
+ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
+ buildoptions {
+- backtick("pkg-config --cflags alsa"),
++ backtick(pkgconfigcmd() .. " --cflags alsa"),
+ }
+ end
+
+@@ -94,7 +96,7 @@ if BASE_TARGETOS=="unix" then
+ }
+ if _OPTIONS["targetos"]~="asmjs" then
+ buildoptions {
+- backtick("pkg-config --cflags fontconfig"),
++ backtick(pkgconfigcmd() .. " --cflags fontconfig"),
+ }
+ end
+ end
+@@ -121,7 +123,7 @@ elseif _OPTIONS["targetos"]=="linux" then
+ }
+ else
+ buildoptions {
+- backtick("pkg-config --cflags Qt5Widgets"),
++ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
+ }
+ end
+ elseif _OPTIONS["targetos"]=="macosx" then
+--
+2.9.0
+
diff --git a/packages/games-emulation/mame/files/mame-0175-use-pkg-config-env.patch b/packages/games-emulation/mame/files/mame-0175-use-pkg-config-env.patch
new file mode 100644
index 0000000..5df1b7e
--- /dev/null
+++ b/packages/games-emulation/mame/files/mame-0175-use-pkg-config-env.patch
@@ -0,0 +1,122 @@
+From 68188e927d2b56772621913b3050c929b65289cc Mon Sep 17 00:00:00 2001
+From: Bernhard Frauendienst <git@nospam.obeliks.de>
+Date: Sat, 9 Jul 2016 21:31:01 +0200
+Subject: [PATCH] Take pkg-config path from env if defined
+
+---
+ scripts/src/osd/modules.lua | 14 +++++++++++---
+ scripts/src/osd/sdl.lua | 4 ++--
+ scripts/src/osd/sdl_cfg.lua | 8 +++++---
+ 3 files changed, 18 insertions(+), 8 deletions(-)
+
+diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua
+index b8e5bb6..ac52800 100644
+--- a/scripts/src/osd/modules.lua
++++ b/scripts/src/osd/modules.lua
+@@ -35,6 +35,14 @@ function addoptionsfromstring(str)
+ end
+ end
+
++function pkgconfigcmd()
++ local pkgconfig = os.getenv("PKG_CONFIG")
++ if pkgconfig == nil then
++ return "pkg-config"
++ end
++ return pkgconfig
++end
++
+ function osdmodulesbuild()
+
+ removeflags {
+@@ -345,7 +353,7 @@ function qtdebuggerbuild()
+ }
+ else
+ buildoptions {
+- backtick("pkg-config --cflags Qt5Widgets"),
++ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
+ }
+ end
+ end
+@@ -380,7 +388,7 @@ function osdmodulestargetconf()
+
+ if _OPTIONS["NO_USE_MIDI"]~="1" then
+ if _OPTIONS["targetos"]=="linux" then
+- local str = backtick("pkg-config --libs alsa")
++ local str = backtick(pkgconfigcmd() .. " --libs alsa")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ elseif _OPTIONS["targetos"]=="macosx" then
+@@ -421,7 +429,7 @@ function osdmodulestargetconf()
+ "Qt5Widgets",
+ }
+ else
+- local str = backtick("pkg-config --libs Qt5Widgets")
++ local str = backtick(pkgconfigcmd() .. " --libs Qt5Widgets")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ end
+diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
+index 4094e48..94c938b 100644
+--- a/scripts/src/osd/sdl.lua
++++ b/scripts/src/osd/sdl.lua
+@@ -42,7 +42,7 @@ function maintargetosdoptions(_target,_subtarget)
+ links {
+ "SDL2_ttf",
+ }
+- local str = backtick("pkg-config --libs fontconfig")
++ local str = backtick(pkgconfigcmd() .. " --libs fontconfig")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
+ end
+@@ -132,7 +132,7 @@ function sdlconfigcmd()
+ if _OPTIONS["targetos"]=="asmjs" then
+ return "sdl2-config"
+ elseif not _OPTIONS["SDL_INSTALL_ROOT"] then
+- return _OPTIONS['TOOLCHAIN'] .. "pkg-config sdl2"
++ return pkgconfigcmd() .. " sdl2"
+ else
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin","sdl2") .. "-config"
+ end
+diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
+index 0fd15e5..b73c925 100644
+--- a/scripts/src/osd/sdl_cfg.lua
++++ b/scripts/src/osd/sdl_cfg.lua
+@@ -1,6 +1,8 @@
+ -- license:BSD-3-Clause
+ -- copyright-holders:MAMEdev Team
+
++dofile('modules.lua')
++
+ forcedincludes {
+ MAME_DIR .. "src/osd/sdl/sdlprefix.h"
+ }
+@@ -52,7 +54,7 @@ end
+
+ if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
+ buildoptions {
+- backtick("pkg-config --cflags alsa"),
++ backtick(pkgconfigcmd() .. " --cflags alsa"),
+ }
+ end
+
+@@ -94,7 +96,7 @@ if BASE_TARGETOS=="unix" then
+ }
+ if _OPTIONS["targetos"]~="asmjs" then
+ buildoptions {
+- backtick("pkg-config --cflags fontconfig"),
++ backtick(pkgconfigcmd() .. " --cflags fontconfig"),
+ }
+ end
+ end
+@@ -121,7 +123,7 @@ elseif _OPTIONS["targetos"]=="linux" then
+ }
+ else
+ buildoptions {
+- backtick("pkg-config --cflags Qt5Widgets"),
++ backtick(pkgconfigcmd() .. " --cflags Qt5Widgets"),
+ }
+ end
+ elseif _OPTIONS["targetos"]=="macosx" then
+--
+2.9.0
+
diff --git a/packages/games-emulation/mame/mame-0.154.exheres-0 b/packages/games-emulation/mame/mame-0.175.exheres-0
index e74e80d..e74e80d 100644
--- a/packages/games-emulation/mame/mame-0.154.exheres-0
+++ b/packages/games-emulation/mame/mame-0.175.exheres-0
diff --git a/packages/games-emulation/mame/mame-scm.exheres-0 b/packages/games-emulation/mame/mame-scm.exheres-0
new file mode 100644
index 0000000..e74e80d
--- /dev/null
+++ b/packages/games-emulation/mame/mame-scm.exheres-0
@@ -0,0 +1,7 @@
+# Copyright 2010 Elias Pipping <pipping@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require mame
+
+PLATFORMS="~amd64"
+
diff --git a/packages/games-emulation/mame/mame.exlib b/packages/games-emulation/mame/mame.exlib
index 9bd30c8..d384114 100644
--- a/packages/games-emulation/mame/mame.exlib
+++ b/packages/games-emulation/mame/mame.exlib
@@ -1,10 +1,19 @@
# Copyright 2010-2011 Elias Pipping <pipping@exherbo.org>
# Distributed under the terms of the GNU General Public License v2
-export_exlib_phases src_unpack src_compile src_install
+export_exlib_phases src_unpack src_prepare src_compile src_install
MY_PV=$(ever delete_all $(ever range 1-2))
+if ever is_scm ; then
+ require github [ user='mamedev' ]
+else
+ DOWNLOADS="
+ https://github.com/mamedev/mame/releases/download/${PN}${MY_PV}/${PN}${MY_PV}s.zip
+ "
+fi
+
+
SUMMARY="Multiple Arcade Machine Emulator. "
DESCRIPTION="
When used in conjunction with images of the original arcade game's ROM and disk data, MAME attempts
@@ -12,44 +21,64 @@ to reproduce that game as faithfully as possible on a more modern general-purpos
currently emulate several thousand different classic arcade video games from the late 1970s through
the modern era.
"
-HOMEPAGE=""
-DOWNLOADS="
- http://mamedev.org/downloader.php?file=releases/${PN}${MY_PV}s.zip
-"
+HOMEPAGE="http://mamedev.org"
-LICENCES="${PN}"
+LICENCES="GPL-2" # since 0.172
SLOT="0"
MYOPTIONS="
- mess [[ description = [ Emulate consoles as well ] ]]
platform: amd64 x86
+
+ ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build:
app-arch/unzip
+ virtual/pkg-config
build+run:
dev-libs/expat
dev-db/sqlite
- media-libs/SDL[=1.2*]
- media-libs/SDL_ttf
+ media-libs/SDL:2[X]
+ media-libs/SDL_ttf:2
media-libs/flac
media-libs/fontconfig
- media-libs/jpeg
media-libs/portmidi
sys-libs/zlib
sys-sound/alsa-lib
x11-dri/glu
x11-libs/libX11
x11-libs/libXinerama
- x11-libs/qt
+ x11-libs/qtbase
+ providers:ijg-jpeg? ( media-libs/jpeg:= )
+ providers:jpeg-turbo? ( media-libs/libjpeg-turbo )
"
-WORK="${WORKBASE}"
+# so far there are no tests defined, but the makefile calls
+# unprefixed gcc anyway, so restrict until there are tests.
+RESTRICT="test"
+
+if ! ever is_scm; then
+ WORK="${WORKBASE}"
+fi
mame_src_unpack() {
default
- unpack ./mame.zip
- edo rm -f mame.zip
+ if ! ever is_scm ; then
+ # unzip fails due to some unicode filenames,
+ # so we have to use unzip directly to exclude them
+ edo unzip -qo ./mame.zip \
+ -x '3rdparty/pugixml/tests/data/*'
+ edo rm -f mame.zip
+ fi
+}
+
+mame_src_prepare() {
+ if ever is_scm; then
+ expatch "${FILES}/0001-use-pkg-config-env.patch"
+ else
+ # zipped versions have dos file endings, so patch with --binary
+ expatch --binary "${FILES}/${PN}-${MY_PV}-use-pkg-config-env.patch"
+ fi
}
mame_src_compile() {
@@ -65,24 +94,22 @@ mame_src_compile() {
AR=${AR}
CC=${CC}
+ CXX=${CXX}
LD=${CXX}
+ PKG_CONFIG=${PKG_CONFIG}
)
- emake TARGET=mame ${args[@]}
- option mess && emake TARGET=mess ${args[@]}
+ emake ${args[@]}
}
mame_src_install() {
- local mamebin messbin
- dodoc docs/{config,license,mame,newvideo}.txt
+ local mamebin
+ dodoc docs/{config,mame,newvideo}.txt docs/LICENSE
if option platform:amd64; then
mamebin=mame64
- messbin=mess64
elif option platform:x86; then
mamebin=mame32
- messbin=mess32
fi
newbin ${mamebin} mame
- option mess && newbin ${messbin} mess
}