Diff zeromq-3.2.5 with a zeromq-4.3.2

/usr/portage/net-libs/zeromq/zeromq-4.3.2.ebuild 2019-12-11 02:41:00.000000000 +0300
1 1
# Copyright 1999-2019 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=5
4
EAPI="7"
5 5

  
6 6
inherit autotools
7 7

  
8
DESCRIPTION="ZeroMQ is a brokerless kernel"
8
DESCRIPTION="A brokerless kernel"
9 9
HOMEPAGE="http://www.zeromq.org/"
10
SRC_URI="http://download.zeromq.org/${P}.tar.gz"
10
SRC_URI="https://github.com/zeromq/libzmq/releases/download/v${PV}/${P}.tar.gz"
11 11

  
12 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"
13
SLOT="0/5"
14
KEYWORDS="amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
15
IUSE="doc drafts pgm +sodium static-libs test unwind elibc_Darwin"
16 16
RESTRICT="!test? ( test )"
17 17

  
18
DEPEND="
19
	|| ( sys-devel/gcc sys-devel/gcc-apple )
20
	pgm? (
21
		virtual/pkgconfig
22
		>=net-libs/openpgm-5.2
18
RDEPEND="
19
	!elibc_Darwin? ( unwind? ( sys-libs/libunwind ) )
20
	sodium? ( dev-libs/libsodium:= )
21
	pgm? ( =net-libs/openpgm-5.2.122 )"
22
DEPEND="${RDEPEND}
23
	!elibc_Darwin? ( sys-apps/util-linux )
24
	doc? (
25
		app-text/asciidoc
26
		app-text/xmlto
23 27
	)
24
	elibc_glibc? ( sys-apps/util-linux )"
25
RDEPEND=""
28
	pgm? ( virtual/pkgconfig )"
26 29

  
27 30
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
31
	sed \
32
		-e '/libzmq_werror=/s:yes:no:g' \
33
		-i configure.ac || die
34
	default
35 35
	eautoreconf
36 36
}
37 37

  
38 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}
39
	local myeconfargs=(
40
		--enable-shared
41
		$(use_enable drafts)
42
		$(use_enable static-libs static)
43
		$(use_enable unwind libunwind)
44
		$(use_with sodium libsodium)
45
		$(use_with pgm)
46
		$(use_with doc docs)
47
	)
48
	econf "${myeconfargs[@]}"
44 49
}
45 50

  
46 51
src_test() {
52
	# Restricting to one job because multiple tests are using the same port.
53
	# Upstream knows the problem and says it doesn't support parallel test
54
	# execution, see ${S}/INSTALL.
47 55
	emake -j1 check
48 56
}
49 57

  
50 58
src_install() {
51 59
	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
60
	find "${ED%/}"/usr/lib* -name '*.la' -delete || die
61 61
}
Thank you!