xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package("libxrender")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: Library for the Render Extension to the X11 protocol")
  4. set_urls("https://www.x.org/archive/individual/lib/libXrender-$(version).tar.gz")
  5. add_versions("0.9.11", "6aec3ca02e4273a8cbabf811ff22106f641438eb194a12c0ae93c7e08474b667")
  6. add_versions("0.9.12", "0fff64125819c02d1102b6236f3d7d861a07b5216d8eea336c3811d31494ecf7")
  7. if is_plat("linux") then
  8. add_extsources("apt::libxrender-dev")
  9. end
  10. if is_plat("macosx", "linux") then
  11. add_deps("pkg-config", "libx11", "xorgproto")
  12. end
  13. on_install("macosx", "linux", 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("XRenderColor", {includes = "X11/extensions/Xrender.h"}))
  27. end)