public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Gonçalo Negrier Duarte" <gonegrier.duarte@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/, games-util/mangohud/files/
Date: Thu,  9 May 2024 23:42:53 +0000 (UTC)	[thread overview]
Message-ID: <1715298118.e9a378e04e7098e104d84a13015b4277d0c1dfc6.gonegrier.duarte@gentoo> (raw)

commit:     e9a378e04e7098e104d84a13015b4277d0c1dfc6
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May  9 22:46:27 2024 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
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>


             reply	other threads:[~2024-05-09 23:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 23:42 Gonçalo Negrier Duarte [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-02 22:11 [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/, games-util/mangohud/files/ Gonçalo Negrier Duarte
2024-02-22 14:12 Gonçalo Negrier Duarte
2023-11-27 19:25 Adel KARA SLIMANE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1715298118.e9a378e04e7098e104d84a13015b4277d0c1dfc6.gonegrier.duarte@gentoo \
    --to=gonegrier.duarte@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox