e.g. the upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This means that gtk-vnc built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime.
This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland (and X), and in the process, arbitrarily restrict gtk-vnc[-wayland] to only build and install on a system with gtk+[-wayland]. But we recently added a hack to gtk itself which allows hiding the automagic macros entirely. Inject this via append-cflags if the USE flags aren't set, to simulate building on a system with more minimal gtk packages. Bug: https://bugs.gentoo.org/624960 Closes: https://bugs.gentoo.org/865659 Signed-off-by: Eli Schwartz <eschwart...@gmail.com> --- ...{gtk-vnc-1.3.1.ebuild => gtk-vnc-1.3.1-r1.ebuild} | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) copy net-libs/gtk-vnc/{gtk-vnc-1.3.1.ebuild => gtk-vnc-1.3.1-r1.ebuild} (76%) diff --git a/net-libs/gtk-vnc/gtk-vnc-1.3.1.ebuild b/net-libs/gtk-vnc/gtk-vnc-1.3.1-r1.ebuild similarity index 76% copy from net-libs/gtk-vnc/gtk-vnc-1.3.1.ebuild copy to net-libs/gtk-vnc/gtk-vnc-1.3.1-r1.ebuild index 252a0fcc4541..3c2eb470aa1a 100644 --- a/net-libs/gtk-vnc/gtk-vnc-1.3.1.ebuild +++ b/net-libs/gtk-vnc/gtk-vnc-1.3.1-r1.ebuild @@ -5,15 +5,15 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit gnome.org vala meson python-any-r1 xdg +inherit flag-o-matic gnome.org vala meson python-any-r1 xdg DESCRIPTION="VNC viewer widget for GTK" HOMEPAGE="https://wiki.gnome.org/Projects/gtk-vnc https://gitlab.gnome.org/GNOME/gtk-vnc" LICENSE="LGPL-2.1+" SLOT="0" -KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ppc64 ~riscv ~sparc x86" -IUSE="+introspection pulseaudio sasl +vala" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="+introspection pulseaudio sasl +vala wayland X" REQUIRED_USE="vala? ( introspection )" RDEPEND=" @@ -23,7 +23,7 @@ RDEPEND=" >=net-libs/gnutls-3.6.0:0= >=sys-libs/zlib-1.2.11 sasl? ( >=dev-libs/cyrus-sasl-2.1.27:2 ) - >=x11-libs/gtk+-3.22.0:3[introspection?] + >=x11-libs/gtk+-3.22.0:3[introspection?,wayland?,X?] >=x11-libs/cairo-1.15.0 >=x11-libs/libX11-1.6.5 pulseaudio? ( media-libs/libpulse ) @@ -48,6 +48,10 @@ src_prepare() { } src_configure() { + # defang automagic dependencies, bug #927952 + use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND + use X || append-cflags -DGENTOO_GTK_HIDE_X11 + local emesonargs=( $(meson_feature introspection) $(meson_feature pulseaudio) -- 2.44.2