On Thu, 2024-06-27 at 05:58 +0100, Sam James wrote: > Eli Schwartz <eschwart...@gmail.com> writes: > > > On 6/26/24 5:03 AM, Sam James wrote: > > > Eli Schwartz <eschwart...@gmail.com> writes: > > > > > > > Many packages perform automagic dependencies on gdk's backend > > > > implementations by checking if the macro is defined and then > > > > using the > > > > code it unlocks, rather than having a buildsystem option such > > > > as > > > > -Dwayland=true. > > > > > > > Doesn't gtk3 need this too? Also, could we have an upstream > > > report > > > making them aware of this for gtk4? > > > > > > Yes, gtk3 needs this too (and patches in this series depend on it). > > > > At https://github.com/gentoo/gentoo/pull/37259 there are 6 patches, > > not > > 5 -- I appear to have accidentally excluded the first patch when > > sending > > it to the list, unsure how that happened. It's almost ccompletely > > copy/paste from gtk4. > > Thanks for clarifying - I was convinced I'd seen you show me it (I > probably saw it on the branch) but I didn't think to check the PR. > > > > > As far as reporting this upstream goes, I'm somewhat nervous they > > will > > suggest you should simply build against what you use and require > > what > > you build against. It's not a completely unreasonable suggestion, > > in > > fact it's the one I described as option 4 and Gentoo simply cannot > > use > > it today since it would require new EAPI. > > I tend to agree. I see this as kind of our fault / a Gentoo-ish > problem.
Please do see about approaching upstream about this in the context of GTK4 in a constructive friendly manner, perhaps from the angle of how to transition any distribution to a GTK that does not include X11 support with less migrational pain - this should be of interest for more cases than Gentoo. Maybe the idea about selecting backend stubs to include for their API functions, which would just end up returning what a fully enabled backend would return when the running environment is NOT that backend (e.g. when gdk-x11 functions are called in a wayland native app or gdk- wayland functions are called when X11 or Xwayland is in use). If that gains some traction, maybe we could also do this for GTK3 as well. Given how we'd have to end up maintaining this long term, such upstream discussions are sort of a soft blocker for proceeding with the patchset, as far as I'm concerned. Mart