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: Tue, 13 Sep 2022 17:21:20
Message-Id: 1663089667.aaaeb19632bbb0c8793aa93425b4bfa354f8442d.mattst88@gentoo
1 commit: aaaeb19632bbb0c8793aa93425b4bfa354f8442d
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 13 17:03:44 2022 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 13 17:21:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaaeb196
7
8 gui-libs/gtk: Version bump to 4.8.0
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 gui-libs/gtk/Manifest | 1 +
13 gui-libs/gtk/gtk-4.8.0.ebuild | 213 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 214 insertions(+)
15
16 diff --git a/gui-libs/gtk/Manifest b/gui-libs/gtk/Manifest
17 index a6c6143e99ff..6ccbf02adbef 100644
18 --- a/gui-libs/gtk/Manifest
19 +++ b/gui-libs/gtk/Manifest
20 @@ -1,2 +1,3 @@
21 DIST gtk-4.6.6.tar.xz 23085304 BLAKE2B 2f0eacb9aaa3fad4e8d99feeadc93e04151f6c4552412d5b7485b972e97c8c9a7296143b39791e9e3230546770174a208ba6906179b9fed37414ee83a1980abb SHA512 b743d99029d7d51db19396641023eefd5d25bbacbd89ad6660d43e382b26fe6cc5e9ce8f0dbb3f4ac7d2143db617ea0c2e2d3cc8926fc93d735eb76ffb2f8309
22 DIST gtk-4.6.7.tar.xz 22885556 BLAKE2B ff3647fbb87fb7743c6aaf84f4de463275ff5816ccdba7f29425ee5268677e53ef56507ddd71447def5a1707e7509958068d5b8a7c64816cc3a1541691d7a262 SHA512 7f9068f66b472e796c1611625a34466b13aa51bce2dfc7661928e6d8087ed39ed0f6adf47a6691609b85540c588621bebc5951e81435277071abe7d2facf28bb
23 +DIST gtk-4.8.0.tar.xz 20502660 BLAKE2B 89a1cebc56cbb372dbdab6186b2661fa466bf6946fb5197b8c2334e228e4531749f96233a1243c6950d8ebcd0624b1d93d4d4d212ba1dec18a3d1b3857ba7da9 SHA512 c48fa63c197d9dbff98485cac57092d0af9ac56993fee5b622fc91c473f06489986105382222d75488fa95272377a9177f56a7cb3a4d2f159eb8d70f80cdadcc
24
25 diff --git a/gui-libs/gtk/gtk-4.8.0.ebuild b/gui-libs/gtk/gtk-4.8.0.ebuild
26 new file mode 100644
27 index 000000000000..874dd2d40730
28 --- /dev/null
29 +++ b/gui-libs/gtk/gtk-4.8.0.ebuild
30 @@ -0,0 +1,213 @@
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.6.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.21.0
77 + >=dev-libs/wayland-protocols-1.25
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 + -Dupdate_screenshots=false
176 + -Dman-pages=true
177 + $(meson_feature introspection)
178 +
179 + # Demos and binaries
180 + $(meson_use examples build-examples)
181 + $(meson_use examples demos)
182 + $(meson_use test build-tests)
183 + -Dinstall-tests=false
184 + )
185 + meson_src_configure
186 +}
187 +
188 +src_test() {
189 + "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
190 +
191 + if use X; then
192 + einfo "Running tests under X"
193 + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx meson_src_test --setup=x11
194 + fi
195 +
196 + if use wayland; then
197 + einfo "Running tests under Weston"
198 +
199 + export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
200 +
201 + weston --backend=headless-backend.so --socket=wayland-5 --idle-time=0 &
202 + compositor=$!
203 + export WAYLAND_DISPLAY=wayland-5
204 +
205 + GSETTINGS_SCHEMA_DIR="${S}/gtk" meson_src_test --setup=wayland
206 +
207 + exit_code=$?
208 + kill ${compositor}
209 + fi
210 +}
211 +
212 +src_install() {
213 + meson_src_install
214 +
215 + insinto /usr/share/gtk-doc/html
216 + # This will install API docs specific to X11 and wayland regardless of USE flags, but this is intentional
217 + doins -r "${S}"/docs/reference/{gtk/gtk4,gsk/gsk4,gdk/gdk4{,-wayland,-x11}}
218 +}
219 +
220 +pkg_preinst() {
221 + xdg_pkg_preinst
222 + gnome2_schemas_savelist
223 +}
224 +
225 +pkg_postinst() {
226 + xdg_pkg_postinst
227 + gnome2_schemas_update
228 +
229 + if ! has_version "app-text/evince"; then
230 + elog "Please install app-text/evince for print preview functionality."
231 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
232 + elog "add it to your settings.ini file."
233 + fi
234 +
235 + if use examples ; then
236 + optfeature "syntax highlighting in gtk4-demo" app-text/highlight
237 + fi
238 +}
239 +
240 +pkg_postrm() {
241 + xdg_pkg_postrm
242 + gnome2_schemas_update
243 +}