xmake.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. package("libxext")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: Library for common extensions to the X11 protocol")
  4. set_urls("https://www.x.org/archive/individual/lib/libXext-$(version).tar.gz")
  5. add_versions("1.3.5", "1a3dcda154f803be0285b46c9338515804b874b5ccc7a2b769ab7fd76f1035bd")
  6. if is_plat("linux") then
  7. add_extsources("apt::libxext-dev")
  8. end
  9. if is_plat("macosx", "linux") then
  10. add_deps("pkg-config", "libx11", "xorgproto")
  11. end
  12. on_install("macosx", "linux", function (package)
  13. local configs = {"--sysconfdir=" .. package:installdir("etc"),
  14. "--localstatedir=" .. package:installdir("var"),
  15. "--disable-dependency-tracking",
  16. "--disable-silent-rules",
  17. "--enable-specs=no"}
  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("XShapeEvent", {includes = "X11/extensions/shape.h"}))
  27. end)