Skip to content

Commit 199d474

Browse files
seqan3: add package (#2510)
1 parent 76ea7a8 commit 199d474

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

packages/s/sdsl-lite/xmake.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package("sdsl-lite")
2+
set_kind("library", {headeronly = true})
3+
set_homepage("https://github.com/xxsds/sdsl-lite")
4+
set_description("Succinct Data Structure Library 3.0")
5+
6+
add_urls("https://github.com/xxsds/sdsl-lite/archive/refs/tags/$(version).tar.gz",
7+
"https://github.com/xxsds/sdsl-lite.git")
8+
9+
add_versions("v3.0.3", "7b3281139f7a6c38049e967dcf1ca1d0cc9b65e62153c2ea163d2c8077dd864b")
10+
11+
add_configs("cereal", {description = "support for serialisation via cereal", default = false, type = "boolean"})
12+
13+
on_load(function (package)
14+
if package:config("cereal") then
15+
package:add("deps", "cereal >=1.3.2")
16+
package:add("defines", "SDSL_CEREAL=1")
17+
end
18+
end)
19+
20+
on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package)
21+
os.cp("include", package:installdir())
22+
end)
23+
24+
on_test(function (package)
25+
assert(package:check_cxxsnippets({test = [[
26+
#include <sdsl/construct.hpp>
27+
void test() {
28+
sdsl::memory_monitor::start();
29+
}
30+
]]}, {configs = {languages = "c++20"}}))
31+
end)

packages/s/seqan3/xmake.lua

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package("seqan3")
2+
set_kind("library", {headeronly = true})
3+
set_homepage("https://www.seqan.de")
4+
set_description("The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.")
5+
set_license("BSD-3-Clause")
6+
7+
add_urls("https://github.com/seqan/seqan3/archive/refs/tags/$(version).tar.gz",
8+
"https://github.com/seqan/seqan3.git")
9+
10+
add_versions("3.2.0", "80d41dd035407cfec83eb3a4466d0421adc27129af684290c0c4da31421e7276")
11+
12+
add_configs("cereal", {description = "required for serialisation and CTD support", default = false, type = "boolean"})
13+
add_configs("zlib", {description = "required for *.gz and .bam file support", default = false, type = "boolean"})
14+
add_configs("bzip2", {description = "required for *.bz2 file support", default = false, type = "boolean"})
15+
16+
if is_plat("windows") then
17+
add_cxxflags("/Zc:__cplusplus")
18+
elseif is_plat("linux") then
19+
add_syslinks("pthread")
20+
end
21+
22+
add_deps("sdsl-lite")
23+
24+
on_load(function (package)
25+
if package:config("cereal") then
26+
package:add("deps", "cereal >=1.3.1")
27+
end
28+
if package:config("zlib") then
29+
package:add("deps", "zlib >=1.2")
30+
package:add("defines", "SEQAN3_HAS_ZLIB=1")
31+
end
32+
if package:config("bzip2") then
33+
package:add("deps", "bzip2 >=1.0")
34+
package:add("defines", "SEQAN3_HAS_BZIP2=1")
35+
end
36+
end)
37+
38+
on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package)
39+
os.cp("include", package:installdir())
40+
end)
41+
42+
on_test(function (package)
43+
assert(package:check_cxxsnippets({test = [[
44+
#include <seqan3/core/debug_stream.hpp>
45+
void test() {
46+
seqan3::debug_stream << "Hello World!\n";
47+
}
48+
]]}, {configs = {languages = "c++20"}}))
49+
end)

0 commit comments

Comments
 (0)