Skip to content

Commit dd2255e

Browse files
authored
[matplotplusplus] Add new port (#13725)
* [matplotplusplus] Add new port * [matplotplusplus] Update tips * [matplotplusplus] Update to fix opengl backend * [matplotplusplus] Update to lastest * [matplotplusplus] Update to 2021-03-07 * [matplotplusplus] Add FEATURES keyword * [matplotplusplus] Modernize * [matplotplusplus] Fix mistake * [matplotplusplus] UWP not supported * [matplotplusplus] Format manifest * [matplotplusplus] Add version file * [matplotplusplus] Experimental filesystem support * [matplotplusplus] Overwrite version * [matplotplusplus] Do not support arm64-windows yet * [matplotplusplus] Update to 2021-04-11 * [matplotplusplus] vcpkg x-add-version --overwrite-version matplotplusplus * [matplotplusplus] Modernize * [matplotplusplus] Overwrite version * [matplotplusplus] Fixup cmake targets * [matplotplusplus] Overwrite version * [matplotplusplus] Modernize * [matplotplusplus] Overwrite version
1 parent 66ce4e9 commit dd2255e

File tree

4 files changed

+91
-0
lines changed

4 files changed

+91
-0
lines changed

ports/matplotplusplus/portfile.cmake

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
message(STATUS " ${PORT}'s gnuplot backend currently requires Gnuplot 5.2.6+.
2+
Windows users may get a pre-built binary installer from http://www.gnuplot.info/download.html.
3+
Linux and MacOS users may install it from the system package manager.
4+
Please visit https://alandefreitas.github.io/matplotplusplus/ for more information."
5+
)
6+
7+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
8+
9+
vcpkg_from_github(
10+
OUT_SOURCE_PATH SOURCE_PATH
11+
REPO alandefreitas/matplotplusplus
12+
REF 36d8dc6c3b94b7a71c4f129763f2c6ad8fc0b54a
13+
SHA512 ac8902e953a2a9f6bd62e14e2eb0bd42e407bae6c0b2921ad16ce547e4921ba2c8d8a9cc68e75831676dce3cd89cdf8294862710e838510b68e20f8a6cdf806f
14+
HEAD_REF master
15+
)
16+
17+
vcpkg_check_features(
18+
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
19+
FEATURES
20+
opengl BUILD_EXPERIMENTAL_OPENGL_BACKEND
21+
)
22+
23+
vcpkg_cmake_configure(
24+
SOURCE_PATH ${SOURCE_PATH}
25+
OPTIONS
26+
-DCPM_USE_LOCAL_PACKAGES=ON
27+
-DBUILD_EXAMPLES=OFF
28+
-DBUILD_TESTS=OFF
29+
-DBUILD_INSTALLER=ON
30+
-DBUILD_PACKAGE=OFF
31+
-DBUILD_WITH_PEDANTIC_WARNINGS=OFF
32+
-DWITH_SYSTEM_CIMG=ON
33+
${FEATURE_OPTIONS}
34+
)
35+
36+
vcpkg_cmake_install()
37+
38+
# The official documentation says:
39+
# find_package(Matplot++ ...)
40+
file(RENAME
41+
${CURRENT_PACKAGES_DIR}/lib/cmake/Matplot++/matplot++-config.cmake
42+
${CURRENT_PACKAGES_DIR}/lib/cmake/Matplot++/Matplot++-config.cmake
43+
)
44+
45+
vcpkg_cmake_config_fixup(PACKAGE_NAME Matplot++ CONFIG_PATH lib/cmake/Matplot++)
46+
47+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
48+
49+
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

ports/matplotplusplus/vcpkg.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "matplotplusplus",
3+
"version-date": "2021-04-11",
4+
"description": "A C++ graphics library for data visualization",
5+
"homepage": "https://alandefreitas.github.io/matplotplusplus/",
6+
"license": "MIT",
7+
"supports": "!(arm | uwp)",
8+
"dependencies": [
9+
"cimg",
10+
{
11+
"name": "vcpkg-cmake",
12+
"host": true
13+
},
14+
{
15+
"name": "vcpkg-cmake-config",
16+
"host": true
17+
}
18+
],
19+
"features": {
20+
"opengl": {
21+
"description": "OpenGL backend for Matplot++",
22+
"dependencies": [
23+
"glad",
24+
"glfw3",
25+
"opengl"
26+
]
27+
}
28+
}
29+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3844,6 +3844,10 @@
38443844
"baseline": "2020-08-27",
38453845
"port-version": 0
38463846
},
3847+
"matplotplusplus": {
3848+
"baseline": "2021-04-11",
3849+
"port-version": 0
3850+
},
38473851
"matroska": {
38483852
"baseline": "1.6.2",
38493853
"port-version": 0

versions/m-/matplotplusplus.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "e4cf18b9e9c16d294f966bae3d1d89ecd698a47f",
5+
"version-date": "2021-04-11",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)