diff --git a/packages/a/at-spi2-core/xmake.lua b/packages/a/at-spi2-core/xmake.lua index fd0abf709..c16097cd8 100644 --- a/packages/a/at-spi2-core/xmake.lua +++ b/packages/a/at-spi2-core/xmake.lua @@ -18,6 +18,8 @@ package("at-spi2-core") local configs = {} table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) import("package.tools.meson").install(package, configs, {packagedeps = {"glib", "libiconv", "libx11", "libxtst", "libxi", "dbus"}}) + local atspi_pkgconfig_dir = package:installdir("lib/pkgconfig/atspi-2.pc") + io.replace(atspi_pkgconfig_dir, [[-DG_LOG_DOMAIN="dbind"]], [[-DG_LOG_DOMAIN=\"dbind\"]]) end) on_test(function (package) diff --git a/packages/g/gdk-pixbuf/xmake.lua b/packages/g/gdk-pixbuf/xmake.lua index 6931bc2c3..6d8699ef4 100644 --- a/packages/g/gdk-pixbuf/xmake.lua +++ b/packages/g/gdk-pixbuf/xmake.lua @@ -55,6 +55,8 @@ package("gdk-pixbuf") "-Dtests=false", "-Dinstalled_tests=false"} table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) + + package:addenv("PATH", "bin") import("package.tools.meson").install(package, configs, {packagedeps = {"libjpeg-turbo", "libpng", "libtiff", "glib", "pcre2", "libintl", "libiconv"}}) end) diff --git a/packages/g/gtk+3/xmake.lua b/packages/g/gtk+3/xmake.lua deleted file mode 100644 index 68d304912..000000000 --- a/packages/g/gtk+3/xmake.lua +++ /dev/null @@ -1,12 +0,0 @@ -package("gtk+3") - - set_homepage("https://gtk.org/") - set_description("Toolkit for creating graphical user interfaces") - set_license("LGPL-2.0-or-later") - - on_fetch("linux", function (package, opt) - if opt.system and package.find_package then - return package:find_package("pkgconfig::gtk+-3.0") - end - end) - diff --git a/packages/g/gtk3/xmake.lua b/packages/g/gtk3/xmake.lua new file mode 100644 index 000000000..c5621c4af --- /dev/null +++ b/packages/g/gtk3/xmake.lua @@ -0,0 +1,44 @@ +package("gtk3") + + set_homepage("https://gtk.org/") + set_description("Toolkit for creating graphical user interfaces") + set_license("LGPL-2.0-or-later") + + add_urls("https://gitlab.gnome.org/GNOME/gtk/-/archive/3.24.43/gtk-$(version).tar.gz") + add_versions("3.24.43", "ab197f76719fc875067671247533f8e5bd2bc090568ec17317de410d06397b7f") + + on_fetch("linux", function (package, opt) + if opt.system and package.find_package then + return package:find_package("pkgconfig::gtk+-3.0") + end + end) + + if is_plat("linux") then + add_syslinks("rt") + end + + add_includedirs("include", "include/gtk-3.0") + + add_deps("meson", "ninja") + add_deps("cairo", {configs = {glib = true}}) + add_deps("glib", "gdk-pixbuf", "pango", "libepoxy", "graphene", "libxkbcommon", "libxext") + add_deps("libx11", "libxfixes", "libxcursor", "libxi", "libxcomposite", "libxrandr", "libxdamage", "libxinerama", "at-spi2-core") + add_links("gtk-3", "gdk-3", "gailutil-3", "X11", "X11-cxb", "pangocairo-1.0", "pango", "rt") + + on_install("linux", function (package) + local configs = {"-Dintrospection=false", "-Ddemos=false", "-Dexamples=false", "-Dtests=false"} + table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static")) + io.replace("gdk/x11/gdkglcontext-x11.c", [[cairo/cairo-xlib.h]], [[cairo-xlib.h]], {plain = true}) + import("package.tools.meson").install(package, configs, {packagedeps = {"libx11", + "libxext", + "libxi", + "at-spi2-core", + "cairo", + "libthai", + "libdatrie", + "gdk-pixbuf"}}) + end) + + on_test(function (package) + assert(package:has_cfuncs("gtk_application_new", {includes = "gtk/gtk.h"})) + end) \ No newline at end of file diff --git a/packages/l/libepoxy/xmake.lua b/packages/l/libepoxy/xmake.lua index 2d165bbe8..ac20a04b8 100644 --- a/packages/l/libepoxy/xmake.lua +++ b/packages/l/libepoxy/xmake.lua @@ -13,6 +13,7 @@ package("libepoxy") if is_plat("linux") then add_extsources("apt::libepoxy-dev") add_deps("libx11", "pkg-config") + add_syslinks("pthread", "dl") end add_deps("meson", "ninja")