From dfbede6a77bf00494f77758f20035726e2db9da2 Mon Sep 17 00:00:00 2001 From: Arthur <72025980+ArthurVasseur@users.noreply.github.com> Date: Fri, 5 Apr 2024 07:49:35 +0900 Subject: [PATCH] add libxcomposite (#3691) * add libxcomposite * fix: missing dep xfixes * fix: typo in libxfixes * fix: changed has_cxxfuncs to has_cfuncs * code review --- packages/l/libxcomposite/xmake.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 packages/l/libxcomposite/xmake.lua diff --git a/packages/l/libxcomposite/xmake.lua b/packages/l/libxcomposite/xmake.lua new file mode 100644 index 000000000..2faea9716 --- /dev/null +++ b/packages/l/libxcomposite/xmake.lua @@ -0,0 +1,29 @@ +package("libxcomposite") + set_homepage("https://www.x.org/") + set_description("libXcomposite provides an X Window System client interface to the Composite extension to the X protocol.") + + set_urls("https://www.x.org/archive/individual/lib/libXcomposite-$(version).tar.gz") + + add_versions("0.4.6", "3599dfcd96cd48d45e6aeb08578aa27636fa903f480f880c863622c2b352d076") + + if is_plat("linux") then + add_extsources("apt::libxcomposite-dev") + end + + if is_plat("macosx", "linux") then + add_deps("pkg-config", "libx11", "libxext", "xorgproto", "libxfixes") + end + + on_install("macosx", "linux", function (package) + local configs = {"--sysconfdir=" .. package:installdir("etc"), + "--localstatedir=" .. package:installdir("var"), + "--disable-dependency-tracking", + "--disable-silent-rules"} + table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) + table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) + import("package.tools.autoconf").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("XCompositeRedirectWindow", {includes = "X11/extensions/Xcomposite.h"})) + end) \ No newline at end of file