|
|
|
@ -6,6 +6,7 @@ package("croaring") |
|
|
|
|
add_urls("https://github.com/RoaringBitmap/CRoaring/archive/refs/tags/$(version).tar.gz", |
|
|
|
|
"https://github.com/RoaringBitmap/CRoaring.git") |
|
|
|
|
|
|
|
|
|
add_versions("v3.0.1", "a1cac9489b1c806c5594073e5db36475e247604282a47b650f4166c185ab061f") |
|
|
|
|
add_versions("v2.0.4", "3c962c196ba28abf2639067f2e2fd25879744ba98152a4e0e74556ca515eda33") |
|
|
|
|
|
|
|
|
|
add_configs("exceptions", {description = "Enable exception-throwing interface", default = false, type = "boolean"}) |
|
|
|
@ -18,7 +19,12 @@ package("croaring") |
|
|
|
|
add_deps("cmake") |
|
|
|
|
|
|
|
|
|
on_install(function (package) |
|
|
|
|
local configs = {"-DBUILD_TESTING=OFF"} |
|
|
|
|
if package:is_plat("bsd") then |
|
|
|
|
-- https://man.freebsd.org/cgi/man.cgi?query=bswap64 |
|
|
|
|
io.replace("include/roaring/portability.h", "byteswap.h", "sys/endian.h", {plain = true}) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local configs = {"-DBUILD_TESTING=OFF", "-DENABLE_ROARING_TESTS=OFF", "-DROARING_USE_CPM=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")) |
|
|
|
|
table.insert(configs, "-DROARING_BUILD_LTO=" .. (package:config("lto") and "ON" or "OFF")) |
|
|
|
|