Gentoo Archives: gentoo-user

From: Allan Gottlieb <gottlieb@×××.edu>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Why is the introspection USE flag for glib being removed by emerge?
Date: Wed, 24 Aug 2011 17:28:33
Message-Id: yu9sjoqu3bs.fsf@nyu.edu
1 In package.use I have
2
3 dev-libs/glib introspection
4
5 However emerge is removing it.
6
7 emerge --ignore-default-opts -pv =dev-libs/glib-9999::gnome
8
9 [ebuild R *] dev-libs/glib-9999 USE="static-libs -debug -doc -fam (-introspection) (-selinux) -test -xattr" 0 kB [1]
10
11 Can someone tell me why it is being removed and how to prevent the
12 removal?
13
14 thanks,
15 allan
16
17 PS This lack of introspection on glib is causing my update world to
18 fail. I have the gnome overlay installed (for gnome3).
19
20 PPS The glib-9999 ebuild (from the gnome overlay) is
21
22 # Copyright 1999-2011 Gentoo Foundation
23 # Distributed under the terms of the GNU General Public License v2
24 # $Header: $
25
26 EAPI="3"
27 PYTHON_DEPEND="2"
28
29 inherit autotools gnome.org libtool eutils flag-o-matic pax-utils python virtualx
30 if [[ ${PV} = 9999 ]]; then
31 inherit gnome2-live
32 fi
33
34 DESCRIPTION="The GLib library of C routines"
35 HOMEPAGE="http://www.gtk.org/"
36 SRC_URI="${SRC_URI}
37 http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf
38
39 LICENSE="LGPL-2"
40 SLOT="2"
41 IUSE="debug doc fam +introspection selinux +static-libs test xattr"
42 if [[ ${PV} = 9999 ]]; then
43 KEYWORDS=""
44 else
45 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
46 fi
47
48 RDEPEND="virtual/libiconv
49 sys-libs/zlib
50 xattr? ( sys-apps/attr )
51 fam? ( virtual/fam )"
52 DEPEND="${RDEPEND}
53 >=sys-devel/gettext-0.11
54 >=dev-util/gtk-doc-am-1.13
55 doc? (
56 >=dev-libs/libxslt-1.0
57 >=dev-util/gtk-doc-1.13
58 ~app-text/docbook-xml-dtd-4.1.2 )
59 test? ( dev-util/pkgconfig
60 >=sys-apps/dbus-1.2.14 )"
61 PDEPEND="introspection? ( dev-libs/gobject-introspection )
62 !<gnome-base/gvfs-1.6.4-r990" # Earlier versions do not work with glib
63
64 # XXX: Consider adding test? ( sys-devel/gdb ); assert-msg-test tries to use it
65
66 pkg_setup() {
67 python_set_active_version 2
68 }
69
70 src_prepare() {
71 [[ ${PV} = 9999 ]] && gnome2-live_src_prepare
72 mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
73
74 if use ia64 ; then
75 # Only apply for < 4.1
76 local major=$(gcc-major-version)
77 local minor=$(gcc-minor-version)
78 if (( major < 4 || ( major == 4 && minor == 0 ) )); then
79 epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
80 fi
81 fi
82
83 # Don't fail gio tests when ran without userpriv, upstream bug 552912
84 # This is only a temporary workaround, remove as soon as possible
85 epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
86
87 # Fix gmodule issues on fbsd; bug #184301
88 epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
89
90 # Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
91 epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
92
93 # Do not try to remove files on live filesystem, upstream bug #619274
94 sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
95 -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
96
97 if ! use test; then
98 # don't waste time building tests
99 sed 's/^\(SUBDIRS =.*\)tests\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
100 || die "sed failed"
101 fi
102
103 # Needed for the punt-python-check patch, disabling timeout test
104 # Also needed to prevent croscompile failures, see bug #267603
105 AT_M4DIR="${WORKDIR}" eautoreconf
106
107 [[ ${CHOST} == *-freebsd* ]] && elibtoolize
108
109 epunt_cxx
110 }
111
112 src_configure() {
113 local myconf
114
115 # Building with --disable-debug highly unrecommended. It will build glib in
116 # an unusable form as it disables some commonly used API. Please do not
117 # convert this to the use_enable form, as it results in a broken build.
118 # -- compnerd (3/27/06)
119 use debug && myconf="--enable-debug"
120
121 # Always use internal libpcre, bug #254659
122 econf ${myconf} \
123 $(use_enable xattr) \
124 $(use_enable doc man) \
125 $(use_enable doc gtk-doc) \
126 $(use_enable fam) \
127 $(use_enable selinux) \
128 $(use_enable static-libs static) \
129 --enable-regex \
130 --with-pcre=internal \
131 --with-threads=posix \
132 --disable-dtrace \
133 --disable-systemtap
134 }
135
136 src_install() {
137 local f
138 emake DESTDIR="${D}" install || die "Installation failed"
139
140 # Do not install charset.alias even if generated, leave it to libiconv
141 rm -f "${ED}/usr/lib/charset.alias"
142
143 # Don't install gdb python macros, bug 291328
144 rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/"
145
146 # This is there for git snapshots and the live ebuild, bug 351966
147 emake README || die "emake README failed"
148 dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
149
150 insinto /usr/share/bash-completion
151 for f in gdbus gsettings; do
152 newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f} || die
153 done
154 rm -rf "${ED}/etc"
155 }
156
157 src_test() {
158 unset DBUS_SESSION_BUS_ADDRESS
159 export XDG_CONFIG_DIRS=/etc/xdg
160 export XDG_DATA_DIRS=/usr/local/share:/usr/share
161 export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
162 export XDG_DATA_HOME="${T}"
163 unset GSETTINGS_BACKEND # bug 352451
164
165 # Related test is a bit nitpicking
166 mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
167 chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
168
169 # Hardened: gdb needs this, bug #338891
170 if host-is-pax ; then
171 pax-mark -mr "${S}"/tests/.libs/assert-msg-test \
172 || die "Hardened adjustment failed"
173 fi
174
175 # Need X for dbus-launch session X11 initialization
176 Xemake check || die "tests failed"
177 }
178
179 pkg_preinst() {
180 # Only give the introspection message if:
181 # * The user has it enabled
182 # * Has glib already installed
183 # * Previous version was different from new version
184 if use introspection && has_version "${CATEGORY}/${PN}"; then
185 if ! has_version "=${CATEGORY}/${PF}"; then
186 ewarn "You must rebuild gobject-introspection so that the installed"
187 ewarn "typelibs and girs are regenerated for the new APIs in glib"
188 fi
189 fi
190 }
191
192 pkg_postinst() {
193 # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483
194 if has_version dev-libs/dbus-glib; then
195 ewarn "If you experience a breakage after updating dev-libs/glib try"
196 ewarn "rebuilding dev-libs/dbus-glib"
197 fi
198 }

Replies

Subject Author
Re: [gentoo-user] Why is the introspection USE flag for glib being removed by emerge? (FIXED) Allan Gottlieb <gottlieb@×××.edu>
Re: [gentoo-user] Why is the introspection USE flag for glib being removed by emerge? "Jesús J. Guerrero Botella" <jesus.guerrero.botella@×××××.com>