public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Haelwenn Monnier" <contact@hacktivis.me>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: games-util/mangohud/, games-util/mangohud/files/
Date: Fri, 10 May 2024 00:33:21 +0000 (UTC)	[thread overview]
Message-ID: <1715270259.6a66116471864352775493f1432b0bcac7828151.lanodan@gentoo> (raw)

commit:     6a66116471864352775493f1432b0bcac7828151
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May  9 14:57:41 2024 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Thu May  9 15:57:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6a661164

games-util/mangohud: use spdlog, imgui and implot system packages

* refactor the ebuild to use system dependecies instead of submodules
* TODO: apply the same change to Vulkan-Headers
* TODO: add the new submodules (including tests)
* TODO: make a meson patch that can be upstream (optional)

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com>

 games-util/mangohud/Manifest                       |  4 ---
 .../files/implot-v0.16-fix-imgui-dep.patch         | 16 -----------
 .../files/mangohud-v0.7.1-menson-fix-dep.patch     | 19 +++++++++++++
 .../mangohud-v0.7.1-meson-fix-imgui-dep.patch      | 14 ---------
 ...gohud-0.7.1.ebuild => mangohud-0.7.1-r1.ebuild} | 33 ++++------------------
 games-util/mangohud/mangohud-9999.ebuild           | 33 ++++------------------
 6 files changed, 29 insertions(+), 90 deletions(-)

diff --git a/games-util/mangohud/Manifest b/games-util/mangohud/Manifest
index f52b926d20..500e807d71 100644
--- a/games-util/mangohud/Manifest
+++ b/games-util/mangohud/Manifest
@@ -1,7 +1,3 @@
-DIST implot-0.16-1-wrap.zip 1226 BLAKE2B 4725661fe2c7f7f05e1702c3a871f9feb9fdefdc2a840cdf8a3d56e7e180e950533f830192f9ad19cba97e8094ab53cf73adda2ed6712a83384d4160f6c06b18 SHA512 6e54beebef8ac4ec0b3e85d30d7570c9a987d69c03b6a564bc67d105d19d2cec45cb3ab8921ebcbda51e7139d93c3c6dae359fa30b3fcce748cdec8953aabbf7
-DIST implot-0.16.tar.gz 137983 BLAKE2B aca328e2fe6049b72601f25a409f313e99971f606e68ca780a1594f8ca42b1606831090add8039fefd013cfb6c057900f0add347d1b80c466a05bd18e455b8d7 SHA512 117cb08122d900e7db857897bfec4c9ac3300a1d429c8f0303415bc693840baa9bbbb91ca3f13853d8efd3a6ebf538b7114401d4fbfe0d067256e58cbdbd4919
 DIST mangohud-0.7.1.tar.gz 14901139 BLAKE2B 722b1caa21225a15d175e0f83dbb4b4a6ac2be92443628dcfe82fe4e36773174121f95deaf078fae9ed25ea74242f5f9acd3e2a4e94111b4a32fbc7c9a852705 SHA512 981b20f0ca986a8e0ee5349dc3d9a5580c1e3eb0a40a1a0e81c390f85d25e3f175fdcca75cd2f18bf0af9f49c7d144de6d85406b6a3c96bdf204a7557f530300
-DIST spdlog-1.13.0-1-wrap.zip 2959 BLAKE2B 13744264cfab96ff51f033300182b8937959e7bf74851d7cff26b7e9c05109518b0623a71bfc326951d86c43d104a1bb1700cd45e69ebd41683726e9764f630b SHA512 59c5d50ee1c14a1b43aa3000a591d9fd2bc4c9ff043b23d25be896ca9a34c1c392c26240ed58a5e877231c09fd1b28012f58b3c403d0370cf5dd9169587a8de4
-DIST spdlog-1.13.0.tar.gz 264003 BLAKE2B 8ffeec847f082a0932f406ab44b4653661fdbe95a15f7b736367ee6d8f45ab36ca2182a9e9c6fba5c0688ab5436c16932b130541a8532cc2e5f4980e6340b929 SHA512 44fcb414ad9fbbe2a6d72c29143eeeae477b687ed30ae870d661b032a029ad4214ef43e7ef6350d02791d05504492978ade2d6733fab12ce4884d8f0bc4c6340
 DIST vulkan-headers-1.2.158-2-meson-wrap.zip 1107 BLAKE2B 35e4bb1f7410a009243fe7d4a4ba6cede7f01e0b56ad6ff72ad30c00c2452bd6d2a4fb44ab92c296147e2506a92acc6de1f817cb5433b96d66652cbcd8885595 SHA512 30cbbb90580399839e1bba8881b9b8cc33fdeead93f37d5f3398c9d53fb3ab050ca2562fd68f376fa4ee0825ee3787f560d70d55a170c780dd575ff2eeb66efd
 DIST vulkan-headers-1.2.158.tar.gz 831647 BLAKE2B 792d7e895e27c4a8fbc93fc4d9c9e696d2ceb946e745709c050c0693b77afbeb6411a4267fc59508ddeb58167d469349fedc1c5d4b4a7415b590c97248b244bc SHA512 f7aa9222f9deb1316d22deacc2c6cd85c409f0f2b2d37ecd55e0fc8466d381bbe3bed287881b993a01c5f33736e1607014f820980b7a54a3721fab6980960c91

diff --git a/games-util/mangohud/files/implot-v0.16-fix-imgui-dep.patch b/games-util/mangohud/files/implot-v0.16-fix-imgui-dep.patch
deleted file mode 100644
index 68f5768760..0000000000
--- a/games-util/mangohud/files/implot-v0.16-fix-imgui-dep.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-# We provide media-libs/imgui in guru
-
-diff --git a/meson.build b/meson.build.new
-index b628fe0..16b11de 100644
---- a/meson.build
-+++ b/meson.build
-@@ -5,8 +5,7 @@ project(
-   version : '0.16',
- )
-
--imgui_sp = subproject('imgui')
--imgui_dep = imgui_sp.get_variable('imgui_dep')
-+imgui_dep = dependency('imgui')
-
- implot_inc = include_directories('.')
- implot_src = files(

diff --git a/games-util/mangohud/files/mangohud-v0.7.1-menson-fix-dep.patch b/games-util/mangohud/files/mangohud-v0.7.1-menson-fix-dep.patch
new file mode 100644
index 0000000000..c85efd7bc1
--- /dev/null
+++ b/games-util/mangohud/files/mangohud-v0.7.1-menson-fix-dep.patch
@@ -0,0 +1,19 @@
+diff --git a/meson.build b/meson.build
+index daf063d..a0c0633 100644
+--- a/meson.build
++++ b/meson.build
+@@ -214,12 +214,10 @@ if get_option('mangoapp')
+   ]
+ endif
+
+-dearimgui_sp = subproject('imgui', default_options: imgui_options)
+-dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
++dearimgui_dep = dependency('imgui')
+
+ if is_unixy
+-implot_sp = subproject('implot', default_options: ['default_library=static'])
+-implot_dep = implot_sp.get_variable('implot_dep')
++implot_dep = dependency('implot')
+ else
+ implot_dep = null_dep
+ implot_lib = static_library('nulllib', [])

diff --git a/games-util/mangohud/files/mangohud-v0.7.1-meson-fix-imgui-dep.patch b/games-util/mangohud/files/mangohud-v0.7.1-meson-fix-imgui-dep.patch
deleted file mode 100644
index 6d3c9c2852..0000000000
--- a/games-util/mangohud/files/mangohud-v0.7.1-meson-fix-imgui-dep.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-# We provide media-libs/imgui in guru
-
---- a/meson.build
-+++ b/meson.build
-@@ -251,8 +251,7 @@ elif sizeof_ptr == 4
-   pre_args += '-DMANGOHUD_ARCH="32bit"'
- endif
-
--dearimgui_sp = subproject('imgui', default_options: imgui_options)
--dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
-+dearimgui_dep = dependency('imgui')
-
- spdlog_dep = cpp.find_library('spdlog', required: get_option('use_system_spdlog'))
- if not spdlog_dep.found()

diff --git a/games-util/mangohud/mangohud-0.7.1.ebuild b/games-util/mangohud/mangohud-0.7.1-r1.ebuild
similarity index 72%
rename from games-util/mangohud/mangohud-0.7.1.ebuild
rename to games-util/mangohud/mangohud-0.7.1-r1.ebuild
index f96a5d8ce4..bc5fd3257a 100644
--- a/games-util/mangohud/mangohud-0.7.1.ebuild
+++ b/games-util/mangohud/mangohud-0.7.1-r1.ebuild
@@ -15,24 +15,12 @@ HOMEPAGE="https://github.com/flightlessmango/MangoHud"
 
 VK_HEADERS_VER="1.2.158"
 VK_HEADERS_MESON_WRAP_VER="2"
-SPDLOG_VER="1.13.0"
-SPDLOG_WRAP_VER="1"
-IMPLOT_VER="0.16"
-IMPLOT_WRAP_VER="1"
 
 SRC_URI="
 	https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VK_HEADERS_VER}.tar.gz
 		-> vulkan-headers-${VK_HEADERS_VER}.tar.gz
 	https://wrapdb.mesonbuild.com/v2/vulkan-headers_${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}/get_patch
 		-> vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
-	https://github.com/gabime/spdlog/archive/refs/tags/v${SPDLOG_VER}.tar.gz
-		-> spdlog-${SPDLOG_VER}.tar.gz
-	https://wrapdb.mesonbuild.com/v2/spdlog_${SPDLOG_VER}-${SPDLOG_WRAP_VER}/get_patch
-		-> spdlog-${SPDLOG_VER}-${SPDLOG_WRAP_VER}-wrap.zip
-	https://github.com/epezent/implot/archive/refs/tags/v${IMPLOT_VER}.tar.gz
-		-> implot-${IMPLOT_VER}.tar.gz
-	https://wrapdb.mesonbuild.com/v2/implot_${IMPLOT_VER}-${IMPLOT_WRAP_VER}/get_patch
-		-> implot-${IMPLOT_VER}-${IMPLOT_WRAP_VER}-wrap.zip
 "
 
 if [[ ${PV} == 9999 ]]; then
@@ -59,12 +47,14 @@ REQUIRED_USE="
 
 BDEPEND="
 	app-arch/unzip
+	>=dev-util/vulkan-headers-1.2.158
 	$(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]')
 "
 
 RDEPEND="
 	${PYTHON_DEPS}
-	~media-libs/imgui-1.81[opengl,vulkan,${MULTILIB_USEDEP}]
+	>=media-libs/imgui-1.81[opengl,vulkan,${MULTILIB_USEDEP}]
+	>=media-libs/implot-0.16[${MULTILIB_USEDEP}]
 	dev-cpp/nlohmann_json
 	dev-util/glslang
 	media-fonts/lato
@@ -88,7 +78,7 @@ RDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/mangohud-v0.7.1-meson-fix-imgui-dep.patch"
+	"${FILESDIR}/mangohud-v0.7.1-menson-fix-dep.patch"
 )
 
 src_unpack() {
@@ -104,15 +94,6 @@ src_unpack() {
 	unpack vulkan-headers-${VK_HEADERS_VER}.tar.gz
 	unpack vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
 	mv "${WORKDIR}/Vulkan-Headers-${VK_HEADERS_VER}" "${S}/subprojects/" || die
-
-	# fix build error by using upstream submodule version of spdlog
-	unpack spdlog-${SPDLOG_VER}.tar.gz
-	unpack spdlog-${SPDLOG_VER}-${SPDLOG_WRAP_VER}-wrap.zip
-	mv "${WORKDIR}/spdlog-${SPDLOG_VER}" "${S}/subprojects/" || die
-
-	unpack implot-${IMPLOT_VER}.tar.gz
-	unpack implot-${IMPLOT_VER}-${IMPLOT_WRAP_VER}-wrap.zip
-	mv "${WORKDIR}/implot-${IMPLOT_VER}" "${S}/subprojects/" || die
 }
 
 src_prepare() {
@@ -123,16 +104,12 @@ src_prepare() {
 	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
 
-	# replace imgui_dep in implot build file
-	sed -i -r -e 's|(imgui_dep = ).*|\1dependency('\'imgui\'')|' \
-		-e '/imgui_sp/d' "${S}/subprojects/implot-${IMPLOT_VER}/meson.build" || die
 }
 
 multilib_src_configure() {
-	# disable system spdlog in favor of the submodule version
 	local emesonargs=(
 		-Dappend_libdir_mangohud=false
-		-Duse_system_spdlog=disabled
+		-Duse_system_spdlog=enabled
 		-Dinclude_doc=false
 		$(meson_feature video_cards_nvidia with_nvml)
 		$(meson_feature xnvctrl with_xnvctrl)

diff --git a/games-util/mangohud/mangohud-9999.ebuild b/games-util/mangohud/mangohud-9999.ebuild
index f96a5d8ce4..bc5fd3257a 100644
--- a/games-util/mangohud/mangohud-9999.ebuild
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -15,24 +15,12 @@ HOMEPAGE="https://github.com/flightlessmango/MangoHud"
 
 VK_HEADERS_VER="1.2.158"
 VK_HEADERS_MESON_WRAP_VER="2"
-SPDLOG_VER="1.13.0"
-SPDLOG_WRAP_VER="1"
-IMPLOT_VER="0.16"
-IMPLOT_WRAP_VER="1"
 
 SRC_URI="
 	https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VK_HEADERS_VER}.tar.gz
 		-> vulkan-headers-${VK_HEADERS_VER}.tar.gz
 	https://wrapdb.mesonbuild.com/v2/vulkan-headers_${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}/get_patch
 		-> vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
-	https://github.com/gabime/spdlog/archive/refs/tags/v${SPDLOG_VER}.tar.gz
-		-> spdlog-${SPDLOG_VER}.tar.gz
-	https://wrapdb.mesonbuild.com/v2/spdlog_${SPDLOG_VER}-${SPDLOG_WRAP_VER}/get_patch
-		-> spdlog-${SPDLOG_VER}-${SPDLOG_WRAP_VER}-wrap.zip
-	https://github.com/epezent/implot/archive/refs/tags/v${IMPLOT_VER}.tar.gz
-		-> implot-${IMPLOT_VER}.tar.gz
-	https://wrapdb.mesonbuild.com/v2/implot_${IMPLOT_VER}-${IMPLOT_WRAP_VER}/get_patch
-		-> implot-${IMPLOT_VER}-${IMPLOT_WRAP_VER}-wrap.zip
 "
 
 if [[ ${PV} == 9999 ]]; then
@@ -59,12 +47,14 @@ REQUIRED_USE="
 
 BDEPEND="
 	app-arch/unzip
+	>=dev-util/vulkan-headers-1.2.158
 	$(python_gen_cond_dep 'dev-python/mako[${PYTHON_USEDEP}]')
 "
 
 RDEPEND="
 	${PYTHON_DEPS}
-	~media-libs/imgui-1.81[opengl,vulkan,${MULTILIB_USEDEP}]
+	>=media-libs/imgui-1.81[opengl,vulkan,${MULTILIB_USEDEP}]
+	>=media-libs/implot-0.16[${MULTILIB_USEDEP}]
 	dev-cpp/nlohmann_json
 	dev-util/glslang
 	media-fonts/lato
@@ -88,7 +78,7 @@ RDEPEND="
 "
 
 PATCHES=(
-	"${FILESDIR}/mangohud-v0.7.1-meson-fix-imgui-dep.patch"
+	"${FILESDIR}/mangohud-v0.7.1-menson-fix-dep.patch"
 )
 
 src_unpack() {
@@ -104,15 +94,6 @@ src_unpack() {
 	unpack vulkan-headers-${VK_HEADERS_VER}.tar.gz
 	unpack vulkan-headers-${VK_HEADERS_VER}-${VK_HEADERS_MESON_WRAP_VER}-meson-wrap.zip
 	mv "${WORKDIR}/Vulkan-Headers-${VK_HEADERS_VER}" "${S}/subprojects/" || die
-
-	# fix build error by using upstream submodule version of spdlog
-	unpack spdlog-${SPDLOG_VER}.tar.gz
-	unpack spdlog-${SPDLOG_VER}-${SPDLOG_WRAP_VER}-wrap.zip
-	mv "${WORKDIR}/spdlog-${SPDLOG_VER}" "${S}/subprojects/" || die
-
-	unpack implot-${IMPLOT_VER}.tar.gz
-	unpack implot-${IMPLOT_VER}-${IMPLOT_WRAP_VER}-wrap.zip
-	mv "${WORKDIR}/implot-${IMPLOT_VER}" "${S}/subprojects/" || die
 }
 
 src_prepare() {
@@ -123,16 +104,12 @@ src_prepare() {
 	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
 
-	# replace imgui_dep in implot build file
-	sed -i -r -e 's|(imgui_dep = ).*|\1dependency('\'imgui\'')|' \
-		-e '/imgui_sp/d' "${S}/subprojects/implot-${IMPLOT_VER}/meson.build" || die
 }
 
 multilib_src_configure() {
-	# disable system spdlog in favor of the submodule version
 	local emesonargs=(
 		-Dappend_libdir_mangohud=false
-		-Duse_system_spdlog=disabled
+		-Duse_system_spdlog=enabled
 		-Dinclude_doc=false
 		$(meson_feature video_cards_nvidia with_nvml)
 		$(meson_feature xnvctrl with_xnvctrl)


             reply	other threads:[~2024-05-10  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  0:33 Haelwenn Monnier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-10 23:37 [gentoo-commits] repo/proj/guru:master commit in: games-util/mangohud/, games-util/mangohud/files/ Ronny Gutbrod
2022-04-17 18:13 Arthur Zamarin

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=1715270259.6a66116471864352775493f1432b0bcac7828151.lanodan@gentoo \
    --to=contact@hacktivis.me \
    --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