Diff libsrtp-1.6.0-r1 with a libsrtp-2.2.0

/usr/portage/net-libs/libsrtp/libsrtp-2.2.0.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=7
4
EAPI=6
5 5

  
6 6
inherit autotools multilib-minimal
7 7

  
......
10 10
SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11 11

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

  
......
22 22
"
23 23
DEPEND="${RDEPEND}"
24 24

  
25
DOCS=( CHANGES README TODO )
25
DOCS=( CHANGES )
26 26

  
27
MULTILIB_WRAPPED_HEADERS=(
28
	/usr/include/srtp/config.h
29
)
30 27
PATCHES=(
31
	"${FILESDIR}/${PN}-pcap-automagic-r0.patch"
32
	"${FILESDIR}/${P}-openssl-hmac.patch"
33
	"${FILESDIR}/${P}-openssl-aem_icm-key.patch"
34
	"${FILESDIR}/${P}-openssl-aem_gcm-key.patch"
35
	"${FILESDIR}/${P}-openssl-1.1.patch"
28
	"${FILESDIR}/${P}-pcap-automagic-r0.patch"
29
	"${FILESDIR}/${P}-gcc-10.patch"
36 30
)
37 31

  
38 32
src_prepare() {
......
42 36
	# using test/rtpw.c guaratees the file exists in any case
43 37
	sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
44 38

  
45
	mv configure.in configure.ac || die
46 39
	eautoreconf
47
	touch ar-lib || die #775680
40

  
41
	# sadly, tests are too broken to even consider using work-arounds
42
	multilib_copy_sources
48 43
}
49 44

  
50 45
multilib_src_configure() {
51 46
	# stdout: default error output for messages in debug
52
	# kernel-linux: breaks the build
53
	# gdoi: disabled by upstream and breaks the build
54 47
	# pcap: seems to be test-only
55
	ECONF_SOURCE=${S} \
48
	# openssl-kdf: OpenSSL 1.1.0+
56 49
	econf \
57
		--enable-stdout \
58
		--disable-kernel-linux \
59
		--disable-gdoi \
50
		--enable-log-stdout \
60 51
		--disable-pcap \
61
		$(use_enable aesicm generic-aesicm) \
62
		$(use_enable console) \
63
		$(use_enable debug) \
64
		$(use_enable openssl) \
65
		$(use_enable syslog)
52
		--disable-openssl-kdf \
53
		$(use_enable debug debug-logging) \
54
		$(use_enable openssl)
66 55
}
67 56

  
68 57
multilib_src_compile() {
69
	use static-libs && emake ${PN}.a
58
	use static-libs && emake ${PN}2.a
70 59
	emake shared_library
71 60
	use test && emake test
72 61
}
73 62

  
74 63
multilib_src_test() {
75
	# work-around tests that do not like out-of-source builds
76
	cp "${S}"/test/{getopt_s,rtpw}.c "${BUILD_DIR}"/test/ || die
77

  
78 64
	LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
79 65

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

  
86 72
multilib_src_install_all() {
87
	# libsrtp.pdf can also be generated with doxygen
88
	# but it would be a waste of time as an up-to-date version is built
89
	use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
73
	# libsrtp.pdf can be generated with doxygen, but it seems to be broken.
74
	use doc && DOCS+=( doc/*.txt )
90 75
	einstalldocs
91 76
}
Thank you!