Skip to content

Commit

Permalink
seqan3: add package (#2510)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Aug 31, 2023
1 parent 76ea7a8 commit 199d474
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/s/sdsl-lite/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package("sdsl-lite")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/xxsds/sdsl-lite")
set_description("Succinct Data Structure Library 3.0")

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

add_versions("v3.0.3", "7b3281139f7a6c38049e967dcf1ca1d0cc9b65e62153c2ea163d2c8077dd864b")

add_configs("cereal", {description = "support for serialisation via cereal", default = false, type = "boolean"})

on_load(function (package)
if package:config("cereal") then
package:add("deps", "cereal >=1.3.2")
package:add("defines", "SDSL_CEREAL=1")
end
end)

on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package)
os.cp("include", package:installdir())
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <sdsl/construct.hpp>
void test() {
sdsl::memory_monitor::start();
}
]]}, {configs = {languages = "c++20"}}))
end)
49 changes: 49 additions & 0 deletions packages/s/seqan3/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package("seqan3")
set_kind("library", {headeronly = true})
set_homepage("https://www.seqan.de")
set_description("The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.")
set_license("BSD-3-Clause")

add_urls("https://github.com/seqan/seqan3/archive/refs/tags/$(version).tar.gz",
"https://github.com/seqan/seqan3.git")

add_versions("3.2.0", "80d41dd035407cfec83eb3a4466d0421adc27129af684290c0c4da31421e7276")

add_configs("cereal", {description = "required for serialisation and CTD support", default = false, type = "boolean"})
add_configs("zlib", {description = "required for *.gz and .bam file support", default = false, type = "boolean"})
add_configs("bzip2", {description = "required for *.bz2 file support", default = false, type = "boolean"})

if is_plat("windows") then
add_cxxflags("/Zc:__cplusplus")
elseif is_plat("linux") then
add_syslinks("pthread")
end

add_deps("sdsl-lite")

on_load(function (package)
if package:config("cereal") then
package:add("deps", "cereal >=1.3.1")
end
if package:config("zlib") then
package:add("deps", "zlib >=1.2")
package:add("defines", "SEQAN3_HAS_ZLIB=1")
end
if package:config("bzip2") then
package:add("deps", "bzip2 >=1.0")
package:add("defines", "SEQAN3_HAS_BZIP2=1")
end
end)

on_install("linux", "macosx", "bsd", "android", "iphoneos", "cross", function (package)
os.cp("include", package:installdir())
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <seqan3/core/debug_stream.hpp>
void test() {
seqan3::debug_stream << "Hello World!\n";
}
]]}, {configs = {languages = "c++20"}}))
end)

0 comments on commit 199d474

Please sign in to comment.