xmake.lua 1.0 KB

12345678910111213141516171819202122232425
  1. package("wigxjpf")
  2. set_homepage("https://fy.chalmers.se/subatom/wigxjpf/")
  3. set_description("WIGXJPF evaluates Wigner 3j, 6j and 9j symbols accurately using prime factorisation and multi-word integer arithmetic.")
  4. set_license("GPL-3.0", "LGPL-3.0")
  5. set_urls("https://fy.chalmers.se/subatom/wigxjpf/wigxjpf-$(version).tar.gz")
  6. add_versions("1.13", "90ab9bfd495978ad1fdcbb436e274d6f4586184ae290b99920e5c978d64b3e6a")
  7. on_install("linux", "macosx", function (package)
  8. local configs = {}
  9. if package:config("shared") then
  10. table.insert(configs, "shared")
  11. end
  12. import("package.tools.make").build(package, configs)
  13. os.cp("inc/*.h", package:installdir("include"))
  14. if package:config("shared") then
  15. os.cp("lib/*.so", package:installdir("lib"))
  16. else
  17. os.cp("lib/*.a", package:installdir("lib"))
  18. end
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("wig3jj", {includes = "wigxjpf.h"}))
  22. end)