add b2, update taskflow and cgal (#2064)

* update taskflow

* update cgal

* update taskflow test

* update mpfr

* add b2

* fix for msys2

* try fix b2 with clang toolset
pull/2066/head
Hoildkv 2 years ago committed by GitHub
parent 31cfa58405
commit c39a377cfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 31
      packages/b/b2/xmake.lua
  2. 1
      packages/c/cgal/xmake.lua
  3. 3
      packages/m/mpfr/xmake.lua
  4. 14
      packages/t/taskflow/xmake.lua

@ -0,0 +1,31 @@
package("b2")
set_kind("binary")
set_homepage("https://www.bfgroup.xyz/b2/")
set_description("B2 makes it easy to build C++ projects, everywhere.")
set_license("BSL-1.0")
add_urls("https://github.com/bfgroup/b2/releases/download/$(version)/b2-$(version).zip")
add_versions("4.9.6", "a049f7fdfae4b62353a3f76f34a72c8c87324d1c026cf87febe6c563311bf687")
on_install("@windows", function (package)
os.vrun("bootstrap.bat")
os.vrunv("b2.exe", {"install", "--prefix=" .. package:installdir()})
package:addenv("PATH", ".")
end)
on_install("@macosx", "@linux", "@bsd", "@msys", "@cygwin", function (package)
os.vrun("sh ./bootstrap.sh")
local configs = {"install", "--prefix=" .. package:installdir()}
if package:has_tool("cc", "gcc", "gxx") then
table.insert(configs, "toolset=gcc")
elseif package:has_tool("cc", "clang", "clangxx") then
table.insert(configs, "toolset=clang")
end
os.vrunv("./b2", configs)
package:addenv("PATH", ".")
end)
on_test(function (package)
os.vrun("b2 --help")
end)

@ -9,6 +9,7 @@ package("cgal")
add_versions("5.2.1", "ccdea67db79153417504f50c534cea3bb6b0e9754e7f32fb753fc19005114db0") add_versions("5.2.1", "ccdea67db79153417504f50c534cea3bb6b0e9754e7f32fb753fc19005114db0")
add_versions("5.3", "49ccfb6b72a78d03ab026c6502099ba9358cf604d9d1f51c33e90b314635fe35") add_versions("5.3", "49ccfb6b72a78d03ab026c6502099ba9358cf604d9d1f51c33e90b314635fe35")
add_versions("5.4", "dbca692666866df5979ef14264570b85a00f21cb77a9f9420ec0823ce8fae473") add_versions("5.4", "dbca692666866df5979ef14264570b85a00f21cb77a9f9420ec0823ce8fae473")
add_versions("5.5.2", "77b17ba5d43fe844c0eca7fb7eff7d5687174b037290c390f1251ef44cc4909b")
add_configs("header_only", {description = "Use header only version.", default = true, type = "boolean"}) add_configs("header_only", {description = "Use header only version.", default = true, type = "boolean"})

@ -4,8 +4,9 @@ package("mpfr")
set_description("The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.") set_description("The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.")
set_license("LGPL-3.0") set_license("LGPL-3.0")
add_urls("https://www.mpfr.org/mpfr-current/mpfr-$(version).tar.gz") add_urls("https://www.mpfr.org/mpfr-$(version)/mpfr-$(version).tar.gz")
add_versions("4.1.0", "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6") add_versions("4.1.0", "3127fe813218f3a1f0adf4e8899de23df33b4cf4b4b3831a5314f78e65ffa2d6")
add_versions("4.2.0", "f1cc1c6bb14d18f0c61cc416e083f5e697b6e0e3cf9630b9b33e8e483fc960f0")
if is_plat("mingw") and is_subhost("msys") then if is_plat("mingw") and is_subhost("msys") then
add_extsources("pacman::mpfr") add_extsources("pacman::mpfr")

@ -7,6 +7,7 @@ package("taskflow")
add_urls("https://github.com/taskflow/taskflow.git") add_urls("https://github.com/taskflow/taskflow.git")
add_urls("https://github.com/taskflow/taskflow/archive/$(version).tar.gz") add_urls("https://github.com/taskflow/taskflow/archive/$(version).tar.gz")
add_versions("v3.6.0", "5a1cd9cf89f93a97fcace58fd73ed2fc8ee2053bcb43e047acb6bc121c3edf4c")
add_versions("v3.5.0", "33c44e0da7dfda694d2b431724d6c8fd25a889ad0afbb4a32e8da82e2e9c2a92") add_versions("v3.5.0", "33c44e0da7dfda694d2b431724d6c8fd25a889ad0afbb4a32e8da82e2e9c2a92")
add_versions("v3.4.0", "8f449137d3f642b43e905aeacdf1d7c5365037d5e1586103ed4f459f87cecf89") add_versions("v3.4.0", "8f449137d3f642b43e905aeacdf1d7c5365037d5e1586103ed4f459f87cecf89")
add_versions("v3.3.0", "66b891f706ba99a5ca5ed239d520ad6943ebe94728d1c89e07a939615a6488ef") add_versions("v3.3.0", "66b891f706ba99a5ca5ed239d520ad6943ebe94728d1c89e07a939615a6488ef")
@ -24,21 +25,18 @@ package("taskflow")
on_test(function (package) on_test(function (package)
assert(package:check_cxxsnippets({test = [[ assert(package:check_cxxsnippets({test = [[
#include <assert.h> #include <taskflow/taskflow.hpp>
#include <taskflow/algorithm/for_each.hpp>
static void test() { static void test() {
tf::Executor executor; tf::Executor executor;
tf::Taskflow taskflow; tf::Taskflow taskflow;
std::vector<int> range(10); std::vector<int> range(10);
std::iota(range.begin(), range.end(), 0); std::iota(range.begin(), range.end(), 0);
taskflow.for_each(range.begin(), range.end(), [&] (int i) { taskflow.for_each(range.begin(), range.end(), [&] (int i) {
printf("for_each on container item: %d\n", i); printf("for_each on container item: %d\n", i);
}); });
executor.run(taskflow).wait();
executor.run(taskflow).get();
} }
]]}, {configs = {languages = "c++1z"}, includes = "taskflow/taskflow.hpp"})) ]]}, {configs = {languages = "c++17"}}))
end) end)

Loading…
Cancel
Save