diff options
author | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-05-10 14:00:10 +0100 |
---|---|---|
committer | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-05-10 15:00:47 +0100 |
commit | 85033ed4ac667fbf18ae6389613bc938647363f0 (patch) | |
tree | 75db0cbaca9757041cd0b4b469aa3e235f9028db /media-libs | |
parent | dev-utils/fortls: 3.0.0_rc5 version bump (drop 3.0.0_rc4) (diff) | |
download | guru-85033ed4ac667fbf18ae6389613bc938647363f0.tar.gz guru-85033ed4ac667fbf18ae6389613bc938647363f0.tar.bz2 guru-85033ed4ac667fbf18ae6389613bc938647363f0.zip |
media-libs/implot: use custom meson.build instead of patch
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/implot/Manifest | 1 | ||||
-rw-r--r-- | media-libs/implot/files/implot-0.16-wrapdb-meson-fix.diff | 64 | ||||
-rw-r--r-- | media-libs/implot/files/implot-meson.build | 37 | ||||
-rw-r--r-- | media-libs/implot/implot-0.16-r1.ebuild | 40 | ||||
-rw-r--r-- | media-libs/implot/implot-0.16.ebuild | 41 |
5 files changed, 77 insertions, 106 deletions
diff --git a/media-libs/implot/Manifest b/media-libs/implot/Manifest index cac8dc9c2..e63ca93fe 100644 --- a/media-libs/implot/Manifest +++ b/media-libs/implot/Manifest @@ -1,2 +1 @@ -DIST implot-0.16-1-meson-wrap.zip 1226 BLAKE2B 4725661fe2c7f7f05e1702c3a871f9feb9fdefdc2a840cdf8a3d56e7e180e950533f830192f9ad19cba97e8094ab53cf73adda2ed6712a83384d4160f6c06b18 SHA512 6e54beebef8ac4ec0b3e85d30d7570c9a987d69c03b6a564bc67d105d19d2cec45cb3ab8921ebcbda51e7139d93c3c6dae359fa30b3fcce748cdec8953aabbf7 DIST implot-0.16.tar.gz 137983 BLAKE2B aca328e2fe6049b72601f25a409f313e99971f606e68ca780a1594f8ca42b1606831090add8039fefd013cfb6c057900f0add347d1b80c466a05bd18e455b8d7 SHA512 117cb08122d900e7db857897bfec4c9ac3300a1d429c8f0303415bc693840baa9bbbb91ca3f13853d8efd3a6ebf538b7114401d4fbfe0d067256e58cbdbd4919 diff --git a/media-libs/implot/files/implot-0.16-wrapdb-meson-fix.diff b/media-libs/implot/files/implot-0.16-wrapdb-meson-fix.diff deleted file mode 100644 index 3e497727b..000000000 --- a/media-libs/implot/files/implot-0.16-wrapdb-meson-fix.diff +++ /dev/null @@ -1,64 +0,0 @@ -# Meson wrapdb's meson.build file doesn't handle installing the library -# and find imgui system library, we patch that here - -diff --git a/meson.build b/implot-0.16-meson.build -index 3343dd4ad..804f84227 100644 ---- a/meson.build -+++ b/implot-0.16-meson.build -@@ -5,8 +5,7 @@ - version : '0.16', - ) - --imgui_sp = subproject('imgui') --imgui_dep = imgui_sp.get_variable('imgui_dep') -+imgui_dep=dependency('imgui', required : true) - - implot_inc = include_directories('.') - implot_src = files( -@@ -17,7 +16,19 @@ - implot_lib = library( - 'implot', - implot_src, -- dependencies: imgui_dep -+ dependencies: imgui_dep, -+ version: meson.project_version(), -+ install: true -+) -+ -+pkg_mod = import('pkgconfig') -+pkg_mod.generate(implot_lib, -+ description : 'Immediate Mode Plotting' -+) -+ -+install_headers( -+ 'implot.h', -+ 'implot_internal.h' - ) - - implot_dep = declare_dependency( -diff --git a/implot.h b/implot.h -index 3054331..856eb0c 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 cd05478..a189fcf 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/media-libs/implot/files/implot-meson.build b/media-libs/implot/files/implot-meson.build new file mode 100644 index 000000000..7bf110666 --- /dev/null +++ b/media-libs/implot/files/implot-meson.build @@ -0,0 +1,37 @@ +project( + 'ImGui Plotting Library', + 'cpp', + license : 'MIT', + version : 'PV', +) + +imgui_dep=dependency('imgui', required : true) + +implot_inc = include_directories('.') +implot_src = files( + 'implot.cpp', + 'implot_items.cpp' +) + +implot_lib = library( + 'implot', + implot_src, + dependencies: imgui_dep, + version: meson.project_version(), + install: true +) + +pkg_mod = import('pkgconfig') +pkg_mod.generate(implot_lib, + description : 'Immediate Mode Plotting' +) + +install_headers( + 'implot.h', + 'implot_internal.h' +) + +implot_dep = declare_dependency( + link_with : implot_lib, + include_directories : implot_inc +) diff --git a/media-libs/implot/implot-0.16-r1.ebuild b/media-libs/implot/implot-0.16-r1.ebuild new file mode 100644 index 000000000..7229edfb8 --- /dev/null +++ b/media-libs/implot/implot-0.16-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson-multilib + +MESON_WRAP_VER="1" + +DESCRIPTION="Immediate Mode Plotting" +HOMEPAGE=" + https://github.com/epezent/implot/ +" + +SRC_URI="https://github.com/epezent/implot/archive/v${PV}.tar.gz -> implot-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" + +DEPEND=" + media-libs/imgui +" + +BDEPEND=" + virtual/pkgconfig + app-arch/unzip +" + +src_prepare() { + default + + # Use custom meson.build and meson_options.txt to install instead of relay on packages + cp "${FILESDIR}/${PN}-meson.build" "${S}/meson.build" || die + sed -i "s/version : 'PV',/version : '${PV}',/g" "${S}/meson.build" || die + + # replace all occurences of imgui headers to use the subfolder + 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 +} diff --git a/media-libs/implot/implot-0.16.ebuild b/media-libs/implot/implot-0.16.ebuild deleted file mode 100644 index 9bc245b81..000000000 --- a/media-libs/implot/implot-0.16.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit meson-multilib - -MESON_WRAP_VER="1" - -DESCRIPTION="Immediate Mode Plotting" -HOMEPAGE=" - https://github.com/epezent/implot/ -" - -SRC_URI=" - https://github.com/epezent/implot/archive/v${PV}.tar.gz -> implot-${PV}.tar.gz - https://wrapdb.mesonbuild.com/v2/implot_${PV}-${MESON_WRAP_VER}/get_patch -> implot-${PV}-${MESON_WRAP_VER}-meson-wrap.zip -" - -LICENSE="MIT" -SLOT="0/${PV}" -KEYWORDS="~amd64" - -DEPEND=" - media-libs/imgui -" - -BDEPEND=" - virtual/pkgconfig - app-arch/unzip -" - -PATCHES=( - "${FILESDIR}/${P}-wrapdb-meson-fix.diff" -) - -src_unpack() { - default - - unpack implot-${PV}-${MESON_WRAP_VER}-meson-wrap.zip -} |