xmake.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  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. add_versions("1.0.12", "2402dd938da4d0a332349ab3d3586606175e19cb32cb9fe013c19f1dc922dcee")
  8. if is_plat("linux") then
  9. add_extsources("apt::libxau-dev", "pacman::libxau")
  10. end
  11. if is_plat("macosx", "linux", "bsd", "cross") then
  12. add_deps("pkg-config", "util-macros", "xorgproto")
  13. end
  14. on_install("macosx", "linux", "bsd", "cross", function (package)
  15. local configs = {"--sysconfdir=" .. package:installdir("etc"),
  16. "--localstatedir=" .. package:installdir("var"),
  17. "--disable-dependency-tracking",
  18. "--disable-silent-rules"}
  19. table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
  20. table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
  21. if package:config("pic") then
  22. table.insert(configs, "--with-pic")
  23. end
  24. import("package.tools.autoconf").install(package, configs)
  25. end)
  26. on_test(function (package)
  27. assert(package:has_ctypes("Xauth", {includes = "X11/Xauth.h"}))
  28. end)