Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/gtk+/
Date: Sun, 05 Mar 2017 15:45:46
Message-Id: 1488728168.8f5fa722ae8c53074fa4b2c210febca68b4fb429.leio@gentoo
1 commit: 8f5fa722ae8c53074fa4b2c210febca68b4fb429
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 5 15:33:51 2017 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 5 15:36:08 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f5fa722
7
8 x11-libs/gtk+: bump to 3.22.9 and apply various fixes
9
10 * Stop inheriting eutils - epatch isn't used with EAPI-6 and einstalldocs
11 comes from EAPI-6 itself as well
12 * Remove cairo[svg] comment as it is a required dep since long ago after
13 the bug was filed upstream - it is needed by file print backend (print to
14 file), which is not optional
15 * Adapt to libepoxy changes that made epoxy/glx.h and related source code
16 optional and put it behind a USE flag, bug #611710
17 * Remove unnecessary libXrender dependency (though cairo[X] will still
18 pull it in), bug #611032
19 * Remove -O3 to -O2 replacement and strip-flags; apparently people have
20 been doing that with success, so lets give it a chance after issues that
21 happened with -O3 over 10 years ago
22 * Install select docs instead of the default ones, which include an
23 uninteresting README.win32, README.in source file that for some reason
24 is shipped in tarball, README.commits that is interesting for git usage
25 instructions only, and a useless ChangeLog that isn't properly generated
26 anymore. The DOCS array is declared locally in multilib_src_install_all,
27 because gnome2_src_install calls "default" which calls einstalldocs too,
28 which would fail if the DOCS is given in global scope and it sees it, as
29 the docs won't be found in multilib WORKDIR.
30
31 Gentoo-bug: 611032
32 Gentoo-bug: 611710
33 Package-Manager: Portage-2.3.3, Repoman-2.3.1
34
35 x11-libs/gtk+/Manifest | 1 +
36 x11-libs/gtk+/gtk+-3.22.9.ebuild | 229 +++++++++++++++++++++++++++++++++++++++
37 2 files changed, 230 insertions(+)
38
39 diff --git a/x11-libs/gtk+/Manifest b/x11-libs/gtk+/Manifest
40 index 86a1ca2b70a..ee67764f7dc 100644
41 --- a/x11-libs/gtk+/Manifest
42 +++ b/x11-libs/gtk+/Manifest
43 @@ -1,3 +1,4 @@
44 DIST gtk+-2.24.31.tar.xz 12805344 SHA256 68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658 SHA512 75b846661308d94b5236e7e1c367deabf57753792ca87e92f9769822dd5ec90e00cd8d5574adcc12162e3702e1ae6dc152278a1d218f9bd9e4d1c8dc1dd520c1 WHIRLPOOL 6f59d444b28910b0f4cd7d0d0bf04f8e442acd945205679c19e5adf7ca3f8e7406d4095e9ff9ca597882eb937a7551e19af63b6597e7b57c0babe5b061f9110e
45 DIST gtk+-3.20.9.tar.xz 17174872 SHA256 83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17 SHA512 5848403959f76633511009231c80a814cfe24a7ba07c9429704f432191e51b54d3e6621ce5b578f79999f21993920af3a45c8d03dad6ba03af5f9a342b32626e WHIRLPOOL 7964b82dabf72b5d45a34565874ba02e0dda09b0f358f640ca0c602c3c7aa4618432829d047794f5f202424c34c837bbdc31ccb3c5457768e252f048afd30107
46 DIST gtk+-3.22.5.tar.xz 18250876 SHA256 693fa0ac643c59ccd51db99cabe476b4e0a41fd4f0c3c8b3e3ef38f94b2e7334 SHA512 f1969612a89c67fb0414843f3cc51ce91894c9fdfdf6b6e00472d761848b5b1be529d35f2da43c26d345e4b39e81980d2de53d16f194d96775ba21f3c6d0926c WHIRLPOOL 6012dce8f5b55005124a2a51149505b368cf0e8d40dfa267dfe0f696227853d6b9e29f4e21d670449bdd850f4fda79242d60d95644e803143df29675439f6be1
47 +DIST gtk+-3.22.9.tar.xz 18239708 SHA256 e414542c96dc9966d40774451331bd8f73f77b6670226a5bbd057973a0c6a3e1 SHA512 cfed67a6263172cdef5a8d5f1548017f2e241667779d810ed84aa14ecdd18b917b213b3e71ac97f8d7099ba97a6829b45322ab15c8540ff406247d1519a08550 WHIRLPOOL 23969c152a34ab0f63de6b059e1a54d7ee8a382f3e79dfde310a6c71601bb0afe6f8ae241fab7e978fafbef40ae7e1d065131fa9964968070b2fc844a3969e79
48
49 diff --git a/x11-libs/gtk+/gtk+-3.22.9.ebuild b/x11-libs/gtk+/gtk+-3.22.9.ebuild
50 new file mode 100644
51 index 00000000000..da233eac383
52 --- /dev/null
53 +++ b/x11-libs/gtk+/gtk+-3.22.9.ebuild
54 @@ -0,0 +1,229 @@
55 +# Copyright 1999-2017 Gentoo Foundation
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +EAPI=6
59 +GNOME2_LA_PUNT="yes"
60 +
61 +inherit autotools flag-o-matic gnome2 multilib virtualx multilib-minimal
62 +
63 +DESCRIPTION="Gimp ToolKit +"
64 +HOMEPAGE="http://www.gtk.org/"
65 +
66 +LICENSE="LGPL-2+"
67 +SLOT="3"
68 +IUSE="aqua broadway cloudprint colord cups examples +introspection test vim-syntax wayland X xinerama"
69 +REQUIRED_USE="
70 + || ( aqua wayland X )
71 + xinerama? ( X )
72 +"
73 +
74 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-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=768662#c1
78 +RESTRICT="test"
79 +
80 +# FIXME: introspection data is built against system installation of gtk+:3,
81 +# bug #????
82 +COMMON_DEPEND="
83 + >=dev-libs/atk-2.15[introspection?,${MULTILIB_USEDEP}]
84 + >=dev-libs/glib-2.49.4:2[${MULTILIB_USEDEP}]
85 + media-libs/fontconfig[${MULTILIB_USEDEP}]
86 + >=media-libs/libepoxy-1.0[X(+)?,${MULTILIB_USEDEP}]
87 + >=x11-libs/cairo-1.14[aqua?,glib,svg,X?,${MULTILIB_USEDEP}]
88 + >=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}]
89 + >=x11-libs/pango-1.37.3[introspection?,${MULTILIB_USEDEP}]
90 + x11-misc/shared-mime-info
91 +
92 + cloudprint? (
93 + >=net-libs/rest-0.7[${MULTILIB_USEDEP}]
94 + >=dev-libs/json-glib-1.0[${MULTILIB_USEDEP}] )
95 + colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] )
96 + cups? ( >=net-print/cups-1.2[${MULTILIB_USEDEP}] )
97 + introspection? ( >=dev-libs/gobject-introspection-1.39:= )
98 + wayland? (
99 + >=dev-libs/wayland-1.9.91[${MULTILIB_USEDEP}]
100 + >=dev-libs/wayland-protocols-1.7
101 + media-libs/mesa[wayland,${MULTILIB_USEDEP}]
102 + >=x11-libs/libxkbcommon-0.2[${MULTILIB_USEDEP}]
103 + )
104 + X? (
105 + >=app-accessibility/at-spi2-atk-2.5.3[${MULTILIB_USEDEP}]
106 + x11-libs/libX11[${MULTILIB_USEDEP}]
107 + >=x11-libs/libXi-1.3[${MULTILIB_USEDEP}]
108 + x11-libs/libXext[${MULTILIB_USEDEP}]
109 + >=x11-libs/libXrandr-1.5[${MULTILIB_USEDEP}]
110 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
111 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
112 + x11-libs/libXcomposite[${MULTILIB_USEDEP}]
113 + x11-libs/libXdamage[${MULTILIB_USEDEP}]
114 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
115 + )
116 +"
117 +DEPEND="${COMMON_DEPEND}
118 + app-text/docbook-xsl-stylesheets
119 + app-text/docbook-xml-dtd:4.1.2
120 + dev-libs/libxslt
121 + dev-libs/gobject-introspection-common
122 + >=dev-util/gdbus-codegen-2.48
123 + >=dev-util/gtk-doc-am-1.20
124 + >=sys-devel/gettext-0.19.7[${MULTILIB_USEDEP}]
125 + virtual/pkgconfig[${MULTILIB_USEDEP}]
126 + X? (
127 + x11-proto/xextproto[${MULTILIB_USEDEP}]
128 + x11-proto/xproto[${MULTILIB_USEDEP}]
129 + x11-proto/inputproto[${MULTILIB_USEDEP}]
130 + x11-proto/damageproto[${MULTILIB_USEDEP}]
131 + xinerama? ( x11-proto/xineramaproto[${MULTILIB_USEDEP}] )
132 + )
133 + test? (
134 + media-fonts/font-misc-misc
135 + media-fonts/font-cursor-misc )
136 +"
137 +# gtk+-3.2.2 breaks Alt key handling in <=x11-libs/vte-0.30.1:2.90
138 +# gtk+-3.3.18 breaks scrolling in <=x11-libs/vte-0.31.0:2.90
139 +# >=xorg-server-1.11.4 needed for
140 +# https://mail.gnome.org/archives/desktop-devel-list/2012-March/msg00024.html
141 +RDEPEND="${COMMON_DEPEND}
142 + >=dev-util/gtk-update-icon-cache-3
143 + !<gnome-base/gail-1000
144 + !<x11-libs/vte-0.31.0:2.90
145 + >=x11-themes/adwaita-icon-theme-3.14
146 + X? ( !<x11-base/xorg-server-1.11.4 )
147 +"
148 +# librsvg for svg icons (PDEPEND to avoid circular dep), bug #547710
149 +PDEPEND="
150 + gnome-base/librsvg[${MULTILIB_USEDEP}]
151 + vim-syntax? ( app-vim/gtk-syntax )
152 +"
153 +
154 +MULTILIB_CHOST_TOOLS=(
155 + /usr/bin/gtk-query-immodules-3.0$(get_exeext)
156 +)
157 +
158 +strip_builddir() {
159 + local rule=$1
160 + shift
161 + local directory=$1
162 + shift
163 + sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
164 + || die "Could not strip director ${directory} from build."
165 +}
166 +
167 +src_prepare() {
168 + if ! use test ; then
169 + # don't waste time building tests
170 + strip_builddir SRC_SUBDIRS testsuite Makefile.{am,in}
171 +
172 + # the tests dir needs to be build now because since commit
173 + # 7ff3c6df80185e165e3bf6aa31bd014d1f8bf224 tests/gtkgears.o needs to be there
174 + # strip_builddir SRC_SUBDIRS tests Makefile.{am,in}
175 + fi
176 +
177 + if ! use examples; then
178 + # don't waste time building demos
179 + strip_builddir SRC_SUBDIRS demos Makefile.{am,in}
180 + strip_builddir SRC_SUBDIRS examples Makefile.{am,in}
181 + fi
182 +
183 + # gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
184 + eapply "${FILESDIR}"/${PN}-3.22.2-update-icon-cache.patch
185 +
186 + eautoreconf
187 + gnome2_src_prepare
188 +}
189 +
190 +multilib_src_configure() {
191 + # need libdir here to avoid a double slash in a path that libtool doesn't
192 + # grok so well during install (// between $EPREFIX and usr ...)
193 + ECONF_SOURCE=${S} \
194 + gnome2_src_configure \
195 + $(use_enable aqua quartz-backend) \
196 + $(use_enable broadway broadway-backend) \
197 + $(use_enable cloudprint) \
198 + $(use_enable colord) \
199 + $(use_enable cups cups auto) \
200 + $(multilib_native_use_enable introspection) \
201 + $(use_enable wayland wayland-backend) \
202 + $(use_enable X x11-backend) \
203 + $(use_enable X xcomposite) \
204 + $(use_enable X xdamage) \
205 + $(use_enable X xfixes) \
206 + $(use_enable X xkb) \
207 + $(use_enable X xrandr) \
208 + $(use_enable xinerama) \
209 + --disable-papi \
210 + --disable-mir-backend \
211 + --enable-man \
212 + --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
213 + --libdir="${EPREFIX}"/usr/$(get_libdir) \
214 + CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config"
215 +
216 + # work-around gtk-doc out-of-source brokedness
217 + if multilib_is_native_abi; then
218 + local d
219 + for d in gdk gtk libgail-util; do
220 + ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
221 + done
222 + fi
223 +}
224 +
225 +multilib_src_test() {
226 + "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
227 + GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check
228 +}
229 +
230 +multilib_src_install() {
231 + gnome2_src_install
232 +}
233 +
234 +multilib_src_install_all() {
235 + insinto /etc/gtk-3.0
236 + doins "${FILESDIR}"/settings.ini
237 + # Skip README.{in,commits,win32} and useless ChangeLog that would get installed by default
238 + DOCS=( AUTHORS NEWS README )
239 + einstalldocs
240 +}
241 +
242 +pkg_preinst() {
243 + gnome2_pkg_preinst
244 +
245 + multilib_pkg_preinst() {
246 + # Make immodules.cache belongs to gtk+ alone
247 + local cache="usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache"
248 +
249 + if [[ -e ${EROOT}${cache} ]]; then
250 + cp "${EROOT}"${cache} "${ED}"/${cache} || die
251 + else
252 + touch "${ED}"/${cache} || die
253 + fi
254 + }
255 + multilib_parallel_foreach_abi multilib_pkg_preinst
256 +}
257 +
258 +pkg_postinst() {
259 + gnome2_pkg_postinst
260 +
261 + multilib_pkg_postinst() {
262 + gnome2_query_immodules_gtk3 \
263 + || die "Update immodules cache failed (for ${ABI})"
264 + }
265 + multilib_parallel_foreach_abi multilib_pkg_postinst
266 +
267 + if ! has_version "app-text/evince"; then
268 + elog "Please install app-text/evince for print preview functionality."
269 + elog "Alternatively, check \"gtk-print-preview-command\" documentation and"
270 + elog "add it to your settings.ini file."
271 + fi
272 +}
273 +
274 +pkg_postrm() {
275 + gnome2_pkg_postrm
276 +
277 + if [[ -z ${REPLACED_BY_VERSION} ]]; then
278 + multilib_pkg_postrm() {
279 + rm -f "${EROOT}"usr/$(get_libdir)/gtk-3.0/3.0.0/immodules.cache
280 + }
281 + multilib_foreach_abi multilib_pkg_postrm
282 + fi
283 +}