summaryrefslogtreecommitdiff
blob: b743966ade2305ab050d47db56236e7a72a0f0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/tpm-tools/tpm-tools-1.3.5-r1.ebuild,v 1.2 2012/05/14 19:40:07 vapier Exp $

EAPI=4
inherit autotools eutils flag-o-matic

DESCRIPTION="TrouSerS' support tools for the Trusted Platform Modules"
HOMEPAGE="http://trousers.sourceforge.net"
SRC_URI="mirror://sourceforge/trousers/${P}.tar.gz"
LICENSE="CPL-1.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE="nls pkcs11 debug"

COMMON_DEPEND="
	>=app-crypt/trousers-0.3.0
	dev-libs/openssl
	pkcs11? ( dev-libs/opencryptoki )
	"
RDEPEND="${COMMON_DEPEND}
	nls? ( virtual/libintl )"
DEPEND="${COMMON_DEPEND}
	nls? ( sys-devel/gettext )"

src_prepare() {
	sed -i -e "s/-Werror //" configure.in || die "Sed failed"
	epatch "${FILESDIR}"/${PN}-1.3.1-gold.patch

	eautoreconf
}

src_configure() {
	local myconf="$(use_enable nls)"

	# don't use --enable-pkcs11-support, configure is a mess.
	use pkcs11 || myconf+=" --disable-pkcs11-support"

	use debug && append-flags -DDEBUG || append-flags -DNDEBUG

	econf ${myconf}
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc README
}