Skip to content

Commit

Permalink
Merge branch 'xmake-io:dev' into node-addon-api
Browse files Browse the repository at this point in the history
  • Loading branch information
enzalito authored Jul 12, 2024
2 parents f25411c + e676808 commit 732d7cf
Show file tree
Hide file tree
Showing 109 changed files with 1,526 additions and 188 deletions.
1 change: 1 addition & 0 deletions packages/a/actor-framework/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("actor-framework")
add_urls("https://github.com/actor-framework/actor-framework/archive/refs/tags/$(version).tar.gz",
"https://github.com/actor-framework/actor-framework.git")

add_versions("1.0.0", "602018239d23a1805d35ebda704fd5c969a0693fc513fcf7459063b628459e5b")
add_versions("0.19.6", "48dc4c4abf5ab5a7c6f84b9259cc8be1b02c601d31893647ab44e143cdc4b6d5")
add_versions("0.19.2", "aa3fcc494424e0e20b177125458a6a6ed39c751a3d3d5193054e88bdf8a146d2")

Expand Down
1 change: 1 addition & 0 deletions packages/a/ada/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("ada")
set_urls("https://github.com/ada-url/ada/archive/refs/tags/$(version).tar.gz",
"https://github.com/ada-url/ada.git")

add_versions("v2.9.0", "8b992f0ce9134cb4eafb74b164d2ce2cb3af1900902162713b0e0c5ab0b6acd8")
add_versions("v2.8.0", "83b77fb53d1a9eea22b1484472cea0215c50478c9ea2b4b44b0ba3b52e07c139")
add_versions("v2.7.8", "8de067b7cb3da1808bf5439279aee6048d761ba246bf8a854c2af73b16b41c75")
add_versions("v2.7.7", "7116d86a80b79886efbc9d946d3919801815060ae62daf78de68c508552af554")
Expand Down
27 changes: 27 additions & 0 deletions packages/a/algo_plus/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package("algo_plus")
set_kind("library", {headeronly = true})
set_homepage("https://csrt-ntua.github.io/AlgoPlus")
set_description("AlgoPlus is a C++17 library for complex data structures and algorithms")
set_license("Apache-2.0")

add_urls("https://github.com/CSRT-NTUA/AlgoPlus.git")
add_versions("2024.07.02", "1287dfc5bf666bace15af9c14d03e807b71efa82")

add_deps("nlohmann_json")

on_install(function (package)
for _, file in ipairs(os.files("src/**.h")) do
io.replace(file, "../../../../third_party/json.hpp", "nlohmann/json.hpp", {plain = true})
end
os.cp("src/*", package:installdir("include"))
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
std::vector<std::vector<double> > data;
int CLUSTERS;
kmeans a(data, CLUSTERS);
}
]]}, {configs = {languages = "c++17"}, includes = {"machine_learning/clustering/kmeans/kmeans.h"}}))
end)
1 change: 1 addition & 0 deletions packages/a/assimp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package("assimp")

set_urls("https://github.com/assimp/assimp/archive/refs/tags/$(version).zip",
"https://github.com/assimp/assimp.git")
add_versions("v5.4.2", "03e38d123f6bf19a48658d197fd09c9a69db88c076b56a476ab2da9f5eb87dcc")
add_versions("v5.4.1", "08837ee7c50b98ca72d2c9e66510ca6640681db8800aa2d3b1fcd61ccc615113")
add_versions("v5.4.0", "0f3698e9ba0110df0b636dbdd95706e7e28d443ff3dbaf5828926c23bfff778d")
add_versions("v5.3.1", "f4020735fe4601de9d85cb335115568cce0e027a65e546dd8895081696d624bd")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-cal/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-cal")
add_urls("https://github.com/awslabs/aws-c-cal/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-cal.git")

add_versions("v0.7.1", "2fbdc04d72d1f3af28b80fe3917f03f20c0a62bc22b6c7b3450486ee9cbe77f6")
add_versions("v0.6.15", "67dda8049a59bbb70cdb166f46f741bc3a8443c86009a1ae4cb7842964a76e0d")
add_versions("v0.6.14", "2326304b15bec45b212f6b738020c21afa41f9da295936687e103f9f2efb7b5e")
add_versions("v0.6.12", "1ec1bc9a50df8d620f226480b420ec69d4fefd3792fb4e877aa7e350c2b174dc")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-common/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-common")
add_urls("https://github.com/awslabs/aws-c-common/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-common.git")

add_versions("v0.9.23", "adf838daf6a60aa31268522105b03262d745f529bc981d3ac665424133d6f91b")
add_versions("v0.9.19", "196430fda1bca2c77df7d9199232956d371a92f49ee48fd6c29ff969410ca0ed")
add_versions("v0.9.17", "82f1a88494c5563892f0e048f0f56acfe7e10e5aa3fe9267b956dbabcc043440")
add_versions("v0.9.15", "8f36c7a6a5d2e17365759d15591f800d3e76dcaa34a226389b92647cbd92393a")
Expand Down
1 change: 1 addition & 0 deletions packages/a/aws-c-s3/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("aws-c-s3")
add_urls("https://github.com/awslabs/aws-c-s3/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-c-s3.git")

add_versions("v0.6.0", "0a29dbb13ea003de3fd0d08a61fa705b1c753db4b35de9c464641432000f13ec")
add_versions("v0.5.9", "7a337195b295406658d163b6dac64ff81f7556291b8a8e79e58ebaa2d55178ee")
add_versions("v0.5.7", "2f2eab9bf90a319030fd3525953dc7ac00c8dc8c0d33e3f0338f2a3b554d3b6a")
add_versions("v0.3.17", "72fd93a2f9a7d9f205d66890da249944b86f9528216dc0321be153bf19b2ecd5")
Expand Down
2 changes: 2 additions & 0 deletions packages/a/aws-crt-cpp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package("aws-crt-cpp")
add_urls("https://github.com/awslabs/aws-crt-cpp/archive/refs/tags/$(version).tar.gz",
"https://github.com/awslabs/aws-crt-cpp.git")

add_versions("v0.27.2", "e17c82d7cc3b5e6e4300bc7e4794306e292b5281d212ead536000a8b5f5f1be4")
add_versions("v0.27.0", "e7601c8c5e6391013b6ad164d2dd7b970bf5dbb3693b9cc80c424bd6f42b79c8")
add_versions("v0.26.11", "23acb2b14019182dd73fe6779ec266ee4d8937f19a99803da6407937fa22db7d")
add_versions("v0.26.9", "5b5760d34fbbfcc971f561296e828de4c788750472fd9bd3ac20068a083620f2")
add_versions("v0.26.8", "36ced4fb54c8eb7325b4576134e01f93bfaca2709565b5ad036d198d703e4c8f")
Expand Down
49 changes: 49 additions & 0 deletions packages/a/aws-lc/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package("aws-lc")
set_homepage("https://github.com/aws/aws-lc")
set_description("AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project.")

add_urls("https://github.com/aws/aws-lc/archive/refs/tags/$(version).tar.gz",
"https://github.com/aws/aws-lc.git")

add_versions("v1.31.0", "f2dfe0ef8fe21482b6795da01a1b226f826e9a084833ff8d5371a02f9623c150")

add_configs("jitter", {description = "Enable FIPS entropy source: CPU Jitter", default = false, type = "boolean"})
add_configs("tools", {description = "Build tools", default = false, type = "boolean"})

add_deps("cmake")
if is_plat("windows") then
add_deps("nasm")
end

add_links("ssl", "crypto")

if is_plat("windows", "mingw") then
add_syslinks("ws2_32")
elseif is_plat("linux", "bsd") then
add_syslinks("pthread", "dl", "m")
end

on_install(function (package)
if package:config("shared") and package:is_plat("windows") then
package:add("defines", "BORINGSSL_SHARED_LIBRARY")
end

local configs = {
"-DBUILD_TESTING=OFF",
"-DCMAKE_INSTALL_INCLUDEDIR=include",
"-DBUILD_LIBSSL=ON",
"-DDISABLE_GO=ON", "-DDISABLE_PERL=ON"
}

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"))

table.insert(configs, "-DBUILD_LIBSSL=ON")
table.insert(configs, "-DENABLE_FIPS_ENTROPY_CPU_JITTER=" .. (package:config("jitter") and "ON" or "OFF"))
table.insert(configs, "-DBUILD_TOOL=" .. (package:config("tools") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

on_test(function (package)
assert(package:has_cfuncs("SSL_new", {includes = "openssl/ssl.h"}))
end)
35 changes: 21 additions & 14 deletions packages/b/bdwgc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,36 @@ package("bdwgc")
set_homepage("https://www.hboehm.info/gc/")
set_description("The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)")

add_urls("https://github.com/ivmai/bdwgc/-/archive/$(version).tar.gz",
add_urls("https://github.com/ivmai/bdwgc/archive/refs/tags/$(version).tar.gz",
"https://github.com/ivmai/bdwgc.git")

add_versions("v8.2.6", "3bfc2b1dd385bfb46d2dab029211a66249a309795b6893f4e00554904999e40a")
add_versions("v8.2.4", "18e63ab1428bd52e691da107a6a56651c161210b11fbe22e2aa3c31f7fa00ca5")

add_deps("cmake")
add_deps("libatomic_ops")

on_install("macosx", "linux", "android", "iphoneos", function (package)
local configs = {}
if on_check then
on_check("android", function (package)
if package:is_arch("armeabi-v7a") then
local ndk = package:toolchain("ndk")
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) > 21, "package(bdwgc/armeabi-v7a): need ndk api level > 21")
end
end)
end

on_install("!wasm", function (package)
local configs = {"-Denable_docs=OFF", "-Dwith_libatomic_ops=ON"}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs, {packagedeps = "libatomic_ops"})

if package:is_plat("windows", "mingw", "cygwin") then
package:add("defines", (package:config("shared") and "GC_DLL" or "GC_NOT_DLL"))
end
end)

on_test(function (package)
assert(package:has_cfuncs({test=[[
void test() {
GC_INIT();
int *ptr = GC_MALLOC(sizeof(int));
*ptr = 42;
printf("Value: %d\n", *ptr);
return 0;
}
]]}),{configs = {includes = "gc.h"}})
assert(package:has_cfuncs("GC_init", {includes = "gc/gc.h"}))
end)
29 changes: 25 additions & 4 deletions packages/b/bvh/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
package("bvh")

set_kind("library", {headeronly = true})
set_homepage("https://github.com/madmann91/bvh")
set_description("A modern C++ BVH construction and traversal library")
set_license("MIT")

add_urls("https://github.com/madmann91/bvh.git")
add_versions("2023.6.30", "578b1e8035743d0a97fcac802de81622c54f28e3")
add_versions("2024.7.8", "77a08cac234bae46abbb5e78c73e8f3c158051d0")

on_install(function (package)
if not package:is_plat("cross") then
package:add("cxxflags", "-march=native")
add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
add_configs("c_api", {description = "Builds the C API library wrapper", default = true, type = "boolean"})

if is_plat("bsd") then
add_syslinks("pthread")
end
on_load(function (package)
if not package:config("c_api") then
package:set("kind", "library", {headeronly = true})
end
end)

on_install(function (package)
os.cp("src/bvh", package:installdir("include"))
if package:config("c_api") then
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
set_languages("c++20")
target("bvh_c")
set_kind("shared")
add_defines("BVH_BUILD_API")
add_files("src/bvh/v2/c_api/bvh.cpp")
add_includedirs("src")
]])
import("package.tools.xmake").install(package)
end
end)

on_test(function (package)
Expand Down
1 change: 1 addition & 0 deletions packages/c/cargs/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package("cargs")

add_urls("https://github.com/likle/cargs/archive/refs/tags/$(version).tar.gz",
"https://github.com/likle/cargs.git")
add_versions("v1.2.0", "0b33379e3d3c8cb3e22f33d3e1a260adcd366970868bc9b7c47237f24188ff25")
add_versions("v1.1.0", "87e7da5b539f574d48529870cb0620ef5a244a5ee2eac73cc7559dedc04128ca")
add_versions("v1.0.3", "ddba25bd35e9c6c75bc706c126001b8ce8e084d40ef37050e6aa6963e836eb8b")

Expand Down
1 change: 1 addition & 0 deletions packages/c/cgif/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package("cgif")
add_urls("https://github.com/dloebl/cgif/archive/refs/tags/$(version).tar.gz",
"https://github.com/dloebl/cgif.git")

add_versions("v0.4.1", "8666f9c5f8123d1c22137a6dd714502a330377fb74e2007621926fe4258529d5")
add_versions("v0.4.0", "130ff8a604f047449e81ddddf818bd0e03826b5f468e989b02726b16b7d4742e")

if is_plat("linux") then
Expand Down
9 changes: 5 additions & 4 deletions packages/c/cinatra/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ package("cinatra")
set_description("modern c++(c++20), cross-platform, header-only, easy to use http framework")
set_license("MIT")

add_urls("https://github.com/qicosmos/cinatra/archive/refs/tags/v$(version).tar.gz",
add_urls("https://github.com/qicosmos/cinatra/archive/refs/tags/$(version).tar.gz",
"https://github.com/qicosmos/cinatra.git")

add_versions("0.8.9", "007dc38aceedf42d03a9c05dc9aa6d2f303456ae7ce1100800df7a565b83b510")
add_versions("0.8.0", "4e14d5206408eccb43b3e810d3a1fe228fbc7496ded8a16b041ed12cbcce4479")
add_versions("0.9.1", "d1a8018e41caabbda2c380175b632e3c9c10b519727f6b998eda4e3f4ede84bd")
add_versions("v0.8.9", "007dc38aceedf42d03a9c05dc9aa6d2f303456ae7ce1100800df7a565b83b510")
add_versions("v0.8.0", "4e14d5206408eccb43b3e810d3a1fe228fbc7496ded8a16b041ed12cbcce4479")

add_patches("0.8.9", "patches/0.8.9/windows-move.patch", "c913ed0e9044ffc0ced40516245ec0d55262f8eabd30244d9911c3f0427a60f5")
add_patches(">=0.8.9", "patches/0.8.9/windows-move.patch", "c913ed0e9044ffc0ced40516245ec0d55262f8eabd30244d9911c3f0427a60f5")

add_configs("ssl", {description = "Enable SSL", default = false, type = "boolean"})
add_configs("gzip", {description = "Enable GZIP", default = false, type = "boolean"})
Expand Down
1 change: 1 addition & 0 deletions packages/c/clove-unit/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package("clove-unit")
add_urls("https://github.com/fdefelici/clove-unit/archive/refs/tags/$(version).tar.gz",
"https://github.com/fdefelici/clove-unit.git")

add_versions("v2.4.5", "e4db72612adf00d7c7c9512cb9990768f5f3e62a72039929b78ba17d5a6f4308")
add_versions("v2.4.4", "25e611e1d4286c73d9cce7bbc99f83e00629551602351fec1edcbb669243e047")

on_install(function (package)
Expand Down
22 changes: 22 additions & 0 deletions packages/c/commata/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package("commata")
set_kind("library", {headeronly = true})
set_homepage("https://furfurylic.github.io/commata/CommataSpecification.xml")
set_description("Just another header-only C++17 CSV parser")
set_license("Unlicense")

add_urls("https://github.com/furfurylic/commata/archive/refs/tags/$(version)-rc.2.zip",
"https://github.com/furfurylic/commata.git")
add_versions("v1.0.0", "5f9ef542d10d5d04d296e609ae8931e09a157761c86630d71b2f397c6a205a75")

on_install(function (package)
os.cp("include", package:installdir())
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
using commata::stored_table;
void test() {
stored_table table;
}
]]}, {configs = {languages = "c++17"}, includes = "commata/stored_table.hpp"}))
end)
2 changes: 2 additions & 0 deletions packages/c/cosmocc/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ package("cosmocc")
add_versions("3.3.9", "0a8a781710f58373077a91ca16a2fafc30a0bc3982fb9b9c5583f045833eca36")
add_versions("3.3.10", "00d61c1215667314f66e288c8285bae38cc6137fca083e5bba6c74e3a52439de")
add_versions("3.4.0", "475e24b84a18973312433f5280e267acbe1b4dac1b2e2ebb3cfce46051a8c08c")
add_versions("3.5.0", "6c8443078ce43bf15bb835c8317d6d44e694e1572023263359c082afb7ec2224")
add_versions("3.5.1", "ea1f47cd4ead6ce3038551be164ad357bd45a4b5b7824871c561d2af23f871d6")

on_load("@windows|x64", function (package)
package:add("deps", "msys2")
Expand Down
1 change: 1 addition & 0 deletions packages/c/csvparser/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package("csvparser")
set_description("A modern C++ library for reading, writing, and analyzing CSV (and similar) files (by vincentlaucsb)")

add_urls("https://github.com/vincentlaucsb/csv-parser/archive/refs/tags/$(version).zip")
add_versions("2.3.0", "17eb8e1a4f2f8cdc6679329e4626de608bb33a830d5614184a21b5d8838bbbb0")
add_versions("2.2.3", "83170169f2af38b171d7c3e127d9411fe381988a4b8910465f7d1c4c6169e815")
add_versions("2.2.2", "e8fb8693680f2a0931ef28cb67a1ea007123201c74073fc588c18f5151e29cfd")
add_versions("2.2.1", "96fd6a468f56fc157a11fcbc5cece6da952b06190837c46465d091eff674a813")
Expand Down
30 changes: 30 additions & 0 deletions packages/c/ctpg/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package("ctpg")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/peter-winter/ctpg")
set_description("Compile Time Parser Generator.")
set_license("MIT")

add_urls("https://github.com/peter-winter/ctpg/archive/refs/tags/$(version).tar.gz",
"https://github.com/peter-winter/ctpg.git")

add_versions("v1.3.7", "6cc7c34de4983e21070599fd5693b65ef08cd5c8f42612e43b47eda723623429")

add_deps("cmake")

on_install(function (package)
import("package.tools.cmake").install(package, {
"-DBUILD_TESTING=OFF"
})
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
using namespace ctpg;
using namespace ctpg::buffers;
constexpr nterm<int> list("list");
constexpr char number_pattern[] = "[1-9][0-9]*";
constexpr regex_term<number_pattern> number("number");
void test() {}
]]}, {configs = {languages = "c++17"}, includes = "ctpg/ctpg.hpp"}))
end)
5 changes: 5 additions & 0 deletions packages/d/dartsim/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ package("dartsim")

add_urls("https://github.com/dartsim/dart/archive/refs/tags/$(version).tar.gz",
"https://github.com/dartsim/dart.git")
add_versions("v6.14.4", "f5fc7f5cb1269cc127a1ff69be26247b9f3617ce04ff1c80c0f3f6abc7d9ab70")
add_versions("v6.13.0", "4da3ff8cee056252a558b05625a5ff29b21e71f2995e6d7f789abbf6261895f7")
add_versions("v6.14.2", "6bbaf452f8182b97bf22adeab6cc7f3dc1cd2733358543131fa130e07c0860fc")

add_configs("dartpy", {description = "Build dartpy interface.", default = false, type = "boolean"})
local configdeps = {bullet3 = "Bullet",
Expand Down Expand Up @@ -34,6 +36,9 @@ package("dartsim")
package:add("deps", config)
end
end
if package:config("dartpy") then
package:add("deps", "python 3.x")
end
end)

on_install("windows|x64", "linux", "macosx", function (package)
Expand Down
Loading

0 comments on commit 732d7cf

Please sign in to comment.