diff --git a/recipes/wip/libs/gtk/gtk3/recipe.toml b/recipes/wip/libs/gtk/gtk3/recipe.toml index 9c7b321b..eace30f7 100644 --- a/recipes/wip/libs/gtk/gtk3/recipe.toml +++ b/recipes/wip/libs/gtk/gtk3/recipe.toml @@ -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 +""" \ No newline at end of file diff --git a/recipes/wip/libs/gtk/gtk3/redox.patch b/recipes/wip/libs/gtk/gtk3/redox.patch new file mode 100644 index 00000000..cca54ded --- /dev/null +++ b/recipes/wip/libs/gtk/gtk3/redox.patch @@ -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 + #include + +-#ifdef GDK_WINDOWING_X11 ++#if defined(GDK_WINDOWING_X11) && !defined(__redox__) + #include + #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'] + diff --git a/src/bin/cook.rs b/src/bin/cook.rs index b7e1bf1f..bb26769a 100644 --- a/src/bin/cook.rs +++ b/src/bin/cook.rs @@ -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