diff options
author | 2012-05-22 18:27:34 +0000 | |
---|---|---|
committer | 2012-05-22 18:27:34 +0000 | |
commit | 131b6f3674992813ac863875e3cd66f5514f5aa0 (patch) | |
tree | 47e2d0598a2fd766d8bf9a4c50cc1c0ac0aa93e8 /dev-libs/opensc | |
parent | Stable for x86, wrt bug #417079 (diff) | |
download | gentoo-2-131b6f3674992813ac863875e3cd66f5514f5aa0.tar.gz gentoo-2-131b6f3674992813ac863875e3cd66f5514f5aa0.tar.bz2 gentoo-2-131b6f3674992813ac863875e3cd66f5514f5aa0.zip |
Fix linking to -ldl when USE=-libtool.
(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/opensc')
-rw-r--r-- | dev-libs/opensc/ChangeLog | 8 | ||||
-rw-r--r-- | dev-libs/opensc/files/opensc-0.12.2-dl.patch | 42 | ||||
-rw-r--r-- | dev-libs/opensc/opensc-0.12.2-r1.ebuild | 72 |
3 files changed, 121 insertions, 1 deletions
diff --git a/dev-libs/opensc/ChangeLog b/dev-libs/opensc/ChangeLog index 1552e7c34ca6..7c76971bfe18 100644 --- a/dev-libs/opensc/ChangeLog +++ b/dev-libs/opensc/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-libs/opensc # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.120 2012/05/13 22:13:29 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/opensc/ChangeLog,v 1.121 2012/05/22 18:27:34 vapier Exp $ + +*opensc-0.12.2-r1 (22 May 2012) + + 22 May 2012; Mike Frysinger <vapier@gentoo.org> +files/opensc-0.12.2-dl.patch, + +opensc-0.12.2-r1.ebuild: + Fix linking to -ldl when USE=-libtool. 13 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/opensc-0.12.2-parallelinstall.patch, diff --git a/dev-libs/opensc/files/opensc-0.12.2-dl.patch b/dev-libs/opensc/files/opensc-0.12.2-dl.patch new file mode 100644 index 000000000000..526ef8161a89 --- /dev/null +++ b/dev-libs/opensc/files/opensc-0.12.2-dl.patch @@ -0,0 +1,42 @@ +From 1b896582a0cd74854f99e08854554807a8f1f764 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 22 May 2012 14:12:23 -0400 +Subject: [PATCH] link against -ldl when -lltdl is not available + +If ltdl isn't found, the code will use dlopen if it's available. +But it won't link to -ldl which can cause link errors like so: + + CCLD opensc-tool +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlopen' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlsym' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlerror' +../../src/libopensc/.libs/libopensc.so: error: undefined reference to 'dlclose' +collect2: ld returned 1 exit status +make[3]: *** [opensc-tool] Error 1 + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + configure.ac | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2751f0f..123aeb1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -277,6 +277,13 @@ if test -z "${LTLIB_LIBS}"; then + [LTLIB_LIBS="-lltdl"] + ) + fi ++if test -z "${LTLIB_LIBS}"; then ++ AC_CHECK_LIB( ++ [dl], ++ [dlopen], ++ [LTLIB_LIBS="-ldl"] ++ ) ++fi + + saved_CFLAGS="${CFLAGS}" + CFLAGS="${CFLAGS} ${LTLIB_CFLAGS}" +-- +1.7.8.6 + diff --git a/dev-libs/opensc/opensc-0.12.2-r1.ebuild b/dev-libs/opensc/opensc-0.12.2-r1.ebuild new file mode 100644 index 000000000000..b33e2101a9a2 --- /dev/null +++ b/dev-libs/opensc/opensc-0.12.2-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2012 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-r1.ebuild,v 1.1 2012/05/22 18:27:34 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} + virtual/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 + epatch "${FILESDIR}"/${P}-parallelinstall.patch + epatch "${FILESDIR}"/${P}-dl.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='$(docdir)/html' \ + --disable-static \ + $(use_enable doc) \ + $(use_enable openct) \ + $(use_enable readline) \ + $(use_enable zlib) \ + ${myconf} +} + +src_install() { + default + find "${ED}"/usr -name '*.la' -delete +} |