aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdel KARA SLIMANE <adel.ks@zegrapher.com>2023-11-27 23:11:59 +0100
committerAdel KARA SLIMANE <adel.ks@zegrapher.com>2023-11-27 23:13:09 +0100
commitab7568044fe114f18bd3e7a824916da9bedda044 (patch)
tree5d0ee766590f4161130ac2fe0bcd64ab4ff6b97d /games-util
parentgames-util/mangohud: fix python eclass use (diff)
downloadguru-ab7568044fe114f18bd3e7a824916da9bedda044.tar.gz
guru-ab7568044fe114f18bd3e7a824916da9bedda044.tar.bz2
guru-ab7568044fe114f18bd3e7a824916da9bedda044.zip
games-util/mangohud: replace patches with sed calls
less maintenance like this. Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/mangohud/files/implot-v0.16-imgui-include-fix.patch45
-rw-r--r--games-util/mangohud/files/mangohud-v0.7.0-imgui-include-fix.patch13
-rw-r--r--games-util/mangohud/mangohud-0.7.0.ebuild7
-rw-r--r--games-util/mangohud/mangohud-9999.ebuild8
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 7da397ce4..000000000
--- 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 1d5d32e2f..000000000
--- 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 f257c749b..4735f458e 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 d68169da0..3fba65ec2 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() {