summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/mgba/Manifest1
-rw-r--r--games-emulation/mgba/mgba-0.6.1.ebuild115
2 files changed, 116 insertions, 0 deletions
diff --git a/games-emulation/mgba/Manifest b/games-emulation/mgba/Manifest
index 90c7709350ea..6f190dafc6f8 100644
--- a/games-emulation/mgba/Manifest
+++ b/games-emulation/mgba/Manifest
@@ -1,2 +1,3 @@
DIST mgba-0.5.2.tar.gz 5343635 SHA256 3d9fda762e6e0dd26ffbd3cbaa5365dc7ca7ed324cee5c65b7c85eaa3c37c4f3 SHA512 8d3ef901bae9b503f8d5afff63c23be9af4b519f86cc6f3656c51374756107e4852bc0472cb7393cb04c8f0ff2f134367a81e32a5ff3dab8ae0c6cbd7d3858da WHIRLPOOL 977da5589b6e04fd67d32295befccf76988b3f23d13d0d92ab525deb51c58aae18ae1d40d0849b8bd2b3fc9e8c15703367458812404ca797b4f0eedbc26f1272
DIST mgba-0.6.0.tar.gz 7434157 SHA256 d8cf01befd7f452415a9191b058bc21e47e39c7f2c865257cd93c2780b17fe07 SHA512 24a9c75370465246e467f03498994e2f142bed18435658aa75ee8dc7ad9f8fa649b476b7846c0f3c4be474ca1d3b7c36e34af05b4088fa3a7a11e3edb0074308 WHIRLPOOL 26588a452d9c2ae8456f0f8be63246ae8a637b6d0bce7b90ba2a11813682ae9402652a99b2d4844f8eddd5c07347f63dbbeb857887448cd328bb27e38939da07
+DIST mgba-0.6.1.tar.gz 7437240 SHA256 7c78feb0aa12930b993ca1b220d282ed178e306621559e48bb168623030eb876 SHA512 fb4d2bd490afa052c32d263e4d7b65ff83ccdcad01f5df6572d73c81de3c4e0c268b102ac36cff4a85ab20fc190d2f1a4959a3058e559a528be5e49c4808ce57 WHIRLPOOL 333b663dfff0610cf6701178f68beed2fc3ae6fe21380d96636a9a2ac66c2ed98081d31fae78a97cd14d9c6cbc89e246961cc8d246ea3214bd26dd98dd6a3a66
diff --git a/games-emulation/mgba/mgba-0.6.1.ebuild b/games-emulation/mgba/mgba-0.6.1.ebuild
new file mode 100644
index 000000000000..7ba7da1f8956
--- /dev/null
+++ b/games-emulation/mgba/mgba-0.6.1.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils xdg-utils
+
+DESCRIPTION="A new Game Boy Advance emulator written in C."
+HOMEPAGE="https://mgba.io"
+SRC_URI="https://github.com/${PN}-emu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ffmpeg imagemagick opengl qt5 +sdl"
+REQUIRED_USE="|| ( qt5 sdl )
+ qt5? ( opengl )"
+
+RDEPEND="
+ dev-db/sqlite:3
+ media-libs/libpng:0=
+ sys-libs/zlib[minizip]
+ ffmpeg? ( virtual/ffmpeg )
+ imagemagick? ( media-gfx/imagemagick:= )
+ opengl? ( virtual/opengl )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtwidgets:5
+ opengl? ( dev-qt/qtopengl:5 )
+ )
+ sdl? ( media-libs/libsdl2[X,sound,joystick,video,opengl?] )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+
+ # Get rid of any bundled stuff we don't want
+ for pkg in libpng lzma sqlite3 zlib ; do
+ rm -r "${S}"/src/third-party/${pkg} || die
+ done
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_GL="$(usex opengl)"
+ -DBUILD_GLES=OFF
+ -DBUILD_PYTHON=OFF
+ -DBUILD_QT="$(usex qt5)"
+ -DBUILD_SDL="$(usex sdl)"
+ -DBUILD_SHARED=ON
+ # test suite fails to build (0.6.0)
+ -DBUILD_SUITE=OFF
+ -DBUILD_TEST=OFF
+ -DM_CORE_GB=ON
+ -DM_CORE_GBA=ON
+ -DUSE_DEBUGGERS="$(usex debug)"
+ -DUSE_EDITLINE="$(usex debug)"
+ -DUSE_EPOXY=OFF
+ -DUSE_FFMPEG="$(usex ffmpeg)"
+ -DUSE_GDB_STUB="$(usex debug)"
+ -DUSE_LIBZIP=OFF
+ -DUSE_LZMA=OFF
+ -DUSE_MAGICK="$(usex imagemagick)"
+ -DUSE_MINIZIP=ON
+ -DUSE_PNG=ON
+ # build fails with sqlite being disabled (0.6.0)
+ -DUSE_SQLITE3=ON
+ -DUSE_ZLIB=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ if use qt5 ; then
+ for size in 16 24 32 48 64 96 128 256; do
+ newicon -s ${size} res/${PN}-${size}.png ${PN}.png
+ done
+ doman doc/${PN}-qt.6
+ domenu res/${PN}-qt.desktop
+ dobin ../${P}_build/qt/${PN}-qt
+ fi
+ if use sdl ; then
+ doman doc/${PN}.6
+ newbin ../${P}_build/sdl/${PN} ${PN}-sdl
+ fi
+
+ dolib.so ../${P}_build/lib${PN}.so*
+}
+
+pkg_preinst() {
+ if use qt5 ; then
+ gnome2_icon_savelist
+ fi
+}
+
+pkg_postinst() {
+ if use qt5 ; then
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+ fi
+}
+
+pkg_postrm() {
+ if use qt5 ; then
+ xdg_desktop_database_update
+ gnome2_icon_cache_update
+ fi
+}