commit:     1e26298c7da3469bccaa1eaab80c2b8fda615ec5
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  3 03:12:15 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Jan  3 03:31:09 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e26298c

games-emulation/mgba: update live

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-emulation/mgba/mgba-9999.ebuild | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/games-emulation/mgba/mgba-9999.ebuild 
b/games-emulation/mgba/mgba-9999.ebuild
index cb61b6113da3..6aeecf7948e2 100644
--- a/games-emulation/mgba/mgba-9999.ebuild
+++ b/games-emulation/mgba/mgba-9999.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
+# can recognize luajit but tests currently fail with it
 LUA_COMPAT=( lua5-{3..4} )
 inherit cmake lua-single xdg
 
@@ -10,7 +11,10 @@ if [[ ${PV} == 9999 ]] ; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/mgba-emu/mgba.git";
 else
-       SRC_URI="https://github.com/mgba-emu/mgba/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       SRC_URI="
+               https://github.com/mgba-emu/mgba/archive/refs/tags/${PV}.tar.gz
+                       -> ${P}.tar.gz
+       "
        KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
 fi
 
@@ -23,13 +27,18 @@ IUSE="
        debug discord elf ffmpeg gles2 gles3 gui libretro
        lua +opengl +sdl +sqlite test
 "
+# gles3+gui with neither gles2 nor opengl currently fails to build
 REQUIRED_USE="
-       gui? ( || ( gles2 gles3 opengl ) sqlite )
+       gui? (
+               || ( gles2 gles3 opengl ) sqlite
+               gles3? ( || ( gles2 opengl ) )
+       )
        lua? ( ${LUA_REQUIRED_USE} )
 "
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+       media-libs/freetype
        media-libs/libpng:=
        virtual/minizip:=
        debug? ( dev-libs/libedit )
@@ -69,15 +78,19 @@ pkg_setup() {
 }
 
 src_configure() {
+       # has unwanted logic with RelWithDebInfo
+       local -x CMAKE_BUILD_TYPE=Release
+
        local mycmakeargs=(
                -DBUILD_CINEMA=$(usex test)
                -DBUILD_GL=$(usex opengl)
                -DBUILD_GLES2=$(usex gles2)
                -DBUILD_GLES3=$(usex gles3)
+               -DBUILD_HEADLESS=yes #918855
                -DBUILD_LIBRETRO=$(usex libretro)
+               -DBUILD_LTO=no # let users' flags handle this
                -DBUILD_QT=$(usex gui)
                $(usev gui -DFORCE_QT_VERSION=6)
-               -DBUILD_ROM_TEST=yes #918855
                -DBUILD_SDL=$(usex sdl) # also used for gamepads in QT build
                -DBUILD_SUITE=$(usex test)
                -DBUILD_UPDATER=no
@@ -85,12 +98,16 @@ src_configure() {
                -DENABLE_GDB_STUB=$(usex debug)
                -DENABLE_SCRIPTING=$(usex lua)
                -DMARKDOWN=no #752048
+               -DSKIP_GIT=yes
                -DUSE_DISCORD_RPC=$(usex discord)
                -DUSE_EDITLINE=$(usex debug)
                -DUSE_ELF=$(usex elf)
                -DUSE_EPOXY=no
                -DUSE_FFMPEG=$(usex ffmpeg)
+               -DUSE_FREETYPE=yes
+               -DUSE_JSON_C=yes
                -DUSE_LIBZIP=no
+               $(usev lua -DUSE_LUA="${ELUA#lua}")
                -DUSE_LZMA=yes
                -DUSE_MINIZIP=yes
                -DUSE_PNG=yes
@@ -98,7 +115,6 @@ src_configure() {
                -DUSE_ZLIB=yes
                $(usev libretro 
-DLIBRETRO_LIBDIR="${EPREFIX}"/usr/$(get_libdir)/libretro)
        )
-       use lua && mycmakeargs+=( -DUSE_LUA=$(ver_cut 1-2 $(lua_get_version)) )
 
        cmake_src_configure
 }
@@ -106,6 +122,7 @@ src_configure() {
 src_test() {
        # CMakeLists.txt forces SKIP_RPATH=yes when PREFIX=/usr
        local -x LD_LIBRARY_PATH=${BUILD_DIR}:${LD_LIBRARY_PATH}
+       local -x QT_QPA_PLATFORM=offscreen
 
        cmake_src_test
 }

Reply via email to