dev-python/objgraph: keyworded 3.4.1 for ia64, bug #717946
[gentoo.git] / net-libs / zeromq / zeromq-3.2.5.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit autotools
7
8 DESCRIPTION="ZeroMQ is a brokerless kernel"
9 HOMEPAGE="http://www.zeromq.org/"
10 SRC_URI="http://download.zeromq.org/${P}.tar.gz"
11
12 LICENSE="LGPL-3"
13 SLOT="0/3"
14 KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
15 IUSE="pgm test static-libs elibc_glibc"
16 RESTRICT="!test? ( test )"
17
18 DEPEND="
19         || ( sys-devel/gcc sys-devel/gcc-apple )
20         pgm? (
21                 virtual/pkgconfig
22                 >=net-libs/openpgm-5.2
23         )
24         elibc_glibc? ( sys-apps/util-linux )"
25 RDEPEND=""
26
27 src_prepare() {
28         einfo "Removing bundled OpenPGM library"
29         sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in || die
30         rm -r "${S}"/foreign/openpgm/libpgm* || die
31         # apply effective bit of below commit to fix compilation on Darwin
32         # https://github.com/zeromq/zeromq3-x/commit/400cbc208a768c4df5039f401dd2688eede6e1ca
33         sed -i -e '/strndup/d' tests/test_disconnect_inproc.cpp || die
34         mv configure.{in,ac} || die
35         eautoreconf
36 }
37
38 src_configure() {
39         local myconf
40         use pgm && myconf="--with-system-pgm" || myconf="--without-pgm"
41         econf \
42           $(use_enable static-libs static) \
43           ${myconf}
44 }
45
46 src_test() {
47         emake -j1 check
48 }
49
50 src_install() {
51         default
52         doman doc/*.[1-9]
53
54         # remove useless .la files
55         find "${ED}" -name '*.la' -delete || die
56
57         # remove useless .a (only for non static compilation)
58         if ! use static-libs; then
59                 find "${ED}" -name '*.a' -delete || die
60         fi
61 }