xmake.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. package("libsais")
  2. set_homepage("https://github.com/IlyaGrebnov/libsais")
  3. set_description("libsais is a library for linear time suffix array, longest common prefix array and burrows wheeler transform construction based on induced sorting algorithm.")
  4. set_license("Apache-2.0")
  5. add_urls("https://github.com/IlyaGrebnov/libsais/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/IlyaGrebnov/libsais.git")
  7. add_versions("v2.7.1", "5f459ad90cd007c30aaefb7d122bba2a4307ea02915c56381be4b331cca92545")
  8. on_install(function (package)
  9. local configs = {}
  10. io.writefile("xmake.lua", [[
  11. add_rules("mode.release", "mode.debug")
  12. target("libsais")
  13. set_kind("$(kind)")
  14. add_files("src/*.c")
  15. add_headerfiles("src/(*.h)")
  16. ]])
  17. if package:config("shared") then
  18. configs.kind = "shared"
  19. end
  20. import("package.tools.xmake").install(package, configs)
  21. end)
  22. on_test(function (package)
  23. assert(package:has_cfuncs("libsais_create_ctx", {includes = "libsais.h"}))
  24. end)