*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / net-libs / zeromq / zeromq-2.2.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 # NOTES:
5 # 1- use flag 'pgm' (OpenPGM support) must be masked by profiles for ARM archs;
6
7 EAPI=4
8
9 inherit autotools
10
11 DESCRIPTION="ZeroMQ is a brokerless messaging kernel with extremely high performance"
12 HOMEPAGE="http://www.zeromq.org"
13 SRC_URI="http://download.zeromq.org/${P}.tar.gz"
14
15 LICENSE="LGPL-3"
16 SLOT="0"
17 KEYWORDS="amd64 hppa ppc ppc64 x86 ~amd64-linux ~x86-linux"
18 IUSE="pgm test static-libs"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND="!net-libs/cppzmq"
22 DEPEND="pgm? (
23                 virtual/pkgconfig
24                 ~net-libs/openpgm-5.1.118
25         )
26         || ( sys-apps/util-linux sys-freebsd/freebsd-lib )"
27
28 src_prepare() {
29         einfo "Removing bundled OpenPGM library"
30         rm -r "${S}"/foreign/openpgm/libpgm* || die
31         eautoreconf
32 }
33
34 src_configure() {
35         local myconf
36         use pgm && myconf="--with-system-pgm" || myconf="--without-pgm"
37         econf \
38                 $(use_enable static-libs static) \
39                 $myconf
40 }
41
42 src_install() {
43         emake DESTDIR="${D}" install || die "emake install failed"
44         dodoc NEWS README AUTHORS ChangeLog || die "dodoc failed"
45         doman doc/*.[1-9] || die "doman failed"
46
47         # remove useless .la files
48         find "${D}" -name '*.la' -delete
49
50         # remove useless .a (only for non static compilation)
51         use static-libs || find "${D}" -name '*.a' -delete
52 }