summaryrefslogtreecommitdiff
path: root/gui-libs/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gui-libs/gtk')
-rw-r--r--gui-libs/gtk/Manifest8
-rw-r--r--gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch91
-rw-r--r--gui-libs/gtk/files/6510b876d1cb5428db4822974cdebfed209692b0.patch134
-rw-r--r--gui-libs/gtk/gtk-4.12.5-r2.ebuild (renamed from gui-libs/gtk/gtk-4.12.5-r1.ebuild)12
-rw-r--r--gui-libs/gtk/gtk-4.14.3-r1.ebuild (renamed from gui-libs/gtk/gtk-4.14.3.ebuild)10
-rw-r--r--gui-libs/gtk/gtk-4.14.4-r1.ebuild (renamed from gui-libs/gtk/gtk-4.14.4.ebuild)12
6 files changed, 260 insertions, 7 deletions
diff --git a/gui-libs/gtk/Manifest b/gui-libs/gtk/Manifest
index 6721a94ee92c..0756289274cf 100644
--- a/gui-libs/gtk/Manifest
+++ b/gui-libs/gtk/Manifest
@@ -1,7 +1,9 @@
+AUX 0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch 2632 BLAKE2B 407b112917f7925fc0f86e0dfb359ad9810cfcf766219985408b4b86081f776aa3776275fab09d272c0b9843937c3243851ebb260080ee0f2bbbff734f8114c6 SHA512 612a2632b6083ebdbb4500eef3e3781138e6f8dafbbd4356bbe10a37fe496850a371ffa72943197db789005bda5f7982596987a5ef511afd2269540f113785bd
+AUX 6510b876d1cb5428db4822974cdebfed209692b0.patch 4322 BLAKE2B 22c556b97cf4c588ef1a7b4852501b6a183ca5a02d3103e0984071d5be5a8c3288da2ee0da24ee401274679500eb504eca7a66fd5a00478ccf1d5ae01a57ad2a SHA512 7b2f251869ff22814d26385160590f5157038df2dac41089db35f91371db7b504240d954b9472909f548ef38754510c05d8f43eb704327faefd73e9c8e9cb5d0
DIST gtk-4.12.5.tar.xz 17314760 BLAKE2B ce6a88d2c3ecfa2a9773682645ff00a61fd932b9a6de764794ef8abd10c5c75df386801143c32d10fec110029e997a16c4cdcb0ef050905562c6dd9fdc46039d SHA512 813758f4fe23b99b2ea1cf22156b86b22df30024717ae3b30bbe36111f9b1363bbd4da5fe8e5f69268c43794ea165e12c1c5bc52fd64bcbb1f9ccd3121540ac4
DIST gtk-4.14.3.tar.xz 18340444 BLAKE2B 20238e061c6500a8b253617010ac017e84ec2cacd9f10a7d2e982e9d72b72d78ee46abb3eb836d853d1d10736c697fc7468b2700b16ce5477a34400e8758e2b8 SHA512 2502fff3e98cb45f2293c94d86c32ff9b7c88d72eb7500a19fc9e589e1eda69af94c4eae78c044dcf5cf345cb99537d264250115d633034d9552cadc67f71e8e
DIST gtk-4.14.4.tar.xz 18306548 BLAKE2B 352831cb6373488593831e0d3489d425ca19b2b6c5541e269e251bb4f0455b435d73d24befef441fe09537838446eb773f33cbca746a9aeeed2204c413535ac0 SHA512 33a983f4ebac9088eaf9d3794a171d1619632bbcb27d9f46d894305dc15f83615a18443598b3c62a553b9596438b58226560ba17c41e539c76c3ee8a2b62c651
-EBUILD gtk-4.12.5-r1.ebuild 5983 BLAKE2B a544726ecd1c05419ac336a1799849a49b2c621e1478c9cf176efa84d730eba7df268c5f300e56040da69b86b6e92e26d2870c3f13a78b4d698e8c47dda189a4 SHA512 c0a3642fa84613bbf1b5c4a627e29435f0b26f35f9661524b2ead95586318bb8903bbcd7b6cb02efa0d8aaba2c280d6afab2d3eae0dc24160d5345efaafecb2e
-EBUILD gtk-4.14.3.ebuild 6483 BLAKE2B f524f027edde4e6a1f874f41d22af141dc82381d44cb7c143b70d9b96714238a08915067ad4452dc12af8093252ea6353cf153e1e4f97599af5c911d7c132284 SHA512 a76ec06ed05f00b08f939fa2d120f38a8bec7332b69af7e6449dab00fff2d7ad7d3e6f30e366086f2e048b4c17ed3d375187e8c1d64755ec24d4fd7b1a5b3036
-EBUILD gtk-4.14.4.ebuild 6483 BLAKE2B f524f027edde4e6a1f874f41d22af141dc82381d44cb7c143b70d9b96714238a08915067ad4452dc12af8093252ea6353cf153e1e4f97599af5c911d7c132284 SHA512 a76ec06ed05f00b08f939fa2d120f38a8bec7332b69af7e6449dab00fff2d7ad7d3e6f30e366086f2e048b4c17ed3d375187e8c1d64755ec24d4fd7b1a5b3036
+EBUILD gtk-4.12.5-r2.ebuild 6406 BLAKE2B ca8fe66c0d1c317b8581c19e5472a1e61012fe051000039b079deafd51715f32ed9a36872fc406338f5cd6a9ab63b8cdca460df2e6ae58dc25e0e7b7ff32948e SHA512 365a014eb20c921714bacd69b94762742104951b633e2ceb7470539290d618535564693709c0e3f1e7da700673ccb72343698feb0458937bcdbb410463e71c47
+EBUILD gtk-4.14.3-r1.ebuild 6773 BLAKE2B 648f336dff9c36feb85634d25c5ab7ce22e2e919b527243f7eb3a15f1e0387941cf69c5fd74cf8a137d1ae7329c6e70c3292db5f3f71768ed2c6e675e938c68d SHA512 dca62c1b2d1f080a5b68c76e74c84112cb051f4ac26cd9faf7891f70157723010fe73ea83eff4e1e388733b09ce34b3841dd3e3bd07daba22c09e85c99edcca2
+EBUILD gtk-4.14.4-r1.ebuild 6766 BLAKE2B 215baacb08966ff8bd63a0b1b6cc7b452e9c70bb360c167bd37aa8f863330a57f0ff2743006f93035bd67b1028f909a79dea0f29be8f0b970c86f8084a2d3a66 SHA512 c3225315d7de97d82caa11caf26199c83a2d3c3746816d97c72e538272e45e956e1869fb1e4a05a655bd3e54d1dd6b38e9d93533cd4f9b9ab12a16933496f53e
MISC metadata.xml 775 BLAKE2B a679a63b050be837319131924b4196dc7fdd2a1dcbca4b099eebc8550db3120dc8afe2b743acd68ce386fda7e4bd3af1eb2eb11d333542e1dbcc8b8a68c6c919 SHA512 15d8dc9c2701575b59d596cc10b1ca18691d10c3a418989eece698650e82a34720bea9d53a4ca4aa83745ce5d254cec5438f1ab10093ab2f765e77d0c9c24433
diff --git a/gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch b/gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
new file mode 100644
index 000000000000..652e9e116339
--- /dev/null
+++ b/gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
@@ -0,0 +1,91 @@
+From 0537043f72ea1a634b101efa9e11cc0a22baaf71 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Wed, 19 Jun 2024 21:28:31 -0400
+Subject: [PATCH] gdk: add a "poison" macro to hide GDK_WINDOWING_*
+
+Many packages perform automagic dependencies on gdk's backend
+implementations by checking if the macro is defined and then using the
+code it unlocks, rather than having a buildsystem option such as
+-Dwayland=true.
+
+It's unfeasible to patch every such package's source code to add
+configure options and respect them. Instead add a truly filthy hack and
+permit gtk itself to selectively show or hide the windowing system in
+use.
+
+By default, we assume this macro is never defined. It should only ever
+be defined inside an ebuild, as such:
+
+```
+use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND
+use X || append-cflags -DGENTOO_GTK_HIDE_X11
+```
+
+When seen, this will prevent code using "#ifdef GDK_WINDOWING_*" from
+seeing the define, so the automagic dependency won't be picked up. It
+will also cause any attempt to #include the backend-specific headers to
+bug out.
+
+Bug: https://bugs.gentoo.org/624960
+Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
+---
+ gdk/gdkconfig.h.meson | 7 +++++++
+ gdk/wayland/gdkwayland.h | 4 ++++
+ gdk/x11/gdkx.h | 4 ++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/gdk/gdkconfig.h.meson b/gdk/gdkconfig.h.meson
+index d5b48f3184..22baab52ae 100644
+--- a/gdk/gdkconfig.h.meson
++++ b/gdk/gdkconfig.h.meson
+@@ -10,10 +10,17 @@
+ G_BEGIN_DECLS
+
+
++#ifndef GENTOO_GTK_HIDE_X11
+ #mesondefine GDK_WINDOWING_X11
++#endif
++
+ #mesondefine GDK_WINDOWING_BROADWAY
+ #mesondefine GDK_WINDOWING_MACOS
++
++#ifndef GENTOO_GTK_HIDE_WAYLAND
+ #mesondefine GDK_WINDOWING_WAYLAND
++#endif
++
+ #mesondefine GDK_WINDOWING_WIN32
+
+ #mesondefine GDK_RENDERING_CAIRO
+diff --git a/gdk/wayland/gdkwayland.h b/gdk/wayland/gdkwayland.h
+index 846445910e..5d84619295 100644
+--- a/gdk/wayland/gdkwayland.h
++++ b/gdk/wayland/gdkwayland.h
+@@ -24,6 +24,10 @@
+
+ #pragma once
+
++#ifdef GENTOO_GTK_HIDE_WAYLAND
++ #error "A Gentoo ebuild has hidden wayland and it cannot be used in this compilation unit. Please file a bug if you see this error."
++#endif
++
+ #include <gdk/gdk.h>
+
+ #define __GDKWAYLAND_H_INSIDE__
+diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
+index 6bef6b6de8..d4f8b94550 100644
+--- a/gdk/x11/gdkx.h
++++ b/gdk/x11/gdkx.h
+@@ -24,6 +24,10 @@
+
+ #pragma once
+
++#ifdef GENTOO_GTK_HIDE_X11
++ #error "A Gentoo ebuild has hidden x11 and it cannot be used in this compilation unit. Please file a bug if you see this error."
++#endif
++
+ #include <gdk/gdk.h>
+
+ #include <X11/Xlib.h>
+--
+2.44.2
+
diff --git a/gui-libs/gtk/files/6510b876d1cb5428db4822974cdebfed209692b0.patch b/gui-libs/gtk/files/6510b876d1cb5428db4822974cdebfed209692b0.patch
new file mode 100644
index 000000000000..0ff0398ab0c8
--- /dev/null
+++ b/gui-libs/gtk/files/6510b876d1cb5428db4822974cdebfed209692b0.patch
@@ -0,0 +1,134 @@
+From 6510b876d1cb5428db4822974cdebfed209692b0 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Tue, 9 Apr 2024 21:01:26 -0400
+Subject: [PATCH] build: Add a missing dependency
+
+Add the generated gdk headers to the sources for all the backends,
+to guarantee that they are generated before the library is used.
+
+Fixes: #6618
+---
+ gdk/broadway/meson.build | 3 +--
+ gdk/macos/meson.build | 2 +-
+ gdk/meson.build | 12 +++++++++---
+ gdk/wayland/meson.build | 7 +------
+ gdk/win32/meson.build | 2 +-
+ gdk/x11/meson.build | 7 +------
+ 6 files changed, 14 insertions(+), 19 deletions(-)
+
+diff --git a/gdk/broadway/meson.build b/gdk/broadway/meson.build
+index ef7fa0ef589..f0a77b37c2d 100644
+--- a/gdk/broadway/meson.build
++++ b/gdk/broadway/meson.build
+@@ -52,8 +52,7 @@ broadwayjs_h = custom_target('broadwayjs.h',
+ )
+
+ libgdk_broadway = static_library('gdk-broadway',
+- clienthtml_h, broadwayjs_h,
+- gdk_broadway_sources, gdkconfig, gdkenum_h,
++ sources: [ clienthtml_h, broadwayjs_h, gdk_broadway_sources, gdk_gen_headers ],
+ include_directories: [confinc, gdkinc],
+ c_args: [
+ '-DGTK_COMPILATION',
+diff --git a/gdk/macos/meson.build b/gdk/macos/meson.build
+index b3baefb898e..d80334b8946 100644
+--- a/gdk/macos/meson.build
++++ b/gdk/macos/meson.build
+@@ -61,7 +61,7 @@ gdk_macos_deps = [
+ libgdk_c_args += ['-xobjective-c']
+
+ libgdk_macos = static_library('gdk-macos',
+- gdk_macos_sources, gdkconfig, gdkenum_h,
++ sources: [ gdk_macos_sources, gdk_gen_headers ],
+ include_directories: [ confinc, gdkinc, ],
+ c_args: [ libgdk_c_args, common_cflags, ],
+ link_with: [],
+diff --git a/gdk/meson.build b/gdk/meson.build
+index 9c0a36e19ec..62e80ea6c44 100644
+--- a/gdk/meson.build
++++ b/gdk/meson.build
+@@ -202,7 +202,13 @@ gdkwayland_inc = include_directories('wayland')
+ wlinc = include_directories('.')
+ win32rcinc = include_directories('win32/rc')
+
+-gdk_gen_headers = [gdkenum_h, gdkmarshal_h, gdkconfig, gdkversionmacros_h, gdk_visibility_h]
++gdk_gen_headers = [
++ gdkenum_h,
++ gdkmarshal_h,
++ gdkconfig,
++ gdkversionmacros_h,
++ gdk_visibility_h,
++]
+
+ gdk_deps = [
+ libm,
+@@ -278,7 +284,7 @@ if gdk_backends.length() == 0
+ endif
+
+ libgdk = static_library('gdk',
+- sources: [gdk_sources, gdk_backends_gen_headers, gdkconfig],
++ sources: [gdk_sources, gdk_backends_gen_headers, gdk_gen_headers],
+ dependencies: gdk_deps + [libgtk_css_dep],
+ link_with: [libgtk_css],
+ include_directories: [confinc, gdkx11_inc, wlinc],
+@@ -290,7 +296,7 @@ libgdk = static_library('gdk',
+ # list the dependencies and generated headers and such, for use in the
+ # "public" libgtk_dep used by internal executables.
+ libgdk_dep = declare_dependency(
+- sources: ['gdk.h', gdkconfig, gdkenum_h],
++ sources: ['gdk.h', gdk_gen_headers],
+ include_directories: [confinc, gdkx11_inc, wlinc],
+ dependencies: gdk_deps + [libgtk_css_dep],
+ )
+diff --git a/gdk/wayland/meson.build b/gdk/wayland/meson.build
+index 00e584a1053..e7c1ac34103 100644
+--- a/gdk/wayland/meson.build
++++ b/gdk/wayland/meson.build
+@@ -117,12 +117,7 @@ foreach p: proto_sources
+ endforeach
+
+ libgdk_wayland = static_library('gdk-wayland',
+- sources: [
+- gdk_wayland_sources,
+- gdk_wayland_gen_headers,
+- gdkconfig,
+- gdkenum_h,
+- ],
++ sources: [ gdk_wayland_sources, gdk_wayland_gen_headers, gdk_gen_headers ],
+ include_directories: [ confinc, gdkinc, ],
+ c_args: [
+ '-DGTK_COMPILATION',
+diff --git a/gdk/win32/meson.build b/gdk/win32/meson.build
+index 3dc16aabb6c..cc56a15d95a 100644
+--- a/gdk/win32/meson.build
++++ b/gdk/win32/meson.build
+@@ -64,7 +64,7 @@ gdk_win32_deps = [
+ ]
+
+ libgdk_win32 = static_library('gdk-win32',
+- gdk_win32_sources, gdkconfig, gdkenum_h,
++ sources: [ gdk_win32_sources, gdk_gen_headers ],
+ include_directories: [ confinc, gdkinc ],
+ c_args: [
+ '-DGTK_COMPILATION',
+diff --git a/gdk/x11/meson.build b/gdk/x11/meson.build
+index 013d8b1d00c..c9aa5383ab1 100644
+--- a/gdk/x11/meson.build
++++ b/gdk/x11/meson.build
+@@ -73,12 +73,7 @@ gdk_x11_deps = [
+ ]
+
+ libgdk_x11 = static_library('gdk-x11',
+- sources: [
+- gdkmarshal_h,
+- gdkenum_h,
+- gdkconfig,
+- gdk_x11_sources,
+- ],
++ sources: [ gdk_gen_headers, gdk_x11_sources ],
+ include_directories: [ confinc, gdkinc, ],
+ c_args: [
+ '-DGTK_COMPILATION',
+--
+GitLab
+
diff --git a/gui-libs/gtk/gtk-4.12.5-r1.ebuild b/gui-libs/gtk/gtk-4.12.5-r2.ebuild
index cd5ffd7bad88..7b15706a0de7 100644
--- a/gui-libs/gtk/gtk-4.12.5-r1.ebuild
+++ b/gui-libs/gtk/gtk-4.12.5-r2.ebuild
@@ -16,7 +16,7 @@ REQUIRED_USE="
test? ( introspection )
"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
COMMON_DEPEND="
>=dev-libs/glib-2.76.0:2
@@ -100,6 +100,16 @@ BDEPEND="
)
"
+PATCHES=(
+ # Gentoo-specific patch to add a "poison" macro support, allowing other ebuilds
+ # with USE="-wayland -X" to trick gtk into claiming that it wasn't built with
+ # such support.
+ # https://bugs.gentoo.org/624960
+ "${FILESDIR}"/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
+ # backport patch to fix race conditions in building generated headers
+ "${FILESDIR}"/6510b876d1cb5428db4822974cdebfed209692b0.patch
+)
+
python_check_deps() {
python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
}
diff --git a/gui-libs/gtk/gtk-4.14.3.ebuild b/gui-libs/gtk/gtk-4.14.3-r1.ebuild
index 7f0c8930ab74..d937fcdd3730 100644
--- a/gui-libs/gtk/gtk-4.14.3.ebuild
+++ b/gui-libs/gtk/gtk-4.14.3-r1.ebuild
@@ -16,7 +16,7 @@ REQUIRED_USE="
test? ( introspection )
"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
# TODO: Optional gst build dep on >=gst-plugins-base-1.23.1, so depend on it once we can
COMMON_DEPEND="
@@ -108,6 +108,14 @@ BDEPEND="
)
"
+PATCHES=(
+ # Gentoo-specific patch to add a "poison" macro support, allowing other ebuilds
+ # with USE="-wayland -X" to trick gtk into claiming that it wasn't built with
+ # such support.
+ # https://bugs.gentoo.org/624960
+ "${FILESDIR}"/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
+)
+
python_check_deps() {
python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
}
diff --git a/gui-libs/gtk/gtk-4.14.4.ebuild b/gui-libs/gtk/gtk-4.14.4-r1.ebuild
index 7f0c8930ab74..dbcdaa083eaa 100644
--- a/gui-libs/gtk/gtk-4.14.4.ebuild
+++ b/gui-libs/gtk/gtk-4.14.4-r1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
inherit 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"
@@ -16,7 +16,7 @@ REQUIRED_USE="
test? ( introspection )
"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv sparc x86"
# TODO: Optional gst build dep on >=gst-plugins-base-1.23.1, so depend on it once we can
COMMON_DEPEND="
@@ -108,6 +108,14 @@ BDEPEND="
)
"
+PATCHES=(
+ # Gentoo-specific patch to add a "poison" macro support, allowing other ebuilds
+ # with USE="-wayland -X" to trick gtk into claiming that it wasn't built with
+ # such support.
+ # https://bugs.gentoo.org/624960
+ "${FILESDIR}"/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
+)
+
python_check_deps() {
python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
}