*/*: Drop stable ia64 keywords
[gentoo.git] / gnome-base / gnome-keyring / gnome-keyring-3.34.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit fcaps gnome2 pam python-any-r1 virtualx
9
10 DESCRIPTION="Password and keyring managing daemon"
11 HOMEPAGE="https://wiki.gnome.org/Projects/GnomeKeyring"
12
13 LICENSE="GPL-2+ LGPL-2+"
14 SLOT="0"
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"
18
19 # Replace gkd gpg-agent with pinentry[gnome-keyring] one, bug #547456
20 RDEPEND="
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 )
26         pam? ( sys-libs/pam )
27         selinux? ( sec-policy/selinux-gnome )
28         >=app-crypt/gnupg-2.0.28:=
29         ssh-agent? ( net-misc/openssh )
30 "
31 DEPEND="${RDEPEND}
32         >=app-eselect/eselect-pinentry-0.5
33         app-text/docbook-xml-dtd:4.3
34         dev-libs/libxslt
35         >=sys-devel/gettext-0.19.8
36         virtual/pkgconfig
37         test? ( ${PYTHON_DEPS} )
38 "
39 PDEPEND="app-crypt/pinentry[gnome-keyring]" #570512
40
41 pkg_setup() {
42         use test && python-any-r1_pkg_setup
43 }
44
45 src_prepare() {
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
50
51         gnome2_src_prepare
52 }
53
54 src_configure() {
55         gnome2_src_configure \
56                 $(use_with caps libcap-ng) \
57                 $(use_enable pam) \
58                 $(use_with pam pam-dir $(getpam_mod_dir)) \
59                 $(use_enable selinux) \
60                 $(use_enable ssh-agent) \
61                 --enable-doc
62 }
63
64 src_test() {
65          "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/schema" || die
66          GSETTINGS_SCHEMA_DIR="${S}/schema" virtx emake check
67 }
68
69 pkg_postinst() {
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
73         gnome2_pkg_postinst
74
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"
78         fi
79 }