git: 240569d0a2e9 - main - graphics/matplotlib-cpp: New port: Header-only C++ plotting library built on the popular matplotlib

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 09 Aug 2022 00:54:37 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=240569d0a2e932a6b46f827c945c3a3b566615b7

commit 240569d0a2e932a6b46f827c945c3a3b566615b7
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-09 00:54:00 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-09 00:54:35 +0000

    graphics/matplotlib-cpp: New port: Header-only C++ plotting library built on the popular matplotlib
---
 graphics/Makefile                                  |  1 +
 graphics/matplotlib-cpp/Makefile                   | 29 ++++++++++++++++++++++
 graphics/matplotlib-cpp/distinfo                   |  3 +++
 graphics/matplotlib-cpp/files/patch-CMakeLists.txt | 18 ++++++++++++++
 graphics/matplotlib-cpp/pkg-descr                  |  4 +++
 5 files changed, 55 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index 4863e09f4268..211774884ec0 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -544,6 +544,7 @@
     SUBDIR += mapcache
     SUBDIR += mapserver
     SUBDIR += mapyrus
+    SUBDIR += matplotlib-cpp
     SUBDIR += matplotplusplus
     SUBDIR += megapov
     SUBDIR += meh
diff --git a/graphics/matplotlib-cpp/Makefile b/graphics/matplotlib-cpp/Makefile
new file mode 100644
index 000000000000..8fb5eb6264c4
--- /dev/null
+++ b/graphics/matplotlib-cpp/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	matplotlib-cpp
+PORTVERSION=	g20210422
+CATEGORIES=	graphics devel
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Header-only C++ plotting library built on the popular matplotlib
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} \
+		${PYNUMPY}
+
+USES=		cmake:testing compiler:c++17-lang python
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	lava
+GH_TAGNAME=	ef0383f
+
+CMAKE_TESTING_ON=	FREEBSD_BUILD_EXAMPLES
+CMAKE_TESTING_TARGET=	${ALL_TARGET}
+
+NO_ARCH=	yes
+
+PLIST_FILES=	include/matplotlibcpp.h \
+		lib/matplotlib_cpp/cmake/matplotlib_cppConfig.cmake \
+		lib/matplotlib_cpp/cmake/matplotlib_cppTargets.cmake
+
+.include <bsd.port.mk>
diff --git a/graphics/matplotlib-cpp/distinfo b/graphics/matplotlib-cpp/distinfo
new file mode 100644
index 000000000000..03ac3f317212
--- /dev/null
+++ b/graphics/matplotlib-cpp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1660004600
+SHA256 (lava-matplotlib-cpp-g20210422-ef0383f_GH0.tar.gz) = 1ea2f58a955577cf14772ef3a7c961356c979eb8df55d0e96f49e734ebc7e1ac
+SIZE (lava-matplotlib-cpp-g20210422-ef0383f_GH0.tar.gz) = 512367
diff --git a/graphics/matplotlib-cpp/files/patch-CMakeLists.txt b/graphics/matplotlib-cpp/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..046a5b805367
--- /dev/null
+++ b/graphics/matplotlib-cpp/files/patch-CMakeLists.txt
@@ -0,0 +1,18 @@
+--- CMakeLists.txt.orig	2022-08-09 00:24:38 UTC
++++ CMakeLists.txt
+@@ -37,6 +37,7 @@ install(
+ 
+ 
+ # Examples
++if (FREEBSD_BUILD_EXAMPLES)
+ add_executable(minimal examples/minimal.cpp)
+ target_link_libraries(minimal PRIVATE matplotlib_cpp)
+ set_target_properties(minimal PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+@@ -101,6 +102,7 @@ if(Python3_NumPy_FOUND)
+   target_link_libraries(spy PRIVATE matplotlib_cpp)
+   set_target_properties(spy PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ endif()
++endif(FREEBSD_BUILD_EXAMPLES)
+ 
+ 
+ # Install headers
diff --git a/graphics/matplotlib-cpp/pkg-descr b/graphics/matplotlib-cpp/pkg-descr
new file mode 100644
index 000000000000..8c20bd38851a
--- /dev/null
+++ b/graphics/matplotlib-cpp/pkg-descr
@@ -0,0 +1,4 @@
+matplotlib-cpp is possibly the simplest C++ plotting library. It is built to
+resemble the plotting API used by Matlab and matplotlib.
+
+WWW: https://github.com/lava/matplotlib-cpp