From bf625027f36f5c97cebc413f64abdad7098dccee Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Thu, 23 Dec 2021 18:41:46 -0500 Subject: [PATCH] Add ext sources for glib/libffi (#784) --- packages/g/glib/xmake.lua | 4 +++- packages/l/libffi/xmake.lua | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/g/glib/xmake.lua b/packages/g/glib/xmake.lua index e831a4f1b..0ed0840a5 100644 --- a/packages/g/glib/xmake.lua +++ b/packages/g/glib/xmake.lua @@ -26,15 +26,17 @@ package("glib") if is_plat("macosx") then add_syslinks("iconv") add_frameworks("Foundation", "CoreFoundation") + add_extsources("brew::glib") elseif is_plat("linux") then add_syslinks("pthread", "dl") + add_extsources("apt::libglib2.0-dev") end if on_fetch then on_fetch("macosx", "linux", function (package, opt) if opt.system and package.find_package then local result - for _, name in ipairs({"gobject-2.0", "glib-2.0"}) do + for _, name in ipairs({"gobject-2.0", "glib-2.0", "gio-2.0", "gmodule-2.0", "gthread-2.0"}) do local pkginfo = package.find_package and package:find_package("pkgconfig::" .. name, opt) if pkginfo then if not result then diff --git a/packages/l/libffi/xmake.lua b/packages/l/libffi/xmake.lua index 32658a932..1e2ac10b8 100644 --- a/packages/l/libffi/xmake.lua +++ b/packages/l/libffi/xmake.lua @@ -11,8 +11,11 @@ package("libffi") if is_plat("linux") then add_extsources("apt::libffi-dev") + elseif is_plat("macosx") then + add_extsources("brew::libffi") end + on_load("macosx", "linux", "iphoneos", function (package) if package:gitref() then package:add("deps", "autoconf", "automake", "libtool")