commit: a014c2bdd6311a4aad49757bfce7b9cf58a674e6
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 29 13:37:31 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 17:22:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a014c2bd
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 <AT> gentoo.org>
games-emulation/mgba/mgba-9999.ebuild | 16 +++++++++++++---
1 file 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
}