Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/mgba/
Date: Wed, 29 Jun 2022 17:22:54
Message-Id: 1656523356.a014c2bdd6311a4aad49757bfce7b9cf58a674e6.ionen@gentoo
1 commit: a014c2bdd6311a4aad49757bfce7b9cf58a674e6
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 13:37:31 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 17:22:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a014c2bd
7
8 games-emulation/mgba: update live for lua scripting support
9
10 Builds with lua5-1 but tests don't pass with it, so do 5-3+5-4
11 compat for now (may revisit).
12
13 Note there is currently upstream build issues with some combinations,
14 IUSE="gui -lua" and IUSE="lua libretro" which won't worry about right
15 now given scripting is work-in-progress upstream.
16
17 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
18
19 games-emulation/mgba/mgba-9999.ebuild | 16 +++++++++++++---
20 1 file changed, 13 insertions(+), 3 deletions(-)
21
22 diff --git a/games-emulation/mgba/mgba-9999.ebuild b/games-emulation/mgba/mgba-9999.ebuild
23 index 76e7916549ff..c7121c11ef4a 100644
24 --- a/games-emulation/mgba/mgba-9999.ebuild
25 +++ b/games-emulation/mgba/mgba-9999.ebuild
26 @@ -3,7 +3,8 @@
27
28 EAPI=8
29
30 -inherit cmake xdg
31 +LUA_COMPAT=( lua5-{3..4} )
32 +inherit cmake lua-single xdg
33
34 if [[ ${PV} == 9999 ]] ; then
35 inherit git-r3
36 @@ -18,10 +19,11 @@ HOMEPAGE="https://mgba.io/"
37
38 LICENSE="MPL-2.0 BSD LGPL-2.1+ public-domain discord? ( MIT )"
39 SLOT="0/10"
40 -IUSE="debug discord elf ffmpeg gles2 gles3 gui libretro opengl +sdl sqlite test"
41 +IUSE="debug discord elf ffmpeg gles2 gles3 gui libretro lua opengl +sdl sqlite test"
42 REQUIRED_USE="
43 || ( gui sdl )
44 - gui? ( || ( gles2 gles3 opengl ) )"
45 + gui? ( || ( gles2 gles3 opengl ) )
46 + lua? ( ${LUA_REQUIRED_USE} )"
47 RESTRICT="!test? ( test )"
48
49 RDEPEND="
50 @@ -32,6 +34,7 @@ RDEPEND="
51 ffmpeg? ( media-video/ffmpeg:= )
52 gles2? ( media-libs/libglvnd )
53 gles3? ( media-libs/libglvnd )
54 + lua? ( ${LUA_DEPS} )
55 opengl? ( media-libs/libglvnd )
56 gui? (
57 dev-qt/qtcore:5
58 @@ -45,6 +48,11 @@ RDEPEND="
59 DEPEND="
60 ${RDEPEND}
61 test? ( dev-util/cmocka )"
62 +BDEPEND="lua? ( virtual/pkgconfig )"
63 +
64 +pkg_setup() {
65 + use lua && lua-single_pkg_setup
66 +}
67
68 src_configure() {
69 local mycmakeargs=(
70 @@ -56,6 +64,7 @@ src_configure() {
71 -DBUILD_QT=$(usex gui)
72 -DBUILD_SDL=$(usex sdl)
73 -DBUILD_SUITE=$(usex test)
74 + -DENABLE_SCRIPTING=$(usex lua)
75 -DMARKDOWN=OFF #752048
76 -DUSE_DEBUGGERS=$(usex debug)
77 -DUSE_DISCORD_RPC=$(usex discord)
78 @@ -72,6 +81,7 @@ src_configure() {
79 -DUSE_ZLIB=ON
80 $(usev libretro -DLIBRETRO_LIBDIR="${EPREFIX}"/usr/$(get_libdir)/libretro)
81 )
82 + use lua && mycmakeargs+=( -DUSE_LUA=$(ver_cut 1-2 $(lua_get_version)) )
83
84 cmake_src_configure
85 }