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