dev-qt/qdbus: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / sys-auth / oath-toolkit / oath-toolkit-2.6.1.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit pam eutils autotools
7 DESCRIPTION="Toolkit for using one-time password authentication with HOTP/TOTP algorithms"
8 HOMEPAGE="http://www.nongnu.org/oath-toolkit/"
9 SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz"
10 LICENSE="GPL-3 LGPL-2.1"
11
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="pam pskc test"
15 RESTRICT="!test? ( test )"
16
17 RDEPEND="
18         pam? ( sys-libs/pam )
19         pskc? ( dev-libs/xmlsec )"
20 DEPEND="${RDEPEND}
21         test? ( dev-libs/libxml2 )
22         dev-util/gtk-doc-am"
23
24 src_prepare() {
25         # These tests need git/cvs and don't reflect anything in the final app
26         sed -i -r \
27                 -e '/TESTS/s,test-vc-list-files-(git|cvs).sh,,g' \
28                 gl/tests/Makefile.am
29         # disable portability warnings, caused by gtk-doc.make
30         sed -i \
31                 -e '/AM_INIT_AUTOMAKE/ s:-Wall:\0 -Wno-portability:' \
32                 {liboath,libpskc}/configure.ac
33         eautoreconf
34         default
35 }
36
37 src_configure() {
38         econf \
39                 $(use_enable test xmltest ) \
40                 $(use_enable pam) \
41                 $(use_with pam pam-dir $(getpam_mod_dir)) \
42                 $(use_enable pskc)
43 }
44
45 src_install() {
46         default
47         if use pam; then
48                 newdoc pam_oath/README README.pam
49         fi
50         if use pskc; then
51                 doman pskctool/pskctool.1
52         fi
53 }
54
55 src_test() {
56         # without keep-going, it will bail out after the first testsuite failure,
57         # skipping the other testsuites. as they are mostly independant, this sucks.
58         emake --keep-going check
59         [ $? -ne 0 ] && die "At least one testsuite failed"
60 }