mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 10:01:32 +02:00
opensc: pull down -ldl fix from Gentoo
The opensc code doesn't link against -ldl itself, so it'll fail to link when openssl fixes itself to stop spewing -ldl implicitly. This has been fixed upstream, so pull down that fix. BUG=None TEST=`emerge-x86-alex opensc` still works Change-Id: I1c53912afcb0e7830f056000b7ba0f72b7562ae7 Reviewed-on: https://gerrit.chromium.org/gerrit/23253 Reviewed-by: Elly Jones <ellyjones@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
6abebfab1d
commit
b7951e1591
42
sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.2-dl.patch
vendored
Normal file
42
sdk_container/src/third_party/portage-stable/dev-libs/opensc/files/opensc-0.12.2-dl.patch
vendored
Normal file
@ -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
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
From 9e62ac20a1dc39e001875e57067ab7fa2389ae73 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
|
||||||
|
Date: Sun, 13 May 2012 14:55:35 -0700
|
||||||
|
Subject: [PATCH] build: fix parallel install by creating directory in the
|
||||||
|
rule
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Relying on the rule that creates the directory is a bad idea to be
|
||||||
|
parallel safe.
|
||||||
|
|
||||||
|
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
||||||
|
---
|
||||||
|
etc/Makefile.am | 4 ++--
|
||||||
|
src/pkcs11/Makefile.am | 7 ++++---
|
||||||
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/etc/Makefile.am b/etc/Makefile.am
|
||||||
|
index 0ef546f..478a7bb 100644
|
||||||
|
--- a/etc/Makefile.am
|
||||||
|
+++ b/etc/Makefile.am
|
||||||
|
@@ -18,8 +18,8 @@ opensc.conf: opensc.conf.in force
|
||||||
|
-e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \
|
||||||
|
< $< > $@
|
||||||
|
|
||||||
|
-sysconf_DATA=#required in order to create dir
|
||||||
|
-install-exec-hook: install-sysconfDATA opensc.conf
|
||||||
|
+install-exec-hook: opensc.conf
|
||||||
|
+ $(mkdir_p) "$(DESTDIR)$(sysconfdir)"
|
||||||
|
if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \
|
||||||
|
$(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \
|
||||||
|
else \
|
||||||
|
diff --git a/src/pkcs11/Makefile.am b/src/pkcs11/Makefile.am
|
||||||
|
index ba5e70d..742c5fb 100644
|
||||||
|
--- a/src/pkcs11/Makefile.am
|
||||||
|
+++ b/src/pkcs11/Makefile.am
|
||||||
|
@@ -52,19 +52,20 @@ pkcs11-jar: jar-dir
|
||||||
|
-k"testcert" jar-dir
|
||||||
|
|
||||||
|
if WIN32
|
||||||
|
-install-exec-hook: install-pkcs11DATA
|
||||||
|
+install-exec-hook:
|
||||||
|
+ $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||||
|
for l in opensc-pkcs11.dll onepin-opensc-pkcs11.dll pkcs11-spy.dll; do \
|
||||||
|
mv "$(DESTDIR)$(libdir)/$$l" "$(DESTDIR)$(bindir)/$$l"; \
|
||||||
|
done
|
||||||
|
else
|
||||||
|
# see http://wiki.cacert.org/wiki/Pkcs11TaskForce
|
||||||
|
-pkcs11_DATA = #This will create the directory
|
||||||
|
if CYGWIN
|
||||||
|
PKCS11_SUFFIX=.dll
|
||||||
|
else
|
||||||
|
PKCS11_SUFFIX=.so
|
||||||
|
endif
|
||||||
|
-install-exec-hook: install-pkcs11DATA
|
||||||
|
+install-exec-hook:
|
||||||
|
+ $(mkdir_p) "$(DESTDIR)$(pkcs11dir)"
|
||||||
|
for l in opensc-pkcs11$(PKCS11_SUFFIX) onepin-opensc-pkcs11$(PKCS11_SUFFIX) pkcs11-spy$(PKCS11_SUFFIX); do \
|
||||||
|
rm -f "$(DESTDIR)$(pkcs11dir)/$$l"; \
|
||||||
|
$(LN_S) ../$$l "$(DESTDIR)$(pkcs11dir)/$$l"; \
|
||||||
|
--
|
||||||
|
1.7.8.6
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
# Copyright 1999-2012 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# 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 $
|
# $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"
|
EAPI="4"
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ SRC_URI="http://www.opensc-project.org/files/${PN}/${P}.tar.gz"
|
|||||||
|
|
||||||
LICENSE="LGPL-2.1"
|
LICENSE="LGPL-2.1"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ppc ppc64 ~s390 ~sh sparc x86"
|
KEYWORDS="alpha amd64 arm hppa ia64 m68k ppc ppc64 s390 sh sparc x86"
|
||||||
IUSE="doc libtool +pcsc-lite openct readline ssl zlib"
|
IUSE="doc libtool +pcsc-lite openct readline ssl zlib"
|
||||||
|
|
||||||
RDEPEND="libtool? ( sys-devel/libtool )
|
RDEPEND="libtool? ( sys-devel/libtool )
|
||||||
@ -22,7 +22,7 @@ RDEPEND="libtool? ( sys-devel/libtool )
|
|||||||
openct? ( >=dev-libs/openct-0.5.0 )
|
openct? ( >=dev-libs/openct-0.5.0 )
|
||||||
pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )"
|
pcsc-lite? ( >=sys-apps/pcsc-lite-1.3.0 )"
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}
|
||||||
dev-util/pkgconfig
|
virtual/pkgconfig
|
||||||
app-text/docbook-xsl-stylesheets
|
app-text/docbook-xsl-stylesheets
|
||||||
dev-libs/libxslt"
|
dev-libs/libxslt"
|
||||||
|
|
||||||
@ -32,6 +32,8 @@ REQUIRED_USE="
|
|||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
epatch "${FILESDIR}"/${PN}-0.12.1-crossbuild.patch
|
epatch "${FILESDIR}"/${PN}-0.12.1-crossbuild.patch
|
||||||
|
epatch "${FILESDIR}"/${P}-parallelinstall.patch
|
||||||
|
epatch "${FILESDIR}"/${P}-dl.patch
|
||||||
eautoreconf
|
eautoreconf
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +57,7 @@ src_configure() {
|
|||||||
|
|
||||||
econf \
|
econf \
|
||||||
--docdir="/usr/share/doc/${PF}" \
|
--docdir="/usr/share/doc/${PF}" \
|
||||||
--htmldir="/usr/share/doc/${PF}/html" \
|
--htmldir='$(docdir)/html' \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
$(use_enable doc) \
|
$(use_enable doc) \
|
||||||
$(use_enable openct) \
|
$(use_enable openct) \
|
||||||
@ -65,8 +67,6 @@ src_configure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
emake DESTDIR="${D}" install
|
default
|
||||||
find "${D}" -name '*.la' -delete
|
find "${ED}"/usr -name '*.la' -delete
|
||||||
|
|
||||||
dodoc ChangeLog
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user