summaryrefslogtreecommitdiff
path: root/x11-libs/gtk+
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/gtk+')
-rw-r--r--x11-libs/gtk+/Manifest6
-rw-r--r--x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch90
-rw-r--r--x11-libs/gtk+/gtk+-2.24.33-r3.ebuild2
-rw-r--r--x11-libs/gtk+/gtk+-3.24.41-r1.ebuild205
-rw-r--r--x11-libs/gtk+/gtk+-3.24.42-r1.ebuild (renamed from x11-libs/gtk+/gtk+-3.24.42.ebuild)5
5 files changed, 306 insertions, 2 deletions
diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest
index 172107efdce7..9f6acd724cf6 100644
--- a/x11-libs/gtk+/Manifest
+++ b/x11-libs/gtk+/Manifest
@@ -1,3 +1,4 @@
+AUX 0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch 2662 BLAKE2B 153fd8af510f664ec3f6414ad905a3c93aacb65d8c8fd9a26949cb2094a986a67a52113efcfc6918003fe710673f52aeba3d428dd5b2e2e4831f2e632a6690d0 SHA512 218c22980df3dc76af6bae2930c2d9b9da64f0e902dc05ff392527250e8377ec61170c2b31119e2a9672bcb1f2d6c88355b09f56f5b5b5c4bfd2f2e9bcc2e773
AUX gtk+-2.24.24-out-of-source.patch 1487 BLAKE2B f322f3872c8e1f02f6d1d52cdfdb4b42dad26d44bda2f1a9b36ee7dae0f8e7c072f5a8e492d01429bb4ae679f886b3ef0fb9952bef5a08e75720908f2e8d616d SHA512 794903f8254a49f7d0e24f9730658dc69184969bb450419bd34bc2a9e7065d99931df4ae5ecd93abc0a18bff546aeb6816aae47531e8a79dc5aef5beaf9b6aa2
AUX gtk+-2.24.31-update-icon-cache.patch 2504 BLAKE2B 29a8874e81e287356f230e355117aabd9c3e9dfd1a810eaa8dc7e60dbe3fb65a73719c272dc1ba2058dae95b3988d86f09fa8587963df34a7486b50e68e79732 SHA512 c2a55a410019502b0af3fa5152fc372ce8a555bd63b5cf7f9574ebe5058f3b95e21dc5f14b5b8867d52105e4f6ebca3336a59935c3a7269bfd41aa91edadab48
AUX gtk+-2.24.33-Fix-casts.patch 6906 BLAKE2B 80247597a4bb6c84ed71d1c572125c28b2696f8f2571d3816fa44fa744a7cdb2a4cee744906b3172ee88c0d623a1ed0dbfc53c832561e0bc906fec7ebc3621e0 SHA512 0a26e9b726a2233ff5d1c1c2a4be0867c42e5127daf2c8312d68e64aa5e887deed36bb9af755db74c3d7aafd2f45bdec1e03d445d73cda325d73f75a88dfad3e
@@ -11,8 +12,9 @@ DIST gtk+-2.24.33.tar.xz 12661828 BLAKE2B f3488b220aaee54bf36fa77e2112d060152e57
DIST gtk+-3.24.35.tar.xz 17913328 BLAKE2B 3beea3cbda7247357238ad133c951e69d5670d68e06efb4de09fae7141b141f4eb17a8c79661cab928a3db427f7b32b518875d0951254941e76b1a7aab60e34f SHA512 3a1ec35756fe12f5be3cfe33ef332d583690458327572e69bffad8b4095059d2a744a4a53b2fd31bab5da2ca7b41a2a38fbbd8ba541a45fa8cc0d00eae005ade
DIST gtk+-3.24.41.tar.xz 13188312 BLAKE2B fbded114fe2b5c1c7bffe79d0a22d559f97081eb972baf31b5c9bd7190bd1ea2875f1c632d3f3be8233377299f1df15bbffbe45d50cc7ff588e034eb41eb8f6e SHA512 aaf061d846fac592e71089feace302bdef1bb64bb2ad6ff30d51d90000da9084cad2fa5bf88cb75adcd789c911d94231ae60a2ca7cf97a2f5720687369a3da98
DIST gtk+-3.24.42.tar.xz 13226980 BLAKE2B 04675abfa056d19a8324c8310789227e661458cfa356b670ba79d61a9498fa1c65161d19799d33d717742912cdddc3400a548573809d5dd4e0f289d0c75e88d9 SHA512 53e86e35d33f82384f1d40bd91feee67be68bc9003abd095842991441b1f2ee11a5b431168963270d3ffc0c653d26673ca97cdd55a8f577ef21dbd5d6004b643
-EBUILD gtk+-2.24.33-r3.ebuild 9873 BLAKE2B 2c8a9b6615fbf5a53f6bc4ffbe35455029a9401886a7c74258c52a542615a47ef67b3cc59a1b96fab194d8ce4106469d13b7466462473265b3c7d83beb5e14ff SHA512 c807aa90c4289afcebd66ea67b77dd844ff74e3aa7f54ddd0276b4d6df5286f5331ff5a05a88133f67ef4fcee50fb671e96d064acb40b0c03d69043d780be4e2
+EBUILD gtk+-2.24.33-r3.ebuild 9931 BLAKE2B 1066095a81e7be9b64759f7cccf5075d21d4099411acf347fd30f380b404805a9f4c54c31a5f7c4658b6be1415f6514e04d7d186f856fdf89d9628d585fd0718 SHA512 42336975f81a8d970503adc40275c6ce0520607a37dd20d247c1c00133237cc16e27aea155a42a65c39ef8bf978c80295dcb3f2f88c3850917447e1d177b7d96
EBUILD gtk+-3.24.35.ebuild 6975 BLAKE2B 0f546d052435348f1eb7fe32c286e599d949d078170034f43ff145ad37f5b7212bf39bbd6efe6e6a700ea9d803145b44f1c20db411676b0e43a7cbe78685e3aa SHA512 8567a382f37b0ee50ab8a38104ed9027b4b36f97e23db6ea9ed62d9031e2526d8382fd483363bb5d3133b1178a1addf747218945fd52f845e2540a729bd90a4e
+EBUILD gtk+-3.24.41-r1.ebuild 5981 BLAKE2B 6b4b7eb34902d257ecbdbb2fe720b0c3e83ec58d913deb621a3989b54a4565131a58e265c6f2b094f7b548b9fbd69d6428547698fbcf0a976e6324a62820b437 SHA512 7ed4c45594d29298fbc79f516f25dbb2c0f3eb48e607efc2a76438b845f718710c25503f9a8568550d4414e1d7c0a18c9800d206b0c8a56f2a7c744fdde9b4a8
EBUILD gtk+-3.24.41.ebuild 5698 BLAKE2B 3def6d5a97f192594a6359bcff0b2642ed7a5c1ff6b281837990944b3a8ad09c81ffeb93ce06c07f86131753fd7e9aac59e5ab68da628add7888315c9c1789b2 SHA512 fb3b785c371b06d039214d34b4376b5b86ee0dd5919c0d8fd2313d2f35c21ff3952a465477bcb3b42e772065d7c551de7b5d42601cab3bf273e8a3aacc0f837c
-EBUILD gtk+-3.24.42.ebuild 6106 BLAKE2B 2e7e08718937b727150964b40893f4471a496f7b6ea40d220dad361aac752941dc5c90447660305ab42274ed2ae062d3377e59ba89eff494fb4926821c8e98a5 SHA512 955dc6d1c78dc373f0e149aa7e6e36b198d2efc38dd9af989ca64bfc50e429c2d4dbfeccc1705354050585091ed0b8417212878c5ec1c7a583a2004c8036a29e
+EBUILD gtk+-3.24.42-r1.ebuild 6389 BLAKE2B 6954e8c418b92bbaf598a7a6d73454fdfd56ba348613a589db0f83e94f1d7ed38ff9e9b034f9f932fcc70ea5ee09fab7817e5dbd518389da26ea1ea1c5a05461 SHA512 4a1b39bee58a3825a21708878bcf32bb8ea0e3ca685651d2b05defb139c5827739659bc1dba2262eb391381e2480d5c828dcce7ffb625aba2df2331475b9ff96
MISC metadata.xml 1041 BLAKE2B 00e12e2caeeb34f9b79de3340f677ee56569fdd977169e5d7c28678936646170b8e5c51c697385453eae323e6dd8948b074caa5928298afb46717589def22a6f SHA512 82401f5bdd721846511ce9364b672a0dfb47c434ac9187bdb361265c7c83698f0777f99ce563f65daddeb03e4abf3741721de3a4589980779d3a7417f64f427e
diff --git a/x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch b/x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
new file mode 100644
index 000000000000..26c56b86fe89
--- /dev/null
+++ b/x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
@@ -0,0 +1,90 @@
+From 25bdad805bb9e16032baf4480e9c1e432ddef49b 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 7db19e0470..6bee207e94 100644
+--- a/gdk/gdkconfig.h.meson
++++ b/gdk/gdkconfig.h.meson
+@@ -10,9 +10,16 @@
+ G_BEGIN_DECLS
+
+
++#ifndef GENTOO_GTK_HIDE_X11
+ #mesondefine GDK_WINDOWING_X11
++#endif
++
+ #mesondefine GDK_WINDOWING_BROADWAY
++
++#ifndef GENTOO_GTK_HIDE_WAYLAND
+ #mesondefine GDK_WINDOWING_WAYLAND
++#endif
++
+ #mesondefine GDK_WINDOWING_WIN32
+ #mesondefine GDK_WINDOWING_QUARTZ
+
+diff --git a/gdk/wayland/gdkwayland.h b/gdk/wayland/gdkwayland.h
+index 2b79295add..5f0e9cfa81 100644
+--- a/gdk/wayland/gdkwayland.h
++++ b/gdk/wayland/gdkwayland.h
+@@ -25,6 +25,10 @@
+ #ifndef __GDK_WAYLAND_H__
+ #define __GDK_WAYLAND_H__
+
++#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 1f64bccb6d..256c83015e 100644
+--- a/gdk/x11/gdkx.h
++++ b/gdk/x11/gdkx.h
+@@ -25,6 +25,10 @@
+ #ifndef __GDK_X_H__
+ #define __GDK_X_H__
+
++#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/x11-libs/gtk+/gtk+-2.24.33-r3.ebuild b/x11-libs/gtk+/gtk+-2.24.33-r3.ebuild
index d6e8c26b77a2..a2a634581869 100644
--- a/x11-libs/gtk+/gtk+-2.24.33-r3.ebuild
+++ b/x11-libs/gtk+/gtk+-2.24.33-r3.ebuild
@@ -134,6 +134,8 @@ src_prepare() {
# -O3 and company cause random crashes in applications, bug #133469
replace-flags -O3 -O2
strip-flags
+ # Not compatible with C23 decls
+ append-flags -std=gnu17
if ! use test ; then
# don't waste time building tests
diff --git a/x11-libs/gtk+/gtk+-3.24.41-r1.ebuild b/x11-libs/gtk+/gtk+-3.24.41-r1.ebuild
new file mode 100644
index 000000000000..685d8096273c
--- /dev/null
+++ b/x11-libs/gtk+/gtk+-3.24.41-r1.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit gnome2 meson-multilib multilib toolchain-funcs virtualx
+
+DESCRIPTION="Gimp ToolKit +"
+HOMEPAGE="https://www.gtk.org/"
+
+LICENSE="LGPL-2+"
+SLOT="3"
+IUSE="aqua broadway cloudproviders colord cups examples gtk-doc +introspection sysprof test vim-syntax wayland +X xinerama"
+REQUIRED_USE="
+ || ( aqua wayland X )
+ test? ( X )
+ xinerama? ( X )
+"
+RESTRICT="!test? ( test )"
+
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
+
+COMMON_DEPEND="
+ >=app-accessibility/at-spi2-core-2.46.0[introspection?,${MULTILIB_USEDEP}]
+ >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
+ >=dev-libs/glib-2.57.2:2[${MULTILIB_USEDEP}]
+ media-libs/fontconfig[${MULTILIB_USEDEP}]
+ >=media-libs/harfbuzz-2.2.0:=
+ >=media-libs/libepoxy-1.4[X(+)?,egl(+),${MULTILIB_USEDEP}]
+ virtual/libintl[${MULTILIB_USEDEP}]
+ >=x11-libs/cairo-1.14[aqua?,glib,svg(+),X?,${MULTILIB_USEDEP}]
+ >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}]
+ >=x11-libs/pango-1.44.0[introspection?,${MULTILIB_USEDEP}]
+ x11-misc/shared-mime-info
+
+ cloudproviders? ( net-libs/libcloudproviders[${MULTILIB_USEDEP}] )
+ colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] )
+ cups? ( >=net-print/cups-2.0[${MULTILIB_USEDEP}] )
+ introspection? ( >=dev-libs/gobject-introspection-1.39:= )
+ sysprof? ( >=dev-util/sysprof-capture-3.33.2:3[${MULTILIB_USEDEP}] )
+ wayland? (
+ >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}]
+ >=dev-libs/wayland-protocols-1.32
+ media-libs/mesa[wayland,${MULTILIB_USEDEP}]
+ >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}]
+ )
+ X? (
+ media-libs/libglvnd[X(+),${MULTILIB_USEDEP}]
+ x11-libs/libX11[${MULTILIB_USEDEP}]
+ x11-libs/libXcomposite[${MULTILIB_USEDEP}]
+ x11-libs/libXcursor[${MULTILIB_USEDEP}]
+ x11-libs/libXdamage[${MULTILIB_USEDEP}]
+ x11-libs/libXext[${MULTILIB_USEDEP}]
+ x11-libs/libXfixes[${MULTILIB_USEDEP}]
+ >=x11-libs/libXi-1.8[${MULTILIB_USEDEP}]
+ >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}]
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=dev-util/gtk-update-icon-cache-3
+"
+# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710
+PDEPEND="
+ gnome-base/librsvg[${MULTILIB_USEDEP}]
+ >=x11-themes/adwaita-icon-theme-3.14
+ vim-syntax? ( app-vim/gtk-syntax )
+"
+BDEPEND="
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/docbook-xsl-stylesheets
+ dev-libs/gobject-introspection-common
+ dev-libs/libxslt
+ >=dev-util/gdbus-codegen-2.48
+ dev-util/glib-utils
+ >=dev-build/gtk-doc-am-1.20
+ wayland? ( dev-util/wayland-scanner )
+ >=sys-devel/gettext-0.19.7
+ virtual/pkgconfig
+ x11-libs/gdk-pixbuf:2
+ gtk-doc? (
+ app-text/docbook-xml-dtd:4.3
+ >=dev-util/gtk-doc-1.20
+ )
+ test? ( sys-apps/dbus )
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gtk-query-immodules-3.0$(get_exeext)
+)
+
+PATCHES=(
+ # gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
+ "${FILESDIR}"/${PN}-3.24.36-update-icon-cache.patch
+ # 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
+)
+
+src_prepare() {
+ default
+
+ # The border-image-excess-size.ui test is known to fail on big-endian platforms
+ # See https://gitlab.gnome.org/GNOME/gtk/-/issues/5904
+ if [[ $(tc-endian) == big ]]; then
+ sed -i \
+ -e "/border-image-excess-size.ui/d" \
+ -e "/^xfails =/a 'border-image-excess-size.ui'," \
+ testsuite/reftests/meson.build || die
+ fi
+}
+
+multilib_src_configure() {
+ local emesonargs=(
+ $(meson_use aqua quartz_backend)
+ $(meson_use broadway broadway_backend)
+ $(meson_use cloudproviders)
+ $(meson_use examples demos)
+ $(meson_use examples)
+ $(meson_native_use_bool gtk-doc gtk_doc)
+ $(meson_native_use_bool introspection)
+ $(meson_use sysprof profiler)
+ $(meson_use wayland wayland_backend)
+ $(meson_use X x11_backend)
+ -Dcolord=$(usex colord yes no)
+ -Dprint_backends=$(usex cups cups,file,lpr file,lpr)
+ -Dxinerama=$(usex xinerama yes no)
+ # Include backend immodules into gtk itself, to avoid problems like
+ # https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a
+ # user overridden GTK_IM_MODULE envvar
+ -Dbuiltin_immodules=backend
+ -Dman=true
+ $(meson_use test tests)
+ -Dtracker3=false
+ )
+ meson_src_configure
+}
+
+multilib_src_compile() {
+ meson_src_compile
+}
+
+multilib_src_test() {
+ virtx dbus-run-session meson test -C "${BUILD_DIR}" --timeout-multiplier 4 || die
+}
+
+multilib_src_install() {
+ meson_src_install
+}
+
+multilib_src_install_all() {
+ insinto /etc/gtk-3.0
+ doins "${FILESDIR}"/settings.ini
+ # Skip README.win32.md that would get installed by default
+ DOCS=( NEWS README.md )
+ einstalldocs
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+
+ multilib_pkg_preinst() {
+ # Make immodules.cache belongs to gtk+ alone
+ local cache="/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}${cache}" "${ED}${cache}" || die
+ else
+ touch "${ED}${cache}" || die
+ fi
+ }
+ multilib_parallel_foreach_abi multilib_pkg_preinst
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+
+ multilib_pkg_postinst() {
+ gnome2_query_immodules_gtk3 \
+ || die "Update immodules cache failed (for ${ABI})"
+ }
+ multilib_parallel_foreach_abi multilib_pkg_postinst
+
+ if ! has_version "app-text/evince"; then
+ elog "Please install app-text/evince for print preview functionality."
+ elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
+ elog "add it to your settings.ini file."
+ fi
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then
+ multilib_pkg_postrm() {
+ rm -f "${EROOT}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
+ }
+ multilib_foreach_abi multilib_pkg_postrm
+ fi
+}
diff --git a/x11-libs/gtk+/gtk+-3.24.42.ebuild b/x11-libs/gtk+/gtk+-3.24.42-r1.ebuild
index 655c05a8a518..b87f4ebae8bb 100644
--- a/x11-libs/gtk+/gtk+-3.24.42.ebuild
+++ b/x11-libs/gtk+/gtk+-3.24.42-r1.ebuild
@@ -95,6 +95,11 @@ MULTILIB_CHOST_TOOLS=(
PATCHES=(
# gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
"${FILESDIR}"/${PN}-3.24.36-update-icon-cache.patch
+ # 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
)
src_prepare() {