1 |
commit: 7cc8b1b22ee34d6b0c84ba5e822fb1a0def6fc01 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 2 14:53:49 2016 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 2 15:41:06 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cc8b1b2 |
7 |
|
8 |
dev-libs/glib: multiple fixes |
9 |
|
10 |
Own and update gschemas and gio modules cache files, bug #518422. |
11 |
Fix IPv6 tests being always disabled, bug #508752. |
12 |
Cleanup variables handled by eclass in src_test. |
13 |
Disable all .desktop file related unittests when desktop-file-utils is missing, bug #567484. |
14 |
|
15 |
Package-Manager: portage-2.2.26 |
16 |
|
17 |
dev-libs/glib/glib-2.46.2-r1.ebuild | 318 ++++++++++++++++++++++++++++++++++++ |
18 |
1 file changed, 318 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/glib/glib-2.46.2-r1.ebuild b/dev-libs/glib/glib-2.46.2-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 0000000..5be46ce |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/glib/glib-2.46.2-r1.ebuild |
25 |
@@ -0,0 +1,318 @@ |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+# $Id$ |
29 |
+ |
30 |
+# Until bug #537330 glib is a reverse dependency of pkgconfig and, then |
31 |
+# adding new dependencies end up making stage3 to grow. Every addition needs |
32 |
+# then to be think very closely. |
33 |
+ |
34 |
+EAPI="5" |
35 |
+PYTHON_COMPAT=( python2_7 ) |
36 |
+# Building with --disable-debug highly unrecommended. It will build glib in |
37 |
+# an unusable form as it disables some commonly used API. Please do not |
38 |
+# convert this to the use_enable form, as it results in a broken build. |
39 |
+GCONF_DEBUG="yes" |
40 |
+# Completely useless with or without USE static-libs, people need to use |
41 |
+# pkg-config |
42 |
+GNOME2_LA_PUNT="yes" |
43 |
+ |
44 |
+inherit autotools bash-completion-r1 gnome2 libtool eutils flag-o-matic multilib \ |
45 |
+ pax-utils python-r1 toolchain-funcs versionator virtualx linux-info multilib-minimal |
46 |
+ |
47 |
+DESCRIPTION="The GLib library of C routines" |
48 |
+HOMEPAGE="http://www.gtk.org/" |
49 |
+SRC_URI="${SRC_URI} |
50 |
+ http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf |
51 |
+ |
52 |
+LICENSE="LGPL-2+" |
53 |
+SLOT="2" |
54 |
+IUSE="dbus fam kernel_linux +mime selinux static-libs systemtap test utils xattr" |
55 |
+REQUIRED_USE=" |
56 |
+ utils? ( ${PYTHON_REQUIRED_USE} ) |
57 |
+ test? ( ${PYTHON_REQUIRED_USE} ) |
58 |
+" |
59 |
+ |
60 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" |
61 |
+ |
62 |
+RDEPEND=" |
63 |
+ !<dev-util/gdbus-codegen-${PV} |
64 |
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] |
65 |
+ >=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}] |
66 |
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
67 |
+ selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] ) |
68 |
+ xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) |
69 |
+ fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] ) |
70 |
+ utils? ( |
71 |
+ ${PYTHON_DEPS} |
72 |
+ >=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}] |
73 |
+ || ( |
74 |
+ >=dev-libs/elfutils-0.142 |
75 |
+ >=dev-libs/libelf-0.8.12 |
76 |
+ >=sys-freebsd/freebsd-lib-9.2_rc1 |
77 |
+ ) |
78 |
+ ) |
79 |
+" |
80 |
+DEPEND="${RDEPEND} |
81 |
+ app-text/docbook-xml-dtd:4.1.2 |
82 |
+ >=dev-libs/libxslt-1.0 |
83 |
+ >=sys-devel/gettext-0.11 |
84 |
+ >=dev-util/gtk-doc-am-1.20 |
85 |
+ systemtap? ( >=dev-util/systemtap-1.3 ) |
86 |
+ test? ( |
87 |
+ sys-devel/gdb |
88 |
+ ${PYTHON_DEPS} |
89 |
+ >=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}] |
90 |
+ >=sys-apps/dbus-1.2.14 ) |
91 |
+ !<dev-util/gtk-doc-1.15-r2 |
92 |
+" |
93 |
+# gobject-introspection blocker to ensure people don't mix |
94 |
+# different g-i and glib major versions |
95 |
+ |
96 |
+PDEPEND="!<gnome-base/gvfs-1.6.4-r990 |
97 |
+ dbus? ( gnome-base/dconf ) |
98 |
+ mime? ( x11-misc/shared-mime-info ) |
99 |
+" |
100 |
+# shared-mime-info needed for gio/xdgmime, bug #409481 |
101 |
+# dconf is needed to be able to save settings, bug #498436 |
102 |
+# Earlier versions of gvfs do not work with glib |
103 |
+ |
104 |
+MULTILIB_CHOST_TOOLS=( |
105 |
+ /usr/bin/gio-querymodules |
106 |
+) |
107 |
+ |
108 |
+pkg_setup() { |
109 |
+ if use kernel_linux ; then |
110 |
+ CONFIG_CHECK="~INOTIFY_USER" |
111 |
+ if use test; then |
112 |
+ CONFIG_CHECK="~IPV6" |
113 |
+ WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them." |
114 |
+ fi |
115 |
+ linux-info_pkg_setup |
116 |
+ fi |
117 |
+} |
118 |
+ |
119 |
+src_prepare() { |
120 |
+ # Prevent build failure in stage3 where pkgconfig is not available, bug #481056 |
121 |
+ mv -f "${WORKDIR}"/pkg-config-*/pkg.m4 "${S}"/m4macros/ || die |
122 |
+ |
123 |
+ if use test; then |
124 |
+ # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163 |
125 |
+ if ! has_version dev-util/desktop-file-utils ; then |
126 |
+ ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system," |
127 |
+ ewarn "think on installing it to get these tests run." |
128 |
+ sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die |
129 |
+ sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die |
130 |
+ fi |
131 |
+ |
132 |
+ # gdesktopappinfo requires existing terminal (gnome-terminal or any |
133 |
+ # other), falling back to xterm if one doesn't exist |
134 |
+ if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then |
135 |
+ ewarn "Some tests will be skipped due to missing terminal program" |
136 |
+ sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die |
137 |
+ fi |
138 |
+ |
139 |
+ # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853 |
140 |
+ if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:3' ; then |
141 |
+ ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:3" |
142 |
+ ewarn "not being present on your system, think on installing them to get these tests run." |
143 |
+ sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die |
144 |
+ sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die |
145 |
+ sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die |
146 |
+ sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die |
147 |
+ sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die |
148 |
+ sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die |
149 |
+ sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die |
150 |
+ # needed to prevent gdbus-threading from asserting |
151 |
+ ln -sfn $(type -P true) gio/tests/gdbus-testserver.py |
152 |
+ fi |
153 |
+ |
154 |
+ # Some tests need ipv6, upstream bug #667468 |
155 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=508752 |
156 |
+ if [[ ! -f /proc/net/if_net6 ]]; then |
157 |
+ sed -i -e "/gdbus\/peer-to-peer/d" gio/tests/gdbus-peer.c || die |
158 |
+ sed -i -e "/gdbus\/delayed-message-processing/d" gio/tests/gdbus-peer.c || die |
159 |
+ sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c || die |
160 |
+ fi |
161 |
+ |
162 |
+ # This test is prone to fail, bug #504024, upstream bug #723719 |
163 |
+ sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die |
164 |
+ else |
165 |
+ # Don't build tests, also prevents extra deps, bug #512022 |
166 |
+ sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die |
167 |
+ fi |
168 |
+ |
169 |
+ # gdbus-codegen is a separate package |
170 |
+ epatch "${FILESDIR}"/${PN}-2.40.0-external-gdbus-codegen.patch |
171 |
+ |
172 |
+ # leave python shebang alone |
173 |
+ sed -e '/${PYTHON}/d' \ |
174 |
+ -i glib/Makefile.{am,in} || die |
175 |
+ |
176 |
+ epatch_user |
177 |
+ |
178 |
+ # Also needed to prevent cross-compile failures, see bug #267603 |
179 |
+ eautoreconf |
180 |
+ |
181 |
+ gnome2_src_prepare |
182 |
+ |
183 |
+ epunt_cxx |
184 |
+} |
185 |
+ |
186 |
+multilib_src_configure() { |
187 |
+ # Avoid circular depend with dev-util/pkgconfig and |
188 |
+ # native builds (cross-compiles won't need pkg-config |
189 |
+ # in the target ROOT to work here) |
190 |
+ if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then |
191 |
+ if has_version sys-apps/dbus; then |
192 |
+ export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include" |
193 |
+ export DBUS1_LIBS="-ldbus-1" |
194 |
+ fi |
195 |
+ export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)" |
196 |
+ export LIBFFI_LIBS="-lffi" |
197 |
+ fi |
198 |
+ |
199 |
+ # These configure tests don't work when cross-compiling. |
200 |
+ if tc-is-cross-compiler ; then |
201 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756473 |
202 |
+ case ${CHOST} in |
203 |
+ hppa*|metag*) export glib_cv_stack_grows=yes ;; |
204 |
+ *) export glib_cv_stack_grows=no ;; |
205 |
+ esac |
206 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756474 |
207 |
+ export glib_cv_uscore=no |
208 |
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756475 |
209 |
+ export ac_cv_func_posix_get{pwuid,grgid}_r=yes |
210 |
+ fi |
211 |
+ |
212 |
+ local myconf |
213 |
+ |
214 |
+ case "${CHOST}" in |
215 |
+ *-mingw*) myconf="${myconf} --with-threads=win32" ;; |
216 |
+ *) myconf="${myconf} --with-threads=posix" ;; |
217 |
+ esac |
218 |
+ |
219 |
+ # FIXME: Always use internal libpcre, bug #254659 |
220 |
+ # (maybe consider going back to system lib) |
221 |
+ # libelf used only by the gresource bin |
222 |
+ ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \ |
223 |
+ $(use_enable xattr) \ |
224 |
+ $(use_enable fam) \ |
225 |
+ $(use_enable selinux) \ |
226 |
+ $(use_enable static-libs static) \ |
227 |
+ $(use_enable systemtap dtrace) \ |
228 |
+ $(use_enable systemtap systemtap) \ |
229 |
+ $(multilib_native_use_enable utils libelf) \ |
230 |
+ --disable-compile-warnings \ |
231 |
+ --enable-man \ |
232 |
+ --with-pcre=internal \ |
233 |
+ --with-xml-catalog="${EPREFIX}/etc/xml/catalog" |
234 |
+ |
235 |
+ if multilib_is_native_abi; then |
236 |
+ local d |
237 |
+ for d in glib gio gobject; do |
238 |
+ ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die |
239 |
+ done |
240 |
+ fi |
241 |
+} |
242 |
+ |
243 |
+multilib_src_test() { |
244 |
+ export XDG_CONFIG_DIRS=/etc/xdg |
245 |
+ export XDG_DATA_DIRS=/usr/local/share:/usr/share |
246 |
+ export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp" |
247 |
+ export LC_TIME=C # bug #411967 |
248 |
+ python_export_best |
249 |
+ |
250 |
+ # Related test is a bit nitpicking |
251 |
+ mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" |
252 |
+ chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" |
253 |
+ |
254 |
+ # Hardened: gdb needs this, bug #338891 |
255 |
+ if host-is-pax ; then |
256 |
+ pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \ |
257 |
+ || die "Hardened adjustment failed" |
258 |
+ fi |
259 |
+ |
260 |
+ # Need X for dbus-launch session X11 initialization |
261 |
+ Xemake check |
262 |
+} |
263 |
+ |
264 |
+multilib_src_install() { |
265 |
+ gnome2_src_install completiondir="$(get_bashcompdir)" |
266 |
+} |
267 |
+ |
268 |
+multilib_src_install_all() { |
269 |
+ DOCS="AUTHORS ChangeLog* NEWS* README" |
270 |
+ einstalldocs |
271 |
+ |
272 |
+ if use utils ; then |
273 |
+ python_replicate_script "${ED}"/usr/bin/gtester-report |
274 |
+ else |
275 |
+ rm "${ED}usr/bin/gtester-report" |
276 |
+ rm "${ED}usr/share/man/man1/gtester-report.1" |
277 |
+ fi |
278 |
+ |
279 |
+ # Do not install charset.alias even if generated, leave it to libiconv |
280 |
+ rm -f "${ED}/usr/lib/charset.alias" |
281 |
+ |
282 |
+ # Don't install gdb python macros, bug 291328 |
283 |
+ rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/" |
284 |
+} |
285 |
+ |
286 |
+pkg_preinst() { |
287 |
+ gnome2_pkg_preinst |
288 |
+ |
289 |
+ # Make gschemas.compiled belong to glib alone |
290 |
+ local cache="usr/share/glib-2.0/schemas/gschemas.compiled" |
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_pkg_preinst() { |
299 |
+ # Make giomodule.cache belong to glib alone |
300 |
+ local cache="usr/$(get_libdir)/gio/giomodule.cache" |
301 |
+ |
302 |
+ if [[ -e ${EROOT}${cache} ]]; then |
303 |
+ cp "${EROOT}"${cache} "${ED}"/${cache} || die |
304 |
+ else |
305 |
+ touch "${ED}"/${cache} || die |
306 |
+ fi |
307 |
+ } |
308 |
+ |
309 |
+ multilib_foreach_abi multilib_pkg_preinst |
310 |
+} |
311 |
+ |
312 |
+pkg_postinst() { |
313 |
+ # force (re)generation of gschemas.compiled |
314 |
+ GNOME2_ECLASS_GLIB_SCHEMAS="force" |
315 |
+ |
316 |
+ gnome2_pkg_postinst |
317 |
+ |
318 |
+ multilib_pkg_postinst() { |
319 |
+ gnome2_giomodule_cache_update \ |
320 |
+ || die "Update GIO modules cache failed (for ${ABI})" |
321 |
+ } |
322 |
+ multilib_foreach_abi multilib_pkg_postinst |
323 |
+ |
324 |
+ if has_version '<x11-libs/gtk+-3.0.12:3'; then |
325 |
+ # To have a clear upgrade path for gtk+-3.0.x users, have to resort to |
326 |
+ # a warning instead of a blocker |
327 |
+ ewarn |
328 |
+ ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes." |
329 |
+ ewarn "You should upgrade to a newer version of gtk+:3 immediately." |
330 |
+ fi |
331 |
+} |
332 |
+ |
333 |
+pkg_postrm() { |
334 |
+ gnome2_pkg_postrm |
335 |
+ |
336 |
+ if [[ -z ${REPLACED_BY_VERSIONS} ]]; then |
337 |
+ multilib_pkg_postinst() { |
338 |
+ rm -f "${EROOT}"usr/$(get_libdir)/gio/giomodule.cache |
339 |
+ } |
340 |
+ multilib_foreach_abi multilib_pkg_postinst |
341 |
+ rm -f "${EROOT}"usr/share/glib-2.0/schemas/gschemas.compiled |
342 |
+ fi |
343 |
+} |