commit: e9a378e04e7098e104d84a13015b4277d0c1dfc6
Author: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May 9 22:46:27 2024 +0000
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Thu May 9 23:41:58 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e9a378e0
games-util/mangohud: add mangoapp and mangohudctl
* enable test
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com>
.../mangohud/files/mangohud-0.7.1-menson-fix-dep.patch | 2 +-
.../mangohud/files/mangohud-9999-menson-fix-dep.patch | 2 +-
.../{mangohud-0.7.1-r2.ebuild => mangohud-0.7.1-r3.ebuild} | 14 ++++++++++++--
games-util/mangohud/mangohud-9999.ebuild | 14 ++++++++++++--
games-util/mangohud/metadata.xml | 3 +++
5 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch
b/games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch
index e06411f0ed..df2f7eb815 100644
--- a/games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch
+++ b/games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch
@@ -34,7 +34,7 @@ index 3bf3918..329ad6f 100644
+# Commented code can be used if mangohud start using latest SDK Vulkan-Headers
+# Allowing user to build mangohud using system Vulkan-Headers
+#if not dependency('VulkanHeaders').found()
-+ vk_sp = subproject('VulkanHeaders')
++ vkh_sp = subproject('vulkan-headers')
+ vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
+ dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
+#else
diff --git a/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
b/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
index 4cf18e1394..549aecfc13 100644
--- a/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
+++ b/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
@@ -32,7 +32,7 @@ index 86b5411568..00555c7f97 100644
+# Commented code can be used if mangohud start using latest SDK Vulkan-Headers
+# Allowing user to build mangohud using system Vulkan-Headers
+#if not dependency('VulkanHeaders').found()
-+ vk_sp = subproject('VulkanHeaders')
++ vkh_sp = subproject('vulkan-headers')
+ vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
+ dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
+#else
diff --git a/games-util/mangohud/mangohud-0.7.1-r2.ebuild
b/games-util/mangohud/mangohud-0.7.1-r3.ebuild
similarity index 87%
rename from games-util/mangohud/mangohud-0.7.1-r2.ebuild
rename to games-util/mangohud/mangohud-0.7.1-r3.ebuild
index 171ea194b7..143418dc36 100644
--- a/games-util/mangohud/mangohud-0.7.1-r2.ebuild
+++ b/games-util/mangohud/mangohud-0.7.1-r3.ebuild
@@ -37,7 +37,8 @@ fi
LICENSE="MIT"
SLOT="0"
-IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia video_cards_amdgpu"
+IUSE="+dbus debug +X xnvctrl wayland mangoapp mangohudctl video_cards_nvidia
video_cards_amdgpu test"
+RESTRICT="!test? ( test )"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
@@ -48,6 +49,7 @@ REQUIRED_USE="
BDEPEND="
app-arch/unzip
>=dev-util/vulkan-headers-1.2.158
+ test? ( dev-util/cmocka )
$(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]')
"
@@ -68,6 +70,10 @@ RDEPEND="
xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
)
wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+ mangoapp? (
+ >=media-libs/imgui-1.81[glfw]
+ media-libs/glew
+ )
$(python_gen_cond_dep '
|| (
dev-python/matplotlib[gtk3,${PYTHON_USEDEP}]
@@ -103,7 +109,8 @@ src_prepare() {
find . -type f -exec sed -i 's|"imgui.h"|<imgui/imgui.h>|g' {} \; || die
find . -type f -exec sed -i
's|<imgui_internal.h>|<imgui/imgui_internal.h>|g' {} \; || die
find . -type f -exec sed -i
's|"imgui_internal.h"|<imgui/imgui_internal.h>|g' {} \; || die
-
+ find . -type f -exec sed -i
's|"imgui_impl_glfw.h"|<imgui/imgui_impl_glfw.h>|g' {} \; || die
+ find . -type f -exec sed -i
's|"imgui_impl_opengl3.h"|<imgui/imgui_impl_opengl3.h>|g' {} \; || die
}
multilib_src_configure() {
@@ -115,6 +122,9 @@ multilib_src_configure() {
$(meson_feature X with_x11)
$(meson_feature wayland with_wayland)
$(meson_feature dbus with_dbus)
+ $(meson_use mangoapp mangoapp)
+ $(meson_use mangoapp mangoapp_layer)
+ $(meson_use mangohudctl mangohudctl)
)
meson_src_configure
}
diff --git a/games-util/mangohud/mangohud-9999.ebuild
b/games-util/mangohud/mangohud-9999.ebuild
index 171ea194b7..143418dc36 100644
--- a/games-util/mangohud/mangohud-9999.ebuild
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -37,7 +37,8 @@ fi
LICENSE="MIT"
SLOT="0"
-IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia video_cards_amdgpu"
+IUSE="+dbus debug +X xnvctrl wayland mangoapp mangohudctl video_cards_nvidia
video_cards_amdgpu test"
+RESTRICT="!test? ( test )"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
@@ -48,6 +49,7 @@ REQUIRED_USE="
BDEPEND="
app-arch/unzip
>=dev-util/vulkan-headers-1.2.158
+ test? ( dev-util/cmocka )
$(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]')
"
@@ -68,6 +70,10 @@ RDEPEND="
xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
)
wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+ mangoapp? (
+ >=media-libs/imgui-1.81[glfw]
+ media-libs/glew
+ )
$(python_gen_cond_dep '
|| (
dev-python/matplotlib[gtk3,${PYTHON_USEDEP}]
@@ -103,7 +109,8 @@ src_prepare() {
find . -type f -exec sed -i 's|"imgui.h"|<imgui/imgui.h>|g' {} \; || die
find . -type f -exec sed -i
's|<imgui_internal.h>|<imgui/imgui_internal.h>|g' {} \; || die
find . -type f -exec sed -i
's|"imgui_internal.h"|<imgui/imgui_internal.h>|g' {} \; || die
-
+ find . -type f -exec sed -i
's|"imgui_impl_glfw.h"|<imgui/imgui_impl_glfw.h>|g' {} \; || die
+ find . -type f -exec sed -i
's|"imgui_impl_opengl3.h"|<imgui/imgui_impl_opengl3.h>|g' {} \; || die
}
multilib_src_configure() {
@@ -115,6 +122,9 @@ multilib_src_configure() {
$(meson_feature X with_x11)
$(meson_feature wayland with_wayland)
$(meson_feature dbus with_dbus)
+ $(meson_use mangoapp mangoapp)
+ $(meson_use mangoapp mangoapp_layer)
+ $(meson_use mangohudctl mangohudctl)
)
meson_src_configure
}
diff --git a/games-util/mangohud/metadata.xml b/games-util/mangohud/metadata.xml
index 81225ee755..113dd15042 100644
--- a/games-util/mangohud/metadata.xml
+++ b/games-util/mangohud/metadata.xml
@@ -15,5 +15,8 @@
</upstream>
<use>
<flag name="xnvctrl">Use XNVctrl as fall back for older Nvidia
devices.</flag>
+ <flag name="test">Run mangohud tests</flag>
+ <flag name="mangoapp">Build and install mangoapp and mangoapp
layer</flag>
+ <flag name="mangohudctl">Build and install mangohudctl</flag>
</use>
</pkgmetadata>