xmake.lua 1.2 KB

123456789101112131415161718192021222324252627282930
  1. package("xcb-util-image")
  2. set_homepage("https://xcb.freedesktop.org")
  3. set_description("X.Org: XML-XCB protocol descriptions for libxcb code generation")
  4. set_urls("https://xcb.freedesktop.org/dist/xcb-util-image-$(version).tar.gz")
  5. add_versions("0.3.8", "3d7f6e3e7e73ca0d42154d360ad61a1e16fc62f6bb000f4e69c0d00305d1e00b")
  6. add_versions("0.3.9", "ac7fa09eddc9ecda6fd872d32b6dc23d451a1c6c201873dfe7cac8362c87acf3")
  7. add_versions("0.4.0", "cb2c86190cf6216260b7357a57d9100811bb6f78c24576a3a5bfef6ad3740a42")
  8. if is_plat("linux") then
  9. add_extsources("apt::libxcb-image0-dev", "pacman::xcb-util-image")
  10. end
  11. if is_plat("macosx", "linux") then
  12. add_deps("m4", "pkg-config")
  13. add_deps("xcb-proto", "libxcb", "xcb-util")
  14. end
  15. on_install("macosx", "linux", function (package)
  16. local configs = {"--sysconfdir=" .. package:installdir("etc"),
  17. "--localstatedir=" .. package:installdir("var"),
  18. "--disable-silent-rules"}
  19. import("package.tools.autoconf").install(package, configs)
  20. end)
  21. on_test(function (package)
  22. assert(package:has_cfuncs("xcb_image_create", {includes = "xcb/xcb_image.h"}))
  23. end)