瀏覽代碼

gdk-pixbuf: add extsources

star9029 1 年之前
父節點
當前提交
ff3e749091
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8 3
      packages/g/gdk-pixbuf/xmake.lua

+ 8 - 3
packages/g/gdk-pixbuf/xmake.lua

@@ -1,5 +1,4 @@
 package("gdk-pixbuf")
-
     set_homepage("https://docs.gtk.org/gdk-pixbuf/")
     set_description("GdkPixbuf is a library that loads image data in various formats and stores it as linear buffers in memory. The buffers can then be scaled, composited, modified, saved, or rendered.")
     set_license("LGPL-2.1")
@@ -14,6 +13,14 @@ package("gdk-pixbuf")
 
     add_patches("2.42.6", path.join(os.scriptdir(), "patches", "2.42.6", "macosx.patch"), "ad2705a5a9aa4b90fb4588bb567e95f5d82fccb6a5d463cd07462180e2e418eb")
 
+    if is_plat("mingw") and is_subhost("msys") then
+        add_extsources("pacman::gdk-pixbuf2")
+    elseif is_plat("linux") then
+        add_extsources("pacman::gdk-pixbuf2", "apt::libgdk-pixbuf-2.0-dev")
+    elseif is_plat("macosx") then
+        add_extsources("brew::gdk-pixbuf")
+    end
+
     add_includedirs("include", "include/gdk-pixbuf-2.0")
 
     add_deps("meson", "ninja")
@@ -23,12 +30,10 @@ package("gdk-pixbuf")
         add_deps("pkgconf", "libintl")
     elseif is_plat("macosx") then
         add_frameworks("Foundation", "CoreFoundation", "AppKit")
-        add_extsources("brew::gdk-pixbuf")
         add_deps("libiconv", {system = true})
         add_syslinks("resolv")
     elseif is_plat("linux") then
         add_deps("libiconv")
-        add_extsources("pacman::gdk-pixbuf2")
     end
 
     on_install("windows", "macosx", "linux", function (package)