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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue May 15 06:22:46 2012 UTC (12 months, 1 week ago) by tetromino
Branch: MAIN
Version bump with a few bugfixes. Drop old.

(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.32.2.ebuild,v 1.3 2012/05/05 16:35:21 tetromino Exp $
4
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 gnome2-utils multilib pax-utils python toolchain-funcs virtualx linux-info
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 kernel_linux selinux static-libs systemtap test utils xattr"
19 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
20
21 RDEPEND="virtual/libiconv
22 virtual/libffi
23 sys-libs/zlib
24 || (
25 >=dev-libs/elfutils-0.142
26 >=dev-libs/libelf-0.8.11 )
27 xattr? ( sys-apps/attr )
28 fam? ( virtual/fam )
29 utils? ( >=dev-util/gdbus-codegen-${PV} )"
30 DEPEND="${RDEPEND}
31 >=sys-devel/gettext-0.11
32 >=dev-util/gtk-doc-am-1.15
33 doc? (
34 >=dev-libs/libxslt-1.0
35 >=dev-util/gdbus-codegen-${PV}
36 >=dev-util/gtk-doc-1.15
37 ~app-text/docbook-xml-dtd-4.1.2 )
38 systemtap? ( >=dev-util/systemtap-1.3 )
39 test? (
40 sys-devel/gdb
41 =dev-lang/python-2*
42 >=dev-util/gdbus-codegen-${PV}
43 >=sys-apps/dbus-1.2.14 )
44 !<dev-util/gtk-doc-1.15-r2"
45 PDEPEND="x11-misc/shared-mime-info
46 !<gnome-base/gvfs-1.6.4-r990"
47 # shared-mime-info needed for gio/xdgmime, bug #409481
48 # Earlier versions of gvfs do not work with glib
49
50 pkg_setup() {
51 # Needed for gio/tests/gdbus-testserver.py
52 if use test ; then
53 python_set_active_version 2
54 python_pkg_setup
55 fi
56
57 if use kernel_linux ; then
58 CONFIG_CHECK="~INOTIFY_USER"
59 linux-info_pkg_setup
60 fi
61 }
62
63 src_prepare() {
64 mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
65
66 if use ia64 ; then
67 # Only apply for < 4.1
68 local major=$(gcc-major-version)
69 local minor=$(gcc-minor-version)
70 if (( major < 4 || ( major == 4 && minor == 0 ) )); then
71 epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
72 fi
73 fi
74
75 # Fix gmodule issues on fbsd; bug #184301
76 epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
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 # Do not try to remove files on live filesystem, upstream bug #619274
84 sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
85 -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
86
87 # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
88 if ! has_version dev-util/desktop-file-utils ; then
89 ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
90 ewarn "think on installing it to get these tests run."
91 sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
92 sed -i -e "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
93 sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
94 sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
95 fi
96
97 # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
98 if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
99 ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
100 ewarn "not being present on your system, think on installing them to get these tests run."
101 sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
102 sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
103 sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
104 sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
105 sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
106 sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
107 sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
108 # needed to prevent gdbus-threading from asserting
109 ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
110 fi
111 fi
112
113 # gdbus-codegen is a separate package
114 epatch "${FILESDIR}/${PN}-2.31.x-external-gdbus-codegen.patch"
115
116 # disable pyc compiling
117 use test && python_clean_py-compile_files
118
119 # Needed for the punt-python-check patch, disabling timeout test
120 # Also needed to prevent croscompile failures, see bug #267603
121 # Also needed for the no-gdbus-codegen patch
122 AT_M4DIR="${WORKDIR}" eautoreconf
123
124 [[ ${CHOST} == *-freebsd* ]] && elibtoolize
125
126 epunt_cxx
127 }
128
129 src_configure() {
130 # Avoid circular depend with dev-util/pkgconfig and
131 # native builds (cross-compiles won't need pkg-config
132 # in the target ROOT to work here)
133 if ! tc-is-cross-compiler && ! has_version virtual/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 --with-pcre=internal \
161 --with-threads=posix
162 }
163
164 src_install() {
165 local f
166
167 # install-exec-hook substitutes ${PYTHON} in glib/gtester-report
168 emake DESTDIR="${D}" PYTHON="${EPREFIX}/usr/bin/python2" install
169
170 if ! use utils; then
171 rm "${ED}usr/bin/gtester-report"
172 fi
173
174 # Do not install charset.alias even if generated, leave it to libiconv
175 rm -f "${ED}/usr/lib/charset.alias"
176
177 # Don't install gdb python macros, bug 291328
178 rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
179
180 dodoc AUTHORS ChangeLog* NEWS* README
181
182 insinto /usr/share/bash-completion
183 for f in gdbus gsettings; do
184 newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f}
185 done
186 rm -rf "${ED}/etc"
187
188 # Completely useless with or without USE static-libs, people need to use
189 # pkg-config
190 find "${D}" -name '*.la' -exec rm -f {} +
191 }
192
193 src_test() {
194 gnome2_environment_reset
195
196 unset DBUS_SESSION_BUS_ADDRESS
197 export XDG_CONFIG_DIRS=/etc/xdg
198 export XDG_DATA_DIRS=/usr/local/share:/usr/share
199 export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
200 unset GSETTINGS_BACKEND # bug 352451
201 export LC_TIME=C # bug #411967
202
203 # Related test is a bit nitpicking
204 mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
205 chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
206
207 # Hardened: gdb needs this, bug #338891
208 if host-is-pax ; then
209 pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
210 || die "Hardened adjustment failed"
211 fi
212
213 # Need X for dbus-launch session X11 initialization
214 Xemake check
215 }
216
217 pkg_preinst() {
218 # Only give the introspection message if:
219 # * The user has gobject-introspection
220 # * Has glib already installed
221 # * Previous version was different from new version
222 if has_version "dev-libs/gobject-introspection" && ! has_version "=${CATEGORY}/${PF}"; then
223 ewarn "You must rebuild gobject-introspection so that the installed"
224 ewarn "typelibs and girs are regenerated for the new APIs in glib"
225 fi
226 }
227
228 pkg_postinst() {
229 # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
230 if has_version dev-libs/dbus-glib; then
231 ewarn "If you experience a breakage after updating dev-libs/glib try"
232 ewarn "rebuilding dev-libs/dbus-glib"
233 fi
234
235 if has_version '<x11-libs/gtk+-3.0.12:3'; then
236 # To have a clear upgrade path for gtk+-3.0.x users, have to resort to
237 # a warning instead of a blocker
238 ewarn
239 ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
240 ewarn "You should upgrade to a newer version of gtk+:3 immediately."
241 fi
242 }

  ViewVC Help
Powered by ViewVC 1.1.13