xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. package("libxcursor")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: X Window System Cursor management library")
  4. set_urls("https://www.x.org/archive/individual/lib/libXcursor-$(version).tar.gz")
  5. add_versions("1.2.1", "77f96b9ad0a3c422cfa826afabaf1e02b9bfbfc8908c5fa1a45094faad074b98")
  6. add_versions("1.2.3", "74e72da27e61cc2cfd2e267c14f500ea47775850048ee0b00362a55c9b60ee9b")
  7. if is_plat("linux") then
  8. add_extsources("apt::libxcursor-dev")
  9. end
  10. if is_plat("macosx", "linux") then
  11. add_deps("pkg-config", "util-macros", "libx11", "libxfixes", "libxrender")
  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("XcursorFileHeader", {includes = "X11/Xcursor/Xcursor.h"}))
  27. end)