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 despite that wxGTK has a wayland USE flag, and checks it in the build system -- just not for this.
This means that when 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 regardless of USE flag. This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland and arbitrarily restrict wxGTK[-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/927952 Signed-off-by: Eli Schwartz <eschwart...@gmail.com> --- ...wxGTK-3.2.2.1-r4.ebuild => wxGTK-3.2.2.1-r5.ebuild} | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) copy x11-libs/wxGTK/{wxGTK-3.2.2.1-r4.ebuild => wxGTK-3.2.2.1-r5.ebuild} (95%) diff --git a/x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild b/x11-libs/wxGTK/wxGTK-3.2.2.1-r5.ebuild similarity index 95% copy from x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild copy to x11-libs/wxGTK/wxGTK-3.2.2.1-r5.ebuild index a9276d1c119a..260365bf3510 100644 --- a/x11-libs/wxGTK/wxGTK-3.2.2.1-r4.ebuild +++ b/x11-libs/wxGTK/wxGTK-3.2.2.1-r5.ebuild @@ -20,8 +20,8 @@ S="${WORKDIR}/wxWidgets-${PV}" LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )" SLOT="${WXRELEASE}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux" -IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="+X curl doc debug keyring gstreamer libnotify +lzma opengl pch sdl +spell test tiff wayland webkit X" REQUIRED_USE="test? ( tiff ) tiff? ( X ) spell? ( X ) keyring? ( X )" RESTRICT="!test? ( test )" @@ -38,7 +38,7 @@ RDEPEND=" media-libs/libpng:0=[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] x11-libs/cairo[${MULTILIB_USEDEP}] - x11-libs/gtk+:3[wayland?,${MULTILIB_USEDEP}] + x11-libs/gtk+:3[wayland?,X?,${MULTILIB_USEDEP}] x11-libs/gdk-pixbuf:2[${MULTILIB_USEDEP}] x11-libs/libSM[${MULTILIB_USEDEP}] x11-libs/libX11[${MULTILIB_USEDEP}] @@ -127,6 +127,10 @@ src_prepare() { } multilib_src_configure() { + # defang automagic dependencies, bug #927952 + use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND + use X || append-cflags -DGENTOO_GTK_HIDE_X11 + # Workaround for bug #915154 append-ldflags $(test-flags-CCLD -Wl,--undefined-version) -- 2.44.2