/[gentoo-x86]/dev-libs/glib/glib-2.30.2.ebuild
Gentoo

Contents of /dev-libs/glib/glib-2.30.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Dec 29 17:24:35 2011 UTC (2 years, 11 months ago) by pacho
Branch: MAIN
Changes since 1.3: +2 -2 lines
amd64 stable, bug 393007

(Portage version: 2.1.10.44/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20