| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gconf/gconf-3.2.3-r1.ebuild,v 1.2 2012/04/11 15:47:21 tetromino Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
GCONF_DEBUG="yes"
|
| 7 |
GNOME_ORG_MODULE="GConf"
|
| 8 |
GNOME2_LA_PUNT="yes"
|
| 9 |
|
| 10 |
inherit eutils gnome2
|
| 11 |
|
| 12 |
DESCRIPTION="Gnome Configuration System and Daemon"
|
| 13 |
HOMEPAGE="http://projects.gnome.org/gconf/"
|
| 14 |
|
| 15 |
LICENSE="LGPL-2"
|
| 16 |
SLOT="2"
|
| 17 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
|
| 18 |
IUSE="debug doc +introspection ldap orbit policykit"
|
| 19 |
|
| 20 |
RDEPEND=">=dev-libs/glib-2.31:2
|
| 21 |
>=x11-libs/gtk+-2.90:3
|
| 22 |
>=dev-libs/dbus-glib-0.74
|
| 23 |
>=sys-apps/dbus-1
|
| 24 |
>=dev-libs/libxml2-2:2
|
| 25 |
introspection? ( >=dev-libs/gobject-introspection-0.9.5 )
|
| 26 |
ldap? ( net-nds/openldap )
|
| 27 |
orbit? ( >=gnome-base/orbit-2.4:2 )
|
| 28 |
policykit? ( sys-auth/polkit )"
|
| 29 |
DEPEND="${RDEPEND}
|
| 30 |
dev-libs/libxslt
|
| 31 |
>=dev-util/intltool-0.35
|
| 32 |
>=dev-util/pkgconfig-0.9
|
| 33 |
doc? ( >=dev-util/gtk-doc-1 )"
|
| 34 |
|
| 35 |
pkg_setup() {
|
| 36 |
DOCS="AUTHORS ChangeLog NEWS README TODO"
|
| 37 |
G2CONF="${G2CONF}
|
| 38 |
--enable-gtk
|
| 39 |
--disable-static
|
| 40 |
--enable-gsettings-backend
|
| 41 |
--with-gtk=3.0
|
| 42 |
$(use_enable introspection)
|
| 43 |
$(use_with ldap openldap)
|
| 44 |
$(use_enable orbit)
|
| 45 |
$(use_enable policykit defaults-service)
|
| 46 |
ORBIT_IDL=$(type -P orbit-idl-2)"
|
| 47 |
# Need host's IDL compiler for cross or native build, bug #262747
|
| 48 |
kill_gconf
|
| 49 |
}
|
| 50 |
|
| 51 |
src_prepare() {
|
| 52 |
gnome2_src_prepare
|
| 53 |
|
| 54 |
# Do not start gconfd when installing schemas, fix bug #238276, upstream #631983
|
| 55 |
epatch "${FILESDIR}/${PN}-2.24.0-no-gconfd.patch"
|
| 56 |
|
| 57 |
# Do not crash in gconf_entry_set_value() when entry pointer is NULL, upstream #631985
|
| 58 |
epatch "${FILESDIR}/${PN}-2.28.0-entry-set-value-sigsegv.patch"
|
| 59 |
}
|
| 60 |
|
| 61 |
src_install() {
|
| 62 |
gnome2_src_install
|
| 63 |
|
| 64 |
keepdir /etc/gconf/gconf.xml.mandatory
|
| 65 |
keepdir /etc/gconf/gconf.xml.defaults
|
| 66 |
# Make sure this directory exists, bug #268070, upstream #572027
|
| 67 |
keepdir /etc/gconf/gconf.xml.system
|
| 68 |
|
| 69 |
echo 'CONFIG_PROTECT_MASK="/etc/gconf"' > 50gconf
|
| 70 |
echo 'GSETTINGS_BACKEND="gconf"' >> 50gconf
|
| 71 |
doenvd 50gconf || die "doenv failed"
|
| 72 |
dodir /root/.gconfd || die
|
| 73 |
}
|
| 74 |
|
| 75 |
pkg_preinst() {
|
| 76 |
kill_gconf
|
| 77 |
}
|
| 78 |
|
| 79 |
pkg_postinst() {
|
| 80 |
kill_gconf
|
| 81 |
|
| 82 |
# change the permissions to avoid some gconf bugs
|
| 83 |
einfo "changing permissions for gconf dirs"
|
| 84 |
find /etc/gconf/ -type d -exec chmod ugo+rx "{}" \;
|
| 85 |
|
| 86 |
einfo "changing permissions for gconf files"
|
| 87 |
find /etc/gconf/ -type f -exec chmod ugo+r "{}" \;
|
| 88 |
|
| 89 |
if ! use orbit; then
|
| 90 |
ewarn "You are using dbus for GConf's IPC. If you are upgrading from"
|
| 91 |
ewarn "<=gconf-3.2.3, or were previously using gconf with USE=orbit,"
|
| 92 |
ewarn "you will need to now restart your desktop session (for example,"
|
| 93 |
ewarn "by logging out and then back in)."
|
| 94 |
ewarn "Otherwise, gconf-based applications may crash with 'Method ..."
|
| 95 |
ewarn "on interface \"org.gnome.GConf.Server\" doesn't exist' errors."
|
| 96 |
fi
|
| 97 |
}
|
| 98 |
|
| 99 |
kill_gconf() {
|
| 100 |
# This function will kill all running gconfd-2 that could be causing troubles
|
| 101 |
if [ -x /usr/bin/gconftool-2 ]
|
| 102 |
then
|
| 103 |
/usr/bin/gconftool-2 --shutdown
|
| 104 |
fi
|
| 105 |
|
| 106 |
return 0
|
| 107 |
}
|