xmake.lua 1.1 KB

1234567891011121314151617181920212223242526
  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_versions("3.0.5", "a9a0226bf85e0d83c41a8ebe4e3e690e1348682f6a2a7838f1b8cbff1b799bcf")
  8. add_deps("autoconf", "automake", "libtool")
  9. on_install("macosx", "linux", "bsd", function (package)
  10. local configs = {}
  11. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  12. if package:debug() then
  13. table.insert(configs, "--enable-debug")
  14. end
  15. if package:is_plat("linux") and package:config("pic") ~= false then
  16. table.insert(configs, "--with-pic")
  17. end
  18. import("package.tools.autoconf").install(package, configs)
  19. end)
  20. on_test(function (package)
  21. assert(package:has_cfuncs("zimg_image_format_default", {includes = "zimg.h"}))
  22. end)