xmake.lua 1018 B

123456789101112131415161718192021222324252627
  1. package("libxshmfence")
  2. set_homepage("https://www.x.org/")
  3. set_description("X.Org: Shared memory 'SyncFence' synchronization primitive")
  4. set_urls("https://www.x.org/archive/individual/lib/libxshmfence-$(version).tar.bz2")
  5. add_versions("1.3", "b884300d26a14961a076fbebc762a39831cb75f92bed5ccf9836345b459220c7")
  6. if is_plat("linux") then
  7. add_extsources("apt::libxshmfence-dev")
  8. end
  9. if is_plat("macosx", "linux") then
  10. add_deps("pkg-config", "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. import("package.tools.autoconf").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_ctypes("struct xshmfence", {includes = "X11/xshmfence.h"}))
  21. end)