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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Sun Jul 17 20:43:06 2011 UTC (3 years ago) by maekke
Branch: MAIN
Changes since 1.8: +2 -2 lines
arm stable, bug #369909

(Portage version: 2.1.10.6/cvs/Linux x86_64)

1 pacho 1.1 # Copyright 1999-2011 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 maekke 1.9 # $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.28.8.ebuild,v 1.8 2011/07/14 10:06:24 tomka Exp $
4 pacho 1.1
5     EAPI="3"
6 nirbheek 1.3 GNOME_TARBALL_SUFFIX="xz"
7 pacho 1.1 PYTHON_DEPEND="2"
8    
9     inherit autotools gnome.org libtool eutils flag-o-matic 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 maekke 1.9 KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
19 pacho 1.1 IUSE="debug doc fam +introspection selinux +static-libs test xattr"
20    
21     RDEPEND="virtual/libiconv
22     sys-libs/zlib
23     xattr? ( sys-apps/attr )
24     fam? ( virtual/fam )"
25     DEPEND="${RDEPEND}
26     >=sys-devel/gettext-0.11
27     >=dev-util/gtk-doc-am-1.13
28     doc? (
29     >=dev-libs/libxslt-1.0
30     >=dev-util/gtk-doc-1.13
31     ~app-text/docbook-xml-dtd-4.1.2 )
32     test? ( dev-util/pkgconfig
33     >=sys-apps/dbus-1.2.14 )
34     !<dev-util/gtk-doc-1.15-r2"
35     PDEPEND="introspection? ( dev-libs/gobject-introspection )
36     !<gnome-base/gvfs-1.6.4-r990" # Earlier versions do not work with glib
37    
38     # XXX: Consider adding test? ( sys-devel/gdb ); assert-msg-test tries to use it
39    
40     pkg_setup() {
41     python_set_active_version 2
42     }
43    
44     src_prepare() {
45     mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
46    
47     if use ia64 ; then
48     # Only apply for < 4.1
49     local major=$(gcc-major-version)
50     local minor=$(gcc-minor-version)
51     if (( major < 4 || ( major == 4 && minor == 0 ) )); then
52     epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
53     fi
54     fi
55    
56     # Don't fail gio tests when ran without userpriv, upstream bug 552912
57     # This is only a temporary workaround, remove as soon as possible
58     epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
59    
60     # Fix gmodule issues on fbsd; bug #184301
61     epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
62    
63     # Don't check for python, hence removing the build-time python dep.
64     # We remove the gdb python scripts in src_install due to bug 291328
65     epatch "${FILESDIR}/${PN}-2.25-punt-python-check.patch"
66    
67     # Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
68     epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
69    
70     # Do not try to remove files on live filesystem, upstream bug #619274
71     sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
72     -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
73    
74     # Disable failing tests, upstream bug #???
75     epatch "${FILESDIR}/${PN}-2.26.0-disable-locale-sensitive-test.patch"
76     epatch "${FILESDIR}/${PN}-2.26.0-disable-volumemonitor-broken-test.patch"
77    
78     if ! use test; then
79     # don't waste time building tests
80 aballier 1.7 sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
81 pacho 1.6 else
82     # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
83     if ! has_version dev-util/desktop-file-utils ; then
84     ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
85     ewarn "think on installing it to get these tests run."
86     sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
87     sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
88     sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
89     sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
90     fi
91    
92     # Disable tests requiring dev-python/dbus-python, bug #349236
93     if ! has_version dev-python/dbus-python ; then
94     ewarn "Some tests will be skipped due dev-python/dbus-python not being present on your system,"
95     ewarn "think on installing it to get these tests run."
96     sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
97     sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
98     sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
99     sed -i -e "/gdbus\/bus-watch-name/d" gio/tests/gdbus-names.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 "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
103     fi
104 pacho 1.1 fi
105    
106     # Needed for the punt-python-check patch, disabling timeout test
107     # Also needed to prevent croscompile failures, see bug #267603
108     AT_M4DIR="${WORKDIR}" eautoreconf
109    
110     [[ ${CHOST} == *-freebsd* ]] && elibtoolize
111    
112     epunt_cxx
113     }
114    
115     src_configure() {
116     local myconf
117    
118     # Building with --disable-debug highly unrecommended. It will build glib in
119     # an unusable form as it disables some commonly used API. Please do not
120     # convert this to the use_enable form, as it results in a broken build.
121     # -- compnerd (3/27/06)
122     use debug && myconf="--enable-debug"
123    
124     # Always use internal libpcre, bug #254659
125     econf ${myconf} \
126     $(use_enable xattr) \
127     $(use_enable doc man) \
128     $(use_enable doc gtk-doc) \
129     $(use_enable fam) \
130     $(use_enable selinux) \
131     $(use_enable static-libs static) \
132     --enable-regex \
133     --with-pcre=internal \
134     --with-threads=posix \
135     --disable-dtrace \
136     --disable-systemtap
137     }
138    
139     src_install() {
140     local f
141     emake DESTDIR="${D}" install || die "Installation failed"
142    
143     # Do not install charset.alias even if generated, leave it to libiconv
144     rm -f "${ED}/usr/lib/charset.alias"
145    
146     # Don't install gdb python macros, bug 291328
147     rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
148    
149     dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
150    
151     insinto /usr/share/bash-completion
152     for f in gdbus gsettings; do
153     newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f} || die
154     done
155     rm -rf "${ED}/etc"
156     }
157    
158     src_test() {
159     unset DBUS_SESSION_BUS_ADDRESS
160     export XDG_CONFIG_DIRS=/etc/xdg
161     export XDG_DATA_DIRS=/usr/local/share:/usr/share
162     export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
163     export XDG_DATA_HOME="${T}"
164     unset GSETTINGS_BACKEND # bug 352451
165    
166     # Related test is a bit nitpicking
167     mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
168     chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
169    
170     # Hardened: gdb needs this, bug #338891
171     if host-is-pax ; then
172     pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
173     || die "Hardened adjustment failed"
174     fi
175    
176     # Need X for dbus-launch session X11 initialization
177     Xemake check || die "tests failed"
178     }
179    
180     pkg_preinst() {
181     # Only give the introspection message if:
182     # * The user has it enabled
183     # * Has glib already installed
184     # * Previous version was different from new version
185     if use introspection && has_version "${CATEGORY}/${PN}"; then
186     if ! has_version "=${CATEGORY}/${PF}"; then
187     ewarn "You must rebuild gobject-introspection so that the installed"
188     ewarn "typelibs and girs are regenerated for the new APIs in glib"
189     fi
190     fi
191     }
192    
193     pkg_postinst() {
194     # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
195     if has_version dev-libs/dbus-glib; then
196     ewarn "If you experience a breakage after updating dev-libs/glib try"
197     ewarn "rebuilding dev-libs/dbus-glib"
198     fi
199     }

  ViewVC Help
Powered by ViewVC 1.1.20