1 |
commit: b4c29513c509ba119680b94e2ab8cda2a6a19de2 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 1 02:11:19 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 1 02:56:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4c29513 |
7 |
|
8 |
x11-libs/gtk+: Version bump to 2.24.33 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/725852 |
11 |
Closes: https://bugs.gentoo.org/786411 |
12 |
Closes: https://bugs.gentoo.org/787257 |
13 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
14 |
|
15 |
x11-libs/gtk+/Manifest | 1 + |
16 |
x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch | 12 + |
17 |
x11-libs/gtk+/gtk+-2.24.33.ebuild | 308 ++++++++++++++++++++++ |
18 |
3 files changed, 321 insertions(+) |
19 |
|
20 |
diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest |
21 |
index 71c8ffe5729..09938d12d58 100644 |
22 |
--- a/x11-libs/gtk+/Manifest |
23 |
+++ b/x11-libs/gtk+/Manifest |
24 |
@@ -1,4 +1,5 @@ |
25 |
DIST gtk+-2.24.32-patchset-r1.tar.xz 13364 BLAKE2B 15e5429b11cc4ccef1bf44105c790b5325e833ab12f393fe718c06470b90f3e4004bea4b51076a725f4bb10bcfd0c48b7063d9b9b021919ad0367d1b981be980 SHA512 1a15dce7578a914585981426d2e5d1cc45866866a70c3f443d1867ab1c0c28fb279bde6c3117b28eec2758a62c1b54bb6fb1b382ad6e9a7cf0114b13f2afd858 |
26 |
DIST gtk+-2.24.32.tar.xz 12620860 BLAKE2B 03f4c0a8be98473f62bc8c86859937969c4169960a5f93d37ff6dcde00413215fa6c7125b15781bf50d67b40aa0056cb71b83fb50acb2c3467b5deb3c8d938f0 SHA512 8e8fd9ae32f1d6fb544da260f00599f0f05090d910d767b06ef086ab4f1f8373a29bb0da9767761c9b5f4cfd51b5c45d0fa5d39b0428c839ddf0a579df806696 |
27 |
+DIST gtk+-2.24.33.tar.xz 12661828 BLAKE2B f3488b220aaee54bf36fa77e2112d060152e57938845d240014a7d43a5743b1d4de19cc09c683d9d238fd1967cd67cc3c493f2475e4e481f6709f5cdc652c65c SHA512 71b588797c81f727dfac8dcb1be193f7436f717d30ecf18eae2d3aeb0f445b3be4743400acac16435490db8f564f01032065d3f42d27871317f80c98aef929d5 |
28 |
DIST gtk+-3.24.26.tar.xz 21404732 BLAKE2B 8260b684b4d508af6b9a5060e47847254ae6bf647ae1dfa131bdbb35f2eaeb3f45ba749e9ad6e1920c05dab660d78424e38d974070928c56e91fc422a62d87db SHA512 d3023e9cd0c1f0de384266c4bd4549a7006ff475de82617de16378617a4a669645ad355cbabfe2ff43b19dddfbba7b9413ec98c14ed0f5ee3a61466b3d6eff76 |
29 |
DIST gtk+-3.24.28.tar.xz 22783312 BLAKE2B b0a8dd5619feacf44880bb1ef168fce5431802c401fbb31408a4a4a9822755ca76cc309eb0f271e98cce63ad7f5cbec4d0d6c947a631843bfbe509a81836778b SHA512 65856ae06e4a863c56b3718c0cc3d0ca9f61a62a02ddef30904432300cd455851efee3fa1e5661659eaacbdfca45650ee7c8a2d4eca004ad2936c1e26c720c15 |
30 |
|
31 |
diff --git a/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch b/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..0c74d962ecf |
34 |
--- /dev/null |
35 |
+++ b/x11-libs/gtk+/files/gtk+-2.24.33-respect-NM.patch |
36 |
@@ -0,0 +1,12 @@ |
37 |
+https://bugs.gentoo.org/725852 |
38 |
+--- a/configure.ac |
39 |
++++ b/configure.ac |
40 |
+@@ -190,7 +190,7 @@ m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) |
41 |
+ AC_SYS_LARGEFILE |
42 |
+ |
43 |
+ AM_PROG_AS |
44 |
+-AC_PATH_TOOL(NM, nm, nm) |
45 |
++AC_CHECK_TOOL(NM, nm, nm) |
46 |
+ |
47 |
+ dnl Initialize maintainer mode |
48 |
+ AM_MAINTAINER_MODE([enable]) |
49 |
|
50 |
diff --git a/x11-libs/gtk+/gtk+-2.24.33.ebuild b/x11-libs/gtk+/gtk+-2.24.33.ebuild |
51 |
new file mode 100644 |
52 |
index 00000000000..8a86eaa7611 |
53 |
--- /dev/null |
54 |
+++ b/x11-libs/gtk+/gtk+-2.24.33.ebuild |
55 |
@@ -0,0 +1,308 @@ |
56 |
+# Copyright 1999-2021 Gentoo Authors |
57 |
+# Distributed under the terms of the GNU General Public License v2 |
58 |
+ |
59 |
+EAPI=7 |
60 |
+GNOME2_EAUTORECONF="yes" |
61 |
+ |
62 |
+inherit flag-o-matic gnome2 multilib multilib-minimal readme.gentoo-r1 virtualx |
63 |
+ |
64 |
+DESCRIPTION="Gimp ToolKit +" |
65 |
+HOMEPAGE="https://www.gtk.org/" |
66 |
+ |
67 |
+LICENSE="LGPL-2+" |
68 |
+SLOT="2" |
69 |
+IUSE="aqua cups examples +introspection test vim-syntax xinerama" |
70 |
+REQUIRED_USE=" |
71 |
+ xinerama? ( !aqua ) |
72 |
+" |
73 |
+ |
74 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
75 |
+ |
76 |
+# Upstream wants us to do their job: |
77 |
+# https://bugzilla.gnome.org/show_bug.cgi?id=768663#c1 |
78 |
+RESTRICT="test" |
79 |
+ |
80 |
+COMMON_DEPEND=" |
81 |
+ >=dev-libs/atk-2.10.0[introspection?,${MULTILIB_USEDEP}] |
82 |
+ >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] |
83 |
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] |
84 |
+ virtual/libintl[${MULTILIB_USEDEP}] |
85 |
+ >=x11-libs/cairo-1.12.14-r4:=[aqua?,svg,${MULTILIB_USEDEP}] |
86 |
+ >=x11-libs/gdk-pixbuf-2.30.7:2[introspection?,${MULTILIB_USEDEP}] |
87 |
+ >=x11-libs/pango-1.36.3[introspection?,${MULTILIB_USEDEP}] |
88 |
+ x11-misc/shared-mime-info |
89 |
+ |
90 |
+ cups? ( >=net-print/cups-1.7.1-r2:=[${MULTILIB_USEDEP}] ) |
91 |
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3:= ) |
92 |
+ !aqua? ( |
93 |
+ >=x11-libs/cairo-1.12.14-r4:=[aqua?,svg,X,${MULTILIB_USEDEP}] |
94 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
95 |
+ >=x11-libs/libXcomposite-0.4.4-r1[${MULTILIB_USEDEP}] |
96 |
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}] |
97 |
+ >=x11-libs/libXdamage-1.1.4-r1[${MULTILIB_USEDEP}] |
98 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
99 |
+ >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] |
100 |
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}] |
101 |
+ >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}] |
102 |
+ >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}] |
103 |
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] ) |
104 |
+ ) |
105 |
+" |
106 |
+DEPEND="${COMMON_DEPEND} |
107 |
+ !aqua? ( x11-base/xorg-proto ) |
108 |
+ test? ( |
109 |
+ media-fonts/font-cursor-misc |
110 |
+ media-fonts/font-misc-misc |
111 |
+ x11-themes/hicolor-icon-theme |
112 |
+ ) |
113 |
+" |
114 |
+ |
115 |
+# gtk+-2.24.8 breaks Alt key handling in <=x11-libs/vte-0.28.2:0 |
116 |
+# Add blocker against old gtk-builder-convert to be sure we maintain both |
117 |
+# in sync. |
118 |
+RDEPEND="${COMMON_DEPEND} |
119 |
+ >=dev-util/gtk-update-icon-cache-2 |
120 |
+ >=x11-themes/adwaita-icon-theme-3.14 |
121 |
+ x11-themes/gnome-themes-standard |
122 |
+ !<dev-util/gtk-builder-convert-${PV} |
123 |
+" |
124 |
+# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710 |
125 |
+PDEPEND=" |
126 |
+ gnome-base/librsvg[${MULTILIB_USEDEP}] |
127 |
+ x11-themes/gtk-engines-adwaita |
128 |
+ vim-syntax? ( app-vim/gtk-syntax ) |
129 |
+" |
130 |
+# docbook-4.1.2 and xsl required for man pages |
131 |
+# docbook-4.3 required for gtk-doc |
132 |
+BDEPEND=" |
133 |
+ app-text/docbook-xml-dtd:4.1.2 |
134 |
+ app-text/docbook-xml-dtd:4.3 |
135 |
+ app-text/docbook-xsl-stylesheets |
136 |
+ dev-libs/gobject-introspection-common |
137 |
+ dev-libs/libxslt |
138 |
+ dev-util/glib-utils |
139 |
+ >=dev-util/gtk-doc-am-1.20 |
140 |
+ >=sys-devel/gettext-0.18.3 |
141 |
+ virtual/pkgconfig |
142 |
+ examples? ( x11-libs/gdk-pixbuf ) |
143 |
+" |
144 |
+ |
145 |
+DISABLE_AUTOFORMATTING="yes" |
146 |
+DOC_CONTENTS="To make the gtk2 file chooser use 'current directory' mode by default, |
147 |
+edit ~/.config/gtk-2.0/gtkfilechooser.ini to contain the following: |
148 |
+[Filechooser Settings] |
149 |
+StartupMode=cwd" |
150 |
+ |
151 |
+MULTILIB_CHOST_TOOLS=( |
152 |
+ /usr/bin/gtk-query-immodules-2.0$(get_exeext) |
153 |
+) |
154 |
+ |
155 |
+PATCHES=( |
156 |
+ # Fix tests running when building out of sources, bug #510596, upstream bug #730319 |
157 |
+ "${FILESDIR}"/${PN}-2.24.24-out-of-source.patch |
158 |
+ # Rely on split gtk-update-icon-cache package, bug #528810 |
159 |
+ "${FILESDIR}"/${PN}-2.24.31-update-icon-cache.patch # requires eautoreconf |
160 |
+ # Respect ${NM}, bug #725852 |
161 |
+ "${FILESDIR}"/${PN}-2.24.33-respect-NM.patch # requires eautoreconf |
162 |
+) |
163 |
+ |
164 |
+strip_builddir() { |
165 |
+ local rule=$1 |
166 |
+ shift |
167 |
+ local directory=$1 |
168 |
+ shift |
169 |
+ sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \ |
170 |
+ || die "Could not strip director ${directory} from build." |
171 |
+} |
172 |
+ |
173 |
+set_gtk2_confdir() { |
174 |
+ # An arch specific config directory is used on multilib systems |
175 |
+ GTK2_CONFDIR="/etc/gtk-2.0/${CHOST}" |
176 |
+} |
177 |
+ |
178 |
+src_prepare() { |
179 |
+ # Various glib marshaller churn could break build against a different glib version, force regeneration |
180 |
+ rm -v gdk/gdkmarshalers.{c,h} gtk/gtkmarshal.{c,h} gtk/gtkmarshalers.{c,h} \ |
181 |
+ perf/marshalers.{c,h} gtk/gtkaliasdef.c gtk/gtkalias.h || die |
182 |
+ |
183 |
+ # Stop trying to build unmaintained docs, bug #349754, upstream bug #623150 |
184 |
+ strip_builddir SUBDIRS tutorial docs/Makefile.{am,in} |
185 |
+ strip_builddir SUBDIRS faq docs/Makefile.{am,in} |
186 |
+ |
187 |
+ # -O3 and company cause random crashes in applications, bug #133469 |
188 |
+ replace-flags -O3 -O2 |
189 |
+ strip-flags |
190 |
+ |
191 |
+ if ! use test ; then |
192 |
+ # don't waste time building tests |
193 |
+ strip_builddir SRC_SUBDIRS tests Makefile.{am,in} |
194 |
+ strip_builddir SUBDIRS tests gdk/Makefile.{am,in} gtk/Makefile.{am,in} |
195 |
+ else |
196 |
+ # Non-working test in gentoo's env |
197 |
+ sed 's:\(g_test_add_func ("/ui-tests/keys-events.*\):/*\1*/:g' \ |
198 |
+ -i gtk/tests/testing.c || die "sed 1 failed" |
199 |
+ |
200 |
+ # Cannot work because glib is too clever to find real user's home |
201 |
+ # gentoo bug #285687, upstream bug #639832 |
202 |
+ # XXX: /!\ Pay extra attention to second sed when bumping /!\ |
203 |
+ sed '/TEST_PROGS.*recentmanager/d' -i gtk/tests/Makefile.am \ |
204 |
+ || die "failed to disable recentmanager test (1)" |
205 |
+ sed '/^TEST_PROGS =/,+3 s/recentmanager//' -i gtk/tests/Makefile.in \ |
206 |
+ || die "failed to disable recentmanager test (2)" |
207 |
+ sed 's:\({ "GtkFileChooserButton".*},\):/*\1*/:g' -i gtk/tests/object.c \ |
208 |
+ || die "failed to disable recentmanager test (3)" |
209 |
+ |
210 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=617473 |
211 |
+ sed -i -e 's:pltcheck.sh:$(NULL):g' \ |
212 |
+ gtk/Makefile.am || die |
213 |
+ |
214 |
+ # UI tests require immodules already installed; bug #413185 |
215 |
+ if ! has_version 'x11-libs/gtk+:2'; then |
216 |
+ ewarn "Disabling UI tests because this is the first install of" |
217 |
+ ewarn "gtk+:2 on this machine. Please re-run the tests after ${P}" |
218 |
+ ewarn "has been installed." |
219 |
+ sed '/g_test_add_func.*ui-tests/ d' \ |
220 |
+ -i gtk/tests/testing.c || die "sed 2 failed" |
221 |
+ fi |
222 |
+ fi |
223 |
+ |
224 |
+ if ! use examples; then |
225 |
+ # don't waste time building demos |
226 |
+ strip_builddir SRC_SUBDIRS demos Makefile.{am,in} |
227 |
+ fi |
228 |
+ |
229 |
+ gnome2_src_prepare |
230 |
+} |
231 |
+ |
232 |
+multilib_src_configure() { |
233 |
+ [[ ${ABI} == ppc64 ]] && append-flags -mminimal-toc |
234 |
+ |
235 |
+ ECONF_SOURCE=${S} \ |
236 |
+ gnome2_src_configure \ |
237 |
+ $(usex aqua --with-gdktarget=quartz --with-gdktarget=x11) \ |
238 |
+ $(usex aqua "" --with-xinput) \ |
239 |
+ $(use_enable cups cups auto) \ |
240 |
+ $(multilib_native_use_enable introspection) \ |
241 |
+ $(use_enable xinerama) \ |
242 |
+ --disable-papi \ |
243 |
+ --enable-man \ |
244 |
+ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \ |
245 |
+ CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config" |
246 |
+ |
247 |
+ # work-around gtk-doc out-of-source brokedness |
248 |
+ if multilib_is_native_abi; then |
249 |
+ local d |
250 |
+ for d in gdk gtk libgail-util; do |
251 |
+ ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die |
252 |
+ done |
253 |
+ fi |
254 |
+} |
255 |
+ |
256 |
+multilib_src_test() { |
257 |
+ virtx emake check |
258 |
+} |
259 |
+ |
260 |
+multilib_src_install() { |
261 |
+ gnome2_src_install |
262 |
+} |
263 |
+ |
264 |
+multilib_src_install_all() { |
265 |
+ # see bug #133241 |
266 |
+ # Also set more default variables in sync with gtk3 and other distributions |
267 |
+ insinto /usr/share/gtk-2.0 |
268 |
+ newins - gtkrc <<- 'EOF' |
269 |
+ gtk-fallback-icon-theme = "gnome" |
270 |
+ gtk-theme-name = "Adwaita" |
271 |
+ gtk-icon-theme-name = "Adwaita" |
272 |
+ gtk-cursor-theme-name = "Adwaita" |
273 |
+ EOF |
274 |
+ |
275 |
+ einstalldocs |
276 |
+ rm "${ED}"/usr/share/doc/${P}/ChangeLog # empty file |
277 |
+ |
278 |
+ # dev-util/gtk-builder-convert split off into a separate package, #402905 |
279 |
+ rm "${ED}"/usr/bin/gtk-builder-convert || die |
280 |
+ rm "${ED}"/usr/share/man/man1/gtk-builder-convert.* || die |
281 |
+ |
282 |
+ readme.gentoo_create_doc |
283 |
+} |
284 |
+ |
285 |
+pkg_preinst() { |
286 |
+ gnome2_pkg_preinst |
287 |
+ |
288 |
+ multilib_pkg_preinst() { |
289 |
+ # Make immodules.cache belongs to gtk+ alone |
290 |
+ local cache="/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" |
291 |
+ |
292 |
+ if [[ -e "${EROOT}${cache}" ]]; then |
293 |
+ cp "${EROOT}${cache}" "${ED}${cache}" || die |
294 |
+ else |
295 |
+ touch "${ED}${cache}" || die |
296 |
+ fi |
297 |
+ } |
298 |
+ multilib_parallel_foreach_abi multilib_pkg_preinst |
299 |
+} |
300 |
+ |
301 |
+pkg_postinst() { |
302 |
+ gnome2_pkg_postinst |
303 |
+ |
304 |
+ multilib_pkg_postinst() { |
305 |
+ gnome2_query_immodules_gtk2 \ |
306 |
+ || die "Update immodules cache failed (for ${ABI})" |
307 |
+ } |
308 |
+ multilib_parallel_foreach_abi multilib_pkg_postinst |
309 |
+ |
310 |
+ set_gtk2_confdir |
311 |
+ |
312 |
+ if [ -e "${EROOT}/etc/gtk-2.0/gtk.immodules" ]; then |
313 |
+ elog "File /etc/gtk-2.0/gtk.immodules has been moved to \$CHOST" |
314 |
+ elog "aware location. Removing deprecated file." |
315 |
+ rm -f "${EROOT}/etc/gtk-2.0/gtk.immodules" |
316 |
+ fi |
317 |
+ |
318 |
+ if [ -e "${EROOT}${GTK2_CONFDIR}/gtk.immodules" ]; then |
319 |
+ elog "File /etc/gtk-2.0/gtk.immodules has been moved to" |
320 |
+ elog "${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" |
321 |
+ elog "Removing deprecated file." |
322 |
+ rm -f "${EROOT}${GTK2_CONFDIR}/gtk.immodules" |
323 |
+ fi |
324 |
+ |
325 |
+ # pixbufs are now handled by x11-libs/gdk-pixbuf |
326 |
+ if [ -e "${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders" ]; then |
327 |
+ elog "File ${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders is now handled by x11-libs/gdk-pixbuf" |
328 |
+ elog "Removing deprecated file." |
329 |
+ rm -f "${EROOT}${GTK2_CONFDIR}/gdk-pixbuf.loaders" |
330 |
+ fi |
331 |
+ |
332 |
+ # two checks needed since we dropped multilib conditional |
333 |
+ if [ -e "${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders" ]; then |
334 |
+ elog "File ${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders is now handled by x11-libs/gdk-pixbuf" |
335 |
+ elog "Removing deprecated file." |
336 |
+ rm -f "${EROOT}/etc/gtk-2.0/gdk-pixbuf.loaders" |
337 |
+ fi |
338 |
+ |
339 |
+ if [ -e "${EROOT}"/usr/lib/gtk-2.0/2.[^1]* ]; then |
340 |
+ elog "You need to rebuild ebuilds that installed into" "${EROOT}"/usr/lib/gtk-2.0/2.[^1]* |
341 |
+ elog "to do that you can use qfile from portage-utils:" |
342 |
+ elog "emerge -va1 \$(qfile -qC ${EPREFIX}/usr/lib/gtk-2.0/2.[^1]*)" |
343 |
+ fi |
344 |
+ |
345 |
+ if ! has_version "app-text/evince"; then |
346 |
+ elog "Please install app-text/evince for print preview functionality." |
347 |
+ elog "Alternatively, check \"gtk-print-preview-command\" documentation and" |
348 |
+ elog "add it to your gtkrc." |
349 |
+ fi |
350 |
+ |
351 |
+ readme.gentoo_print_elog |
352 |
+} |
353 |
+ |
354 |
+pkg_postrm() { |
355 |
+ gnome2_pkg_postrm |
356 |
+ |
357 |
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then |
358 |
+ multilib_pkg_postrm() { |
359 |
+ rm -f "${EROOT}/usr/$(get_libdir)/gtk-2.0/2.10.0/immodules.cache" |
360 |
+ } |
361 |
+ multilib_foreach_abi multilib_pkg_postrm |
362 |
+ fi |
363 |
+} |