diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-07-15 14:08:22 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2017-07-15 14:09:02 +0200 |
commit | 1eccba62f0f71438a1db0838c54c7fc5947cacc1 (patch) | |
tree | fbcc8a5ab43e99bd93dd22f19d5e1bbe251dbd75 /net-libs/zeromq | |
parent | dev-ruby/backports: cleanup (diff) | |
download | gentoo-1eccba62f0f71438a1db0838c54c7fc5947cacc1.tar.gz gentoo-1eccba62f0f71438a1db0838c54c7fc5947cacc1.tar.bz2 gentoo-1eccba62f0f71438a1db0838c54c7fc5947cacc1.zip |
net-libs/zeromq: make 'sys-libs/libunwind' an optional depend
Closes: https://github.com/gentoo/gentoo/pull/5105
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'net-libs/zeromq')
-rw-r--r-- | net-libs/zeromq/files/zeromq-4.2.2-optional-libunwind.patch | 70 | ||||
-rw-r--r-- | net-libs/zeromq/zeromq-4.2.2-r2.ebuild | 59 |
2 files changed, 129 insertions, 0 deletions
diff --git a/net-libs/zeromq/files/zeromq-4.2.2-optional-libunwind.patch b/net-libs/zeromq/files/zeromq-4.2.2-optional-libunwind.patch new file mode 100644 index 000000000000..36a5f66bbc91 --- /dev/null +++ b/net-libs/zeromq/files/zeromq-4.2.2-optional-libunwind.patch @@ -0,0 +1,70 @@ +Accepted upstream as: https://github.com/zeromq/libzmq/pull/2625 + +From 88487e7da3e0412abde30af2855a667ab973f9fc Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Fri, 14 Jul 2017 21:44:30 +0100 +Subject: [PATCH] configure.ac: allow user to disable libunwind discovery via + --disable-libunwind + +on ia64 architecture libunwind comes with gcc. Unfortunately +libunwind is not directly usable as-is and fails at link time: + +``` + ia64-unknown-linux-gnu-g++ -o perf/.libs/local_lat perf/local_lat.o src/.libs/libzmq.so -lsodium -lrt -lpthread -ldl + src/.libs/libzmq.so: undefined reference to `_ULia64_step' +``` + +The change adds --{enable,disable}-libunwind flag to control +automatic dependency. The default is unchanged: use if available. + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + configure.ac | 32 ++++++++++++++++++++++---------- + 1 file changed, 22 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c10f8445..ad193871 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -721,16 +721,28 @@ else + AC_SUBST(pkg_config_defines, "") + fi + +-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]) +- ]) ++AC_ARG_ENABLE([libunwind], ++ [AS_HELP_STRING([--enable-libunwind], ++ [enable libunwind [default=auto]])], ++ [enable_libunwind=$enableval], ++ [enable_libunwind="auto"]) ++ ++if test "x$enable_libunwind" != "xno"; then ++ 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]) ++ ], ++ [ ++ if test "x$enable_libunwind" = "xyes"; then ++ AC_MSG_ERROR([Cannot find libunwind]) ++ else ++ AC_MSG_WARN([Cannot find libunwind]) ++ fi ++ ]) ++fi + + # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS + AC_SUBST(LIBZMQ_EXTRA_CFLAGS) +-- +2.13.3 + diff --git a/net-libs/zeromq/zeromq-4.2.2-r2.ebuild b/net-libs/zeromq/zeromq-4.2.2-r2.ebuild new file mode 100644 index 000000000000..5a7e6a8072ba --- /dev/null +++ b/net-libs/zeromq/zeromq-4.2.2-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools + +DESCRIPTION="A brokerless kernel" +HOMEPAGE="http://www.zeromq.org/" +SRC_URI="https://github.com/zeromq/libzmq/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0/5" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" +IUSE="pgm +sodium static-libs test unwind elibc_Darwin" + +RDEPEND=" + !elibc_Darwin? ( unwind? ( sys-libs/libunwind ) ) + sodium? ( dev-libs/libsodium:= ) + pgm? ( =net-libs/openpgm-5.2.122 )" +DEPEND="${RDEPEND} + app-text/asciidoc + app-text/xmlto + !elibc_Darwin? ( sys-apps/util-linux ) + pgm? ( virtual/pkgconfig )" + +PATCHES=( "${FILESDIR}"/${PN}-4.2.1-disable-experimental-zmq_poll-implementation.patch + "${FILESDIR}"/${PN}-4.2.2-optional-libunwind.patch ) + +src_prepare() { + sed \ + -e '/libzmq_werror=/s:yes:no:g' \ + -i configure.ac || die + default + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-shared + $(use_enable static-libs static) + $(use_enable unwind libunwind) + $(use_with sodium libsodium) + $(use_with pgm) + ) + econf "${myeconfargs[@]}" +} + +src_test() { + # Restricting to one job because multiple tests are using the same port. + # Upstream knows the problem and says it doesn't support parallel test + # execution, see ${S}/INSTALL. + emake -j1 check +} + +src_install() { + default + find "${ED}"usr/lib* -name '*.la' -delete || die +} |