Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libsrtp/
Date: Fri, 11 Aug 2017 13:21:06
Message-Id: 1502457641.594ae1a45e2227f1c5daaef5d0ab74510ef8441d.mgorny@gentoo
1 commit: 594ae1a45e2227f1c5daaef5d0ab74510ef8441d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 9 15:40:37 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 11 13:20:41 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=594ae1a4
7
8 net-libs/libsrtp: Enable multilib build in :2
9
10 net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild | 75 ++++++++++++++++++++++++++++++++
11 1 file changed, 75 insertions(+)
12
13 diff --git a/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
14 new file mode 100644
15 index 00000000000..c15b98e7a29
16 --- /dev/null
17 +++ b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
18 @@ -0,0 +1,75 @@
19 +# Copyright 1999-2017 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +inherit autotools multilib-minimal
25 +
26 +DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
27 +HOMEPAGE="https://github.com/cisco/libsrtp"
28 +SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
29 +
30 +LICENSE="BSD"
31 +SLOT="2/1"
32 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
33 +IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
34 +
35 +RDEPEND="
36 + openssl? (
37 + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
38 + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
39 + )
40 +"
41 +DEPEND="${RDEPEND}"
42 +
43 +DOCS=( CHANGES README TODO )
44 +
45 +PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
46 +
47 +src_prepare() {
48 + default
49 +
50 + # test/rtpw.c is using /usr/share/dict/words assuming it exists
51 + # using test/rtpw.c guaratees the file exists in any case
52 + sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
53 +
54 + eautoreconf
55 +
56 + # sadly, tests are too broken to even consider using work-arounds
57 + multilib_copy_sources
58 +}
59 +
60 +multilib_src_configure() {
61 + # stdout: default error output for messages in debug
62 + # pcap: seems to be test-only
63 + # openssl-kdf: OpenSSL 1.1.0+
64 + econf \
65 + --enable-stdout \
66 + --disable-pcap \
67 + --disable-openssl-kdf \
68 + $(use_enable aesicm generic-aesicm) \
69 + $(use_enable console) \
70 + $(use_enable debug) \
71 + $(use_enable openssl)
72 +}
73 +
74 +multilib_src_compile() {
75 + use static-libs && emake ${PN}.a
76 + emake shared_library
77 + use test && emake test
78 +}
79 +
80 +multilib_src_test() {
81 + LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
82 +
83 + # Makefile.in has '$(testapp): libsrtp2.a'
84 + if use !static-libs; then
85 + rm libsrtp2.a || die
86 + fi
87 +}
88 +
89 +multilib_src_install_all() {
90 + # libsrtp.pdf can be generated with doxygen, but it seems to be broken.
91 + use doc && DOCS+=( doc/*.txt )
92 + einstalldocs
93 +}