diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2012-09-06 13:37:17 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2012-09-06 13:37:17 +0000 |
commit | 53f817fd934508f425de39bab08af1b080f3223b (patch) | |
tree | ea4f0b8ddfe19694cc5371ad3d39debbba1c0c86 /net-libs/libsrtp | |
parent | Stable ppc, bug #425354 (diff) | |
download | gentoo-2-53f817fd934508f425de39bab08af1b080f3223b.tar.gz gentoo-2-53f817fd934508f425de39bab08af1b080f3223b.tar.bz2 gentoo-2-53f817fd934508f425de39bab08af1b080f3223b.zip |
Make compilation & installation of static libraries optional, closes bug #378763 by Agostino "ago" Sarubbo. Patch scavenged by Matthias Nagl from upstream tracker resolves a crash caused by an invalid index, closes bug #409013.
(Portage version: 2.1.11.13/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/libsrtp')
-rw-r--r-- | net-libs/libsrtp/ChangeLog | 11 | ||||
-rw-r--r-- | net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch | 11 | ||||
-rw-r--r-- | net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild | 76 |
3 files changed, 97 insertions, 1 deletions
diff --git a/net-libs/libsrtp/ChangeLog b/net-libs/libsrtp/ChangeLog index a6fb7e226114..ed99800084fe 100644 --- a/net-libs/libsrtp/ChangeLog +++ b/net-libs/libsrtp/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-libs/libsrtp # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libsrtp/ChangeLog,v 1.16 2012/05/20 12:12:28 halcy0n Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libsrtp/ChangeLog,v 1.17 2012/09/06 13:37:17 chainsaw Exp $ + +*libsrtp-1.4.4-r2 (06 Sep 2012) + + 06 Sep 2012; Tony Vroon <chainsaw@gentoo.org> +libsrtp-1.4.4-r2.ebuild, + +files/libsrtp-1.4.4-invalid-index.patch: + Make compilation & installation of static libraries optional, closes bug + #378763 by Agostino "ago" Sarubbo. Patch scavenged by Matthias Nagl from + upstream tracker resolves a crash caused by an invalid index, closes bug + #409013. 20 May 2012; Mark Loeser <halcy0n@gentoo.org> libsrtp-1.4.4-r1.ebuild: Stable for ppc64; bug #397617 diff --git a/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch b/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch new file mode 100644 index 000000000000..90a8f019fd43 --- /dev/null +++ b/net-libs/libsrtp/files/libsrtp-1.4.4-invalid-index.patch @@ -0,0 +1,11 @@ +--- srtp/crypto/replay/rdb.c.orig 2012-03-20 14:52:32.890017830 +0100 ++++ srtp/crypto/replay/rdb.c 2012-03-20 14:56:31.670017835 +0100 +@@ -115,7 +115,7 @@ + + /* shift the window forward by delta bits*/ + v128_left_shift(&rdb->bitmask, delta); +- v128_set_bit(&rdb->bitmask, rdb_bits_in_bitmask-delta); ++ v128_set_bit(&rdb->bitmask, rdb_bits_in_bitmask-1); + rdb->window_start += delta; + + } diff --git a/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild b/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild new file mode 100644 index 000000000000..b23f96098b22 --- /dev/null +++ b/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/libsrtp/libsrtp-1.4.4-r2.ebuild,v 1.1 2012/09/06 13:37:17 chainsaw Exp $ + +EAPI="4" + +inherit base multilib + +MY_PN="srtp" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)" +HOMEPAGE="http://srtp.sourceforge.net/srtp.html" +SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz + mirror://gentoo/gentoo-${PN}-patchset-0.1.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="aesicm console debug doc static-libs syslog" +PATCHES=( "${FILESDIR}/${P}-shared.patch" + "${FILESDIR}/${P}-invalid-index.patch" ) + +S=${WORKDIR}/${MY_PN} + +src_configure() { + # stdout: default error output for messages in debug + # kernel-linux: breaks the build + # gdoi: disabled by upstream and breaks the build + econf \ + --enable-stdout \ + --disable-kernel-linux \ + --disable-gdoi \ + $(use_enable aesicm generic-aesicm) \ + $(use_enable console) \ + $(use_enable debug) \ + $(use_enable syslog) +} + +src_compile() { + if use static-libs; then + emake ${PN}.a || die "Failed to build static library" + fi + emake ${PN}$(get_libname) || die "Failed to build dynamic library" +} + +src_test() { + # getopt returns an int, not a char + sed -i -e "s/char q/int q/" \ + test/rdbx_driver.c test/srtp_driver.c test/dtls_srtp_driver.c \ + || die "fixing getopt errors failed" + + # test/rtpw_test.sh is assuming . is in $PATH + sed -i -e "s:\$RTPW :./\$RTPW :" test/rtpw_test.sh \ + || die "patching test/rtpw_test.sh failed" + + # test/rtpw.c is using /usr/share/dict/words assuming it exists + # using test/rtpw.c guaratees the file exists in any case + sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c \ + || die "patching test/rtpw.c failed" + + emake test || die "building test failed" + emake -j1 runtest || die "tests failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dodoc CHANGES README TODO || die "dodoc failed" + + if use doc; then + # libsrtp.pdf can also be generated with doxygen + # but it would be a waste of time as an up-to-date version is built + dodoc doc/*.txt doc/${PN}.pdf || die "dodoc failed" + fi +} |