[Buildroot] [PATCH 1/1] package/libgtk3: Remove atk-bridge from .pc file

Adrian Perez de Castro aperez at igalia.com
Thu Apr 13 14:13:47 UTC 2023


Hello,

On Thu, 13 Apr 2023 00:26:40 +0200 Stefan Ott via buildroot <buildroot at buildroot.org> wrote:
> The dependency is supposed to be optional but it always ends up in the
> .pc file. This leads to issues when building packages that depend on
> libgtk3 and are unable to find atk-bridge:
> 
> > output/build/gcr-3.40.0/meson.build:57:2: ERROR: Dependency lookup for gtk+-3.0 with method 'pkgconfig' failed: Could not generate cargs for gtk+-3.0:
> > Package atk-bridge-2.0 was not found in the pkg-config search path.
> > Perhaps you should add the directory containing `atk-bridge-2.0.pc'
> > to the PKG_CONFIG_PATH environment variable
> > Package 'atk-bridge-2.0', required by 'gtk+-3.0', not found
> 
> This change modifies the original patch so that the dependency is only
> added to the .pc file if atk-bridge is present.

This fixes building WebKitGTK for X11.

Coincidentally I was just a couple of days ago starting to work on the update
to 2.40.x, and noticed that the build recipe enforces (X11 xor Wayland)
support in WebKitGTK, but it is possible to build support for both at the same
time (which is what most Linux distributions do). While testing the different
build options I ran into pkg-config complaining about the missing
atk-bridge-2.0 module, which in turn made CMake skip picking the preprocessor
flags properly and then WebKit failing to build.

> Signed-off-by: Stefan Ott <stefan at ott.net>

Tested-by: Adrian Perez de Castro <aperez at igalia.com>
Reviewed-by: Adrian Perez de Castro <aperez at igalia.com>

> ---
>  package/libgtk3/0001-disable-atk-bridge.patch | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/package/libgtk3/0001-disable-atk-bridge.patch b/package/libgtk3/0001-disable-atk-bridge.patch
> index f3e9bff2ba..8127b97253 100644
> --- a/package/libgtk3/0001-disable-atk-bridge.patch
> +++ b/package/libgtk3/0001-disable-atk-bridge.patch
> @@ -39,3 +39,14 @@ Signed-off-by: Hadrien Boutteville <hadrien.boutteville at gmail.com>
>   
>     backend_immodules += ['xim']
>   
> +@@ -588,7 +588,9 @@
> +     x11_pkgs += ['xdamage']
> +   endif
> +
> +-  atk_pkgs += ['atk-bridge-2.0']
> ++  if atkbridge_dep.found()
> ++    atk_pkgs += ['atk-bridge-2.0']
> ++  endif
> +
> +   cdata.set('HAVE_XDAMAGE', xdamage_dep.found() ? 1 : false)
> +   cdata.set('HAVE_XCURSOR', xcursor_dep.found() ? 1 : false)
> -- 
> 2.40.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

Cheers,
—Adrián
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20230413/fd4634a5/attachment-0001.asc>


More information about the buildroot mailing list