1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools base multilib
9 DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
10 HOMEPAGE="https://github.com/cisco/libsrtp"
11 SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
16 IUSE="aesicm console debug doc openssl static-libs syslog"
18 DEPEND="openssl? ( dev-libs/openssl:0 )"
22 epatch "${FILESDIR}/${PN}-pcap-automagic-r0.patch"
27 # stdout: default error output for messages in debug
28 # kernel-linux: breaks the build
29 # gdoi: disabled by upstream and breaks the build
30 # pcap: seems to be test-only
33 --disable-kernel-linux \
36 $(use_enable aesicm generic-aesicm) \
37 $(use_enable console) \
39 $(use_enable openssl) \
44 if use static-libs; then
47 emake shared_library || die
51 # getopt returns an int, not a char
52 sed -i -e "s/char q/int q/" \
53 test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c || die
55 # test/rtpw_test.sh is assuming . is in $PATH
56 sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh || die
58 # test/rtpw.c is using /usr/share/dict/words assuming it exists
59 # using test/rtpw.c guaratees the file exists in any case
60 sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
63 emake -j1 runtest || die
67 emake DESTDIR="${D}" install || die
69 dodoc CHANGES README TODO || die
72 # libsrtp.pdf can also be generated with doxygen
73 # but it would be a waste of time as an up-to-date version is built
74 dodoc doc/*.txt doc/${PN}.pdf || die