lah7/gtk3-classic

Request: No D-Bus?

b-aaz opened this issue · 3 comments

b-aaz commented

What should be patched?

Describe the functionality or style that should be changed. Was this a behaviour observed in an older GTK version?
I wonder if you could patch D-Bus out ! it's a "hard" dependency now
in the older versions of gtk you could configure it at build time to not to include atk-bridge (that takes dbus in)

Screenshots

If applicable, show what it looks like today under GTK3.
no difference(I think)

Commits

Was this changed by upstream GTK? If applicable, are there any commits to use as a reference?
here is a patch by gentoo community
https://forums.gentoo.org/viewtopic-t-1103236-start-0.html
and I also as I said there was a time that you could toggle atk-bridge at compile time !
here is the commit
https://gitlab.gnome.org/GNOME/gtk/-/commit/ed8203e700aa8a8de40df071ffdc2d18cab68e29

thanks 👍

lah7 commented

Looks like it could be possible. Personally I wouldn't gain anything if I did this, since a fair bit of my software depends on dbus. I'm not sure if our gtk3-classic users need accessibility features and if things could mysteriously break if ATK was really patched out for everyone.

There could possibly be a patch that brings back the build flag and make it optional.

The links are useful, thanks! If you're on Arch, you could have a stab at this yourself. Try patching your PKGBUILD locally and take out the atk packages:

makedepends=(
-	atk cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2 fribidi
+	cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2 fribidi
-	libxcomposite libxdamage pango shared-mime-info at-spi2-atk wayland libxkbcommon
+	libxcomposite libxdamage pango shared-mime-info wayland libxkbcommon
	json-glib librsvg wayland-protocols desktop-file-utils mesa gtk-update-icon-cache
	adwaita-icon-theme cantarell-fonts

-	lib32-atk lib32-cairo lib32-libxcursor lib32-libxinerama lib32-libxrandr lib32-libxi
+	lib32-cairo lib32-libxcursor lib32-libxinerama lib32-libxrandr lib32-libxi
	lib32-libepoxy lib32-gdk-pixbuf2 lib32-fribidi lib32-libxcomposite lib32-libxdamage 
-	lib32-pango lib32-at-spi2-atk lib32-wayland lib32-libxkbcommon lib32-json-glib
+	lib32-pango lib32-wayland lib32-libxkbcommon lib32-json-glib
	lib32-librsvg lib32-mesa lib32-libcups lib32-krb5 lib32-e2fsprogs
)

package_gtk3-classic()
{
	depends=(
-		atk cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2 fribidi
+		cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2 fribidi
-		libxcomposite libxdamage pango shared-mime-info at-spi2-atk wayland libxkbcommon
+		libxcomposite libxdamage pango shared-mime-info wayland libxkbcommon
		json-glib librsvg wayland-protocols desktop-file-utils mesa gtk-update-icon-cache
	)
}

And then modify configure (by extracting gtk+-3.24.30.tar.xz) and remove the section for building with ATK support. Delete the lines around 27040-27090 and modify any lines mentioning atk.

-ATK_REQUIRED_VERSION=2.32.0
...
-########################################
-# Check for Accessibility Toolkit flags
-########################################
-
-if test x$enable_x11_backend = xyes; then
...
-if test -n "$ATK_CFLAGS"; then
...
-if test -n "$ATK_LIBS"; then
...
-fi

...

-GTK_PACKAGES="atk >= 2.32.0 cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.57.2"
+GTK_PACKAGES="cairo >= 1.14.0 cairo-gobject >= 1.14.0 gdk-pixbuf-2.0 >= 2.30.0 gio-2.0 >= 2.57.2"

...
-ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"

That could happen by some shell command in the package() stage or by modifying the PKGBUILD source=( lines so it builds a local tarball / folder with the modified file. Maybe that could work, or maybe GTK became too interlinked that it would only crash?

lah7 commented

It came to my attention (#40) that there is a third party AUR package gtk3-classic-noatk-64 out there that patches out ATK and some other libraries. Looks like that one might serve your needs.