Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/gtk+/
Date: Mon, 04 Apr 2022 22:20:19
Message-Id: 1649110795.325aa03c15acdb93715c93789216fe5f59021cde.sam@gentoo
1 commit: 325aa03c15acdb93715c93789216fe5f59021cde
2 Author: Christophe Lermytte <gentoo <AT> lermytte <DOT> be>
3 AuthorDate: Mon Apr 4 21:31:38 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 4 22:19:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=325aa03c
7
8 x11-libs/gtk+: add missing legacy icons
9
10 Suggestion by sam to temporarily depend on git to apply this binary upstream patch,
11 which should make it into the next upstream release.
12
13 Closes: https://bugs.gentoo.org/835966
14 Signed-off-by: Christophe Lermytte <gentoo <AT> lermytte.be>
15 Closes: https://github.com/gentoo/gentoo/pull/24909
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 x11-libs/gtk+/Manifest | 1 +
19 x11-libs/gtk+/gtk+-3.24.33-r1.ebuild | 257 +++++++++++++++++++++++++++++++++++
20 2 files changed, 258 insertions(+)
21
22 diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest
23 index 436bf39c5d33..f76d9384329a 100644
24 --- a/x11-libs/gtk+/Manifest
25 +++ b/x11-libs/gtk+/Manifest
26 @@ -1,4 +1,5 @@
27 DIST gtk+-2.24.33.tar.xz 12661828 BLAKE2B f3488b220aaee54bf36fa77e2112d060152e57938845d240014a7d43a5743b1d4de19cc09c683d9d238fd1967cd67cc3c493f2475e4e481f6709f5cdc652c65c SHA512 71b588797c81f727dfac8dcb1be193f7436f717d30ecf18eae2d3aeb0f445b3be4743400acac16435490db8f564f01032065d3f42d27871317f80c98aef929d5
28 DIST gtk+-3.24.31.tar.xz 22449112 BLAKE2B 2a09b199ad88ab8006e8d768ff6d2c5ddbdd22f84aa7d661e8e25f87a7436135edf0116202574a092536d3293800d83d9dcf1affff27e9baedeb27d31291e6a5 SHA512 e7f8e5003a919e297bd3e616acccbc5cc9bf9c9d41377c108c24db51817fcccec919abc12d05c0ed585d49526d52f0395a1c0f3ed9d9ef816bb0c4b2aa615f9b
29 DIST gtk+-3.24.32.tar.xz 22443900 BLAKE2B 0a07f4159d8c09dc46b22a98398020bf164a0a29ff4bc41aea158d697d95362b74558c9605eaafab366500cfeade9b8794baa980dd3023f71336ae8c49e1e4d7 SHA512 326640621b8aca59e9e46282c19b7a88f15469436e39bde7b845028014f245f23fef482db3589a7dbded20fcc82ec3adac66b837472f2b8c3016d285d38582c4
30 +DIST gtk+-3.24.33-add-legacy-icons.patch 157847 BLAKE2B 298a872d876421bb0d34f897b5d65984be768f623f294f0dd98e722df16ca2177c417e9508aa14fb81c75e3ff24981e018739d398748b62ae5450804f3286cee SHA512 a11b1e30a67214fbd65182efa0a7c1315a6fe75426d211a48678e5b4c13799b389b487e07b07b7a7044b7d3e277f7342a9842819e53176674ec71668481b9976
31 DIST gtk+-3.24.33.tar.xz 22449472 BLAKE2B 7fb75393ecd0a932ed5ef6ea3c694e61dec237403e87addca3bbfdcc1dd8dcd4646d11fab3f0a8b7717bfb8c0c64926132a5aa8b1009e8c20f656c6eaa593c1b SHA512 35c844af67d442a9d55197028c6b660668c701ad8f83a64791669fca2930ada15194452b59b2ee11f8068098986218744fe9fc4742897af5a6b3eba23c98395e
32
33 diff --git a/x11-libs/gtk+/gtk+-3.24.33-r1.ebuild b/x11-libs/gtk+/gtk+-3.24.33-r1.ebuild
34 new file mode 100644
35 index 000000000000..858f30b994b6
36 --- /dev/null
37 +++ b/x11-libs/gtk+/gtk+-3.24.33-r1.ebuild
38 @@ -0,0 +1,257 @@
39 +# Copyright 1999-2022 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +GNOME2_EAUTORECONF="yes"
44 +
45 +inherit gnome2 multilib multilib-minimal virtualx
46 +
47 +DESCRIPTION="Gimp ToolKit +"
48 +HOMEPAGE="https://www.gtk.org/"
49 +
50 +SRC_URI+=" https://gitlab.gnome.org/GNOME/gtk/-/commit/5a0ffbbb4568e39bdf26006e1bf18c1c1d0d597a.patch -> ${P}-add-legacy-icons.patch"
51 +
52 +LICENSE="LGPL-2+"
53 +SLOT="3"
54 +IUSE="aqua broadway colord cups examples gtk-doc +introspection sysprof test vim-syntax wayland +X xinerama"
55 +REQUIRED_USE="
56 + || ( aqua wayland X )
57 + xinerama? ( X )
58 +"
59 +
60 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
61 +
62 +# Upstream wants us to do their job:
63 +# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1
64 +RESTRICT="test"
65 +
66 +# FIXME: introspection data is built against system installation of gtk+:3,
67 +# bug #????
68 +COMMON_DEPEND="
69 + >=dev-libs/atk-2.32.0[introspection?,${MULTILIB_USEDEP}]
70 + >=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
71 + >=dev-libs/glib-2.57.2:2[${MULTILIB_USEDEP}]
72 + media-libs/fontconfig[${MULTILIB_USEDEP}]
73 + >=media-libs/harfbuzz-2.2.0:=
74 + >=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}]
75 + virtual/libintl[${MULTILIB_USEDEP}]
76 + >=x11-libs/cairo-1.14[aqua?,glib,svg,X?,${MULTILIB_USEDEP}]
77 + >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}]
78 + >=x11-libs/pango-1.44.0[introspection?,${MULTILIB_USEDEP}]
79 + x11-misc/shared-mime-info
80 +
81 + colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] )
82 + cups? ( >=net-print/cups-2.0[${MULTILIB_USEDEP}] )
83 + introspection? ( >=dev-libs/gobject-introspection-1.39:= )
84 + sysprof? ( >=dev-util/sysprof-capture-3.33.2:3[${MULTILIB_USEDEP}] )
85 + wayland? (
86 + >=dev-libs/wayland-1.14.91[${MULTILIB_USEDEP}]
87 + >=dev-libs/wayland-protocols-1.17
88 + media-libs/mesa[wayland,${MULTILIB_USEDEP}]
89 + >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}]
90 + )
91 + X? (
92 + >=app-accessibility/at-spi2-atk-2.15.1[${MULTILIB_USEDEP}]
93 + media-libs/mesa[X(+),${MULTILIB_USEDEP}]
94 + x11-libs/libX11[${MULTILIB_USEDEP}]
95 + x11-libs/libXcomposite[${MULTILIB_USEDEP}]
96 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
97 + x11-libs/libXdamage[${MULTILIB_USEDEP}]
98 + x11-libs/libXext[${MULTILIB_USEDEP}]
99 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
100 + >=x11-libs/libXi-1.8[${MULTILIB_USEDEP}]
101 + >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}]
102 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
103 + )
104 +"
105 +DEPEND="${COMMON_DEPEND}
106 + test? (
107 + media-fonts/font-cursor-misc
108 + media-fonts/font-misc-misc
109 + )
110 + X? ( x11-base/xorg-proto )
111 +"
112 +# gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90
113 +# gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90
114 +RDEPEND="${COMMON_DEPEND}
115 + >=dev-util/gtk-update-icon-cache-3
116 + !<x11-libs/vte-0.31.0:2.90
117 +"
118 +# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710
119 +PDEPEND="
120 + gnome-base/librsvg[${MULTILIB_USEDEP}]
121 + >=x11-themes/adwaita-icon-theme-3.14
122 + vim-syntax? ( app-vim/gtk-syntax )
123 +"
124 +
125 +# dev-vcs/git to apply the binary patch in SRC_URI, should be dropped on next release (3.24.34)
126 +BDEPEND="
127 + app-text/docbook-xml-dtd:4.1.2
128 + app-text/docbook-xsl-stylesheets
129 + dev-libs/gobject-introspection-common
130 + dev-libs/libxslt
131 + >=dev-util/gdbus-codegen-2.48
132 + dev-util/glib-utils
133 + >=dev-util/gtk-doc-am-1.20
134 + wayland? ( dev-util/wayland-scanner )
135 + >=sys-devel/gettext-0.19.7
136 + virtual/pkgconfig
137 + x11-libs/gdk-pixbuf:2
138 + gtk-doc? (
139 + app-text/docbook-xml-dtd:4.3
140 + >=dev-util/gtk-doc-1.20
141 + )
142 + dev-vcs/git
143 +"
144 +
145 +MULTILIB_CHOST_TOOLS=(
146 + /usr/bin/gtk-query-immodules-3.0$(get_exeext)
147 +)
148 +
149 +PATCHES=(
150 + # gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
151 + "${FILESDIR}"/${PN}-3.24.25-update-icon-cache.patch
152 +
153 + # Fix broken autotools logic
154 + "${FILESDIR}"/${PN}-3.22.20-libcloudproviders-automagic.patch
155 +)
156 +
157 +strip_builddir() {
158 + local rule=$1
159 + shift
160 + local directory=$1
161 + shift
162 + sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
163 + || die "Could not strip director ${directory} from build."
164 +}
165 +
166 +src_prepare() {
167 + if ! use test ; then
168 + # don't waste time building tests
169 + strip_builddir SRC_SUBDIRS testsuite Makefile.{am,in}
170 +
171 + # the tests dir needs to be build now because since commit
172 + # 7ff3c6df80185e165e3bf6aa31bd014d1f8bf224 tests/gtkgears.o needs to be there
173 + # strip_builddir SRC_SUBDIRS tests Makefile.{am,in}
174 + fi
175 +
176 + if ! use examples; then
177 + # don't waste time building demos
178 + strip_builddir SRC_SUBDIRS demos Makefile.{am,in}
179 + strip_builddir SRC_SUBDIRS examples Makefile.{am,in}
180 + fi
181 +
182 + # bug #836763
183 + git apply "${DISTDIR}/${P}-add-legacy-icons.patch" || die
184 +
185 + gnome2_src_prepare
186 +}
187 +
188 +multilib_src_configure() {
189 + local myconf=(
190 + $(use_enable aqua quartz-backend)
191 + $(use_enable broadway broadway-backend)
192 + $(use_enable colord)
193 + $(use_enable cups cups auto)
194 + $(multilib_native_use_enable gtk-doc)
195 + $(multilib_native_use_enable introspection)
196 + $(use_enable sysprof profiler)
197 + $(use_enable wayland wayland-backend)
198 + $(use_enable X x11-backend)
199 + $(use_enable X xcomposite)
200 + $(use_enable X xdamage)
201 + $(use_enable X xfixes)
202 + $(use_enable X xkb)
203 + $(use_enable X xrandr)
204 + $(use_enable xinerama)
205 + # cloudprovider is not packaged in Gentoo yet
206 + --disable-cloudproviders
207 + --disable-papi
208 + --enable-man
209 + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog
210 + # need libdir here to avoid a double slash in a path that libtool doesn't
211 + # grok so well during install (// between $EPREFIX and usr ...)
212 + # TODO: Is this still the case?
213 + --libdir="${EPREFIX}"/usr/$(get_libdir)
214 + CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config"
215 + )
216 +
217 + if use wayland; then
218 + myconf+=(
219 + # Include wayland immodule into gtk itself, to avoid problems like
220 + # https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a
221 + # user overridden GTK_IM_MODULE envvar
222 + --with-included-immodules=wayland
223 + )
224 + fi;
225 +
226 + ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
227 +
228 + # work-around gtk-doc out-of-source brokedness
229 + if multilib_is_native_abi; then
230 + local d
231 + for d in gdk gtk libgail-util; do
232 + ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
233 + done
234 + fi
235 +}
236 +
237 +multilib_src_test() {
238 + "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
239 + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check
240 +}
241 +
242 +multilib_src_install() {
243 + gnome2_src_install
244 +}
245 +
246 +multilib_src_install_all() {
247 + insinto /etc/gtk-3.0
248 + doins "${FILESDIR}"/settings.ini
249 + # Skip README.{in,commits,win32} that would get installed by default
250 + DOCS=( AUTHORS ChangeLog NEWS README )
251 + einstalldocs
252 +}
253 +
254 +pkg_preinst() {
255 + gnome2_pkg_preinst
256 +
257 + multilib_pkg_preinst() {
258 + # Make immodules.cache belongs to gtk+ alone
259 + local cache="/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
260 +
261 + if [[ -e ${EROOT}${cache} ]]; then
262 + cp "${EROOT}${cache}" "${ED}${cache}" || die
263 + else
264 + touch "${ED}${cache}" || die
265 + fi
266 + }
267 + multilib_parallel_foreach_abi multilib_pkg_preinst
268 +}
269 +
270 +pkg_postinst() {
271 + gnome2_pkg_postinst
272 +
273 + multilib_pkg_postinst() {
274 + gnome2_query_immodules_gtk3 \
275 + || die "Update immodules cache failed (for ${ABI})"
276 + }
277 + multilib_parallel_foreach_abi multilib_pkg_postinst
278 +
279 + if ! has_version "app-text/evince"; then
280 + elog "Please install app-text/evince for print preview functionality."
281 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
282 + elog "add it to your settings.ini file."
283 + fi
284 +}
285 +
286 +pkg_postrm() {
287 + gnome2_pkg_postrm
288 +
289 + if [[ -z ${REPLACED_BY_VERSION} ]]; then
290 + multilib_pkg_postrm() {
291 + rm -f "${EROOT}/usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
292 + }
293 + multilib_foreach_abi multilib_pkg_postrm
294 + fi
295 +}