xmake.lua 1016 B

12345678910111213141516171819202122232425262728
  1. package("xcb-util-errors")
  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-errors-$(version).tar.gz")
  5. add_versions("1.0", "7752a722e580efdbada30632cb23aed35c18757399ac3b547b59fd7257cf5e33")
  6. if is_plat("linux") then
  7. add_extsources("pacman::xcb-util-errors")
  8. end
  9. if is_plat("macosx", "linux") then
  10. add_deps("m4", "pkg-config")
  11. add_deps("xcb-proto", "libxcb")
  12. end
  13. on_install("macosx", "linux", function (package)
  14. local configs = {"--sysconfdir=" .. package:installdir("etc"),
  15. "--localstatedir=" .. package:installdir("var"),
  16. "--disable-silent-rules"}
  17. import("package.tools.autoconf").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("xcb_errors_context_new", {includes = "xcb/xcb_errors.h"}))
  21. end)