Auto-update lunasvg to v3.0.1 (#5658)

* Update lunasvg to v3.0.1

* Update xmake.lua

* improve includedirs

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/5705/head
ruki 3 weeks ago committed by GitHub
parent 8f4880d4a4
commit be9b7777f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      packages/l/lunasvg/xmake.lua

@ -6,14 +6,18 @@ package("lunasvg")
add_urls("https://github.com/sammycage/lunasvg/archive/refs/tags/$(version).tar.gz",
"https://github.com/sammycage/lunasvg.git")
add_versions("v3.0.1", "39e3f47d4e40f7992d7958123ca1993ff1a02887539af2af1c638da2855a603c")
add_versions("v2.4.1", "db9d2134c8c2545694e71e62fb0772a7d089fe53e1ace1e08c2279a89e450534")
add_versions("v2.4.0", "0682c60501c91d75f4261d9c1a5cd44c2c9da8dba76f8402eab628448c9a4591")
add_versions("v2.3.9", "088bc9fd1191a004552c65bdcc260989b83da441b0bdaa965e79d984feba88fa")
add_versions("v2.3.5", "350ff56aa1acdedefe2ad8a4241a9fb8f9b232868adc7bd36dfb3dbdd57e2e93")
add_deps("cmake")
add_deps("plutovg")
on_load("windows", "mingw", function (package)
add_includedirs("include", "include/lunasvg")
on_load(function (package)
local version = package:version()
if package:gitref() or version:ge("2.4.1") then
if not package:config("shared") then
@ -27,10 +31,17 @@ package("lunasvg")
end)
on_install(function (package)
local configs = {}
io.replace("CMakeLists.txt", "FetchContent_MakeAvailable(plutovg)", "find_package(plutovg)", {plain = true})
local configs = {"-DLUNASVG_BUILD_EXAMPLES=OFF"}
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"))
import("package.tools.cmake").install(package, configs)
if package:is_plat("windows") and package:is_debug() then
local dir = package:installdir(package:config("shared") and "bin" or "lib")
os.trycp(path.join(package:buildir(), "lunasvg.pdb"), dir)
end
end)
on_test(function (package)

Loading…
Cancel
Save