1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 GNOME_ORG_MODULE="GConf"
8 PYTHON_COMPAT=( python2_7 )
11 inherit eutils gnome2 multilib-minimal python-r1
13 DESCRIPTION="GNOME configuration system and daemon"
14 HOMEPAGE="https://projects.gnome.org/gconf/"
18 KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 sparc x86 ~x86-linux"
19 IUSE="debug +introspection ldap policykit"
23 >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}]
24 >=dev-libs/dbus-glib-0.100.2:=[${MULTILIB_USEDEP}]
25 >=sys-apps/dbus-1.6.18-r1:=[${MULTILIB_USEDEP}]
26 >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
27 introspection? ( >=dev-libs/gobject-introspection-0.9.5:= )
28 ldap? ( >=net-nds/openldap-2.4.38-r1:=[${MULTILIB_USEDEP}] )
29 policykit? ( sys-auth/polkit:= )
35 >=dev-util/intltool-0.35
36 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
39 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
46 # Do not start gconfd when installing schemas, fix bug #238276, upstream #631983
47 epatch "${FILESDIR}/${PN}-2.24.0-no-gconfd.patch"
49 # Do not crash in gconf_entry_set_value() when entry pointer is NULL, upstream #631985
50 epatch "${FILESDIR}/${PN}-2.28.0-entry-set-value-sigsegv.patch"
53 # mconvert: enable recursive scheme lookup and fix a crasher
54 epatch "${FILESDIR}/${P}-mconvert-crasher.patch"
56 # dbus: Don't spew to console when unable to connect to dbus daemon
57 epatch "${FILESDIR}/${P}-spew-console-error.patch"
59 # gsettings-data-convert: Warn (and fix) invalid schema paths
60 epatch "${FILESDIR}/${P}-gsettings-data-convert-paths.patch"
65 multilib_src_configure() {
67 gnome2_src_configure \
69 --enable-gsettings-backend \
72 $(multilib_native_use_enable introspection) \
73 $(use_with ldap openldap) \
74 $(multilib_native_use_enable policykit defaults-service)
76 if multilib_is_native_abi; then
77 ln -s "${S}"/doc/gconf/html doc/gconf/html || die
81 multilib_src_install() {
85 multilib_src_install_all() {
86 python_replicate_script "${ED}"/usr/bin/gsettings-schema-convert
88 keepdir /etc/gconf/gconf.xml.mandatory
89 keepdir /etc/gconf/gconf.xml.defaults
90 # Make sure this directory exists, bug #268070, upstream #572027
91 keepdir /etc/gconf/gconf.xml.system
93 echo "CONFIG_PROTECT_MASK=\"/etc/gconf\"" > 50gconf
94 echo 'GSETTINGS_BACKEND="gconf"' >> 50gconf
109 multilib_pkg_postinst() {
110 gnome2_giomodule_cache_update \
111 || die "Update GIO modules cache failed (for ${ABI})"
113 multilib_foreach_abi multilib_pkg_postinst
115 # change the permissions to avoid some gconf bugs
116 einfo "changing permissions for gconf dirs"
117 find "${EPREFIX}"/etc/gconf/ -type d -exec chmod ugo+rx "{}" \;
119 einfo "changing permissions for gconf files"
120 find "${EPREFIX}"/etc/gconf/ -type f -exec chmod ugo+r "{}" \;
126 multilib_pkg_postrm() {
127 gnome2_giomodule_cache_update \
128 || die "Update GIO modules cache failed (for ${ABI})"
130 multilib_foreach_abi multilib_pkg_postrm
134 # This function will kill all running gconfd-2 that could be causing troubles
135 if [ -x "${EPREFIX}"/usr/bin/gconftool-2 ]
137 "${EPREFIX}"/usr/bin/gconftool-2 --shutdown