summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-06-29 09:37:31 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-06-29 13:22:36 -0400
commita014c2bdd6311a4aad49757bfce7b9cf58a674e6 (patch)
treea54a682399452f40d2c01971eac05fd8106cd22b /games-emulation
parentgames-emulation/mgba: re-arrange ebuild (diff)
downloadgentoo-a014c2bdd6311a4aad49757bfce7b9cf58a674e6.tar.gz
gentoo-a014c2bdd6311a4aad49757bfce7b9cf58a674e6.tar.bz2
gentoo-a014c2bdd6311a4aad49757bfce7b9cf58a674e6.zip
games-emulation/mgba: update live for lua scripting support
Builds with lua5-1 but tests don't pass with it, so do 5-3+5-4 compat for now (may revisit). Note there is currently upstream build issues with some combinations, IUSE="gui -lua" and IUSE="lua libretro" which won't worry about right now given scripting is work-in-progress upstream. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/mgba/mgba-9999.ebuild16
1 files changed, 13 insertions, 3 deletions
diff --git a/games-emulation/mgba/mgba-9999.ebuild b/games-emulation/mgba/mgba-9999.ebuild
index 76e7916549ff..c7121c11ef4a 100644
--- a/games-emulation/mgba/mgba-9999.ebuild
+++ b/games-emulation/mgba/mgba-9999.ebuild
@@ -3,7 +3,8 @@
EAPI=8
-inherit cmake xdg
+LUA_COMPAT=( lua5-{3..4} )
+inherit cmake lua-single xdg
if [[ ${PV} == 9999 ]] ; then
inherit git-r3
@@ -18,10 +19,11 @@ HOMEPAGE="https://mgba.io/"
LICENSE="MPL-2.0 BSD LGPL-2.1+ public-domain discord? ( MIT )"
SLOT="0/10"
-IUSE="debug discord elf ffmpeg gles2 gles3 gui libretro opengl +sdl sqlite test"
+IUSE="debug discord elf ffmpeg gles2 gles3 gui libretro lua opengl +sdl sqlite test"
REQUIRED_USE="
|| ( gui sdl )
- gui? ( || ( gles2 gles3 opengl ) )"
+ gui? ( || ( gles2 gles3 opengl ) )
+ lua? ( ${LUA_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -32,6 +34,7 @@ RDEPEND="
ffmpeg? ( media-video/ffmpeg:= )
gles2? ( media-libs/libglvnd )
gles3? ( media-libs/libglvnd )
+ lua? ( ${LUA_DEPS} )
opengl? ( media-libs/libglvnd )
gui? (
dev-qt/qtcore:5
@@ -45,6 +48,11 @@ RDEPEND="
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka )"
+BDEPEND="lua? ( virtual/pkgconfig )"
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+}
src_configure() {
local mycmakeargs=(
@@ -56,6 +64,7 @@ src_configure() {
-DBUILD_QT=$(usex gui)
-DBUILD_SDL=$(usex sdl)
-DBUILD_SUITE=$(usex test)
+ -DENABLE_SCRIPTING=$(usex lua)
-DMARKDOWN=OFF #752048
-DUSE_DEBUGGERS=$(usex debug)
-DUSE_DISCORD_RPC=$(usex discord)
@@ -72,6 +81,7 @@ src_configure() {
-DUSE_ZLIB=ON
$(usev libretro -DLIBRETRO_LIBDIR="${EPREFIX}"/usr/$(get_libdir)/libretro)
)
+ use lua && mycmakeargs+=( -DUSE_LUA=$(ver_cut 1-2 $(lua_get_version)) )
cmake_src_configure
}