Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/glib: ChangeLog glib-2.30.2-r1.ebuild
Date: Tue, 10 Jan 2012 21:25:17
Message-Id: 20120110212505.0C06E2004B@flycatcher.gentoo.org
1 vapier 12/01/10 21:25:05
2
3 Modified: ChangeLog
4 Added: glib-2.30.2-r1.ebuild
5 Log:
6 Add fix from upstream for building with C++ compilers.
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.497 dev-libs/glib/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/ChangeLog?rev=1.497&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/ChangeLog?rev=1.497&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/ChangeLog?r1=1.496&r2=1.497
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v
20 retrieving revision 1.496
21 retrieving revision 1.497
22 diff -u -r1.496 -r1.497
23 --- ChangeLog 31 Dec 2011 21:26:59 -0000 1.496
24 +++ ChangeLog 10 Jan 2012 21:25:04 -0000 1.497
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-libs/glib
27 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.496 2011/12/31 21:26:59 tetromino Exp $
29 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.497 2012/01/10 21:25:04 vapier Exp $
31 +
32 +*glib-2.30.2-r1 (10 Jan 2012)
33 +
34 + 10 Jan 2012; Mike Frysinger <vapier@g.o> +glib-2.30.2-r1.ebuild,
35 + +files/glib-2.30.2-missing-decls.patch:
36 + Add fix from upstream for building with C++ compilers.
37
38 31 Dec 2011; Alexandre Rostovtsev <tetromino@g.o>
39 glib-2.30.1-r2.ebuild, glib-2.30.2.ebuild:
40
41
42
43 1.1 dev-libs/glib/glib-2.30.2-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/glib-2.30.2-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/glib-2.30.2-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: glib-2.30.2-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.30.2-r1.ebuild,v 1.1 2012/01/10 21:25:04 vapier Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="utils? 2"
56 # Avoid runtime dependency on python when USE=test
57
58 inherit autotools gnome.org libtool eutils flag-o-matic multilib pax-utils python virtualx
59
60 DESCRIPTION="The GLib library of C routines"
61 HOMEPAGE="http://www.gtk.org/"
62 SRC_URI="${SRC_URI}
63 http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf
64
65 LICENSE="LGPL-2"
66 SLOT="2"
67 IUSE="debug doc fam selinux +static-libs systemtap test utils xattr"
68 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
69
70 RDEPEND="virtual/libiconv
71 virtual/libffi
72 sys-libs/zlib
73 xattr? ( sys-apps/attr )
74 fam? ( virtual/fam )
75 utils? ( >=dev-util/gdbus-codegen-${PV} )"
76 DEPEND="${RDEPEND}
77 >=sys-devel/gettext-0.11
78 >=dev-util/gtk-doc-am-1.15
79 doc? (
80 >=dev-libs/libxslt-1.0
81 >=dev-util/gdbus-codegen-${PV}
82 >=dev-util/gtk-doc-1.15
83 ~app-text/docbook-xml-dtd-4.1.2 )
84 systemtap? ( >=dev-util/systemtap-1.3 )
85 test? (
86 sys-devel/gdb
87 =dev-lang/python-2*
88 >=dev-util/gdbus-codegen-${PV}
89 >=sys-apps/dbus-1.2.14 )
90 !<dev-util/gtk-doc-1.15-r2"
91 PDEPEND="!<gnome-base/gvfs-1.6.4-r990" # Earlier versions do not work with glib
92
93 pkg_setup() {
94 # Needed for gio/tests/gdbus-testserver.py
95 if use test ; then
96 python_set_active_version 2
97 python_pkg_setup
98 fi
99 }
100
101 src_prepare() {
102 mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
103
104 if use ia64 ; then
105 # Only apply for < 4.1
106 local major=$(gcc-major-version)
107 local minor=$(gcc-minor-version)
108 if (( major < 4 || ( major == 4 && minor == 0 ) )); then
109 epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
110 fi
111 fi
112
113 # Fix from upstream for building with C++ compilers.
114 epatch "${FILESDIR}"/${P}-missing-decls.patch
115
116 # Don't fail gio tests when ran without userpriv, upstream bug 552912
117 # This is only a temporary workaround, remove as soon as possible
118 # epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
119
120 # Fix gmodule issues on fbsd; bug #184301
121 epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
122
123 # Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
124 epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
125
126 # Do not try to remove files on live filesystem, upstream bug #619274
127 sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
128 -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
129
130 # need to build tests if USE=doc for bug #387385
131 if ! use test && ! use doc; then
132 # don't waste time building tests
133 sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
134 else
135 # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
136 if ! has_version dev-util/desktop-file-utils ; then
137 ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
138 ewarn "think on installing it to get these tests run."
139 sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
140 sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
141 sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
142 sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
143 fi
144
145 # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
146 if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
147 ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
148 ewarn "not being present on your system, think on installing them to get these tests run."
149 sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
150 sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
151 sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
152 sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
153 sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
154 sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
155 sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
156 # needed to prevent gdbus-threading from asserting
157 ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
158 fi
159 fi
160
161 # gdbus-codegen is a separate package
162 epatch "${FILESDIR}/${PN}-2.30.1-external-gdbus-codegen.patch"
163
164 # Handle the G_HOME environment variable to override the passwd entry, upstream bug #142568
165 epatch "${FILESDIR}/${PN}-2.30.1-homedir-env.patch"
166
167 # Fix hardcoded path to machine-id wrt #390143
168 epatch "${FILESDIR}/${PN}-2.30.2-machine-id.patch"
169
170 # disable pyc compiling
171 echo '#!/bin/sh' > py-compile
172
173 # Needed for the punt-python-check patch, disabling timeout test
174 # Also needed to prevent croscompile failures, see bug #267603
175 # Also needed for the no-gdbus-codegen patch
176 AT_M4DIR="${WORKDIR}" eautoreconf
177
178 [[ ${CHOST} == *-freebsd* ]] && elibtoolize
179
180 epunt_cxx
181 }
182
183 src_configure() {
184 # Avoid circular depend with dev-util/pkgconfig
185 if ! has_version dev-util/pkgconfig; then
186 if has_version sys-apps/dbus; then
187 export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
188 export DBUS1_LIBS="-ldbus-1"
189 fi
190 export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)"
191 export LIBFFI_LIBS="-lffi"
192 fi
193
194 local myconf
195
196 # Building with --disable-debug highly unrecommended. It will build glib in
197 # an unusable form as it disables some commonly used API. Please do not
198 # convert this to the use_enable form, as it results in a broken build.
199 # -- compnerd (3/27/06)
200 use debug && myconf="--enable-debug"
201
202 # Always use internal libpcre, bug #254659
203 econf ${myconf} \
204 $(use_enable xattr) \
205 $(use_enable doc man) \
206 $(use_enable doc gtk-doc) \
207 $(use_enable fam) \
208 $(use_enable selinux) \
209 $(use_enable static-libs static) \
210 $(use_enable systemtap dtrace) \
211 $(use_enable systemtap systemtap) \
212 --enable-regex \
213 --with-pcre=internal \
214 --with-threads=posix
215 }
216
217 src_install() {
218 local f
219
220 # install-exec-hook substitutes ${PYTHON} in glib/gtester-report
221 emake DESTDIR="${D}" PYTHON="${EPREFIX}/usr/bin/python2" install
222
223 if ! use utils; then
224 rm "${ED}usr/bin/gtester-report"
225 fi
226
227 # Do not install charset.alias even if generated, leave it to libiconv
228 rm -f "${ED}/usr/lib/charset.alias"
229
230 # Don't install gdb python macros, bug 291328
231 rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
232
233 dodoc AUTHORS ChangeLog* NEWS* README
234
235 insinto /usr/share/bash-completion
236 for f in gdbus gsettings; do
237 newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f}
238 done
239 rm -rf "${ED}/etc"
240
241 # Completely useless with or without USE static-libs, people need to use
242 # pkg-config
243 find "${D}" -name '*.la' -exec rm -f {} +
244 }
245
246 src_test() {
247 unset DBUS_SESSION_BUS_ADDRESS
248 export XDG_CONFIG_DIRS=/etc/xdg
249 export XDG_DATA_DIRS=/usr/local/share:/usr/share
250 export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
251 export XDG_DATA_HOME="${T}"
252 unset GSETTINGS_BACKEND # bug 352451
253
254 # Related test is a bit nitpicking
255 mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
256 chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
257
258 # Hardened: gdb needs this, bug #338891
259 if host-is-pax ; then
260 pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
261 || die "Hardened adjustment failed"
262 fi
263
264 # Need X for dbus-launch session X11 initialization
265 Xemake check
266 }
267
268 pkg_preinst() {
269 # Only give the introspection message if:
270 # * The user has gobject-introspection
271 # * Has glib already installed
272 # * Previous version was different from new version
273 if has_version "dev-libs/gobject-introspection" && ! has_version "=${CATEGORY}/${PF}"; then
274 ewarn "You must rebuild gobject-introspection so that the installed"
275 ewarn "typelibs and girs are regenerated for the new APIs in glib"
276 fi
277 }
278
279 pkg_postinst() {
280 # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
281 if has_version dev-libs/dbus-glib; then
282 ewarn "If you experience a breakage after updating dev-libs/glib try"
283 ewarn "rebuilding dev-libs/dbus-glib"
284 fi
285
286 if has_version '<x11-libs/gtk+-3.0.12:3'; then
287 # To have a clear upgrade path for gtk+-3.0.x users, have to resort to
288 # a warning instead of a blocker
289 ewarn
290 ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
291 ewarn "You should upgrade to a newer version of gtk+:3 immediately."
292 fi
293 }