Skip to content

Commit fa55ba4

Browse files
SFGrenadeluadebug
andauthored
libui: update to 2025.3.15 (#10440)
* libui: update to 2025.3.15 and make it buildable again * remove commented code that caused an error because both `--default-library` and `-Ddefault_library` being set * Add '/usr/share/pkgconfig' to pkg-config path * Update xmake.lua * Add Linux support for GTK3 dependencies * Add Linux platform support for libui * Try to supply link order Removed Linux-specific library links and added logic to ensure link order during installation. * Update xmake.lua * assume add_links for linux os * Add links for Pango libraries * Remove shared-mime-info dependency from gdk-pixbuf Remove shared-mime-info dependency from gdk-pixbuf build to prevent issues on systems without it. --------- Co-authored-by: Saikari <lin@sz.cn.eu.org>
1 parent 64438e1 commit fa55ba4

4 files changed

Lines changed: 25 additions & 5 deletions

File tree

packages/g/gdk-pixbuf/xmake.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ package("gdk-pixbuf")
6565
io.gsub("meson.build", "subdir%('fuzzing'%)", "")
6666
io.gsub("meson.build", "subdir%('docs'%)", "")
6767

68+
-- shared-mime-info has no libraries/includes, it only provides the mime database which
69+
-- gdk-pixbuf uses at build time. Keeping it in gdk_pixbuf_deps makes it leak into the
70+
-- generated gdk-pixbuf-2.0.pc (as Requires/Requires.private), hard-failing every consumer
71+
-- (e.g. libui/gtk3 meson) on systems without a system shared-mime-info.pc, because
72+
-- shared-mime-info is a binary package and its share/pkgconfig is not in PKG_CONFIG_PATH.
73+
io.gsub("meson.build", "shared_mime_dep,%s*\r?\n", "")
74+
6875
if not package:is_plat("linux") then
6976
io.replace("meson.build", "cc.find_library('intl', required: false)", "dependency('libintl')", {plain = true})
7077
end

packages/l/libui/xmake.lua

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,31 @@ package("libui")
44

55
set_urls("https://github.com/libui-ng/libui-ng.git")
66
add_versions("2022.12.3", "8c82e737eea2f8ab3667e227142abd2fd221f038")
7+
add_versions("2025.3.15", "43ba1ef553c8993a43a67f1ce6e35983a2660d8c")
78

89
add_deps("meson", "ninja")
910

1011
if is_plat("macosx") then
1112
add_frameworks("CoreGraphics", "CoreText", "Foundation", "AppKit")
12-
elseif is_plat("windows") then
13-
add_syslinks("user32", "ole32", "gdi32", "d2d1", "dwrite", "comctl32", "windowscodecs")
1413
elseif is_plat("linux") then
15-
add_deps("gtk+3", "glib")
14+
add_links("ui", "pango-1.0", "pangoxft-1.0", "pangocairo-1.0", "pangoft2-1.0")
15+
elseif is_plat("windows") then
16+
-- the windows meson build file links all of these with a todo to prune the list
17+
add_syslinks("user32", "kernel32", "gdi32", "comctl32", "uxtheme", "msimg32", "comdlg32", "d2d1", "dwrite", "ole32", "oleaut32", "oleacc", "uuid", "windowscodecs")
1618
end
1719

20+
on_load("linux", function (package)
21+
if package:config("shared") then
22+
package:add("deps", "gtk3", {configs = {shared = true}})
23+
else
24+
package:add("deps", "gtk3")
25+
end
26+
package:add("deps", "glib", "gdk-pixbuf", "shared-mime-info")
27+
end)
28+
1829
on_install("linux", "macosx", "windows", function (package)
1930
local configs = {"-Dexamples=false", "-Dtests=false"}
20-
table.insert(configs, "--default-library=" .. (package:config("shared") and "shared" or "static"))
31+
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
2132
import("package.tools.meson").install(package, configs)
2233
end)
2334

packages/p/pango/xmake.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ package("pango")
3131

3232
add_includedirs("include", "include/pango-1.0")
3333

34+
add_links("pangocairo-1.0", "pangoxft-1.0", "pangoft2-1.0", "pango-1.0")
35+
3436
on_load(function (package)
3537
for _, name in ipairs({"fontconfig", "cairo", "freetype", "libthai"}) do
3638
if package:config(name) then

packages/p/pkg-config/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package("pkg-config")
1717
end)
1818

1919
on_install("@macosx", "@linux", "@bsd", function (package)
20-
local pcpath = {"/usr/local/lib/pkgconfig", "/usr/lib/pkgconfig"}
20+
local pcpath = {"/usr/local/lib/pkgconfig", "/usr/lib/pkgconfig", "/usr/share/pkgconfig"}
2121
if package:is_plat("linux") and package:is_arch("x86_64") then
2222
table.insert(pcpath, "/usr/lib64/pkgconfig")
2323
table.insert(pcpath, "/usr/lib/x86_64-linux-gnu/pkgconfig")

0 commit comments

Comments
 (0)