* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2023-11-27 22:13 Adel KARA SLIMANE
0 siblings, 0 replies; 6+ messages in thread
From: Adel KARA SLIMANE @ 2023-11-27 22:13 UTC (permalink / raw
To: gentoo-commits
commit: ab7568044fe114f18bd3e7a824916da9bedda044
Author: Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Mon Nov 27 22:11:59 2023 +0000
Commit: Adel KARA SLIMANE <adel <AT> karaslimane <DOT> com>
CommitDate: Mon Nov 27 22:13:09 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ab756804
games-util/mangohud: replace patches with sed calls
less maintenance like this.
Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
.../files/implot-v0.16-imgui-include-fix.patch | 45 ----------------------
.../files/mangohud-v0.7.0-imgui-include-fix.patch | 13 -------
games-util/mangohud/mangohud-0.7.0.ebuild | 7 ++--
games-util/mangohud/mangohud-9999.ebuild | 8 ++--
4 files changed, 8 insertions(+), 65 deletions(-)
diff --git a/games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch b/games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch
deleted file mode 100644
index 7da397ce44..0000000000
--- a/games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/.github/example_implot.cpp b/.github/example_implot.cpp
-index 9339bab..13bcf8c 100644
---- a/.github/example_implot.cpp
-+++ b/.github/example_implot.cpp
-@@ -1,12 +1,12 @@
- // Sample app built with Dear ImGui and ImPlot
- // This app uses implot and imgui, but does not output to any backend! It only serves as a proof that an app can be built, linked, and run.
-
--#include "imgui.h"
-+#include "imgui/imgui.h"
- #include "implot.h"
- #include "stdio.h"
-
- int main(int, char**)
--{
-+{
- printf("sample_implot: start\n");
-
- IMGUI_CHECKVERSION();
-diff --git a/implot.h b/implot.h
-index 36c0d40..5dabc9d 100644
---- a/implot.h
-+++ b/implot.h
-@@ -45,7 +45,7 @@
- // [SECTION] Obsolete API
-
- #pragma once
--#include "imgui.h"
-+#include "imgui/imgui.h"
-
- //-----------------------------------------------------------------------------
- // [SECTION] Macros and Defines
-diff --git a/implot_internal.h b/implot_internal.h
-index fb01204..4e58767 100644
---- a/implot_internal.h
-+++ b/implot_internal.h
-@@ -32,7 +32,7 @@
- #pragma once
-
- #include <time.h>
--#include "imgui_internal.h"
-+#include "imgui/imgui_internal.h"
-
- #ifndef IMPLOT_VERSION
- #error Must include implot.h before implot_internal.h
diff --git a/games-util/mangohud/files/mangohud-v0.7.0-imgui-include-fix.patch b/games-util/mangohud/files/mangohud-v0.7.0-imgui-include-fix.patch
deleted file mode 100644
index 1d5d32e2f1..0000000000
--- a/games-util/mangohud/files/mangohud-v0.7.0-imgui-include-fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/overlay.h b/src/overlay.h
-index 8b53285..127c3db 100644
---- a/src/overlay.h
-+++ b/src/overlay.h
-@@ -7,7 +7,7 @@
- #include <vector>
- #include <deque>
- #include <imgui.h>
--#include "imgui_internal.h"
-+#include "imgui/imgui_internal.h"
- #include "overlay_params.h"
- #include "hud_elements.h"
- #include "engine_types.h"
diff --git a/games-util/mangohud/mangohud-0.7.0.ebuild b/games-util/mangohud/mangohud-0.7.0.ebuild
index f257c749b7..4735f458e9 100644
--- a/games-util/mangohud/mangohud-0.7.0.ebuild
+++ b/games-util/mangohud/mangohud-0.7.0.ebuild
@@ -78,7 +78,6 @@ RDEPEND="
PATCHES=(
"${FILESDIR}/mangohud-v0.7.0-meson-fix-imgui-dep.patch"
- "${FILESDIR}/mangohud-v0.7.0-imgui-include-fix.patch"
)
src_unpack() {
@@ -99,8 +98,10 @@ src_unpack() {
src_prepare() {
default
# replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
- find . -type f -exec sed -i 's/#include <imgui.h>/#include <imgui\/imgui.h>/g' {} \;
- find . -type f -exec sed -i 's/#include "imgui.h"/#include <imgui\/imgui.h>/g' {} \;
+ find . -type f -exec sed -i 's|<imgui.h>|<imgui/imgui.h>|g' {} \; || die
+ 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
}
src_configure() {
diff --git a/games-util/mangohud/mangohud-9999.ebuild b/games-util/mangohud/mangohud-9999.ebuild
index d68169da01..3fba65ec23 100644
--- a/games-util/mangohud/mangohud-9999.ebuild
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -85,7 +85,6 @@ RDEPEND="
PATCHES=(
"${FILESDIR}/mangohud-v0.7.0-meson-fix-imgui-dep.patch"
- "${FILESDIR}/mangohud-v0.7.0-imgui-include-fix.patch"
)
src_unpack() {
@@ -108,14 +107,15 @@ src_unpack() {
cd "${S}/subprojects/implot-${IMPLOT_VER}" || die
eapply "${FILESDIR}/implot-v0.16-fix-imgui-dep.patch"
- eapply "${FILESDIR}/implot-v0.16-imgui-include-fix.patch"
}
src_prepare() {
default
# replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
- find . -type f -exec sed -i 's/#include <imgui.h>/#include <imgui\/imgui.h>/g' {} \;
- find . -type f -exec sed -i 's/#include "imgui.h"/#include <imgui\/imgui.h>/g' {} \;
+ find . -type f -exec sed -i 's|<imgui.h>|<imgui/imgui.h>|g' {} \; || die
+ 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
}
src_configure() {
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2024-05-09 22:36 Gonçalo Negrier Duarte
0 siblings, 0 replies; 6+ messages in thread
From: Gonçalo Negrier Duarte @ 2024-05-09 22:36 UTC (permalink / raw
To: gentoo-commits
commit: 70a8f8072f026673bd167c992a1eba8d4b760fe9
Author: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May 9 22:35:32 2024 +0000
Commit: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Thu May 9 22:36:30 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=70a8f807
games-util/mangohud: improve meson lib detection patch
* see this: https://github.com/flightlessmango/MangoHud/pull/1321
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail.com>
.../files/mangohud-0.7.1-menson-fix-dep.patch | 116 +++++++++++++++++++++
.../files/mangohud-9999-menson-fix-dep.patch | 108 +++++++++++++++++++
.../files/mangohud-v0.7.1-menson-fix-dep.patch | 19 ----
...ud-0.7.1-r1.ebuild => mangohud-0.7.1-r2.ebuild} | 3 +-
games-util/mangohud/mangohud-9999.ebuild | 3 +-
5 files changed, 226 insertions(+), 23 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
new file mode 100644
index 0000000000..e06411f0ed
--- /dev/null
+++ b/games-util/mangohud/files/mangohud-0.7.1-menson-fix-dep.patch
@@ -0,0 +1,116 @@
+From c98df705d2a52dcc0322e6ce8626ee1cf8ad87dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?=
+ <gonegrier.duarte@gmail.com>
+Date: Thu, 9 May 2024 21:52:21 +0100
+Subject: [PATCH] meson: verify if system lib are present before fallback to
+ submodules
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* removed use_system_spdlog feature
+* System vulkan-headers cant be use since mangohud don't use latest SDK
+* The code is commented out for future use
+* This is a backport for mangohud-0.7.1 of: aa7875942f5a0b7fdd187916b898b0b63c9a886c
+* (see: https://github.com/flightlessmango/MangoHud/pull/1321)
+
+Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
+---
+ meson.build | 45 ++++++++++++++++++++++++---------------------
+ meson_options.txt | 1 -
+ 2 files changed, 24 insertions(+), 22 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 3bf3918..329ad6f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -164,9 +164,16 @@ else
+ dep_rt = null_dep
+ endif
+
+-vkh_sp = subproject('vulkan-headers')
+-vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
+-dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
++# 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')
++ vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
++ dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
++#else
++# dep_vulkan = dependency('VulkanHeaders', required: true)
++# vk_api_xml = files('/usr/share/vulkan/registry/vk.xml')
++#endif
+
+ vk_enum_to_str = custom_target(
+ 'vk_enum_to_str',
+@@ -212,31 +219,25 @@ 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', fallback: ['imgui', 'dearimgui_dep'], required: true, default_options: imgui_options)
+
+ if is_unixy
+-implot_sp = subproject('implot', default_options: ['default_library=static'])
+-implot_dep = implot_sp.get_variable('implot_dep')
++implot_dep = dependency('implot', fallback: ['implot', 'implot_deb'], required: true, default_options: ['default_library=static'])
+ else
+ implot_dep = null_dep
+ implot_lib = static_library('nulllib', [])
+ endif
+
+-spdlog_dep = cpp.find_library('spdlog', required: get_option('use_system_spdlog'))
+-if not spdlog_dep.found()
+- spdlog_sp = subproject('spdlog', default_options: [
+- 'default_library=static',
+- 'compile_library=true',
+- 'werror=false',
+- 'tests=disabled',
+- 'external_fmt=disabled',
+- 'std_format=disabled'
+- ])
+- spdlog_dep = spdlog_sp.get_variable('spdlog_dep')
+-else
+- spdlog_dep = dependency('spdlog', required: true)
+-endif
++spdlog_options = [
++ 'default_library=static',
++ 'compile_library=true',
++ 'werror=false',
++ 'tests=disabled',
++ 'external_fmt=disabled',
++ 'std_format=disabled'
++]
++
++spdlog_dep = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], required: true, default_options: spdlog_options)
+
+ if ['windows', 'mingw'].contains(host_machine.system())
+ minhook_sp = subproject('minhook')
+@@ -275,6 +276,7 @@ if get_option('tests').enabled()
+ dependencies: [
+ cmocka_dep,
+ spdlog_dep,
++ implot_dep,
+ dearimgui_dep
+ ],
+ include_directories: inc_common)
+@@ -287,3 +289,4 @@ endif
+ if get_option('mangoplot').enabled()
+ subdir('bin')
+ endif
++
+diff --git a/meson_options.txt b/meson_options.txt
+index c82ae15..2984dfe 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,5 +1,4 @@
+ option('glibcxx_asserts', type : 'boolean', value : false)
+-option('use_system_spdlog', type : 'feature', value : 'disabled', description: 'Use system spdlog library')
+ option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')
+ option('include_doc', type : 'boolean', value : true, description: 'Include the example config, man pages, appstream files etc.')
+ option('with_nvml', type : 'combo', value : 'enabled', choices: ['enabled', 'system', 'disabled'], description: 'Enable NVML support')
+--
+2.45.0
+
diff --git a/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch b/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
new file mode 100644
index 0000000000..4cf18e1394
--- /dev/null
+++ b/games-util/mangohud/files/mangohud-9999-menson-fix-dep.patch
@@ -0,0 +1,108 @@
+From aa7875942f5a0b7fdd187916b898b0b63c9a886c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?=
+ <gonegrier.duarte@gmail.com>
+Date: Thu, 9 May 2024 21:52:21 +0100
+Subject: [PATCH] meson: verify if system lib are present before fallback to
+ submodules
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* removed use_system_spdlog feature
+* System vulkan-headers cant be use since mangohud don't use latest SDK
+* The code is commented out for future use
+
+Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
+---
+ meson.build | 46 +++++++++++++++++++++++++---------------------
+ meson_options.txt | 1 -
+ 2 files changed, 25 insertions(+), 22 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 86b5411568..00555c7f97 100644
+--- a/meson.build
++++ b/meson.build
+@@ -166,9 +166,18 @@ else
+ dep_rt = null_dep
+ endif
+
+-vkh_sp = subproject('vulkan-headers')
+-vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
+-dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
++# 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')
++ vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
++ dep_vulkan = vkh_sp.get_variable('vulkan_headers_dep')
++#else
++# dep_vulkan = dependency('VulkanHeaders', required: true)
++# vk_api_xml = files('/usr/share/vulkan/registry/vk.xml')
++#endif
++
++
+
+ vk_enum_to_str = custom_target(
+ 'vk_enum_to_str',
+@@ -213,31 +222,25 @@ if get_option('mangoapp')
+ 'glfw=enabled',
+ ]
+ endif
+-
+-dearimgui_sp = subproject('imgui', default_options: imgui_options)
+-dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
++dearimgui_dep = dependency('imgui', fallback: ['imgui', 'dearimgui_dep'], required: true, default_options: imgui_options)
+
+ if is_unixy
+-implot_sp = subproject('implot', default_options: ['default_library=static'])
+-implot_dep = implot_sp.get_variable('implot_dep')
++implot_dep = dependency('implot', fallback: ['implot', 'implot_deb'], required: true, default_options: ['default_library=static'])
+ else
+ implot_dep = null_dep
+ implot_lib = static_library('nulllib', [])
+ endif
+
+-if not cpp.find_library('spdlog', required: false).found()
+- spdlog_sp = subproject('spdlog', default_options: [
+- 'default_library=static',
+- 'compile_library=true',
+- 'werror=false',
+- 'tests=disabled',
+- 'external_fmt=disabled',
+- 'std_format=disabled'
+- ])
+- spdlog_dep = spdlog_sp.get_variable('spdlog_dep')
+-else
+- spdlog_dep = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], required: true)
+-endif
++spdlog_options = [
++ 'default_library=static',
++ 'compile_library=true',
++ 'werror=false',
++ 'tests=disabled',
++ 'external_fmt=disabled',
++ 'std_format=disabled'
++]
++
++spdlog_dep = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], required: true, default_options: spdlog_options)
+
+ if ['windows', 'mingw'].contains(host_machine.system())
+ minhook_sp = subproject('minhook')
+@@ -277,6 +280,7 @@ if get_option('tests').enabled()
+ dep_vulkan,
+ cmocka_dep,
+ spdlog_dep,
++ implot_dep,
+ dearimgui_dep
+ ],
+ include_directories: inc_common)
+diff --git a/meson_options.txt b/meson_options.txt
+index b6f127e635..d5c0a567b3 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,5 +1,4 @@
+ option('glibcxx_asserts', type : 'boolean', value : false)
+-option('use_system_spdlog', type : 'feature', value : 'disabled', description: 'Use system spdlog library')
+ option('append_libdir_mangohud', type : 'boolean', value : true, description: 'Append "mangohud" to libdir path or not.')
+ option('include_doc', type : 'boolean', value : true, description: 'Include the example config, man pages, appstream files etc.')
+ option('with_nvml', type : 'combo', value : 'enabled', choices: ['enabled', 'system', 'disabled'], description: 'Enable NVML support')
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
deleted file mode 100644
index c85efd7bc1..0000000000
--- a/games-util/mangohud/files/mangohud-v0.7.1-menson-fix-dep.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-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/mangohud-0.7.1-r1.ebuild b/games-util/mangohud/mangohud-0.7.1-r2.ebuild
similarity index 97%
rename from games-util/mangohud/mangohud-0.7.1-r1.ebuild
rename to games-util/mangohud/mangohud-0.7.1-r2.ebuild
index bc5fd3257a..171ea194b7 100644
--- a/games-util/mangohud/mangohud-0.7.1-r1.ebuild
+++ b/games-util/mangohud/mangohud-0.7.1-r2.ebuild
@@ -78,7 +78,7 @@ RDEPEND="
"
PATCHES=(
- "${FILESDIR}/mangohud-v0.7.1-menson-fix-dep.patch"
+ "${FILESDIR}/${P}-menson-fix-dep.patch"
)
src_unpack() {
@@ -109,7 +109,6 @@ src_prepare() {
multilib_src_configure() {
local emesonargs=(
-Dappend_libdir_mangohud=false
- -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 bc5fd3257a..171ea194b7 100644
--- a/games-util/mangohud/mangohud-9999.ebuild
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -78,7 +78,7 @@ RDEPEND="
"
PATCHES=(
- "${FILESDIR}/mangohud-v0.7.1-menson-fix-dep.patch"
+ "${FILESDIR}/${P}-menson-fix-dep.patch"
)
src_unpack() {
@@ -109,7 +109,6 @@ src_prepare() {
multilib_src_configure() {
local emesonargs=(
-Dappend_libdir_mangohud=false
- -Duse_system_spdlog=enabled
-Dinclude_doc=false
$(meson_feature video_cards_nvidia with_nvml)
$(meson_feature xnvctrl with_xnvctrl)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2024-05-09 15:57 Gonçalo Negrier Duarte
0 siblings, 0 replies; 6+ messages in thread
From: Gonçalo Negrier Duarte @ 2024-05-09 15:57 UTC (permalink / raw
To: gentoo-commits
commit: 6a66116471864352775493f1432b0bcac7828151
Author: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May 9 14:57:41 2024 +0000
Commit: Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2023-11-27 19:25 Adel KARA SLIMANE
0 siblings, 0 replies; 6+ messages in thread
From: Adel KARA SLIMANE @ 2023-11-27 19:25 UTC (permalink / raw
To: gentoo-commits
commit: 26e006d1e03f7670231d0a83cf8b69fda9af5d44
Author: Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Mon Nov 27 19:22:51 2023 +0000
Commit: Adel KARA SLIMANE <adel <AT> karaslimane <DOT> com>
CommitDate: Mon Nov 27 19:25:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=26e006d1
games-util/mangohud: add 9999
Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
games-util/mangohud/Manifest | 2 +
.../files/implot-v0.16-fix-imgui-dep.patch | 16 +++
.../files/implot-v0.16-imgui-include-fix.patch | 45 +++++++
games-util/mangohud/mangohud-9999.ebuild | 150 +++++++++++++++++++++
4 files changed, 213 insertions(+)
diff --git a/games-util/mangohud/Manifest b/games-util/mangohud/Manifest
index cc06a9c609..d9d337f7d4 100644
--- a/games-util/mangohud/Manifest
+++ b/games-util/mangohud/Manifest
@@ -1,3 +1,5 @@
+DIST implot-0.16-1-meson-wrap.zip 1226 BLAKE2B 4725661fe2c7f7f05e1702c3a871f9feb9fdefdc2a840cdf8a3d56e7e180e950533f830192f9ad19cba97e8094ab53cf73adda2ed6712a83384d4160f6c06b18 SHA512 6e54beebef8ac4ec0b3e85d30d7570c9a987d69c03b6a564bc67d105d19d2cec45cb3ab8921ebcbda51e7139d93c3c6dae359fa30b3fcce748cdec8953aabbf7
+DIST implot-0.16.tar.gz 137983 BLAKE2B aca328e2fe6049b72601f25a409f313e99971f606e68ca780a1594f8ca42b1606831090add8039fefd013cfb6c057900f0add347d1b80c466a05bd18e455b8d7 SHA512 117cb08122d900e7db857897bfec4c9ac3300a1d429c8f0303415bc693840baa9bbbb91ca3f13853d8efd3a6ebf538b7114401d4fbfe0d067256e58cbdbd4919
DIST mangohud-0.7.0.tar.gz 14892372 BLAKE2B 436a7834743aac3f95d55031194fddd79861061010cf5eb25e81cf5eceacf4015b607a191931a85715ca0d58c8e314841d536ce83e7767a39869ab789d376c7a SHA512 1ed43c2ba8a97c8934895450bf1ce152970031e5a5654db91df02d7b44f5eeacb32167f219735d2f0fb3c8ba24fc4386a8af4da99a3cd736af0b0d50ef2fedd7
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
new file mode 100644
index 0000000000..68f5768760
--- /dev/null
+++ b/games-util/mangohud/files/implot-v0.16-fix-imgui-dep.patch
@@ -0,0 +1,16 @@
+# 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/implot-v0.16-imgui-include-fix.patch b/games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch
new file mode 100644
index 0000000000..7da397ce44
--- /dev/null
+++ b/games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch
@@ -0,0 +1,45 @@
+diff --git a/.github/example_implot.cpp b/.github/example_implot.cpp
+index 9339bab..13bcf8c 100644
+--- a/.github/example_implot.cpp
++++ b/.github/example_implot.cpp
+@@ -1,12 +1,12 @@
+ // Sample app built with Dear ImGui and ImPlot
+ // This app uses implot and imgui, but does not output to any backend! It only serves as a proof that an app can be built, linked, and run.
+
+-#include "imgui.h"
++#include "imgui/imgui.h"
+ #include "implot.h"
+ #include "stdio.h"
+
+ int main(int, char**)
+-{
++{
+ printf("sample_implot: start\n");
+
+ IMGUI_CHECKVERSION();
+diff --git a/implot.h b/implot.h
+index 36c0d40..5dabc9d 100644
+--- a/implot.h
++++ b/implot.h
+@@ -45,7 +45,7 @@
+ // [SECTION] Obsolete API
+
+ #pragma once
+-#include "imgui.h"
++#include "imgui/imgui.h"
+
+ //-----------------------------------------------------------------------------
+ // [SECTION] Macros and Defines
+diff --git a/implot_internal.h b/implot_internal.h
+index fb01204..4e58767 100644
+--- a/implot_internal.h
++++ b/implot_internal.h
+@@ -32,7 +32,7 @@
+ #pragma once
+
+ #include <time.h>
+-#include "imgui_internal.h"
++#include "imgui/imgui_internal.h"
+
+ #ifndef IMPLOT_VERSION
+ #error Must include implot.h before implot_internal.h
diff --git a/games-util/mangohud/mangohud-9999.ebuild b/games-util/mangohud/mangohud-9999.ebuild
new file mode 100644
index 0000000000..7632ae6556
--- /dev/null
+++ b/games-util/mangohud/mangohud-9999.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-any-r1 meson
+
+MY_PV=$(ver_cut 1-3)
+[[ -n "$(ver_cut 4)" ]] && MY_PV_REV="-$(ver_cut 4)"
+
+DESCRIPTION="Vulkan and OpenGL overlay for monitoring FPS, sensors, system load and more"
+HOMEPAGE="https://github.com/flightlessmango/MangoHud"
+
+VK_HEADERS_VER="1.2.158"
+VK_HEADERS_MESON_WRAP_VER="2"
+
+IMPLOT_VER="0.16"
+IMPLOT_MESON_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/epezent/implot/archive/refs/tags/v${IMPLOT_VER}.tar.gz
+ -> implot-${IMPLOT_VER}.tar.gz
+ https://wrapdb.mesonbuild.com/v2/implot_${IMPLOT_VER}-${IMPLOT_MESON_WRAP_VER}/get_patch
+ -> implot-${IMPLOT_VER}-${IMPLOT_MESON_WRAP_VER}-meson-wrap.zip
+"
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/flightlessmango/MangoHud.git"
+else
+ SRC_URI+="
+ https://github.com/flightlessmango/MangoHud/archive/v${MY_PV}${MY_PV_REV}.tar.gz
+ -> ${P}.tar.gz
+ "
+ KEYWORDS="~amd64"
+ S="${WORKDIR}/MangoHud-${PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia video_cards_amdgpu"
+
+REQUIRED_USE="
+ || ( X wayland )
+ xnvctrl? ( video_cards_nvidia )"
+
+BDEPEND="
+ app-arch/unzip
+ $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
+"
+
+python_check_deps() {
+ python_has_version "dev-python/mako[${PYTHON_USEDEP}]" ||
+ python_has_version "dev-python/matplotlib[gtk3,${PYTHON_USEDEP}]" ||
+ python_has_version "dev-python/matplotlib[qt5,${PYTHON_USEDEP}]" ||
+ python_has_version "dev-python/matplotlib[wxwidgets,${PYTHON_USEDEP}]"
+}
+
+DEPEND="
+ ~media-libs/imgui-1.81[opengl,vulkan]
+ dev-cpp/nlohmann_json
+ dev-libs/spdlog
+ dev-util/glslang
+ media-fonts/lato
+ media-libs/vulkan-loader
+ media-libs/libglvnd
+ x11-libs/libdrm
+ dbus? ( sys-apps/dbus )
+ X? ( x11-libs/libX11 )
+ video_cards_nvidia? (
+ x11-drivers/nvidia-drivers
+ xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
+ )
+ wayland? ( dev-libs/wayland )
+ || (
+ $(python_gen_any_dep '
+ dev-python/matplotlib[gtk3,${PYTHON_USEDEP}]
+ dev-python/matplotlib[qt5,${PYTHON_USEDEP}]
+ dev-python/matplotlib[wxwidgets,${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/mangohud-v0.7.0-meson-fix-imgui-dep.patch"
+ "${FILESDIR}/mangohud-v0.7.0-imgui-include-fix.patch"
+)
+
+src_unpack() {
+
+ default
+
+ [[ -n "${MY_PV_REV}" ]] && ( mv "${WORKDIR}/MangoHud-${MY_PV}${MY_PV_REV}" "${WORKDIR}/MangoHud-${PV}" || die )
+
+ if [[ $PV == 9999 ]]; then
+ git-r3_src_unpack
+ fi
+
+ 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
+
+ unpack implot-${IMPLOT_VER}.tar.gz
+ unpack implot-${IMPLOT_VER}-${IMPLOT_MESON_WRAP_VER}-meson-wrap.zip
+ mv "${WORKDIR}/implot-${IMPLOT_VER}" "${S}/subprojects/" || die
+
+ cd "${S}/subprojects/implot-${IMPLOT_VER}" || die
+ eapply "${FILESDIR}/implot-v0.16-fix-imgui-dep.patch"
+ eapply "${FILESDIR}/implot-v0.16-imgui-include-fix.patch"
+}
+
+src_prepare() {
+ default
+ # replace all occurences of "#include <imgui.h>" to "#include <imgui/imgui.h>"
+ find . -type f -exec sed -i 's/#include <imgui.h>/#include <imgui\/imgui.h>/g' {} \;
+ find . -type f -exec sed -i 's/#include "imgui.h"/#include <imgui\/imgui.h>/g' {} \;
+}
+
+src_configure() {
+ local emesonargs=(
+ -Dappend_libdir_mangohud=false
+ -Duse_system_spdlog=enabled
+ -Dinclude_doc=false
+ $(meson_feature video_cards_nvidia with_nvml)
+ $(meson_feature xnvctrl with_xnvctrl)
+ $(meson_feature X with_x11)
+ $(meson_feature wayland with_wayland)
+ $(meson_feature dbus with_dbus)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ if ! use xnvctrl; then
+ einfo ""
+ einfo "If mangohud can't get GPU load, or other GPU information,"
+ einfo "and you have an older Nvidia device."
+ einfo ""
+ einfo "Try enabling the 'xnvctrl' useflag."
+ einfo ""
+ fi
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2022-05-10 21:29 Adel KARA SLIMANE
0 siblings, 0 replies; 6+ messages in thread
From: Adel KARA SLIMANE @ 2022-05-10 21:29 UTC (permalink / raw
To: gentoo-commits
commit: 67b8cd8e3eddbaccb77d75ef7535079a2e4950ef
Author: Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Tue May 10 21:27:21 2022 +0000
Commit: Adel KARA SLIMANE <adel <AT> karaslimane <DOT> com>
CommitDate: Tue May 10 21:29:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=67b8cd8e
games-util/mangohud: make dev-python/mako BDEPEND + remove spdlog patch texts
Closes: https://bugs.gentoo.org/843551
Closes: https://bugs.gentoo.org/843554
Closes: https://bugs.gentoo.org/843566
Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
...on-build.patch => mangohud-0.6.6-meson-fix-imgui-dep.patch} | 2 +-
.../{mangohud-0.6.6.1-r2.ebuild => mangohud-0.6.6.1-r3.ebuild} | 10 +++++-----
games-util/mangohud/metadata.xml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch b/games-util/mangohud/files/mangohud-0.6.6-meson-fix-imgui-dep.patch
similarity index 79%
rename from games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch
rename to games-util/mangohud/files/mangohud-0.6.6-meson-fix-imgui-dep.patch
index c6aa9e6fd..6d3c9c285 100644
--- a/games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch
+++ b/games-util/mangohud/files/mangohud-0.6.6-meson-fix-imgui-dep.patch
@@ -8,7 +8,7 @@
-dearimgui_sp = subproject('imgui', default_options: imgui_options)
-dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
-+dearimgui_dep = dependency('imgui', default_options: imgui_options, fallback : ['imgui', '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.6.6.1-r2.ebuild b/games-util/mangohud/mangohud-0.6.6.1-r3.ebuild
similarity index 95%
rename from games-util/mangohud/mangohud-0.6.6.1-r2.ebuild
rename to games-util/mangohud/mangohud-0.6.6.1-r3.ebuild
index f237f6f88..977a71eef 100644
--- a/games-util/mangohud/mangohud-0.6.6.1-r2.ebuild
+++ b/games-util/mangohud/mangohud-0.6.6.1-r3.ebuild
@@ -34,10 +34,10 @@ REQUIRED_USE="
BDEPEND="
app-arch/unzip
+ dev-python/mako[${PYTHON_USEDEP}]
"
DEPEND="
- dev-python/mako[${PYTHON_USEDEP}]
dev-libs/spdlog
dev-util/glslang
>=dev-util/vulkan-headers-1.2
@@ -56,10 +56,9 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/MangoHud-${PV}"
-PATCHES=(
- # "${FILESDIR}/mangonhud-0.6.6-meson-build.patch"
- "${FILESDIR}/mangohud-0.6.6-meson-fix-spdlog-dep.patch"
-)
+# PATCHES=(
+# "${FILESDIR}/mangohud-0.6.6-meson-fix-imgui-dep.patch"
+# )
src_unpack() {
default
@@ -73,6 +72,7 @@ src_unpack() {
src_configure() {
local emesonargs=(
-Dappend_libdir_mangohud=false
+ -Duse_system_spdlog=enabled
-Duse_system_vulkan=enabled
-Dinclude_doc=false
$(meson_feature video_cards_nvidia with_nvml)
diff --git a/games-util/mangohud/metadata.xml b/games-util/mangohud/metadata.xml
index da9d5549c..53e5027d0 100644
--- a/games-util/mangohud/metadata.xml
+++ b/games-util/mangohud/metadata.xml
@@ -10,6 +10,6 @@
<bugs-to>https://github.com/flightlessmango/MangoHud/issues</bugs-to>
</upstream>
<use>
- <flag name="xnvctrl">"Use XNVctrl as fall back for older Nvidia devices."</flag>
+ <flag name="xnvctrl">Use XNVctrl as fall back for older Nvidia devices.</flag>
</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/
@ 2022-04-16 17:35 Adel KARA SLIMANE
0 siblings, 0 replies; 6+ messages in thread
From: Adel KARA SLIMANE @ 2022-04-16 17:35 UTC (permalink / raw
To: gentoo-commits
commit: e5119f64b321b101843486a27ae1bd7135f06242
Author: Adel KARA SLIMANE <adel.ks <AT> zegrapher <DOT> com>
AuthorDate: Sat Apr 16 17:30:19 2022 +0000
Commit: Adel KARA SLIMANE <adel <AT> karaslimane <DOT> com>
CommitDate: Sat Apr 16 17:32:43 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e5119f64
games-util/mangohud: new package
The imgui dependency that is bundled in GURU needs some work
before it can be used as a dependency, bundle it for now
Bug: https://bugs.gentoo.org/838850
Signed-off-by: Adel KARA SLIMANE <adel.ks <AT> zegrapher.com>
games-util/mangohud/Manifest | 3 +
.../files/mangonhud-0.6.6-meson-build.patch | 14 ++++
games-util/mangohud/mangohud-0.6.6.1.ebuild | 94 ++++++++++++++++++++++
games-util/mangohud/metadata.xml | 15 ++++
4 files changed, 126 insertions(+)
diff --git a/games-util/mangohud/Manifest b/games-util/mangohud/Manifest
new file mode 100644
index 000000000..c00c83d44
--- /dev/null
+++ b/games-util/mangohud/Manifest
@@ -0,0 +1,3 @@
+DIST imgui-1.81-1-meson-wrap.zip 1850 BLAKE2B 325f84fd57a896ec9aceb83a54752e8dba52499c3540cc389ab51b929f1dd65c4a599ab71f7f06fa082f31572d8cdaf2f9d7bfdd8cf6ca96a529318bd53f0a06 SHA512 c97fa4cb5ab31c040951e6da04bb1b9659f0105adf54becc35c60ad376c6d4f9e4dcd2a5a554dc5430cfc69527ef5d8570f39fbbf91a23d15f51740f06fb7c3c
+DIST imgui-1.81.tar.gz 1413443 BLAKE2B 6f2e63777821b2767da92d9f40f4de7b4313c38817413e959e612c0ce67701645cf29f0748a3b86cfbd41e0b4b2c8099e9a0ca786c637ca1661fffd7b0de0629 SHA512 d7a2b66dea77359f78068a595607d7668e09ddd0b91910f67fc6463cb920b91b0cc1855984bd4d41e6a880b69ca7cd5e3adc064dcf461c0629b9f8c845a4fc3e
+DIST mangohud-0.6.6.1.tar.gz 14839055 BLAKE2B e0e27e62bf688b80611461ecab1bf4cf2c39f8359a9dc2cc1362555bfca55db30a72684da4e07e03970d8e5dee1d26f1d7a1fa30ff47aa86ec653dba273f24cf SHA512 c097dede7e534641f12a9c7f0a2ce049611e17732c7d232251b38d5c50bbcee53b2b22e548ff27f514fa57a45c563d883a1a9382c2c0ee9ac6832a2775e8f221
diff --git a/games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch b/games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch
new file mode 100644
index 000000000..c6aa9e6fd
--- /dev/null
+++ b/games-util/mangohud/files/mangonhud-0.6.6-meson-build.patch
@@ -0,0 +1,14 @@
+# 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', default_options: imgui_options, fallback : ['imgui', 'imgui_dep'])
+
+ 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.6.6.1.ebuild b/games-util/mangohud/mangohud-0.6.6.1.ebuild
new file mode 100644
index 000000000..ae6a20b76
--- /dev/null
+++ b/games-util/mangohud/mangohud-0.6.6.1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1 meson-multilib
+
+MY_PV=$(ver_cut 1-3)
+[ -n "$(ver_cut 4)" ] && MY_PV_REV="-$(ver_cut 4)"
+
+IMGUI_VER="1.81"
+IMGUI_MESON_WRAP_VER="1"
+
+DESCRIPTION="A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more."
+HOMEPAGE="https://github.com/flightlessmango/MangoHud"
+
+SRC_URI="
+ https://github.com/flightlessmango/MangoHud/archive/v${MY_PV}${MY_PV_REV}.tar.gz -> ${P}.tar.gz
+ https://github.com/ocornut/imgui/archive/v${IMGUI_VER}.tar.gz -> imgui-${IMGUI_VER}.tar.gz
+ https://wrapdb.mesonbuild.com/v2/imgui_${IMGUI_VER}-${IMGUI_MESON_WRAP_VER}/get_patch -> imgui-${IMGUI_VER}-${IMGUI_MESON_WRAP_VER}-meson-wrap.zip
+"
+
+KEYWORDS="-* ~amd64 ~x86"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="+dbus debug +X xnvctrl wayland video_cards_nvidia"
+
+REQUIRED_USE="
+ || ( X wayland )
+ xnvctrl? ( video_cards_nvidia )"
+
+BDEPEND="
+ app-arch/unzip
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-libs/spdlog
+ dev-util/glslang
+ >=dev-util/vulkan-headers-1.2
+ media-libs/vulkan-loader[${MULTILIB_USEDEP}]
+ media-libs/libglvnd[$MULTILIB_USEDEP]
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )
+ video_cards_nvidia? (
+ x11-drivers/nvidia-drivers[${MULTILIB_USEDEP}]
+ xnvctrl? ( x11-drivers/nvidia-drivers[static-libs] )
+ )
+ wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )
+"
+
+RDEPEND="${BDEPEND}"
+
+S="${WORKDIR}/MangoHud-${PV}"
+
+src_unpack() {
+ default
+ [ -n "${MY_PV_REV}" ] && ( mv ${WORKDIR}/MangoHud-${MY_PV}${MY_PV_REV} ${WORKDIR}/MangoHud-${PV} || die )
+
+ unpack imgui-${IMGUI_VER}.tar.gz
+ unpack imgui-${IMGUI_VER}-${IMGUI_MESON_WRAP_VER}-meson-wrap.zip
+ mv ${WORKDIR}/imgui-${IMGUI_VER} ${S}/subprojects/imgui || die
+}
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}/mangonhud-0.6.6-meson-build.patch"
+}
+
+multilib_src_configure() {
+ local emesonargs=(
+ -Dappend_libdir_mangohud=false
+ -Duse_system_spdlog=enabled
+ -Duse_system_vulkan=enabled
+ -Dinclude_doc=false
+ $(meson_feature video_cards_nvidia with_nvml)
+ $(meson_feature xnvctrl with_xnvctrl)
+ $(meson_feature X with_x11)
+ $(meson_feature wayland with_wayland)
+ $(meson_feature dbus with_dbus)
+ )
+ meson_src_configure
+}
+
+pkg_postinst() {
+ if ! use xnvctrl; then
+ einfo ""
+ einfo "If mangohud can't get GPU load, or other GPU information,"
+ einfo "and you have an older Nvidia device."
+ einfo ""
+ einfo "Try enabling the 'xnvctrl' useflag."
+ einfo ""
+ fi
+}
diff --git a/games-util/mangohud/metadata.xml b/games-util/mangohud/metadata.xml
new file mode 100644
index 000000000..da9d5549c
--- /dev/null
+++ b/games-util/mangohud/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>adel.ks@zegrapher.com</email>
+ <name>Adel KARA SLIMANE</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">flightlessmango/MangoHud</remote-id>
+ <bugs-to>https://github.com/flightlessmango/MangoHud/issues</bugs-to>
+ </upstream>
+ <use>
+ <flag name="xnvctrl">"Use XNVctrl as fall back for older Nvidia devices."</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-09 22:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 22:13 [gentoo-commits] repo/proj/guru:dev commit in: games-util/mangohud/files/, games-util/mangohud/ Adel KARA SLIMANE
-- strict thread matches above, loose matches on Subject: below --
2024-05-09 22:36 Gonçalo Negrier Duarte
2024-05-09 15:57 Gonçalo Negrier Duarte
2023-11-27 19:25 Adel KARA SLIMANE
2022-05-10 21:29 Adel KARA SLIMANE
2022-04-16 17:35 Adel KARA SLIMANE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox