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:09
Message-Id: 1502457639.28603988379b493f164ddf34e0dc014cc8799f84.mgorny@gentoo
1 commit: 28603988379b493f164ddf34e0dc014cc8799f84
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 9 15:27:49 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 11 13:20:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28603988
7
8 net-libs/libsrtp: Enable multilib build in :0
9
10 net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild | 83 ++++++++++++++++++++++++++++++++
11 1 file changed, 83 insertions(+)
12
13 diff --git a/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild b/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild
14 new file mode 100644
15 index 00000000000..01c12476018
16 --- /dev/null
17 +++ b/net-libs/libsrtp/libsrtp-1.5.4-r1.ebuild
18 @@ -0,0 +1,83 @@
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="0/1"
32 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 +MULTILIB_WRAPPED_HEADERS=(
46 + /usr/include/srtp/config.h
47 +)
48 +PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
49 +
50 +src_prepare() {
51 + default
52 +
53 + # test/rtpw.c is using /usr/share/dict/words assuming it exists
54 + # using test/rtpw.c guaratees the file exists in any case
55 + sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
56 +
57 + eautoreconf
58 +}
59 +
60 +multilib_src_configure() {
61 + # stdout: default error output for messages in debug
62 + # kernel-linux: breaks the build
63 + # gdoi: disabled by upstream and breaks the build
64 + # pcap: seems to be test-only
65 + ECONF_SOURCE=${S} \
66 + econf \
67 + --enable-stdout \
68 + --disable-kernel-linux \
69 + --disable-gdoi \
70 + --disable-pcap \
71 + $(use_enable aesicm generic-aesicm) \
72 + $(use_enable console) \
73 + $(use_enable debug) \
74 + $(use_enable openssl) \
75 + $(use_enable syslog)
76 +}
77 +
78 +multilib_src_compile() {
79 + use static-libs && emake ${PN}.a
80 + emake shared_library
81 + use test && emake test
82 +}
83 +
84 +multilib_src_test() {
85 + # work-around tests that do not like out-of-source builds
86 + cp "${S}"/test/{getopt_s,rtpw}.c "${BUILD_DIR}"/test/ || die
87 +
88 + LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
89 +
90 + # Makefile.in has '$(testapp): libsrtp.a'
91 + if use !static-libs; then
92 + rm libsrtp.a || die
93 + fi
94 +}
95 +
96 +multilib_src_install_all() {
97 + # libsrtp.pdf can also be generated with doxygen
98 + # but it would be a waste of time as an up-to-date version is built
99 + use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
100 + einstalldocs
101 +}