xmake.lua 1.1 KB

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