mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 20:13:01 -04:00
games-util/mangohud: replace patches with sed calls
less maintenance like this. Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user