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: Thu, 28 Apr 2022 18:40:06
Message-Id: 1651171166.07cdd00b6fb3f0ac4332d3c8c28bc9ed23624ca0.mattst88@gentoo
1 commit: 07cdd00b6fb3f0ac4332d3c8c28bc9ed23624ca0
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 17:23:31 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 18:39:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07cdd00b
7
8 gui-libs/gtk: Version bump to 4.6.3
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.3.ebuild | 210 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 211 insertions(+)
15
16 diff --git a/gui-libs/gtk/Manifest b/gui-libs/gtk/Manifest
17 index 9144df81372b..1de93e0ef6f9 100644
18 --- a/gui-libs/gtk/Manifest
19 +++ b/gui-libs/gtk/Manifest
20 @@ -1,2 +1,3 @@
21 DIST gtk-4.6.1.tar.xz 22882528 BLAKE2B 921f57124af67523e9d820427b1f5a099d8dfe14982630437df9a821b9ba25eb3db6aa494e71aea26cec3dca4d76e958e150c515d128bdda51b1812bd7801c2c SHA512 7184c3a541172bcc712c00c0093426c5ff5cc54ad2de8529cfec17f8185966718b18b46cfb6c3d8067535909eb0275cd57e8887d2be7a2af459d14f5efb4d03b
22 DIST gtk-4.6.2.tar.xz 23060652 BLAKE2B 7cc3d5f06826c6f6d5c66ad251381dc34543672c778254c9044b7f58acfff9f7d0f44cdb0c124177cd0121a844a6168a46b8094d97565ef71c6ecfc9dc018865 SHA512 220959085b43c5a0bc496cb3d67213b73e1c597d6c799e5d788d0b75b664adc573b21c449850c7c0fbb7cbfafd77528c910f0e5eaa75a8fa59bff47e04c77f33
23 +DIST gtk-4.6.3.tar.xz 23060172 BLAKE2B 6ca25528fea54c9be2b8961790bbd8bcb933966c0c5faa203da7d9740a86561954ab595edf31db01df22008f4384648ec748d643369574eae4c4cc54cd06e7f7 SHA512 0e96b39a8171ccefc24808d1af8af8e3cbcc9b403c1bdfd85778ed2e824c93e3687b7baa1237b05fa35181d300eacfd6cc9f79c7a6eef70b365991f0a2769f71
24
25 diff --git a/gui-libs/gtk/gtk-4.6.3.ebuild b/gui-libs/gtk/gtk-4.6.3.ebuild
26 new file mode 100644
27 index 000000000000..ab9340eab60f
28 --- /dev/null
29 +++ b/gui-libs/gtk/gtk-4.6.3.ebuild
30 @@ -0,0 +1,210 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
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 ~ppc64 ~riscv ~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[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 + xdg_src_prepare
136 + # dev-python/docutils installs rst2man.py, not rst2man
137 + sed -i -e "s/'rst2man'/'rst2man.py'/" docs/reference/gtk/meson.build || die
138 + # Nothing should use gtk4-update-icon-cache and an unversioned one is shipped by dev-util/gtk-update-icon-cache
139 + sed -i -e '/gtk4-update-icon-cache/d' tools/meson.build || die
140 + # Workaround RWX ELF sections, https://gitlab.gnome.org/GNOME/gtk/-/issues/4598
141 + sed -i -e 's/^ld =.*/ld = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die
142 + sed -i -e 's/^objcopy =.*/objcopy = disabler()/g' gtk/meson.build demos/gtk-demo/meson.build demos/widget-factory/meson.build || die
143 +}
144 +
145 +src_configure() {
146 + local emesonargs=(
147 + # GDK backends
148 + $(meson_use X x11-backend)
149 + $(meson_use wayland wayland-backend)
150 + $(meson_use broadway broadway-backend)
151 + -Dwin32-backend=false
152 + $(meson_use aqua macos-backend)
153 +
154 + # Media backends
155 + $(meson_feature ffmpeg media-ffmpeg)
156 + $(meson_feature gstreamer media-gstreamer)
157 +
158 + # Print backends
159 + $(meson_feature cups print-cups)
160 +
161 + # Optional dependencies
162 + $(meson_feature vulkan)
163 + -Dcloudproviders=disabled # cloudprovider is not packaged in Gentoo yet
164 + $(meson_feature sysprof)
165 + -Dtracker=disabled # tracker3 is not packaged in Gentoo yet
166 + $(meson_feature colord)
167 + # Expected to fail with GCC < 11
168 + # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71993
169 + $(meson_feature cpu_flags_x86_f16c f16c)
170 +
171 + # Documentation and introspection
172 + -Dgtk_doc=false # we ship pregenerated API docs from tarball
173 + -Dman-pages=true
174 + $(meson_feature introspection)
175 +
176 + # Demos and binaries
177 + $(meson_use examples build-examples)
178 + $(meson_use examples demos)
179 + $(meson_use test build-tests)
180 + -Dinstall-tests=false
181 + )
182 + meson_src_configure
183 +}
184 +
185 +src_test() {
186 + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
187 +
188 + if use X; then
189 + einfo "Running tests under X"
190 + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx meson_src_test --setup=x11
191 + fi
192 +
193 + if use wayland; then
194 + einfo "Running tests under Weston"
195 +
196 + export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
197 +
198 + weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 &
199 + compositor=$!
200 + export WAYLAND_DISPLAY=wayland-5
201 +
202 + GSETTINGS_SCHEMA_DIR="${S}/gtk" meson_src_test --setup=wayland
203 +
204 + exit_code=$?
205 + kill ${compositor}
206 + fi
207 +}
208 +
209 +src_install() {
210 + meson_src_install
211 +
212 + insinto /usr/share/gtk-doc/html
213 + # This will install API docs specific to X11 and wayland regardless of USE flags, but this is intentional
214 + doins -r "${S}"/docs/reference/{gtk/gtk4,gsk/gsk4,gdk/gdk4{,-wayland,-x11}}
215 +}
216 +
217 +pkg_preinst() {
218 + xdg_pkg_preinst
219 + gnome2_schemas_savelist
220 +}
221 +
222 +pkg_postinst() {
223 + xdg_pkg_postinst
224 + gnome2_schemas_update
225 +
226 + if ! has_version "app-text/evince"; then
227 + elog "Please install app-text/evince for print preview functionality."
228 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
229 + elog "add it to your settings.ini file."
230 + fi
231 +
232 + if use examples ; then
233 + optfeature "syntax highlighting in gtk4-demo" app-text/highlight
234 + fi
235 +}
236 +
237 +pkg_postrm() {
238 + xdg_pkg_postrm
239 + gnome2_schemas_update
240 +}