* update libyaml

* add numcpp

* update imagemagick
pull/541/head
Hoildkv 3 years ago committed by GitHub
parent bf71062f90
commit ef74897dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/i/imagemagick/xmake.lua
  2. 33
      packages/l/libyaml/xmake.lua
  3. 27
      packages/n/numcpp/xmake.lua

@ -1,8 +1,12 @@
package("imagemagick") package("imagemagick")
set_homepage("https://imagemagick.org/script/index.php") set_homepage("https://imagemagick.org/script/index.php")
set_description("ImageMagick is a FOSS software suite for modifying images. This does NOT provide any of the utilities. It installs the C/C++ Libraries.") set_description("ImageMagick is a FOSS software suite for modifying images. This does NOT provide any of the utilities. It installs the C/C++ Libraries.")
add_urls("https://download.imagemagick.org/ImageMagick/download/ImageMagick-$(version).tar.gz") set_license("Apache-2.0")
add_urls("https://download.imagemagick.org/ImageMagick/download/releases/ImageMagick-$(version).tar.gz")
add_versions("7.0.11-13", "6c162d7cbd7b80968a6d083d39eb18d9c9bbd49f500f7f49c9a5dcc0fc36a03b") add_versions("7.0.11-13", "6c162d7cbd7b80968a6d083d39eb18d9c9bbd49f500f7f49c9a5dcc0fc36a03b")
add_versions("7.1.0-4", "94a7a52f633891cc29eefc49da95408ed68c64c3690402dc401cd0478d2bd91f")
add_configs("bzlib", {description = "Enable bzip2 support.", default = false, type = "boolean"}) add_configs("bzlib", {description = "Enable bzip2 support.", default = false, type = "boolean"})
add_configs("exr", {description = "Enable exr support.", default = false, type = "boolean"}) add_configs("exr", {description = "Enable exr support.", default = false, type = "boolean"})

@ -2,16 +2,41 @@ package("libyaml")
set_homepage("http://pyyaml.org/wiki/LibYAML") set_homepage("http://pyyaml.org/wiki/LibYAML")
set_description("Canonical source repository for LibYAML.") set_description("Canonical source repository for LibYAML.")
set_license("MIT")
set_urls("https://github.com/yaml/libyaml/archive/$(version).tar.gz", set_urls("https://github.com/yaml/libyaml/archive/$(version).tar.gz",
"https://github.com/yaml/libyaml.git") "https://github.com/yaml/libyaml.git")
add_versions("0.2.2", "46bca77dc8be954686cff21888d6ce10ca4016b360ae1f56962e6882a17aa1fe") add_versions("0.2.2", "46bca77dc8be954686cff21888d6ce10ca4016b360ae1f56962e6882a17aa1fe")
add_versions("0.2.5", "fa240dbf262be053f3898006d502d514936c818e422afdcf33921c63bed9bf2e")
on_install("macosx", "linux", function (package) on_load("windows", function (package)
if not os.isfile("configure") then if not package:config("shared") then
os.vrun("./bootstrap") package:add("defines", "YAML_DECLARE_STATIC")
end end
import("package.tools.autoconf").install(package) end)
on_install("windows", "macosx", "linux", "mingw", function (package)
local ver = package:version()
io.writefile("xmake.lua", format([[
add_rules("mode.debug", "mode.release")
target("yaml")
set_kind("$(kind)")
add_files("src/*.c")
add_headerfiles("include/yaml.h")
add_includedirs("include", "$(buildir)")
set_configvar("YAML_VERSION_MAJOR", %d)
set_configvar("YAML_VERSION_MINOR", %d)
set_configvar("YAML_VERSION_PATCH", %d)
set_configvar("YAML_VERSION_STRING", "%s")
add_configfiles("cmake/config.h.in", {pattern = "@(.-)@"})
add_defines("HAVE_CONFIG_H")
if is_kind("static") then
add_defines("YAML_DECLARE_STATIC")
else
add_defines("YAML_DECLARE_EXPORT")
end
]], ver:major(), ver:minor(), ver:patch(), ver))
import("package.tools.xmake").install(package, {kind = package:config("shared") and "shared" or "static"})
end) end)
on_test(function (package) on_test(function (package)

@ -0,0 +1,27 @@
package("numcpp")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/dpilger26/NumCpp")
set_description("C++ implementation of the Python Numpy library")
set_license("MIT")
add_urls("https://github.com/dpilger26/NumCpp/archive/refs/tags/Version_$(version).tar.gz",
"https://github.com/dpilger26/NumCpp.git")
add_versions("2.4.2", "8da0494552796b76e5e9ef691176fa7cb27bc52fec4019da20bfd8fb7ba00b91")
add_deps("cmake")
add_deps("boost")
on_install("windows", "macosx", "linux", function (package)
import("package.tools.cmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
nc::NdArray<int> a0 = {{1, 2}, {3, 4}};
nc::NdArray<int> a1 = {{1, 2}, {3, 4}, {5, 6}};
a1.reshape(2, 3);
auto a2 = a1.astype<double>();
}
]]}, {configs = {languages = "c++17"}, includes = "NumCpp.hpp"}))
end)
Loading…
Cancel
Save