aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonçalo Negrier Duarte <gonegrier.duarte@gmail.com>2024-05-09 23:46:27 +0100
committerGonçalo Negrier Duarte <gonegrier.duarte@gmail.com>2024-05-10 00:41:58 +0100
commite9a378e04e7098e104d84a13015b4277d0c1dfc6 (patch)
tree490437957d3462e0fab15ded3b5fa51db136be44 /games-util
parentgames-util/mangohud: improve meson lib detection patch (diff)
downloadguru-e9a378e04e7098e104d84a13015b4277d0c1dfc6.tar.gz
guru-e9a378e04e7098e104d84a13015b4277d0c1dfc6.tar.bz2
guru-e9a378e04e7098e104d84a13015b4277d0c1dfc6.zip
games-util/mangohud: add mangoapp and mangohudctl
* enable test Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch2
-rw-r--r--games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch2
-rw-r--r--games-util/mangohud/mangohud-0.7.1-r3.ebuild (renamed from games-util/mangohud/mangohud-0.7.1-r2.ebuild)14
-rw-r--r--games-util/mangohud/mangohud-9999.ebuild14
-rw-r--r--games-util/mangohud/metadata.xml3
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 e06411f0e..df2f7eb81 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 4cf18e139..549aecfc1 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
index 171ea194b..143418dc3 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 171ea194b..143418dc3 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 81225ee75..113dd1504 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>