xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package("pffft")
  2. set_homepage("https://bitbucket.org/jpommier/pffft/")
  3. set_description("PFFFT, a pretty fast Fourier Transform.")
  4. set_license("BSD-like (FFTPACK license)")
  5. add_urls("https://bitbucket.org/jpommier/pffft/$(version)", {version = function (version)
  6. local hash = "02fe7715a5bf8bfd914681c53429600f94e0f536"
  7. if version:le("2024.11.29") then
  8. hash = "02fe7715a5bf8bfd914681c53429600f94e0f536"
  9. end
  10. return "get/" .. hash .. ".tar.gz"
  11. end})
  12. add_versions("2024.11.29", "9adeb18ac7bb52e9fb921c31c0c6a4e9ae150cc6fcb20a899d4b3a2275176ded")
  13. add_configs("simd", {description = "Build with SIMD support.", default = true, type = "boolean"})
  14. if not is_plat("windows") then
  15. add_syslinks("m")
  16. end
  17. on_install(function (package)
  18. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  19. local configs = {}
  20. configs.simd = package:config("simd")
  21. import("package.tools.xmake").install(package, configs)
  22. end)
  23. on_test(function (package)
  24. assert(package:has_cfuncs("pffft_simd_size", {includes = "pffft.h"}))
  25. end)