diff options
-rw-r--r-- | dev-libs/opensc/ChangeLog | 11 | ||||
-rw-r--r-- | dev-libs/opensc/files/opensc-0.11.13+pcsc-lite-1.6.2.patch | 64 | ||||
-rw-r--r-- | dev-libs/opensc/opensc-0.11.13-r1.ebuild | 58 | ||||
-rw-r--r-- | dev-libs/opensc/opensc-0.11.13.ebuild | 11 |
4 files changed, 142 insertions, 2 deletions
diff --git a/dev-libs/opensc/ChangeLog b/dev-libs/opensc/ChangeLog index d6d34aec652a..02036cd82d41 100644 --- a/dev-libs/opensc/ChangeLog +++ b/dev-libs/opensc/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-libs/opensc # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.101 2010/10/17 18:02:28 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.102 2010/11/29 13:43:03 flameeyes Exp $ + +*opensc-0.11.13-r1 (29 Nov 2010) + + 29 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> opensc-0.11.13.ebuild, + +opensc-0.11.13-r1.ebuild, +files/opensc-0.11.13+pcsc-lite-1.6.2.patch: + Fix build with recent pcsc-lite (backport from upstream); closes bug #341371; + add dependency over libtool (needed for ltdl), and over readline (it was + automagic before). In r1 instead add USE flag for readline, OpenSSL and zlib, + and rebuild autotools with modern versions to fix bug #317295. 17 Oct 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> opensc-0.11.13.ebuild: diff --git a/dev-libs/opensc/files/opensc-0.11.13+pcsc-lite-1.6.2.patch b/dev-libs/opensc/files/opensc-0.11.13+pcsc-lite-1.6.2.patch new file mode 100644 index 000000000000..1cac75e8a15d --- /dev/null +++ b/dev-libs/opensc/files/opensc-0.11.13+pcsc-lite-1.6.2.patch @@ -0,0 +1,64 @@ +Index: opensc-0.11.13/src/libopensc/internal-winscard.h +=================================================================== +--- opensc-0.11.13.orig/src/libopensc/internal-winscard.h ++++ opensc-0.11.13/src/libopensc/internal-winscard.h +@@ -77,7 +77,7 @@ typedef struct + unsigned long cbAtr; + unsigned char rgbAtr[MAX_ATR_SIZE]; + } +-SCARD_READERSTATE_A; ++SCARD_READERSTATE; + + typedef struct _SCARD_IO_REQUEST + { +@@ -87,8 +87,8 @@ typedef struct _SCARD_IO_REQUEST + SCARD_IO_REQUEST, *PSCARD_IO_REQUEST, *LPSCARD_IO_REQUEST; + + typedef const SCARD_IO_REQUEST *LPCSCARD_IO_REQUEST; +-typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A, +- *LPSCARD_READERSTATE_A; ++typedef SCARD_READERSTATE SCARD_READERSTATE, *PSCARD_READERSTATE, ++ *SCARD_READERSTATE; + + #endif /* HAVE_SCARD_H */ + +@@ -113,7 +113,7 @@ typedef LONG (PCSC_API *SCardEndTransact + typedef LONG (PCSC_API *SCardStatus_t)(SCARDHANDLE hCard, LPSTR mszReaderNames, LPDWORD pcchReaderLen, + LPDWORD pdwState, LPDWORD pdwProtocol, LPBYTE pbAtr, LPDWORD pcbAtrLen); + typedef LONG (PCSC_API *SCardGetStatusChange_t)(SCARDCONTEXT hContext, DWORD dwTimeout, +- LPSCARD_READERSTATE_A rgReaderStates, DWORD cReaders); ++ SCARD_READERSTATE *rgReaderStates, DWORD cReaders); + typedef LONG (PCSC_API *SCardControlOLD_t)(SCARDHANDLE hCard, LPCVOID pbSendBuffer, DWORD cbSendLength, + LPVOID pbRecvBuffer, LPDWORD lpBytesReturned); + typedef LONG (PCSC_API *SCardControl_t)(SCARDHANDLE hCard, DWORD dwControlCode, LPCVOID pbSendBuffer, +Index: opensc-0.11.13/src/libopensc/reader-pcsc.c +=================================================================== +--- opensc-0.11.13.orig/src/libopensc/reader-pcsc.c ++++ opensc-0.11.13/src/libopensc/reader-pcsc.c +@@ -80,7 +80,7 @@ struct pcsc_private_data { + + struct pcsc_slot_data { + SCARDHANDLE pcsc_card; +- SCARD_READERSTATE_A reader_state; ++ SCARD_READERSTATE reader_state; + DWORD verify_ioctl; + DWORD verify_ioctl_start; + DWORD verify_ioctl_finish; +@@ -353,7 +353,7 @@ static int pcsc_wait_for_event(sc_reader + sc_context_t *ctx; + SCARDCONTEXT pcsc_ctx; + LONG ret; +- SCARD_READERSTATE_A rgReaderStates[SC_MAX_READERS]; ++ SCARD_READERSTATE rgReaderStates[SC_MAX_READERS]; + unsigned long on_bits, off_bits; + time_t end_time, now, delta; + size_t i; +@@ -401,7 +401,7 @@ static int pcsc_wait_for_event(sc_reader + /* Wait for a status change and return if it's a card insert/removal + */ + for( ; ; ) { +- SCARD_READERSTATE_A *rsp; ++ SCARD_READERSTATE *rsp; + + /* Scan the current state of all readers to see if they + * match any of the events we're polling for */ diff --git a/dev-libs/opensc/opensc-0.11.13-r1.ebuild b/dev-libs/opensc/opensc-0.11.13-r1.ebuild new file mode 100644 index 000000000000..e342c041576a --- /dev/null +++ b/dev-libs/opensc/opensc-0.11.13-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.11.13-r1.ebuild,v 1.1 2010/11/29 13:43:03 flameeyes Exp $ + +EAPI="2" + +inherit eutils autotools + +DESCRIPTION="SmartCard library and applications" +HOMEPAGE="http://www.opensc-project.org/opensc/" + +SRC_URI="http://www.opensc-project.org/files/${PN}/${P}.tar.gz" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="doc openct pcsc-lite readline ssl zlib" + +# libtool is required at runtime for libltdl +RDEPEND=" + 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" + +pkg_setup() { + if use openct; then + elog "Support for openct is deprecated." + elog "It is recommended to use pcsc-lite." + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}+pcsc-lite-1.6.2.patch + + eautoreconf +} + +src_configure() { + econf \ + --docdir="/usr/share/doc/${PF}" \ + --htmldir="/usr/share/doc/${PF}/html" \ + $(use_enable doc) \ + $(use_enable openct) \ + $(use_enable pcsc-lite pcsc) \ + $(use_enable readline) \ + $(use_enable ssl openssl) \ + $(use_enable zlib) \ + --with-pinentry="/usr/bin/pinentry" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" +} diff --git a/dev-libs/opensc/opensc-0.11.13.ebuild b/dev-libs/opensc/opensc-0.11.13.ebuild index 3d6a19d4701c..55443686d04a 100644 --- a/dev-libs/opensc/opensc-0.11.13.ebuild +++ b/dev-libs/opensc/opensc-0.11.13.ebuild @@ -1,9 +1,11 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.11.13.ebuild,v 1.7 2010/10/17 18:02:28 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/opensc-0.11.13.ebuild,v 1.8 2010/11/29 13:43:03 flameeyes Exp $ EAPI="2" +inherit eutils + DESCRIPTION="SmartCard library and applications" HOMEPAGE="http://www.opensc-project.org/opensc/" @@ -14,8 +16,11 @@ LICENSE="LGPL-2.1" SLOT="0" IUSE="doc openct pcsc-lite" +# libtool is required at runtime for libltdl RDEPEND="dev-libs/openssl sys-libs/zlib + sys-devel/libtool + sys-libs/readline openct? ( >=dev-libs/openct-0.5.0 ) pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )" DEPEND="${RDEPEND} @@ -28,6 +33,10 @@ pkg_setup() { fi } +src_prepare() { + epatch "${FILESDIR}"/${P}+pcsc-lite-1.6.2.patch +} + src_configure() { econf \ --docdir="/usr/share/doc/${PF}" \ |