commit:     0a5f410f1f893d0edb8947d7a1f800741b91b2ea
Author:     Ian Jordan <immoloism <AT> gmail <DOT> com>
AuthorDate: Mon Jun 30 14:42:39 2025 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jul  5 08:11:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a5f410f

gui-libs/gtk: Fix build issues with x86

When building for x86 CPUs with SSE4.2 the build system assumes it's running
on x86_64 and causes compile time failures.

Following upstream advice in:
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173

Setting  -DDISABLE_X64=1 on x86 will allow the program to compile as intended.

Closes: https://bugs.gentoo.org/830723
Signed-off-by: Ian Jordan <immoloism <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42812
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 gui-libs/gtk/gtk-4.14.4-r1.ebuild  | 4 +++-
 gui-libs/gtk/gtk-4.16.12-r1.ebuild | 4 +++-
 gui-libs/gtk/gtk-4.16.13.ebuild    | 4 +++-
 gui-libs/gtk/gtk-4.18.5.ebuild     | 4 +++-
 gui-libs/gtk/gtk-4.18.6.ebuild     | 4 +++-
 5 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gui-libs/gtk/gtk-4.14.4-r1.ebuild 
b/gui-libs/gtk/gtk-4.14.4-r1.ebuild
index 09c6be8ffc7e..7627347f4fe7 100644
--- a/gui-libs/gtk/gtk-4.14.4-r1.ebuild
+++ b/gui-libs/gtk/gtk-4.14.4-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
-inherit gnome.org gnome2-utils meson optfeature python-any-r1 toolchain-funcs 
virtualx xdg
+inherit flag-o-matic gnome.org gnome2-utils meson optfeature python-any-r1 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -146,6 +146,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use x86 && append-flags -DDISABLE_X64=1 #943705 
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173
+
        local emesonargs=(
                # GDK backends
                $(meson_use X x11-backend)

diff --git a/gui-libs/gtk/gtk-4.16.12-r1.ebuild 
b/gui-libs/gtk/gtk-4.16.12-r1.ebuild
index 96a2b4956b1a..e1f2c6fa2d96 100644
--- a/gui-libs/gtk/gtk-4.16.12-r1.ebuild
+++ b/gui-libs/gtk/gtk-4.16.12-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
-inherit gnome.org gnome2-utils meson optfeature python-any-r1 toolchain-funcs 
virtualx xdg
+inherit flag-o-matic gnome.org gnome2-utils meson optfeature python-any-r1 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -146,6 +146,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use x86 && append-flags -DDISABLE_X64=1 #943705 
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173
+
        local emesonargs=(
                # GDK backends
                $(meson_use X x11-backend)

diff --git a/gui-libs/gtk/gtk-4.16.13.ebuild b/gui-libs/gtk/gtk-4.16.13.ebuild
index df0eb307fe71..ca0e6a05fea0 100644
--- a/gui-libs/gtk/gtk-4.16.13.ebuild
+++ b/gui-libs/gtk/gtk-4.16.13.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 PYTHON_COMPAT=( python3_{10..13} )
-inherit gnome.org gnome2-utils meson optfeature python-any-r1 toolchain-funcs 
virtualx xdg
+inherit flag-o-matic gnome.org gnome2-utils meson optfeature python-any-r1 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -146,6 +146,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use x86 && append-flags -DDISABLE_X64=1 #943705 
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173
+
        local emesonargs=(
                # GDK backends
                $(meson_use X x11-backend)

diff --git a/gui-libs/gtk/gtk-4.18.5.ebuild b/gui-libs/gtk/gtk-4.18.5.ebuild
index 006d8883cafa..16cc39003920 100644
--- a/gui-libs/gtk/gtk-4.18.5.ebuild
+++ b/gui-libs/gtk/gtk-4.18.5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 PYTHON_COMPAT=( python3_{11..13} )
-inherit gnome.org gnome2-utils meson optfeature python-any-r1 toolchain-funcs 
virtualx xdg
+inherit flag-o-matic gnome.org gnome2-utils meson optfeature python-any-r1 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -145,6 +145,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use x86 && append-flags -DDISABLE_X64=1 #943705 
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173
+
        local emesonargs=(
                # GDK backends
                $(meson_use X x11-backend)

diff --git a/gui-libs/gtk/gtk-4.18.6.ebuild b/gui-libs/gtk/gtk-4.18.6.ebuild
index ee7dfc19898a..227be1aec257 100644
--- a/gui-libs/gtk/gtk-4.18.6.ebuild
+++ b/gui-libs/gtk/gtk-4.18.6.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 PYTHON_COMPAT=( python3_{11..14} )
-inherit gnome.org gnome2-utils meson optfeature python-any-r1 toolchain-funcs 
virtualx xdg
+inherit flag-o-matic gnome.org gnome2-utils meson optfeature python-any-r1 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user 
interfaces"
 HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/";
@@ -145,6 +145,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use x86 && append-flags -DDISABLE_X64=1 #943705 
https://gitlab.gnome.org/GNOME/gtk/-/issues/4173
+
        local emesonargs=(
                # GDK backends
                $(meson_use X x11-backend)

Reply via email to