public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayland,X],
Date: Sun, 23 Jun 2024 19:33:59 +0100	[thread overview]
Message-ID: <ecf59f87c91d30e7f5013659cd46f18e95546cf9.camel@gentoo.org> (raw)
In-Reply-To: <20240623173646.3368935-1-eschwartz93@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2154 bytes --]

On Sun, 2024-06-23 at 13:35 -0400, Eli Schwartz wrote:
> There is a bug in how gtk 3 and gtk 4 are built against by other
> packages. GTK supports optionally enabling X and wayland support -- when
> you do so, the ABI of GTK changes.
> 
> It is historically common for X11 packages to check for a macro provided
> by GTK that says "built with X11 support". This goes back to the days
> when X11 was the only backend shipped with GTK, and the main use of the
> macro was to check whether to use X11 or rather to use, say, the win32
> or Quartz (macOS) backends. The pattern has continued now that Linux has
> two backends.
> 
> The result of this is that many packages really need to support their
> own IUSE="X wayland" (because they can conditionally build code for
> that) and also need to make sure that USE flag is actually respected.
> Failure to do this means that when rebuilding GTK with different USE
> flags, all applications linking to GTK need to be rebuilt too, but
> portage doesn't know that.
> 
> It also means that binhosts -- such as the one officially hosted by
> Gentoo -- have bad binaries that don't actually match the packages users
> have installed. This is particularly bad since it breaks expectations
> and is quite hard to debug. This has hit people a bunch of times when
> trying to install the xfce desktop environment, in particular.

<snip>

> - What I propose in this patchset. Hack a custom gentoo feature into the
>   GTK headers. GTK normally behaves exactly as it's supposed to
>   upstream, but we add the ability to pass a define via `append-cflags`
>   that makes the GTK headers tell an outright lie and claim its API
>   doesn't exist. Which is what we want -- we want packages to be able to
>   compile *as if* GTK wasn't built with support for a given backend.
>   This disables the automagic as if option 1 (implementing configure
>   options) was carried out. Advantage: automatically support proper
>   control of features. Disadvantage: requires patching GTK and
>   then still adding workarounds for each package that needs it.

Nice trick! I like it. Good work. :)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

  parent reply	other threads:[~2024-06-23 18:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 17:35 [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayland,X], Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 1/5] gui-libs/gtk: add a "poison" macro support to disable X/wayland Eli Schwartz
2024-06-24  9:08   ` Florian Schmaus
2024-06-26  9:03   ` Sam James
2024-06-27  4:52     ` Eli Schwartz
2024-06-27  4:58       ` Sam James
2024-06-23 17:35 ` [gentoo-dev] [PATCH 2/5] net-libs/gtk-vnc: prevent automagically building against gtk[X,wayland] Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 3/5] x11-libs/wxGTK: " Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 4/5] xfce-base/libxfce4ui: prevent automagically building against gtk[wayland] Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 5/5] dev-libs/libportal: prevent automagically building against gtk[X,wayland] Eli Schwartz
2024-06-23 18:33 ` James Le Cuirot [this message]
2024-06-26  9:02 ` [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayland,X], Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecf59f87c91d30e7f5013659cd46f18e95546cf9.camel@gentoo.org \
    --to=chewi@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox