net-libs/zeromq: Backport fix for underlinking
authorJustin Lecher <jlec@gentoo.org>
Sat, 10 Dec 2016 11:43:08 +0000 (12:43 +0100)
committerJustin Lecher <jlec@gentoo.org>
Sat, 10 Dec 2016 11:43:24 +0000 (12:43 +0100)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=602230

Package-Manager: portage-2.3.3
Signed-off-by: Justin Lecher <jlec@gentoo.org>
net-libs/zeromq/files/zeromq-4.2.0-dl-backport.patch [new file with mode: 0644]
net-libs/zeromq/zeromq-4.2.0.ebuild

diff --git a/net-libs/zeromq/files/zeromq-4.2.0-dl-backport.patch b/net-libs/zeromq/files/zeromq-4.2.0-dl-backport.patch
new file mode 100644 (file)
index 0000000..c00001d
--- /dev/null
@@ -0,0 +1,25 @@
+From 1b3fcbd3eead8f1f59f3e9472319d58ce6b52bb7 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <luca.boccassi@gmail.com>
+Date: Thu, 10 Nov 2016 22:49:41 +0000
+Subject: [PATCH] Problem: linker fails looking for dladdr
+
+Solution: search and add it via AC_CHECK_LIB when building with
+libunwind, as the backtrace function uses dladdr. This problem
+only appears on some distributions and with some compiler/toolchain
+versions.
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4fb2757..d548f9f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -650,6 +650,7 @@ PKG_CHECK_MODULES(LIBUNWIND, [libunwind],
+         AC_DEFINE(HAVE_LIBUNWIND, 1, [The libunwind library is to be used])
+         AC_SUBST([LIBUNWIND_CFLAGS])
+         AC_SUBST([LIBUNWIND_LIBS])
++        AC_CHECK_LIB([dl], [dladdr])
+     ],
+     [
+         AC_MSG_WARN([Cannot find libunwind])
index f43dcbd1128c55f130598640ef8662674dd93f49..c6b044abc82e19f217a188c7c7c1e7acef19a768 100644 (file)
@@ -24,6 +24,10 @@ DEPEND="${RDEPEND}
        sys-apps/util-linux
        pgm? ( virtual/pkgconfig )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-dl-backport.patch
+)
+
 src_prepare() {
        sed \
                -e '/libzmq_werror=/s:yes:no:g' \
@@ -51,5 +55,5 @@ src_test() {
 
 src_install() {
        default
-       find "${ED}"usr/lib* -name '*.la' -o -name '*.a' -delete || die
+       find "${ED}"usr/lib* -name '*.la' -delete || die
 }