Skip to content

Commit

Permalink
Auto-update matplotplusplus to v1.2.2 (#6534)
Browse files Browse the repository at this point in the history
* Update matplotplusplus to v1.2.2

* unbundle deps

* Update xmake.lua

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
  • Loading branch information
waruqi and star-hengxing authored Mar 7, 2025
1 parent de0b5b6 commit f7e7fdc
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions packages/m/matplotplusplus/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("matplotplusplus")
add_urls("https://github.com/alandefreitas/matplotplusplus/archive/refs/tags/$(version).tar.gz",
"https://github.com/alandefreitas/matplotplusplus.git")

add_versions("v1.2.2", "c7434b4fea0d0cc3508fd7104fafbb2fa7c824b1d2ccc51c52eaee26fc55a9a0")
add_versions("v1.2.1", "9dd7cc92b2425148f50329f5a3bf95f9774ac807657838972d35334b5ff7cb87")
add_versions("v1.2.0", "42e24edf717741fcc721242aaa1fdb44e510fbdce4032cdb101c2258761b2554")
add_versions("v1.1.0", "5c3a1bdfee12f5c11fd194361040fe4760f57e334523ac125ec22b2cb03f27bb")
Expand All @@ -25,13 +26,23 @@ package("matplotplusplus")
end

add_deps("cmake")
add_deps("nodesoup")
add_deps("nodesoup", "cimg")

if is_plat("windows") then
add_syslinks("user32", "shell32", "gdi32")
end

on_load("windows", "macosx", "linux", function (package)
if on_check then
on_check("linux", function (package)
if package:version() and package:version():eq("1.2.2") then
if package:is_debug() then
raise("package(matplotplusplus 1.2.2) unsupported debug build type")
end
end
end)
end

on_load(function (package)
for config, dep in pairs(configdeps) do
if package:config(config) then
package:add("deps", dep)
Expand All @@ -53,7 +64,9 @@ package("matplotplusplus")
"-DBUILD_TESTS=OFF",
"-DBUILD_INSTALLER=ON",
"-DBUILD_PACKAGE=OFF",
"-DWITH_SYSTEM_NODESOUP=ON"
"-DWITH_SYSTEM_NODESOUP=ON",
"-DMATPLOTPP_WITH_SYSTEM_NODESOUP=ON",
"-DMATPLOTPP_WITH_SYSTEM_CIMG=ON",
}
for config, dep in pairs(configdeps) do
if not package:config(config) then
Expand All @@ -62,9 +75,6 @@ package("matplotplusplus")
end
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=''")
end
import("package.tools.cmake").install(package, configs)
end)

Expand Down

0 comments on commit f7e7fdc

Please sign in to comment.