gtk3: fix compilation

This commit is contained in:
Jeremy Soller 2025-05-04 19:59:34 -06:00
parent 484186ef02
commit 9772ec2a7f
No known key found for this signature in database
GPG Key ID: 670FDFB5428E05CA
3 changed files with 86 additions and 11 deletions

View File

@ -1,18 +1,49 @@
#TODO probably missing dependencies, see https://docs.gtk.org/gtk3/building.html#dependencies
#TODO port to orbital
[source]
tar = "https://download.gnome.org/sources/gtk+/3.24/gtk%2B-3.24.37.tar.xz"
tar = "https://download.gnome.org/sources/gtk+/3.24/gtk%2B-3.24.43.tar.xz"
blake3 = "5feab2bad81e6b5906895f70ddce6227cf96a6a14b16af0ef72c79991a48ddf4"
patches = ["redox.patch"]
[build]
template = "configure"
dependencies = [
"glib",
"gdk-pixbuf",
"pango",
"cairo",
"libepoxy",
"atk",
"gobject-introspection",
"cairo",
"expat",
"fontconfig",
"freetype2",
"fribidi",
"gdk-pixbuf",
"gettext",
"glib",
#TODO "gobject-introspection",
"harfbuzz",
"libepoxy",
"libffi",
"libiconv",
"libjpeg",
"libpng",
"libpthread-stubs",
"libx11",
"libxau",
"libxcb",
"libxext",
"libxfixes",
"libxi",
"libxrandr",
"libxrender",
"pango",
"pcre2",
"pixman",
"shared-mime-info",
"graphene",
"gstreamer",
"x11proto",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
#TODO: why are libs not automatically detected?
cookbook_meson \
-Dc_args="-DM_SQRT2=1.41421356237309504880 -lXext -lX11 -lxcb -lXau" \
-Dintrospection=false \
-Dwayland_backend=false
"""

View File

@ -0,0 +1,42 @@
diff -ruwN gtk+-3.24.43/gtk/a11y/gtkaccessibility.c source/gtk/a11y/gtkaccessibility.c
--- gtk+-3.24.43/gtk/a11y/gtkaccessibility.c 2024-07-10 11:03:14.000000000 -0600
+++ source/gtk/a11y/gtkaccessibility.c 2025-05-04 19:46:06.985224833 -0600
@@ -37,7 +37,7 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkaccessible.h>
-#ifdef GDK_WINDOWING_X11
+#if defined(GDK_WINDOWING_X11) && !defined(__redox__)
#include <atk-bridge.h>
#endif
@@ -254,7 +254,7 @@
}
}
-#ifdef GDK_WINDOWING_X11
+#if defined(GDK_WINDOWING_X11) && !defined(__redox__)
/*
* If the focus widget is a GtkSocket without a plug
* then ignore the focus notification as the embedded
@@ -986,7 +986,7 @@
_gtk_accessibility_override_atk_util ();
do_window_event_initialization ();
-#ifdef GDK_WINDOWING_X11
+#if defined(GDK_WINDOWING_X11) && !defined(__redox__)
atk_bridge_adaptor_init (NULL, NULL);
#endif
diff -ruwN gtk+-3.24.43/meson.build source/meson.build
--- gtk+-3.24.43/meson.build 2024-07-10 11:03:14.000000000 -0600
+++ source/meson.build 2025-05-04 18:36:13.187091118 -0600
@@ -565,7 +565,7 @@
xfixes_dep = dependency('xfixes', required: false)
xcomposite_dep = dependency('xcomposite', required: false)
fontconfig_dep = dependency('fontconfig', fallback: ['fontconfig', 'fontconfig_dep'])
- atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
+ #TODO atkbridge_dep = dependency('atk-bridge-2.0', version: at_spi2_atk_req)
backend_immodules += ['xim']

View File

@ -843,6 +843,8 @@ function cookbook_meson {
echo "strip = '${STRIP}'" >> cross_file.txt
echo "pkg-config = '${PKG_CONFIG}'" >> cross_file.txt
echo "llvm-config = '${TARGET}-llvm-config'" >> cross_file.txt
echo "glib-compile-resources = 'glib-compile-resources'" >> cross_file.txt
echo "glib-compile-schemas = 'glib-compile-schemas'" >> cross_file.txt
echo "[host_machine]" >> cross_file.txt
echo "system = 'redox'" >> cross_file.txt