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