Merge remote-tracking branch 'github/pr/674'.
[gentoo.git] / dev-libs / opensc / opensc-0.13.0.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 inherit eutils
8
9 DESCRIPTION="Libraries and applications to access smartcards"
10 HOMEPAGE="http://www.opensc-project.org/opensc/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
12
13 LICENSE="LGPL-2.1"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
16 IUSE="doc +pcsc-lite secure-messaging openct ctapi readline ssl zlib"
17
18 RDEPEND="zlib? ( sys-libs/zlib )
19         readline? ( sys-libs/readline:0 )
20         ssl? ( dev-libs/openssl:0 )
21         openct? ( >=dev-libs/openct-0.5.0 )
22         pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )"
23 DEPEND="${RDEPEND}
24         virtual/pkgconfig
25         app-text/docbook-xsl-stylesheets
26         dev-libs/libxslt"
27
28 REQUIRED_USE="
29         pcsc-lite? ( !openct !ctapi )
30         openct? ( !pcsc-lite !ctapi )
31         ctapi? ( !pcsc-lite !openct )
32         || ( pcsc-lite openct ctapi )"
33
34 src_prepare() {
35         epatch "${FILESDIR}/${P}-openssl.patch"
36 }
37
38 src_configure() {
39         econf \
40                 --docdir="/usr/share/doc/${PF}" \
41                 --htmldir='$(docdir)/html' \
42                 --disable-static \
43                 $(use_enable doc) \
44                 $(use_enable openct) \
45                 $(use_enable readline) \
46                 $(use_enable zlib) \
47                 $(use_enable secure-messaging sm) \
48                 $(use_enable ssl openssl) \
49                 $(use_enable pcsc-lite pcsc) \
50                 $(use_enable openct) \
51                 $(use_enable ctapi)
52 }
53
54 src_install() {
55         default
56         find "${ED}"/usr -name '*.la' -delete
57 }