From e3456f5fd152bb84516987c27a189290b8f9143a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Mon, 4 Jul 2011 11:16:18 +0200 Subject: [PATCH] dev-libs/opensc: backport another fix when cross-building opensc; update to 0.12.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this change, opensc unreliably links to the new library on install, and might actually link to the old installed copy instead, creating unusable tools and libraries. BUG=none TEST=./build_packages && ./build_image updating from opensc-0.11.* Change-Id: I001a86f551d7be736a8e0f14866e78b3dae64333 Reviewed-on: http://gerrit.chromium.org/gerrit/3624 Reviewed-by: David James Tested-by: Diego Elio Pettenò Reviewed-by: Diego Elio Pettenò --- .../files/opensc-0.12.1-crossbuild.patch | 38 +++++++++++++++++++ ...-0.12.0-r2.ebuild => opensc-0.12.1.ebuild} | 11 +++++- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.1-crossbuild.patch rename sdk_container/src/third_party/portage-stable/dev-libs/opensc/{opensc-0.12.0-r2.ebuild => opensc-0.12.1.ebuild} (85%) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.1-crossbuild.patch b/sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.1-crossbuild.patch new file mode 100644 index 0000000000..008fd3c357 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.1-crossbuild.patch @@ -0,0 +1,38 @@ +--- src/pkcs11/Makefile.am 2011-05-17 13:07:00.000000000 -0400 ++++ Makefile.am.new 2011-07-07 10:03:28.399185928 -0400 +@@ -14,9 +14,10 @@ + mechanism.c openssl.c framework-pkcs15.c \ + framework-pkcs15init.c debug.c opensc-pkcs11.exports \ + pkcs11-display.c pkcs11-display.h +-OPENSC_PKCS11_LIBS = $(OPTIONAL_OPENSSL_LIBS) $(PTHREAD_LIBS) $(LTLIB_LIBS) \ ++OPENSC_PKCS11_LIBS = \ + $(top_builddir)/src/common/libcompat.la \ +- $(top_builddir)/src/libopensc/libopensc.la ++ $(top_builddir)/src/libopensc/libopensc.la \ ++ $(OPTIONAL_OPENSSL_LIBS) $(PTHREAD_LIBS) $(LTLIB_LIBS) + + opensc_pkcs11_la_SOURCES = $(OPENSC_PKCS11_SRC) $(OPENSC_PKCS11_INC) hack-disabled.c + opensc_pkcs11_la_LIBADD = $(OPENSC_PKCS11_LIBS) +@@ -31,7 +32,7 @@ + -module -shared -avoid-version -no-undefined + + pkcs11_spy_la_SOURCES = pkcs11-spy.c pkcs11-display.c pkcs11-display.h pkcs11-spy.exports +-pkcs11_spy_la_LIBADD = $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) $(top_builddir)/src/common/libpkcs11.la ++pkcs11_spy_la_LIBADD = $(top_builddir)/src/common/libpkcs11.la $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) + pkcs11_spy_la_LDFLAGS = $(AM_LDFLAGS) \ + -export-symbols "$(srcdir)/pkcs11-spy.exports" \ + -module -shared -avoid-version -no-undefined +--- src/tools/Makefile.am 2011-05-17 13:07:00.000000000 -0400 ++++ Makefile.am.new 2011-07-07 10:06:08.710185925 -0400 +@@ -24,8 +24,9 @@ + pkcs15_tool_SOURCES = pkcs15-tool.c util.c + pkcs15_tool_LDADD = $(OPTIONAL_OPENSSL_LIBS) + pkcs11_tool_SOURCES = pkcs11-tool.c util.c +-pkcs11_tool_LDADD = $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) \ +- $(top_builddir)/src/common/libpkcs11.la ++pkcs11_tool_LDADD = \ ++ $(top_builddir)/src/common/libpkcs11.la \ ++ $(OPTIONAL_OPENSSL_LIBS) $(LTLIB_LIBS) + pkcs15_crypt_SOURCES = pkcs15-crypt.c util.c + pkcs15_crypt_LDADD = $(OPTIONAL_OPENSSL_LIBS) + cryptoflex_tool_SOURCES = cryptoflex-tool.c util.c diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.1.ebuild similarity index 85% rename from sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.0-r2.ebuild rename to sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.1.ebuild index a8bcd70be6..9e732fde15 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.0-r2.ebuild +++ b/sdk_container/src/third_party/portage-stable/dev-libs/opensc/opensc-0.12.1.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.12.0-r2.ebuild,v 1.1 2011/04/18 18:49:57 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.12.1.ebuild,v 1.1 2011/07/07 14:27:49 c1pher Exp $ EAPI="4" +inherit eutils autotools + DESCRIPTION="Libraries and applications to access smartcards." HOMEPAGE="http://www.opensc-project.org/opensc/" @@ -30,6 +32,11 @@ REQUIRED_USE=" pcsc-lite? ( !openct ) openct? ( !pcsc-lite )" +src_prepare() { + epatch "${FILESDIR}"/${P}-crossbuild.patch + eautoreconf +} + src_configure() { # disable everything, enable selectively local myconf="--disable-pcsc --disable-openct --disable-ctapi" @@ -54,7 +61,7 @@ src_configure() { } src_install() { - emake DESTDIR="${D}" install || die + emake DESTDIR="${D}" install find "${D}" -name '*.la' -delete dodoc ChangeLog