commit:     ffa7459c015522ff0017f5e3cc36b8f2d967f5a1
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Wed Sep 18 10:22:23 2024 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Wed Sep 18 12:06:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ffa7459c

games-util/mangohud: add workaround for lld

It can now be built with stage3-llvm-openrc, at least.

Bug: https://bugs.gentoo.org/924681
Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 games-util/mangohud/mangohud-0.7.2.ebuild | 10 +++++++---
 games-util/mangohud/mangohud-9999.ebuild  | 10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/games-util/mangohud/mangohud-0.7.2.ebuild 
b/games-util/mangohud/mangohud-0.7.2.ebuild
index a7f88f4cc..3dc42b9ac 100644
--- a/games-util/mangohud/mangohud-0.7.2.ebuild
+++ b/games-util/mangohud/mangohud-0.7.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit python-single-r1 meson-multilib
+inherit flag-o-matic python-single-r1 meson-multilib
 
 MY_PV=$(ver_cut 1-3)
 [[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
@@ -73,8 +73,8 @@ RDEPEND="
        )
        wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
        mangoapp? (
-               >=media-libs/imgui-1.81[glfw]
-               media-libs/glfw[X]
+               =media-libs/imgui-1.89.9*[glfw]
+               media-libs/glfw[X(+)]
                media-libs/glew
        )
        mangoplot? ( $(python_gen_cond_dep '
@@ -113,6 +113,10 @@ src_prepare() {
 }
 
 multilib_src_configure() {
+       # workaround for lld
+       # https://github.com/flightlessmango/MangoHud/issues/1240
+       append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
        local emesonargs=(
                -Dappend_libdir_mangohud=false
                -Dinclude_doc=false

diff --git a/games-util/mangohud/mangohud-9999.ebuild 
b/games-util/mangohud/mangohud-9999.ebuild
index a7f88f4cc..3dc42b9ac 100644
--- a/games-util/mangohud/mangohud-9999.ebuild
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit python-single-r1 meson-multilib
+inherit flag-o-matic python-single-r1 meson-multilib
 
 MY_PV=$(ver_cut 1-3)
 [[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
@@ -73,8 +73,8 @@ RDEPEND="
        )
        wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
        mangoapp? (
-               >=media-libs/imgui-1.81[glfw]
-               media-libs/glfw[X]
+               =media-libs/imgui-1.89.9*[glfw]
+               media-libs/glfw[X(+)]
                media-libs/glew
        )
        mangoplot? ( $(python_gen_cond_dep '
@@ -113,6 +113,10 @@ src_prepare() {
 }
 
 multilib_src_configure() {
+       # workaround for lld
+       # https://github.com/flightlessmango/MangoHud/issues/1240
+       append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
        local emesonargs=(
                -Dappend_libdir_mangohud=false
                -Dinclude_doc=false

Reply via email to