Diff libsrtp-2.2.0 with a libsrtp-2.3.0-r1

/usr/portage/net-libs/libsrtp/libsrtp-2.3.0-r1.ebuild 2021-05-02 13:39:00.000000000 +0300
1 1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=7
5 5

  
6 6
inherit autotools multilib-minimal
7 7

  
......
12 12
LICENSE="BSD"
13 13
SLOT="2/1"
14 14
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 -sparc x86 ~ppc-macos ~x64-macos"
15
IUSE="aesicm console debug doc openssl static-libs syslog test"
15
IUSE="debug doc nss openssl static-libs test"
16 16
RESTRICT="!test? ( test )"
17 17

  
18
REQUIRED_USE="?? ( nss openssl )"
19

  
18 20
RDEPEND="
19 21
	openssl? (
20 22
		dev-libs/openssl:0=[${MULTILIB_USEDEP}]
21 23
	)
24
	nss? ( >=dev-libs/nss-3.52[${MULTILIB_USEDEP}] )
22 25
"
23 26
DEPEND="${RDEPEND}"
24 27

  
28
BDEPEND="
29
	doc? ( app-doc/doxygen )
30
	virtual/pkgconfig
31
"
32

  
25 33
DOCS=( CHANGES )
26 34

  
27 35
PATCHES=(
28
	"${FILESDIR}/${P}-pcap-automagic-r0.patch"
29 36
	"${FILESDIR}/${P}-gcc-10.patch"
37
	"${FILESDIR}/${P}-nss.patch"
38
	"${FILESDIR}/${P}-rtp-header.patch"
30 39
)
31 40

  
32 41
src_prepare() {
33 42
	default
34 43

  
35
	# test/rtpw.c is using /usr/share/dict/words assuming it exists
36
	# using test/rtpw.c guaratees the file exists in any case
37
	sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
44
	# autoconf-2.7x fix
45
	touch ar-lib || die
38 46

  
39 47
	eautoreconf
40 48

  
49
	if use doc; then
50
		echo "${PV}" > "${S}/VERSION"
51
	fi
52

  
41 53
	# sadly, tests are too broken to even consider using work-arounds
42 54
	multilib_copy_sources
43 55
}
......
51 63
		--disable-pcap \
52 64
		--disable-openssl-kdf \
53 65
		$(use_enable debug debug-logging) \
54
		$(use_enable openssl)
66
		$(use_enable openssl) \
67
		$(use_enable nss)
55 68
}
56 69

  
57 70
multilib_src_compile() {
58 71
	use static-libs && emake ${PN}2.a
59 72
	emake shared_library
60 73
	use test && emake test
74
	if multilib_is_native_abi && use doc; then
75
		emake libsrtp2doc
76
	fi
61 77
}
62 78

  
63 79
multilib_src_test() {
64 80
	LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
65 81

  
66 82
	# Makefile.in has '$(testapp): libsrtp2.a'
67
	if use !static-libs; then
83
	if ! use static-libs; then
68 84
		rm libsrtp2.a || die
69 85
	fi
70 86
}
71 87

  
88
multilib_src_install() {
89
	default
90

  
91
	if multilib_is_native_abi && use doc; then
92
		dodoc -r doc/html
93
	fi
94
}
95

  
72 96
multilib_src_install_all() {
73
	# libsrtp.pdf can be generated with doxygen, but it seems to be broken.
74
	use doc && DOCS+=( doc/*.txt )
75 97
	einstalldocs
76 98
}
Thank you!