xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package("libxau")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: A Sample Authorization Protocol for X")
  4. set_urls("https://www.x.org/archive/individual/lib/libXau-$(version).tar.gz")
  5. add_versions("1.0.10", "51a54da42475d4572a0b59979ec107c27dacf6c687c2b7b04e5cf989a7c7e60c")
  6. add_versions("1.0.11", "3a321aaceb803577a4776a5efe78836eb095a9e44bbc7a465d29463e1a14f189")
  7. if is_plat("linux") then
  8. add_extsources("apt::libxau-dev", "pacman::libxau")
  9. end
  10. if is_plat("macosx", "linux", "bsd") then
  11. add_deps("pkg-config", "util-macros", "xorgproto")
  12. end
  13. on_install("macosx", "linux", "bsd", function (package)
  14. local configs = {"--sysconfdir=" .. package:installdir("etc"),
  15. "--localstatedir=" .. package:installdir("var"),
  16. "--disable-dependency-tracking",
  17. "--disable-silent-rules"}
  18. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  19. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  20. if package:config("pic") then
  21. table.insert(configs, "--with-pic")
  22. end
  23. import("package.tools.autoconf").install(package, configs)
  24. end)
  25. on_test(function (package)
  26. assert(package:has_ctypes("Xauth", {includes = "X11/Xauth.h"}))
  27. end)