commit:     a0fad0f4611efabdb614a93b304cf52aab8e06cc
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 29 00:28:40 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Sun Feb  2 05:28:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0fad0f4

app-i18n/ibus: correctly depend on gtk interfaces to wayland/X

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.

We must unconditionally depend on the gdk X11 backend, since the code
unconditionally tries to use it (even when headers themselves are
conditional, which they aren't always).

We can now solve this using a special Gentoo macro to hide these
automagic macros to simulate building on a system with more minimal gtk
packages.

Bug: https://bugs.gentoo.org/624960
Closes: https://bugs.gentoo.org/910646
Closes: https://bugs.gentoo.org/921671
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 .../ibus/{ibus-1.5.31.ebuild => ibus-1.5.29-r1.ebuild}  | 17 ++++++++++-------
 .../ibus/{ibus-1.5.30.ebuild => ibus-1.5.30-r1.ebuild}  |  9 ++++++---
 .../ibus/{ibus-1.5.31.ebuild => ibus-1.5.31-r1.ebuild}  |  9 ++++++---
 profiles/arch/alpha/package.use.mask                    |  1 +
 profiles/features/big-endian/package.use.mask           |  3 ++-
 5 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/app-i18n/ibus/ibus-1.5.31.ebuild 
b/app-i18n/ibus/ibus-1.5.29-r1.ebuild
similarity index 94%
copy from app-i18n/ibus/ibus-1.5.31.ebuild
copy to app-i18n/ibus/ibus-1.5.29-r1.ebuild
index 45f554b527e7..7c1ad0e700ad 100644
--- a/app-i18n/ibus/ibus-1.5.31.ebuild
+++ b/app-i18n/ibus/ibus-1.5.29-r1.ebuild
@@ -5,16 +5,17 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit autotools bash-completion-r1 gnome2-utils flag-o-matic python-r1 
toolchain-funcs vala virtualx
+inherit autotools bash-completion-r1 flag-o-matic gnome2-utils python-r1 
toolchain-funcs vala virtualx
 
 DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
 HOMEPAGE="https://github.com/ibus/ibus/wiki";
 
 MY_PV=$(ver_rs 3 '-')
+MY_PV_DERP="${MY_PV}-rc2" # Upstream retagged rc2 as the final release
 GENTOO_VER=
 [[ -n ${GENTOO_VER} ]] && \
        
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-gentoo-patches-${GENTOO_VER}.tar.xz";
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${MY_PV}/${PN}-${MY_PV}.tar.gz
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${MY_PV}/${PN}-${MY_PV_DERP}.tar.gz
        ${GENTOO_PATCHSET_URI}"
 
 LICENSE="LGPL-2.1"
@@ -45,8 +46,8 @@ DEPEND="
        )
        appindicator? ( dev-libs/libdbusmenu[gtk3?] )
        gtk2? ( x11-libs/gtk+:2 )
-       gtk3? ( x11-libs/gtk+:3 )
-       gtk4? ( gui-libs/gtk:4 )
+       gtk3? ( x11-libs/gtk+:3[X,wayland?] )
+       gtk4? ( gui-libs/gtk:4[X,wayland?] )
        gui? (
                x11-libs/libX11
                x11-libs/libXi
@@ -82,6 +83,8 @@ BDEPEND="
        test? ( x11-apps/setxkbmap )
        unicode? ( app-i18n/unicode-data )"
 
+S=${WORKDIR}/${PN}-${MY_PV_DERP}
+
 src_prepare() {
        vala_setup --ignore-use
        # Under various circumstances, vala transpiles will need to be redone 
due to
@@ -116,9 +119,6 @@ src_prepare() {
 }
 
 src_configure() {
-       # bug #944071
-       append-flags -std=gnu17
-
        local unicodedir="${EPREFIX}"/usr/share/unicode
        local python_conf=()
        if use python; then
@@ -131,6 +131,9 @@ src_configure() {
                python_conf+=( --disable-setup )
        fi
 
+       # defang automagic dependencies
+       use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
+
        if tc-is-cross-compiler && { use emoji || use unicode; }; then
                mkdir -p "${S}-build"
                pushd "${S}-build" >/dev/null 2>&1 || die

diff --git a/app-i18n/ibus/ibus-1.5.30.ebuild 
b/app-i18n/ibus/ibus-1.5.30-r1.ebuild
similarity index 95%
rename from app-i18n/ibus/ibus-1.5.30.ebuild
rename to app-i18n/ibus/ibus-1.5.30-r1.ebuild
index ff30e4b764a9..78886f0e2bcd 100644
--- a/app-i18n/ibus/ibus-1.5.30.ebuild
+++ b/app-i18n/ibus/ibus-1.5.30-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit autotools bash-completion-r1 gnome2-utils python-r1 toolchain-funcs 
vala virtualx
+inherit autotools bash-completion-r1 flag-o-matic gnome2-utils python-r1 
toolchain-funcs vala virtualx
 
 DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
 HOMEPAGE="https://github.com/ibus/ibus/wiki";
@@ -45,8 +45,8 @@ DEPEND="
        )
        appindicator? ( dev-libs/libdbusmenu[gtk3?] )
        gtk2? ( x11-libs/gtk+:2 )
-       gtk3? ( x11-libs/gtk+:3 )
-       gtk4? ( gui-libs/gtk:4 )
+       gtk3? ( x11-libs/gtk+:3[X,wayland?] )
+       gtk4? ( gui-libs/gtk:4[X,wayland?] )
        gui? (
                x11-libs/libX11
                x11-libs/libXi
@@ -128,6 +128,9 @@ src_configure() {
                python_conf+=( --disable-setup )
        fi
 
+       # defang automagic dependencies
+       use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
+
        if tc-is-cross-compiler && { use emoji || use unicode; }; then
                mkdir -p "${S}-build"
                pushd "${S}-build" >/dev/null 2>&1 || die

diff --git a/app-i18n/ibus/ibus-1.5.31.ebuild 
b/app-i18n/ibus/ibus-1.5.31-r1.ebuild
similarity index 96%
rename from app-i18n/ibus/ibus-1.5.31.ebuild
rename to app-i18n/ibus/ibus-1.5.31-r1.ebuild
index 45f554b527e7..9f41a2a7d624 100644
--- a/app-i18n/ibus/ibus-1.5.31.ebuild
+++ b/app-i18n/ibus/ibus-1.5.31-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{10..12} )
 
-inherit autotools bash-completion-r1 gnome2-utils flag-o-matic python-r1 
toolchain-funcs vala virtualx
+inherit autotools bash-completion-r1 flag-o-matic gnome2-utils python-r1 
toolchain-funcs vala virtualx
 
 DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
 HOMEPAGE="https://github.com/ibus/ibus/wiki";
@@ -45,8 +45,8 @@ DEPEND="
        )
        appindicator? ( dev-libs/libdbusmenu[gtk3?] )
        gtk2? ( x11-libs/gtk+:2 )
-       gtk3? ( x11-libs/gtk+:3 )
-       gtk4? ( gui-libs/gtk:4 )
+       gtk3? ( x11-libs/gtk+:3[X,wayland?] )
+       gtk4? ( gui-libs/gtk:4[X,wayland?] )
        gui? (
                x11-libs/libX11
                x11-libs/libXi
@@ -131,6 +131,9 @@ src_configure() {
                python_conf+=( --disable-setup )
        fi
 
+       # defang automagic dependencies
+       use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
+
        if tc-is-cross-compiler && { use emoji || use unicode; }; then
                mkdir -p "${S}-build"
                pushd "${S}-build" >/dev/null 2>&1 || die

diff --git a/profiles/arch/alpha/package.use.mask 
b/profiles/arch/alpha/package.use.mask
index 4623b370371e..676b01c1c8ea 100644
--- a/profiles/arch/alpha/package.use.mask
+++ b/profiles/arch/alpha/package.use.mask
@@ -120,6 +120,7 @@ app-alternatives/ninja samurai
 # https://buildd.debian.org/status/logs.php?pkg=weston&arch=alpha
 gui-libs/gtk wayland
 dev-libs/libportal wayland
+app-i18n/ibus wayland
 
 # matoro <[email protected]> (2023-06-18)
 # sci-physics/bullet not keyworded here (#908240)

diff --git a/profiles/features/big-endian/package.use.mask 
b/profiles/features/big-endian/package.use.mask
index 57cd68309a34..1272812b2df4 100644
--- a/profiles/features/big-endian/package.use.mask
+++ b/profiles/features/big-endian/package.use.mask
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Gentoo Authors
+# Copyright 2023-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Michał Górny <[email protected]> (2024-06-05)
@@ -43,6 +43,7 @@ mail-client/thunderbird system-av1
 # dev-libs/weston casualties (#833010)
 # https://gitlab.freedesktop.org/wayland/weston/-/issues/739
 gui-libs/gtk wayland
+app-i18n/ibus wayland
 gnome-base/gnome-control-center wayland
 sys-apps/xdg-desktop-portal-gnome wayland
 net-libs/webkit-gtk:6 wayland

Reply via email to