*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / dev-libs / opensc / opensc-0.19.0-r2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit bash-completion-r1
7
8 DESCRIPTION="Libraries and applications to access smartcards"
9 HOMEPAGE="https://github.com/OpenSC/OpenSC/wiki"
10 SRC_URI="https://github.com/OpenSC/OpenSC/releases/download/${PV}/${P}.tar.gz"
11
12 LICENSE="LGPL-2.1"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh ~sparc x86"
15 IUSE="ctapi doc libressl openct notify +pcsc-lite readline secure-messaging ssl test zlib"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="zlib? ( sys-libs/zlib )
19         readline? ( sys-libs/readline:0= )
20         ssl? (
21                 !libressl? ( dev-libs/openssl:0= )
22                 libressl? ( >=dev-libs/libressl-2.7.0:0= )
23         )
24         openct? ( >=dev-libs/openct-0.5.0 )
25         pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )
26         notify? ( dev-libs/glib:2= )"
27 DEPEND="${RDEPEND}
28         app-text/docbook-xsl-stylesheets
29         dev-libs/libxslt
30         test? ( dev-util/cmocka )"
31 BDEPEND="virtual/pkgconfig"
32
33 REQUIRED_USE="
34         pcsc-lite? ( !openct !ctapi )
35         openct? ( !pcsc-lite !ctapi )
36         ctapi? ( !pcsc-lite !openct )
37         || ( pcsc-lite openct ctapi )"
38
39 PATCHES=(
40         "${FILESDIR}/${P}-p11test_common.h.patch"
41 )
42
43 src_configure() {
44         econf \
45                 --with-completiondir="$(get_bashcompdir)" \
46                 --disable-openpace \
47                 --disable-static \
48                 --disable-strict \
49                 --enable-man \
50                 $(use_enable ctapi) \
51                 $(use_enable doc) \
52                 $(use_enable notify ) \
53                 $(use_enable openct) \
54                 $(use_enable openct) \
55                 $(use_enable pcsc-lite pcsc) \
56                 $(use_enable readline) \
57                 $(use_enable secure-messaging sm) \
58                 $(use_enable ssl openssl) \
59                 $(use_enable test tests) \
60                 $(use_enable zlib)
61 }
62
63 src_install() {
64         default
65         find "${D}" -name '*.la' -delete || die
66 }