From 08b06173bd3c95f0fa532b38533e10e558eec602 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Tue, 22 Sep 2026 23:04:50 +0200 Subject: [PATCH] package/flutter-engine: fix build with pango >= 1.58.0 Buildroot commit c3aa6774563d20901fd1370f51ef105180665b54 bumped pango to 1.58.0 causing a build error with flutter-engine ../../flutter/shell/platform/linux/fl_accessible_text_field.cc:9:1: error: redefinition of 'glib_autoptr_clear_PangoContext' 9 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoContext, g_object_unref) ../../flutter/shell/platform/linux/fl_accessible_text_field.cc:60:3: error: 'cleanup' argument is not a function 60 | g_autoptr(PangoContext) context = get_pango_context(self); with this defconfig: BR2_x86_64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y BR2_PACKAGE_MESA3D_OPENGL_EGL=y BR2_PACKAGE_MESA3D_OPENGL_ES=y BR2_PACKAGE_FLUTTER_ENGINE=y BR2_PACKAGE_LIBGTK3=y Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- .../0005-Fix-building-on-Pango-1.58.0.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/flutter-engine/0005-Fix-building-on-Pango-1.58.0.patch diff --git a/package/flutter-engine/0005-Fix-building-on-Pango-1.58.0.patch b/package/flutter-engine/0005-Fix-building-on-Pango-1.58.0.patch new file mode 100644 index 0000000000..9bb475187b --- /dev/null +++ b/package/flutter-engine/0005-Fix-building-on-Pango-1.58.0.patch @@ -0,0 +1,33 @@ +From f1c316430713ae7d526f8abc1621b09958aef281 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Mon, 21 Sep 2026 22:06:06 +0200 +Subject: [PATCH] Fix building on Pango 1.58.0 + +This version added the autoptr macros which we no longer need to define. + +Upstream: https://github.com/flutter/flutter/pull/193119 + +Signed-off-by: Bernd Kuhls +--- + .../flutter/shell/platform/linux/fl_accessible_text_field.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/engine/src/flutter/shell/platform/linux/fl_accessible_text_field.cc b/engine/src/flutter/shell/platform/linux/fl_accessible_text_field.cc +index e99b123bbfd..f7955a32f07 100644 +--- a/engine/src/flutter/shell/platform/linux/fl_accessible_text_field.cc ++++ b/engine/src/flutter/shell/platform/linux/fl_accessible_text_field.cc +@@ -6,7 +6,11 @@ + #include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h" + #include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h" + ++// PangoContext g_autoptr macro weren't added until 1.58.0. Add them manually. ++// https://gitlab.gnome.org/GNOME/pango/-/commit/223b147 ++#if !PANGO_VERSION_CHECK(1, 58, 0) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoContext, g_object_unref) ++#endif + // PangoLayout g_autoptr macro weren't added until 1.49.4. Add them manually. + // https://gitlab.gnome.org/GNOME/pango/-/commit/0b84e14 + #if !PANGO_VERSION_CHECK(1, 49, 4) +-- +2.47.3 +