app-crypt/tpm-tools: backport tpm-tools-1.3.5-r1 from main Gentoo

This version applies the gold patch directly, without ChromiumOS-specific
patching, and also fixes the automagic dependency problem on OpenCryptoki.

BUG=chromium-os:13728
TEST=emerge-{x86,arm}-generic (and misc test in Gentoo upstream)

Change-Id: I2fbec3fc722f9f307721d481db8873d2b3b62e93

Review URL: http://codereview.chromium.org/6792011
This commit is contained in:
Diego Elio Pettenò 2011-04-03 21:10:52 +02:00
parent b79b6e6772
commit ad5ed869f0
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/tpm-tools-1.3.1/src/data_mgmt/Makefile.am b/tpm-tools-1.3.1-orig/src/data_mgmt/Makefile.am
index 697f031..cff5897 100644
--- tpm-tools-1.3.1/src/data_mgmt/Makefile.am
+++ tpm-tools-1.3.1/src/data_mgmt/Makefile.am
@@ -31,7 +31,7 @@ bin_PROGRAMS = tpmtoken_init \
# Common build flags
AM_CPPFLAGS = -I$(top_builddir)/include -D_LINUX
-LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi
+LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl
#

View File

@ -0,0 +1,47 @@
# Copyright 1999-2011 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.1 2011/03/31 22:19:40 flameeyes 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 ~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
}