public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/implot/files/, media-libs/implot/
@ 2024-05-09 15:57 Gonçalo Negrier Duarte
  0 siblings, 0 replies; 2+ messages in thread
From: Gonçalo Negrier Duarte @ 2024-05-09 15:57 UTC (permalink / raw
  To: gentoo-commits

commit:     67d96b3e23905552c023be65c24254539472ff22
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Thu May  9 14:55:15 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=67d96b3e

media-libs/implot: new package, add 0.16

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

 media-libs/implot/Manifest                         |  2 +
 .../implot/files/implot-0.16-wrapdb-meson-fix.diff | 64 ++++++++++++++++++++++
 media-libs/implot/implot-0.16.ebuild               | 41 ++++++++++++++
 media-libs/implot/metadata.xml                     | 13 +++++
 4 files changed, 120 insertions(+)

diff --git a/media-libs/implot/Manifest b/media-libs/implot/Manifest
new file mode 100644
index 0000000000..cac8dc9c2c
--- /dev/null
+++ b/media-libs/implot/Manifest
@@ -0,0 +1,2 @@
+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
new file mode 100644
index 0000000000..3e497727b4
--- /dev/null
+++ b/media-libs/implot/files/implot-0.16-wrapdb-meson-fix.diff
@@ -0,0 +1,64 @@
+# 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/implot-0.16.ebuild b/media-libs/implot/implot-0.16.ebuild
new file mode 100644
index 0000000000..9bc245b814
--- /dev/null
+++ b/media-libs/implot/implot-0.16.ebuild
@@ -0,0 +1,41 @@
+# 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
+}

diff --git a/media-libs/implot/metadata.xml b/media-libs/implot/metadata.xml
new file mode 100644
index 0000000000..33a455ffb9
--- /dev/null
+++ b/media-libs/implot/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>gonegrier.duarte@gmail.com</email>
+		<name>Gonçalo Negrier Duarte</name>
+	</maintainer>
+    <upstream>
+        <bugs-to>https://github.com/epezent/implot/issues</bugs-to>
+        <remote-id type="github">epezent/implot</remote-id>
+    </upstream>
+    </use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: media-libs/implot/files/, media-libs/implot/
@ 2024-05-10 14:00 Gonçalo Negrier Duarte
  0 siblings, 0 replies; 2+ messages in thread
From: Gonçalo Negrier Duarte @ 2024-05-10 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     85033ed4ac667fbf18ae6389613bc938647363f0
Author:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
AuthorDate: Fri May 10 13:00:10 2024 +0000
Commit:     Gonçalo Negrier Duarte <gonegrier.duarte <AT> gmail <DOT> com>
CommitDate: Fri May 10 14:00:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=85033ed4

media-libs/implot: use custom meson.build instead of patch

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

 media-libs/implot/Manifest                         |  1 -
 .../implot/files/implot-0.16-wrapdb-meson-fix.diff | 64 ----------------------
 media-libs/implot/files/implot-meson.build         | 37 +++++++++++++
 media-libs/implot/implot-0.16-r1.ebuild            | 40 ++++++++++++++
 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 cac8dc9c2c..e63ca93fe8 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 3e497727b4..0000000000
--- 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 0000000000..7bf1106663
--- /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 0000000000..7229edfb8c
--- /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 9bc245b814..0000000000
--- 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
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-10 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-10 14:00 [gentoo-commits] repo/proj/guru:dev commit in: media-libs/implot/files/, media-libs/implot/ Gonçalo Negrier Duarte
  -- strict thread matches above, loose matches on Subject: below --
2024-05-09 15:57 Gonçalo Negrier Duarte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox