Gentoo Archives: gentoo-commits

From: Alexandre Rostovtsev <tetromino@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/
Date: Sun, 11 Oct 2015 00:14:50
Message-Id: 1444522362.67b2d360e634c57fd65334688c6d42113969d8f5.tetromino@gentoo
1 commit: 67b2d360e634c57fd65334688c6d42113969d8f5
2 Author: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 00:12:01 2015 +0000
4 Commit: Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 00:12:42 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67b2d360
7
8 dev-libs/glib: pull in elfutils only when USE=utils
9
10 It's only used by /usr/bin/gresource, which is a debugging utility.
11
12 Gentoo-Bug: 542816
13 Reported-by: Nikoli
14
15 dev-libs/glib/glib-2.44.1-r1.ebuild | 270 ++++++++++++++++++++++++++++++++++++
16 dev-libs/glib/metadata.xml | 3 +-
17 2 files changed, 272 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild b/dev-libs/glib/glib-2.44.1-r1.ebuild
20 new file mode 100644
21 index 0000000..9534f7a
22 --- /dev/null
23 +++ b/dev-libs/glib/glib-2.44.1-r1.ebuild
24 @@ -0,0 +1,270 @@
25 +# Copyright 1999-2015 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +# $Id$
28 +
29 +# Until bug #537330 glib is a reverse dependency of pkgconfig and, then
30 +# adding new dependencies end up making stage3 to grow. Every addition needs
31 +# then to be think very closely.
32 +
33 +EAPI="5"
34 +PYTHON_COMPAT=( python2_7 )
35 +# Building with --disable-debug highly unrecommended. It will build glib in
36 +# an unusable form as it disables some commonly used API. Please do not
37 +# convert this to the use_enable form, as it results in a broken build.
38 +GCONF_DEBUG="yes"
39 +# Completely useless with or without USE static-libs, people need to use
40 +# pkg-config
41 +GNOME2_LA_PUNT="yes"
42 +
43 +inherit autotools bash-completion-r1 gnome2 libtool eutils flag-o-matic multilib \
44 + pax-utils python-r1 toolchain-funcs versionator virtualx linux-info multilib-minimal
45 +
46 +DESCRIPTION="The GLib library of C routines"
47 +HOMEPAGE="http://www.gtk.org/"
48 +SRC_URI="${SRC_URI}
49 + http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz" # pkg.m4 for eautoreconf
50 +
51 +LICENSE="LGPL-2+"
52 +SLOT="2"
53 +IUSE="dbus fam kernel_linux +mime selinux static-libs systemtap test utils xattr"
54 +REQUIRED_USE="
55 + utils? ( ${PYTHON_REQUIRED_USE} )
56 + test? ( ${PYTHON_REQUIRED_USE} )
57 +"
58 +
59 +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"
60 +
61 +RDEPEND="
62 + !<dev-util/gdbus-codegen-${PV}
63 + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
64 + >=virtual/libffi-3.0.13-r1[${MULTILIB_USEDEP}]
65 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
66 + selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
67 + xattr? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] )
68 + fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
69 + utils? (
70 + ${PYTHON_DEPS}
71 + >=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
72 + || (
73 + >=dev-libs/elfutils-0.142
74 + >=dev-libs/libelf-0.8.12
75 + >=sys-freebsd/freebsd-lib-9.2_rc1
76 + )
77 + )
78 + abi_x86_32? (
79 + !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
80 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
81 + )
82 +"
83 +DEPEND="${RDEPEND}
84 + app-text/docbook-xml-dtd:4.1.2
85 + >=dev-libs/libxslt-1.0
86 + >=sys-devel/gettext-0.11
87 + >=dev-util/gtk-doc-am-1.20
88 + systemtap? ( >=dev-util/systemtap-1.3 )
89 + test? (
90 + sys-devel/gdb
91 + ${PYTHON_DEPS}
92 + >=dev-util/gdbus-codegen-${PV}[${PYTHON_USEDEP}]
93 + >=sys-apps/dbus-1.2.14 )
94 + !<dev-util/gtk-doc-1.15-r2
95 +"
96 +# gobject-introspection blocker to ensure people don't mix
97 +# different g-i and glib major versions
98 +
99 +PDEPEND="!<gnome-base/gvfs-1.6.4-r990
100 + dbus? ( gnome-base/dconf )
101 + mime? ( x11-misc/shared-mime-info )
102 +"
103 +# shared-mime-info needed for gio/xdgmime, bug #409481
104 +# dconf is needed to be able to save settings, bug #498436
105 +# Earlier versions of gvfs do not work with glib
106 +
107 +pkg_setup() {
108 + if use kernel_linux ; then
109 + CONFIG_CHECK="~INOTIFY_USER"
110 + if use test; then
111 + CONFIG_CHECK="~IPV6"
112 + WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
113 + export IPV6_DISABLED="yes"
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 "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
130 + sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
131 + sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
132 + fi
133 +
134 + # gdesktopappinfo requires existing terminal (gnome-terminal or any
135 + # other), falling back to xterm if one doesn't exist
136 + if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
137 + ewarn "Some tests will be skipped due to missing terminal program"
138 + sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
139 + fi
140 +
141 + # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
142 + if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:3' ; then
143 + ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:3"
144 + ewarn "not being present on your system, think on installing them to get these tests run."
145 + sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
146 + sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
147 + sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
148 + sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
149 + sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
150 + sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
151 + sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
152 + # needed to prevent gdbus-threading from asserting
153 + ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
154 + fi
155 +
156 + # Some tests need ipv6, upstream bug #667468
157 + if [[ -n "${IPV6_DISABLED}" ]]; then
158 + sed -i -e "/gdbus\/peer-to-peer/d" gio/tests/gdbus-peer.c || die
159 + sed -i -e "/gdbus\/delayed-message-processing/d" gio/tests/gdbus-peer.c || die
160 + sed -i -e "/gdbus\/nonce-tcp/d" gio/tests/gdbus-peer.c || die
161 + fi
162 +
163 + # thread test fails, upstream bug #679306
164 + # FIXME: we need to check if it's still failing as upstream thinks something
165 + # is wrong in our setups
166 + #epatch "${FILESDIR}/${PN}-2.34.0-testsuite-skip-thread4.patch"
167 +
168 + # This test is prone to fail, bug #504024, upstream bug #723719
169 + sed -i -e '/gdbus-close-pending/d' gio/tests/Makefile.am || die
170 + else
171 + # Don't build tests, also prevents extra deps, bug #512022
172 + sed -i -e 's/ tests//' {.,gio,glib}/Makefile.am || die
173 + fi
174 +
175 + # gdbus-codegen is a separate package
176 + epatch "${FILESDIR}/${PN}-2.40.0-external-gdbus-codegen.patch"
177 +
178 + # leave python shebang alone
179 + sed -e '/${PYTHON}/d' \
180 + -i glib/Makefile.{am,in} || die
181 +
182 + # Gentoo handles completions in a different directory
183 + sed -i "s|^completiondir =.*|completiondir = $(get_bashcompdir)|" \
184 + gio/Makefile.am || die
185 +
186 + epatch_user
187 +
188 + # Also needed to prevent cross-compile failures, see bug #267603
189 + eautoreconf
190 +
191 + gnome2_src_prepare
192 +
193 + epunt_cxx
194 +}
195 +
196 +multilib_src_configure() {
197 + # Avoid circular depend with dev-util/pkgconfig and
198 + # native builds (cross-compiles won't need pkg-config
199 + # in the target ROOT to work here)
200 + if ! tc-is-cross-compiler && ! $(tc-getPKG_CONFIG) --version >& /dev/null; then
201 + if has_version sys-apps/dbus; then
202 + export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
203 + export DBUS1_LIBS="-ldbus-1"
204 + fi
205 + export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
206 + export LIBFFI_LIBS="-lffi"
207 + fi
208 +
209 + local myconf
210 +
211 + case "${CHOST}" in
212 + *-mingw*) myconf="${myconf} --with-threads=win32" ;;
213 + *) myconf="${myconf} --with-threads=posix" ;;
214 + esac
215 +
216 + # FIXME: Always use internal libpcre, bug #254659
217 + # (maybe consider going back to system lib)
218 + # libelf used only by the gresource bin
219 + ECONF_SOURCE="${S}" gnome2_src_configure ${myconf} \
220 + $(use_enable xattr) \
221 + $(use_enable fam) \
222 + $(use_enable selinux) \
223 + $(use_enable static-libs static) \
224 + $(use_enable systemtap dtrace) \
225 + $(use_enable systemtap systemtap) \
226 + $(multilib_native_use_enable utils libelf) \
227 + --disable-compile-warnings \
228 + --enable-man \
229 + --with-pcre=internal \
230 + --with-xml-catalog="${EPREFIX}/etc/xml/catalog"
231 +
232 + if multilib_is_native_abi; then
233 + local d
234 + for d in glib gio gobject; do
235 + ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
236 + done
237 + fi
238 +}
239 +
240 +multilib_src_test() {
241 + unset DBUS_SESSION_BUS_ADDRESS
242 + export XDG_CONFIG_DIRS=/etc/xdg
243 + export XDG_DATA_DIRS=/usr/local/share:/usr/share
244 + export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
245 + unset GSETTINGS_BACKEND # bug 352451
246 + export LC_TIME=C # bug #411967
247 + python_export_best
248 +
249 + # Related test is a bit nitpicking
250 + mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
251 + chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
252 +
253 + # Hardened: gdb needs this, bug #338891
254 + if host-is-pax ; then
255 + pax-mark -mr "${BUILD_DIR}"/tests/.libs/assert-msg-test \
256 + || die "Hardened adjustment failed"
257 + fi
258 +
259 + # Need X for dbus-launch session X11 initialization
260 + Xemake check
261 +}
262 +
263 +multilib_src_install() {
264 + gnome2_src_install
265 +}
266 +
267 +multilib_src_install_all() {
268 + DOCS="AUTHORS ChangeLog* NEWS* README"
269 + einstalldocs
270 +
271 + if use utils ; then
272 + python_replicate_script "${ED}"/usr/bin/gtester-report
273 + else
274 + rm "${ED}usr/bin/gtester-report"
275 + rm "${ED}usr/share/man/man1/gtester-report.1"
276 + fi
277 +
278 + # Do not install charset.alias even if generated, leave it to libiconv
279 + rm -f "${ED}/usr/lib/charset.alias"
280 +
281 + # Don't install gdb python macros, bug 291328
282 + rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
283 +}
284 +
285 +pkg_postinst() {
286 + gnome2_pkg_postinst
287 + if has_version '<x11-libs/gtk+-3.0.12:3'; then
288 + # To have a clear upgrade path for gtk+-3.0.x users, have to resort to
289 + # a warning instead of a blocker
290 + ewarn
291 + ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
292 + ewarn "You should upgrade to a newer version of gtk+:3 immediately."
293 + fi
294 +}
295
296 diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
297 index 8f096da..9dda65d 100644
298 --- a/dev-libs/glib/metadata.xml
299 +++ b/dev-libs/glib/metadata.xml
300 @@ -11,7 +11,8 @@
301 <flag name="systemtap">Build support for profiling and tracing using
302 <pkg>dev-util/systemtap</pkg></flag>
303 <flag name="utils">Install gtester-report utility to generate test
304 - report files for your software.</flag>
305 + report files for your software; build gresource utility with
306 + ELF support.</flag>
307 </use>
308 <upstream>
309 <remote-id type="cpe">cpe:/a:gnome:glib</remote-id>