1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit fcaps gnome2 pam python-any-r1 virtualx
10 DESCRIPTION="Password and keyring managing daemon"
11 HOMEPAGE="https://wiki.gnome.org/Projects/GnomeKeyring"
13 LICENSE="GPL-2+ LGPL-2+"
15 IUSE="+caps pam selinux +ssh-agent test"
16 RESTRICT="!test? ( test )"
17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
19 # Replace gkd gpg-agent with pinentry[gnome-keyring] one, bug #547456
21 >=app-crypt/gcr-3.27.90:=[gtk]
22 >=dev-libs/glib-2.44:2
23 app-misc/ca-certificates
24 >=dev-libs/libgcrypt-1.2.2:0=
25 caps? ( sys-libs/libcap-ng )
27 selinux? ( sec-policy/selinux-gnome )
28 >=app-crypt/gnupg-2.0.28:=
29 ssh-agent? ( net-misc/openssh )
32 >=app-eselect/eselect-pinentry-0.5
33 app-text/docbook-xml-dtd:4.3
35 >=sys-devel/gettext-0.19.8
37 test? ( ${PYTHON_DEPS} )
39 PDEPEND="app-crypt/pinentry[gnome-keyring]" #570512
42 use test && python-any-r1_pkg_setup
46 # Disable stupid CFLAGS with debug enabled
47 sed -e 's/CFLAGS="$CFLAGS -g"//' \
48 -e 's/CFLAGS="$CFLAGS -O0"//' \
49 -i configure.ac configure || die
55 gnome2_src_configure \
56 $(use_with caps libcap-ng) \
58 $(use_with pam pam-dir $(getpam_mod_dir)) \
59 $(use_enable selinux) \
60 $(use_enable ssh-agent) \
65 "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/schema" || die
66 GSETTINGS_SCHEMA_DIR="${S}/schema" virtx emake check
70 # cap_ipc_lock only needed if building --with-libcap-ng
71 # Never install as suid root, this breaks dbus activation, see bug #513870
72 use caps && fcaps -m 755 cap_ipc_lock usr/bin/gnome-keyring-daemon
75 if ! [[ $(eselect pinentry show | grep "pinentry-gnome3") ]] ; then
76 ewarn "Please select pinentry-gnome3 as default pinentry provider:"
77 ewarn " # eselect pinentry set pinentry-gnome3"