opensc: import latest from Gentoo

This version no longer needs libtool at runtime.

BUG=chromium-os:20376
TEST=`emerge-x86-alex opensc` still works, and doesn't link against libtool
TEST=cbuildbot x86-generic-full passed
CQ-DEPEND=If3d7df287f903b6fd03c1631bb923c1861ebb891

Change-Id: I5f838e4852316a07d6b01e6a6c9f6e9d8731f83f
Reviewed-on: https://gerrit.chromium.org/gerrit/13661
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2012-01-04 15:00:56 -05:00 committed by Gerrit
parent ffec5a2b2e
commit 6fe9babd62
3 changed files with 111 additions and 1 deletions

View File

@ -1 +1 @@
DIST opensc-0.12.1.tar.gz 1579129 RMD160 ab1f1a27fce1e2769d21d15c79fd7eef386ba4cd SHA1 656524f2aef61cfeea60b7795ef5a942bcca6f30 SHA256 e9b5812dd8024484c6bb7400fb3e638aca2e9b112a7ffb161c300fe2260b28c8
DIST opensc-0.12.2.tar.gz 1738553 RMD160 45504135db05fd404a357ebd8bea047c5c8604dc SHA1 8c34be52eb94025eb181c02b466223901bef744c SHA256 50e7371c0f45a3ed887098b712554905e3ef639d4dfca5ac90b8af5f69f1e675

View File

@ -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

View File

@ -0,0 +1,72 @@
# 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.2.ebuild,v 1.3 2011/12/05 16:13:09 vapier Exp $
EAPI="4"
inherit eutils autotools
DESCRIPTION="Libraries and applications to access smartcards"
HOMEPAGE="http://www.opensc-project.org/opensc/"
SRC_URI="http://www.opensc-project.org/files/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86"
IUSE="doc libtool +pcsc-lite openct readline ssl zlib"
RDEPEND="libtool? ( sys-devel/libtool )
zlib? ( sys-libs/zlib )
readline? ( sys-libs/readline )
ssl? ( dev-libs/openssl )
openct? ( >=dev-libs/openct-0.5.0 )
pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )"
DEPEND="${RDEPEND}
dev-util/pkgconfig
app-text/docbook-xsl-stylesheets
dev-libs/libxslt"
REQUIRED_USE="
pcsc-lite? ( !openct )
openct? ( !pcsc-lite )"
src_prepare() {
epatch "${FILESDIR}"/${PN}-0.12.1-crossbuild.patch
eautoreconf
}
src_configure() {
# disable everything, enable selectively
local myconf="--disable-pcsc --disable-openct --disable-ctapi"
if use pcsc-lite; then
myconf+=" --enable-pcsc"
elif use openct; then
myconf+=" --enable-openct"
else
myconf+=" --enable-ctapi"
fi
# the configure script prefers libtool's libltdl over
# the native system's dlopen ... so we have to manually
# control the behavior to something a bit more sane
export ac_cv_header_ltdl_h=$(usex libtool) \
ac_cv_lib_ltdl_lt_dlopen=$(usex libtool)
econf \
--docdir="/usr/share/doc/${PF}" \
--htmldir="/usr/share/doc/${PF}/html" \
--disable-static \
$(use_enable doc) \
$(use_enable openct) \
$(use_enable readline) \
$(use_enable zlib) \
${myconf}
}
src_install() {
emake DESTDIR="${D}" install
find "${D}" -name '*.la' -delete
dodoc ChangeLog
}