Bug 269963

Summary: x11-toolkits/gtk30: Depends on accessibility/at-spi2-core despite unsetting ATK_BRIDGE
Product: Ports & Packages Reporter: Corey Halpin <chalpin>
Component: Individual Port(s)Assignee: freebsd-desktop (Team) <desktop>
Status: Closed FIXED    
Severity: Affects Only Me CC: eduardo, graahnul.grom, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269996
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275567
Bug Depends on:    
Bug Blocks: 275567    

Description Corey Halpin 2023-03-04 21:48:05 UTC
/usr/local/etc/poudriere.d/hobbes-make.conf contains:

```
OPTIONS_UNSET+= AVAHI COLORD CUPS DBUS GCONF GSETTINGS JACK LINUX
OPTIONS_UNSET+= MDNSRESPONDER PLATFORM_WAYLAND PULSEAUDIO SNDIO
OPTIONS_UNSET+= WAYLAND
x11-toolkits_gtk30_UNSET+= ATK_BRIDGE
```

As I understand it, the above set of options *should* mean that gtk3 will be built without depending on any ATK components. It did previously work this way.


And yet, `poudriere bulk -j 131_amd64 -z hobbes -c -vvv x11-toolkits/gtk30` produces:
```
[00:00:00] Creating the reference jail... done
[00:00:01] Mounting system devices for 131_amd64-default-hobbes
[00:00:01] Mounting ports/packages/distfiles
[00:00:01] Stashing existing package repository
[00:00:01] Mounting ccache from: /var/cache/ccache
[00:00:01] Mounting packages from: /usr/local/poudriere/data/packages/131_amd64-default-hobbes
[00:00:01] Appending to make.conf: /usr/local/etc/poudriere.d/hobbes-make.conf
/etc/resolv.conf -> /usr/local/poudriere/data/.m/131_amd64-default-hobbes/ref/etc/resolv.conf
[00:00:01] Starting jail 131_amd64-default-hobbes
[00:00:01] Will build as nobody: (65534:65534)
[00:00:02] Logs: /usr/local/poudriere/data/logs/bulk/131_amd64-default-hobbes/2023-03-04_15h35m11s
[00:00:02] Loading MOVED for /usr/local/poudriere/data/.m/131_amd64-default-hobbes/ref/usr/ports
[00:00:04] Ports supports: FLAVORS SELECTED_OPTIONS
[00:00:04] Gathering ports metadata
[00:00:04] x11-toolkits/gtk30 depends on accessibility/at-spi2-core
[00:00:04] x11-toolkits/gtk30 depends on converters/fribidi
[00:00:04] x11-toolkits/gtk30 depends on devel/ccache
[00:00:04] x11-toolkits/gtk30 depends on devel/gettext-runtime
[00:00:04] x11-toolkits/gtk30 depends on devel/gettext-tools
[00:00:04] x11-toolkits/gtk30 depends on devel/glib20
[00:00:04] x11-toolkits/gtk30 depends on devel/gmake
[00:00:04] x11-toolkits/gtk30 depends on devel/gobject-introspection
[00:00:04] x11-toolkits/gtk30 depends on devel/pkgconf
[00:00:04] x11-toolkits/gtk30 depends on graphics/cairo
[00:00:04] x11-toolkits/gtk30 depends on graphics/gdk-pixbuf2
[00:00:04] x11-toolkits/gtk30 depends on graphics/gtk-update-icon-cache
[00:00:04] x11-toolkits/gtk30 depends on graphics/libepoxy
[00:00:04] x11-toolkits/gtk30 depends on graphics/librsvg2-rust
[00:00:04] x11-toolkits/gtk30 depends on lang/perl5.32
[00:00:04] x11-toolkits/gtk30 depends on misc/hicolor-icon-theme
[00:00:04] x11-toolkits/gtk30 depends on ports-mgmt/pkg
[00:00:04] x11-toolkits/gtk30 depends on print/freetype2
[00:00:04] x11-toolkits/gtk30 depends on print/harfbuzz
[00:00:04] x11-toolkits/gtk30 depends on x11-fonts/fontconfig
[00:00:04] x11-toolkits/gtk30 depends on x11-themes/adwaita-icon-theme
[00:00:04] x11-toolkits/gtk30 depends on x11-toolkits/pango
[00:00:04] x11-toolkits/gtk30 depends on x11/libX11
[00:00:04] x11-toolkits/gtk30 depends on x11/libXcomposite
[00:00:04] x11-toolkits/gtk30 depends on x11/libXcursor
[00:00:04] x11-toolkits/gtk30 depends on x11/libXdamage
[00:00:04] x11-toolkits/gtk30 depends on x11/libXext
[00:00:04] x11-toolkits/gtk30 depends on x11/libXfixes
[00:00:04] x11-toolkits/gtk30 depends on x11/libXi
[00:00:04] x11-toolkits/gtk30 depends on x11/libXinerama
[00:00:04] x11-toolkits/gtk30 depends on x11/libXrandr
[00:00:04] x11-toolkits/gtk30 depends on x11/libXrender
(snip)
```

From looking at the gtk30 Makefile, it is not at all obvious to me where the dependency that poudriere is reporting actually comes from. Details on how to restore the previous behavior would be appreciated.
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2023-03-05 13:57:09 UTC
Moin moin 

As the bridge is now part of the at-spi2-core package, which gtk30 depends on via its dependency on atk (via USE_GNOME=atk) -- which also is provided by the at-spi2-core package, this option has become redundant, and should be removed.


mfg Tobias
Comment 2 Corey Halpin 2023-03-05 14:10:41 UTC
This would imply that there is now no longer any way, at all, to build gtk30 without depending on dbus. That would be an extremely disappointing regression.
Comment 3 Dmitry Pryakhin 2023-03-06 20:17:41 UTC
I've filed a bug report #269996 [1] with patch that
makes it possible to build accessibility/at-spi2-core
without dbus, while providing the ATK library, which
is used by many other ports.
Please take a look.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269996

Regards,
Dmitry.
Comment 4 Corey Halpin 2023-03-06 23:15:04 UTC
After applying the patch from 269996 and adding `accessibility_at-spi2-core_SET+= ATKONLY` to my `make.conf`, the correct behavior is restored. Thank you.

Personally, I would *much* prefer this solution to removing the `ATK_BRIDGE` option from x11-toolkits/gtk30.
Comment 5 Corey Halpin 2023-08-09 15:36:39 UTC
With https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269996 sorted, I think this can now be closed.
Comment 6 Nuno Teixeira freebsd_committer freebsd_triage 2023-12-10 11:24:44 UTC
ATK_BRIDGE removed from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275567 update
Comment 7 Nuno Teixeira freebsd_committer freebsd_triage 2023-12-10 11:25:12 UTC
Closing this one now.
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-12-23 18:15:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a1dd69c3167141ace3cb39e897fd6e6ee0026c1

commit 0a1dd69c3167141ace3cb39e897fd6e6ee0026c1
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-12-23 12:56:37 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-12-23 18:14:13 +0000

    x11-toolkits/gtk30: Update to 3.24.38

    - Switch to DISTVERSION
    - Switch to meson build
    - Fix ATK_BRIGDE option (deps run detection: #PR269963)
    - Group backends into multi option (at least one backend needed to build)
    - Pet portlint, portclippy and portfmt

    ChangeLog:      https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/NEWS
    PR:             269963, 275567
    Exp-run by:     antoine

 x11-toolkits/gtk30/Makefile                        |  107 +-
 x11-toolkits/gtk30/distinfo                        |    6 +-
 x11-toolkits/gtk30/files/patch-Makefile.in (gone)  |   11 -
 x11-toolkits/gtk30/files/patch-atk-bridge-option   |  124 +-
 x11-toolkits/gtk30/files/patch-configure (gone)    |   28 -
 .../gtk30/files/patch-docs_Makefile.in (gone)      |   20 -
 .../patch-docs_reference_gtk_Makefile.in (gone)    |   10 -
 .../patch-docs_reference_gtk_meson.build (new)     |   10 +
 .../gtk30/files/patch-gtk_gtkbuilderparser.c       |    8 +-
 .../gtk30/files/patch-gtk_updateiconcache.c        |    6 +-
 x11-toolkits/gtk30/pkg-plist                       | 1397 ++++++++++----------
 11 files changed, 820 insertions(+), 907 deletions(-)