xmake.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package("spot")
  2. set_homepage("https://spot.lrde.epita.fr/")
  3. set_description("Spot: a platform for LTL and ω-automata manipulation")
  4. set_license("GPL-3.0")
  5. add_urls("https://www.lrde.epita.fr/dload/spot/spot-$(version).tar.gz")
  6. add_versions("2.13.2", "a412b3bbaef950215a2f71870ee24f01d722338b657cad9839f39acff1841011")
  7. add_versions("2.10.1", "38002989fc8e3725841a0537665bb2d5dfc259d2e09358100322c38f4c7481ad")
  8. if not is_subhost("windows") then
  9. add_deps("autotools")
  10. end
  11. if is_plat("linux") then
  12. add_syslinks("atomic")
  13. end
  14. if on_check then
  15. on_check("android", function (package)
  16. local ndk_sdkver = package:toolchain("ndk"):config("ndk_sdkver")
  17. assert(ndk_sdkver and tonumber(ndk_sdkver) > 22, "package(spot) require ndk version > 22")
  18. end)
  19. end
  20. on_install("linux", "macosx", "android@linux,macosx", "cross", "bsd", "mingw", "msys", function (package)
  21. io.replace("buddy/Makefile.am", [[SUBDIRS = src examples doc]], [[SUBDIRS = src]], {plain = true})
  22. local configs = {"--disable-python"}
  23. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  24. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  25. import("package.tools.autoconf").install(package, configs)
  26. end)
  27. on_test(function (package)
  28. assert(package:check_cxxsnippets({test = [[
  29. #include <spot/tl/parse.hh>
  30. void test() {
  31. spot::formula f = spot::parse_formula("& & G p0 p1 p2");
  32. }
  33. ]]}, {configs = {languages = "c++17"}}))
  34. end)