add docopt and ezc3d (#604)

* add docopt

* add ezc3d

* update harfbuzz

* update libsdl

* improve openblas

* update catch2
pull/599/head^2
Hoildkv 3 years ago committed by GitHub
parent 8a16ba0009
commit caac3eedff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/c/catch2/xmake.lua
  2. 43
      packages/d/docopt/xmake.lua
  3. 31
      packages/e/ezc3d/xmake.lua
  4. 1
      packages/h/harfbuzz/xmake.lua
  5. 3
      packages/l/libsdl/xmake.lua
  6. 11
      packages/o/openblas/xmake.lua

@ -3,8 +3,10 @@ package("catch2")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/catchorg/Catch2")
set_description("Catch2 is a multi-paradigm test framework for C++. which also supports Objective-C (and maybe C). ")
set_license("BSL-1.0")
add_urls("https://github.com/catchorg/Catch2/archive/v$(version).zip")
add_versions("2.13.7", "3f3ccd90ad3a8fbb1beeb15e6db440ccdcbebe378dfd125d07a1f9a587a927e9")
add_versions("2.13.6", "39d50f5d1819cdf2908066664d57c2cde4a4000c364ad3376ea099735c896ff4")
add_versions("2.13.5", "728679b056dc1248cc79b3a1999ff7453f76422c68417563fc47a0ac2aaeeaef")
add_versions("2.9.2", "dc486300de22b0d36ddba1705abb07b9e5780639d824ba172ddf7062b2a1bf8f")

@ -0,0 +1,43 @@
package("docopt")
set_homepage("https://github.com/docopt/docopt.cpp")
set_description("Pythonic command line arguments parser (C++11 port)")
set_license("BSL-1.0")
add_urls("https://github.com/docopt/docopt.cpp/archive/refs/tags/$(version).tar.gz",
"https://github.com/docopt/docopt.cpp.git")
add_versions("v0.6.3", "28af5a0c482c6d508d22b14d588a3b0bd9ff97135f99c2814a5aa3cbff1d6632")
add_deps("cmake")
on_load("windows", function (package)
if package:config("shared") then
package:add("defines", "DOCOPT_DLL")
end
end)
on_install(function (package)
local rmtarget = package:config("shared") and "docopt_s" or "docopt"
io.replace("CMakeLists.txt", "install(TARGETS " .. rmtarget .. " EXPORT", "#", {plain = true})
import("package.tools.cmake").install(package)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
static const char USAGE[] =
R"(Naval Fate.
Usage:
naval_fate (-h | --help)
naval_fate --version
Options:
-h --help Show this screen.
--version Show version.
)";
void test(int argc, char *argv[]) {
std::map<std::string, docopt::value> args
= docopt::docopt(USAGE, { argv + 1, argv + argc }, true, "Naval Fate 2.0");
}
]]}, {configs = {languages = "c++11"}, includes = "docopt/docopt.h"}))
end)

@ -0,0 +1,31 @@
package("ezc3d")
set_homepage("https://github.com/pyomeca/ezc3d")
set_description("Easy to use C3D reader/writer for C++, Python and Matlab")
set_license("MIT")
add_urls("https://github.com/pyomeca/ezc3d/archive/refs/tags/Release_$(version).tar.gz")
add_versions("1.4.5", "01602b2ccfc0edd88089e89d249e10086022f7ed7ef40caa3eb3b048ccfa40aa")
add_deps("cmake")
add_includedirs("include/ezc3d")
if not is_plat("windows") then
add_linkdirs("lib/ezc3d")
end
on_install("windows", "linux", "macosx", function (package)
local configs = {"-DBUILD_EXAMPLE=OFF", "-DBUILD_TESTS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package: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)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <vector>
void test() {
ezc3d::c3d c3d_empty;
ezc3d::ParametersNS::GroupNS::Parameter t("SCALE");
t.set(std::vector<double>(), {0});
}
]]}, {configs = {languages = "c++11"}, includes = {"ezc3d.h", "Parameters.h"}}))
end)

@ -7,6 +7,7 @@ package("harfbuzz")
add_urls("https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$(version).tar.gz",
"https://github.com/harfbuzz/harfbuzz.git")
add_versions("2.8.1", "b3f17394c5bccee456172b2b30ddec0bb87e9c5df38b4559a973d14ccd04509d")
add_versions("2.9.0", "bf5d5bad69ee44ff1dd08800c58cb433e9b3bf4dad5d7c6f1dec5d1cf0249d04")
add_configs("icu", {description = "Use the ICU library.", default = false, type = "boolean"})

@ -2,17 +2,20 @@ package("libsdl")
set_homepage("https://www.libsdl.org/")
set_description("Simple DirectMedia Layer")
set_license("zlib")
if is_plat("windows", "mingw") then
set_urls("https://www.libsdl.org/release/SDL2-devel-$(version)-VC.zip")
add_versions("2.0.8", "68505e1f7c16d8538e116405411205355a029dcf2df738dbbc768b2fe95d20fd")
add_versions("2.0.12", "00c55a597cebdb9a4eb2723f2ad2387a4d7fd605e222c69b46099b15d5d8b32d")
add_versions("2.0.14", "232071cf7d40546cde9daeddd0ec30e8a13254c3431be1f60e1cdab35a968824")
add_versions("2.0.16", "f83651227229e059a570aac26be24f5070352c0d23aaf3d2cfbd3eb2c9599334")
else
set_urls("https://www.libsdl.org/release/SDL2-$(version).zip")
add_versions("2.0.8", "e6a7c71154c3001e318ba7ed4b98582de72ff970aca05abc9f45f7cbdc9088cb")
add_versions("2.0.12", "476e84d6fcbc499cd1f4a2d3fd05a924abc165b5d0e0d53522c9604fe5a021aa")
add_versions("2.0.14", "2c1e870d74e13dfdae870600bfcb6862a5eab4ea5b915144aff8d75a0f9bf046")
add_versions("2.0.16", "010148866e2226e5469f2879425d28ff7c572c736cb3fb65a0604c3cde6bfab9")
end
if is_plat("macosx") then

@ -24,12 +24,19 @@ package("openblas")
add_versions("0.3.15", "30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe")
add_versions("0.3.17", "df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f")
add_configs("with_fortran", {description="Compile with fortran enabled.", default = true, type = "boolean"})
add_configs("with_fortran", {description="Compile with fortran enabled.", default = is_plat("linux"), type = "boolean"})
end
if is_plat("linux") then
add_syslinks("pthread")
elseif is_plat("macosx") then
add_frameworks("Accelerate")
end
on_load("macosx", "linux", function (package)
if package:config("with_fortran") then
package:add("syslinks", "gfortran")
end
end)
on_install("windows", function (package)
os.mv(path.join("bin", "libopenblas.dll"), package:installdir("bin"))
@ -38,7 +45,7 @@ package("openblas")
package:addenv("PATH", "bin")
end)
on_install("linux", "mingw@windows,msys", function (package)
on_install("macosx", "linux", "mingw@windows,msys", function (package)
local configs = {}
if package:config("debug") then table.insert(configs, "DEBUG=1") end
if not package:config("shared") then

Loading…
Cancel
Save