Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: gui-libs/gtk/
Date: Sun, 03 Jul 2022 18:46:04
Message-Id: 1656873952.813d3e893e801c341441d938ff1a8d600b5462ff.mattst88@gentoo
1 commit: 813d3e893e801c341441d938ff1a8d600b5462ff
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 18:16:16 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 18:45:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=813d3e89
7
8 gui-libs/gtk: Version bump to 4.6.6
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 gui-libs/gtk/Manifest | 1 +
13 gui-libs/gtk/gtk-4.6.6.ebuild | 212 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 213 insertions(+)
15
16 diff --git a/gui-libs/gtk/Manifest b/gui-libs/gtk/Manifest
17 index e9fd07b2eb03..879ef4868c1d 100644
18 --- a/gui-libs/gtk/Manifest
19 +++ b/gui-libs/gtk/Manifest
20 @@ -1,2 +1,3 @@
21 DIST gtk-4.6.4.tar.xz 23074696 BLAKE2B 90368cc0023dcdba63f2412e67a65a0f4238f1c29e9faee969ada897c3fe21f55e7eb0f5470fc025692b4ea3af2956a32140db060663591b149186c2888cccc6 SHA512 ef18e3d084757a627f09f226cfe8da18634466575b726dd6200b74e65e0a7fc33fa8d8f609c2de09a907dfd6ca90af66e15015612675dc89d43de6e711b173e6
22 DIST gtk-4.6.5.tar.xz 23082944 BLAKE2B 18855d5002a544a66b6129514633f9b560b224f7c654859aa3a545142879d6aa8835edd2373706ade3f701846e9cae3653237860bd07c45d81642bc67b6ef9c2 SHA512 a7bf28f6b9f5259fe1333432c205aeb8673f5f32ea0b1878c0724676f148e2d1680fe63ed9594ab5b92120d3497f06cddc5cde428247b3fc876e5785b3dd47ca
23 +DIST gtk-4.6.6.tar.xz 23085304 BLAKE2B 2f0eacb9aaa3fad4e8d99feeadc93e04151f6c4552412d5b7485b972e97c8c9a7296143b39791e9e3230546770174a208ba6906179b9fed37414ee83a1980abb SHA512 b743d99029d7d51db19396641023eefd5d25bbacbd89ad6660d43e382b26fe6cc5e9ce8f0dbb3f4ac7d2143db617ea0c2e2d3cc8926fc93d735eb76ffb2f8309
24
25 diff --git a/gui-libs/gtk/gtk-4.6.6.ebuild b/gui-libs/gtk/gtk-4.6.6.ebuild
26 new file mode 100644
27 index 000000000000..5901072e16fc
28 --- /dev/null
29 +++ b/gui-libs/gtk/gtk-4.6.6.ebuild
30 @@ -0,0 +1,212 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..11} )
37 +inherit gnome.org gnome2-utils meson optfeature python-any-r1 virtualx xdg
38 +
39 +DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user interfaces"
40 +HOMEPAGE="https://www.gtk.org/ https://gitlab.gnome.org/GNOME/gtk/"
41 +
42 +LICENSE="LGPL-2+"
43 +SLOT="4"
44 +IUSE="aqua broadway colord cups examples ffmpeg gstreamer +introspection sysprof test vulkan wayland +X cpu_flags_x86_f16c"
45 +REQUIRED_USE="
46 + || ( aqua wayland X )
47 + test? ( introspection )
48 +"
49 +
50 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
51 +
52 +COMMON_DEPEND="
53 + >=dev-libs/fribidi-0.19.7
54 + >=dev-libs/glib-2.66.0:2
55 + >=media-libs/graphene-1.9.1[introspection?]
56 + >=media-libs/libepoxy-1.4[egl,X(+)?]
57 + >=x11-libs/cairo-1.14[aqua?,glib,svg,X?]
58 + >=x11-libs/gdk-pixbuf-2.30:2[introspection?]
59 + >=x11-libs/pango-1.50.0[introspection?]
60 + media-libs/libpng:0=
61 + media-libs/tiff:0=
62 + media-libs/libjpeg-turbo:0=
63 + >=media-libs/harfbuzz-2.1.0:=
64 + x11-misc/shared-mime-info
65 +
66 + colord? ( >=x11-misc/colord-0.1.9:0= )
67 + cups? ( >=net-print/cups-2.0 )
68 + ffmpeg? ( media-video/ffmpeg )
69 + gstreamer? (
70 + >=media-libs/gst-plugins-bad-1.12.3
71 + >=media-libs/gst-plugins-base-1.12.3[opengl]
72 + )
73 + introspection? ( >=dev-libs/gobject-introspection-1.39:= )
74 + vulkan? ( media-libs/vulkan-loader:= )
75 + wayland? (
76 + >=dev-libs/wayland-1.20.0
77 + >=dev-libs/wayland-protocols-1.23
78 + media-libs/mesa[wayland]
79 + >=x11-libs/libxkbcommon-0.2
80 + )
81 + X? (
82 + >=app-accessibility/at-spi2-atk-2.5.3
83 + media-libs/fontconfig
84 + media-libs/mesa[X(+)]
85 + x11-libs/libX11
86 + >=x11-libs/libXi-1.8
87 + x11-libs/libXext
88 + >=x11-libs/libXrandr-1.5
89 + x11-libs/libXcursor
90 + x11-libs/libXfixes
91 + x11-libs/libXdamage
92 + x11-libs/libXinerama
93 + )
94 +"
95 +DEPEND="${COMMON_DEPEND}
96 + sysprof? ( >=dev-util/sysprof-capture-3.40.1:4 )
97 + X? ( x11-base/xorg-proto )
98 +"
99 +RDEPEND="${COMMON_DEPEND}
100 + >=dev-util/gtk-update-icon-cache-3
101 +"
102 +# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710
103 +PDEPEND="
104 + gnome-base/librsvg
105 + >=x11-themes/adwaita-icon-theme-3.14
106 +"
107 +BDEPEND="
108 + dev-libs/gobject-introspection-common
109 + introspection? (
110 + ${PYTHON_DEPS}
111 + $(python_gen_any_dep '
112 + dev-python/pygobject:3[${PYTHON_USEDEP}]
113 + ')
114 + )
115 + dev-python/docutils
116 + >=dev-util/gdbus-codegen-2.48
117 + dev-util/glib-utils
118 + >=sys-devel/gettext-0.19.7
119 + virtual/pkgconfig
120 + test? (
121 + dev-libs/glib:2
122 + wayland? ( dev-libs/weston[headless] )
123 + )
124 +"
125 +
126 +python_check_deps() {
127 + python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
128 +}
129 +
130 +pkg_setup() {
131 + use introspection && python-any-r1_pkg_setup
132 +}
133 +
134 +src_prepare() {
135 + default
136 + xdg_environment_reset
137 +
138 + # dev-python/docutils installs rst2man.py, not rst2man
139 + sed -i -e "s/'rst2man'/'rst2man.py'/" docs/reference/gtk/meson.build || die
140 + # Nothing should use gtk4-update-icon-cache and an unversioned one is shipped by dev-util/gtk-update-icon-cache
141 + sed -i -e '/gtk4-update-icon-cache/d' tools/meson.build || die
142 + # Workaround RWX ELF sections, https://gitlab.gnome.org/GNOME/gtk/-/issues/4598
143 + sed -i -e 's/^ld =.*/ld = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die
144 + sed -i -e 's/^objcopy =.*/objcopy = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die
145 +}
146 +
147 +src_configure() {
148 + local emesonargs=(
149 + # GDK backends
150 + $(meson_use X x11-backend)
151 + $(meson_use wayland wayland-backend)
152 + $(meson_use broadway broadway-backend)
153 + -Dwin32-backend=false
154 + $(meson_use aqua macos-backend)
155 +
156 + # Media backends
157 + $(meson_feature ffmpeg media-ffmpeg)
158 + $(meson_feature gstreamer media-gstreamer)
159 +
160 + # Print backends
161 + $(meson_feature cups print-cups)
162 +
163 + # Optional dependencies
164 + $(meson_feature vulkan)
165 + -Dcloudproviders=disabled # cloudprovider is not packaged in Gentoo yet
166 + $(meson_feature sysprof)
167 + -Dtracker=disabled # tracker3 is not packaged in Gentoo yet
168 + $(meson_feature colord)
169 + # Expected to fail with GCC < 11
170 + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71993
171 + $(meson_feature cpu_flags_x86_f16c f16c)
172 +
173 + # Documentation and introspection
174 + -Dgtk_doc=false # we ship pregenerated API docs from tarball
175 + -Dman-pages=true
176 + $(meson_feature introspection)
177 +
178 + # Demos and binaries
179 + $(meson_use examples build-examples)
180 + $(meson_use examples demos)
181 + $(meson_use test build-tests)
182 + -Dinstall-tests=false
183 + )
184 + meson_src_configure
185 +}
186 +
187 +src_test() {
188 + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
189 +
190 + if use X; then
191 + einfo "Running tests under X"
192 + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx meson_src_test --setup=x11
193 + fi
194 +
195 + if use wayland; then
196 + einfo "Running tests under Weston"
197 +
198 + export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
199 +
200 + weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 &
201 + compositor=$!
202 + export WAYLAND_DISPLAY=wayland-5
203 +
204 + GSETTINGS_SCHEMA_DIR="${S}/gtk" meson_src_test --setup=wayland
205 +
206 + exit_code=$?
207 + kill ${compositor}
208 + fi
209 +}
210 +
211 +src_install() {
212 + meson_src_install
213 +
214 + insinto /usr/share/gtk-doc/html
215 + # This will install API docs specific to X11 and wayland regardless of USE flags, but this is intentional
216 + doins -r "${S}"/docs/reference/{gtk/gtk4,gsk/gsk4,gdk/gdk4{,-wayland,-x11}}
217 +}
218 +
219 +pkg_preinst() {
220 + xdg_pkg_preinst
221 + gnome2_schemas_savelist
222 +}
223 +
224 +pkg_postinst() {
225 + xdg_pkg_postinst
226 + gnome2_schemas_update
227 +
228 + if ! has_version "app-text/evince"; then
229 + elog "Please install app-text/evince for print preview functionality."
230 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
231 + elog "add it to your settings.ini file."
232 + fi
233 +
234 + if use examples ; then
235 + optfeature "syntax highlighting in gtk4-demo" app-text/highlight
236 + fi
237 +}
238 +
239 +pkg_postrm() {
240 + xdg_pkg_postrm
241 + gnome2_schemas_update
242 +}