xmake.lua 1.0 KB

12345678910111213141516171819202122232425
  1. package("zimg")
  2. set_homepage("https://github.com/sekrit-twc/zimg")
  3. set_description("Scaling, colorspace conversion, and dithering library")
  4. set_license("WTFPL")
  5. add_urls("https://github.com/sekrit-twc/zimg/archive/refs/tags/release-$(version).tar.gz")
  6. add_versions("3.0.3", "5e002992bfe8b9d2867fdc9266dc84faca46f0bfd931acc2ae0124972b6170a7")
  7. add_deps("autoconf", "automake", "libtool")
  8. on_install("macosx", "linux", "bsd", function (package)
  9. local configs = {}
  10. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  11. if package:debug() then
  12. table.insert(configs, "--enable-debug")
  13. end
  14. if package:is_plat("linux") and package:config("pic") ~= false then
  15. table.insert(configs, "--with-pic")
  16. end
  17. import("package.tools.autoconf").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("zimg_image_format_default", {includes = "zimg.h"}))
  21. end)