xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package("libxdmcp")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: X Display Manager Control Protocol library")
  4. set_urls("https://www.x.org/archive/individual/lib/libXdmcp-$(version).tar.gz")
  5. add_versions("1.1.3", "2ef9653d32e09d1bf1b837d0e0311024979653fe755ad3aaada8db1aa6ea180c")
  6. add_versions("1.1.4", "55041a8ff8992ab02777478c4b19c249c0f8399f05a752cb4a1a868a9a0ccb9a")
  7. if is_plat("linux") then
  8. add_extsources("apt::libxdmcp-dev", "pacman::libxmdcp")
  9. end
  10. if is_plat("macosx", "linux", "bsd") then
  11. add_deps("pkg-config", "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. "--enable-docs=no"}
  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("xdmOpCode", {includes = "X11/Xdmcp.h"}))
  28. end)