aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2022-08-09 00:54:00 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2022-08-09 00:54:35 +0000
commit240569d0a2e932a6b46f827c945c3a3b566615b7 (patch)
tree571bf1730ced1c9dd1943e3f4454edb8adf62cb8
parenta04a1743fd8cca687b6ad45b39126d37e3434f6e (diff)
downloadports-240569d0a2e932a6b46f827c945c3a3b566615b7.tar.gz
ports-240569d0a2e932a6b46f827c945c3a3b566615b7.zip
graphics/matplotlib-cpp: New port: Header-only C++ plotting library built on the popular matplotlib
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/matplotlib-cpp/Makefile29
-rw-r--r--graphics/matplotlib-cpp/distinfo3
-rw-r--r--graphics/matplotlib-cpp/files/patch-CMakeLists.txt18
-rw-r--r--graphics/matplotlib-cpp/pkg-descr4
5 files changed, 55 insertions, 0 deletions
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