xmake.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. package("coin-or-asl")
  2. set_homepage("https://github.com/coin-or-tools/ThirdParty-ASL/")
  3. set_description("The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.")
  4. set_license("EPL-1.0")
  5. add_urls("https://github.com/coin-or-tools/ThirdParty-ASL/archive/refs/tags/releases/$(version).tar.gz",
  6. "https://github.com/coin-or-tools/ThirdParty-ASL.git")
  7. add_versions("2.0.1", "92575a7d5264311a53bfec65bec006475c4b5ef3e79d8d84db798d73e8d3567f")
  8. if is_plat("linux") then
  9. add_deps("autoconf", "automake", "libtool", "m4")
  10. add_syslinks("dl")
  11. end
  12. add_includedirs("include", "include/coin-or")
  13. on_install("linux", function (package)
  14. os.vrunv("sh", {"./get.ASL"})
  15. local configs = {}
  16. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  17. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  18. if package:is_debug() then
  19. table.insert(configs, "--enable-debug")
  20. end
  21. import("package.tools.autoconf").install(package, configs)
  22. end)
  23. on_test(function (package)
  24. assert(package:has_cfuncs("ASL_alloc", {includes = "asl/asl.h"}))
  25. end)