diff options
author | Stephan Hartmann <stha09@googlemail.com> | 2020-06-12 18:53:01 +0200 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-06-12 12:55:57 -0400 |
commit | 67270353460d76130476dea6730903a595db3153 (patch) | |
tree | 4402d9df7f852ab760e3b9068b88ab89201078d3 /net-libs/libsrtp | |
parent | eclass/cargo.eclass: drop EAPI=6 support (diff) | |
download | gentoo-67270353460d76130476dea6730903a595db3153.tar.gz gentoo-67270353460d76130476dea6730903a595db3153.tar.bz2 gentoo-67270353460d76130476dea6730903a595db3153.zip |
net-libs/libsrtp: version bump to 2.3.0
Closes: https://bugs.gentoo.org/723492
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Stephan Hartmann <stha09@googlemail.com>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/16204
Diffstat (limited to 'net-libs/libsrtp')
-rw-r--r-- | net-libs/libsrtp/Manifest | 1 | ||||
-rw-r--r-- | net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch | 26 | ||||
-rw-r--r-- | net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch | 12 | ||||
-rw-r--r-- | net-libs/libsrtp/libsrtp-2.3.0.ebuild | 95 | ||||
-rw-r--r-- | net-libs/libsrtp/metadata.xml | 1 |
5 files changed, 135 insertions, 0 deletions
diff --git a/net-libs/libsrtp/Manifest b/net-libs/libsrtp/Manifest index bc57e86e9e49..4cdfe368ac83 100644 --- a/net-libs/libsrtp/Manifest +++ b/net-libs/libsrtp/Manifest @@ -1,2 +1,3 @@ DIST libsrtp-1.6.0.tar.gz 1648862 BLAKE2B 5526d7659db160df3b6d9f14922bd731d083f04c6dd084ef473c439d720733d0fd8b38bdfe92e30e05a8a94c41df965d04bca52601b2644352428b49b1ed9093 SHA512 5ac712d0d343c3b63ed248503cc7d33c637895a274c4434c91f513be117836f27cd5daba83088b4647bbd9c82d841e216e6346af8d485cb9ddcd35dee21d4887 DIST libsrtp-2.2.0.tar.gz 308469 BLAKE2B 4ef318bdf5c69b69b5869f478d5f0b9ee82d7d8a52440d10e931722c75b2f3a62b59f7542bb932cc93a21b7af24e6b253d70b4722833c5e1e5afce052e3b00e2 SHA512 3a5214b02199ae8dff45a2ed225ed9b1dcb75a9c6b07669e23bf86f97ad26e3e22b4930acdf3c56b21b605211a89a53a17c61602195b391a5b29a09823ba868c +DIST libsrtp-2.3.0.tar.gz 633819 BLAKE2B 9ea40e9689fabc29b7a2c637bd4e4a2c44eec79205a6e5c5e5abf1069dfec7ba28d868ba620462205d61fdb28d0ca3b8532c1f59db704edd508e01afb551d255 SHA512 34b1a01cb9a75aed175be09aadd2827224203b9801becc3fbc5214667cce79c3b87b0f59e4315583863ab5a2cc4fc81d56ab604a5e4c984518b8a8a2a7b77461 diff --git a/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch b/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch new file mode 100644 index 000000000000..67d4ad86d516 --- /dev/null +++ b/net-libs/libsrtp/files/libsrtp-2.3.0-gcc-10.patch @@ -0,0 +1,26 @@ +diff --git a/crypto/math/datatypes.c b/crypto/math/datatypes.c +index 001584c..4fcb396 100644 +--- a/crypto/math/datatypes.c ++++ b/crypto/math/datatypes.c +@@ -79,7 +79,7 @@ int octet_get_weight(uint8_t octet) + + /* the value MAX_PRINT_STRING_LEN is defined in datatypes.h */ + +-char bit_string[MAX_PRINT_STRING_LEN]; ++static char bit_string[MAX_PRINT_STRING_LEN]; + + uint8_t srtp_nibble_to_hex_char(uint8_t nibble) + { +diff --git a/test/util.c b/test/util.c +index 2abc28e..c0f7614 100644 +--- a/test/util.c ++++ b/test/util.c +@@ -49,7 +49,7 @@ + #include <stdint.h> + + /* include space for null terminator */ +-char bit_string[MAX_PRINT_STRING_LEN + 1]; ++static char bit_string[MAX_PRINT_STRING_LEN + 1]; + + static inline int hex_char_to_nibble(uint8_t c) + { diff --git a/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch b/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch new file mode 100644 index 000000000000..6f71839e69da --- /dev/null +++ b/net-libs/libsrtp/files/libsrtp-2.3.0-nss.patch @@ -0,0 +1,12 @@ +diff --git a/crypto/cipher/aes_gcm_nss.c b/crypto/cipher/aes_gcm_nss.c +index 54547cd..ecbba64 100644 +--- a/crypto/cipher/aes_gcm_nss.c ++++ b/crypto/cipher/aes_gcm_nss.c +@@ -284,6 +284,7 @@ static srtp_err_status_t srtp_aes_gcm_nss_do_crypto(void *cv, + + c->params.pIv = c->iv; + c->params.ulIvLen = GCM_IV_LEN; ++ c->params.ulIvBits = 8 * GCM_IV_LEN; + c->params.pAAD = c->aad; + c->params.ulAADLen = c->aad_size; + diff --git a/net-libs/libsrtp/libsrtp-2.3.0.ebuild b/net-libs/libsrtp/libsrtp-2.3.0.ebuild new file mode 100644 index 000000000000..b534d6b7f95b --- /dev/null +++ b/net-libs/libsrtp/libsrtp-2.3.0.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools multilib-minimal + +DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)" +HOMEPAGE="https://github.com/cisco/libsrtp" +SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="2/1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~ppc-macos ~x64-macos ~x86-macos" +IUSE="debug doc libressl nss openssl static-libs test" +RESTRICT="!test? ( test )" + +REQUIRED_USE="?? ( nss openssl )" + +RDEPEND=" + openssl? ( + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + ) + nss? ( dev-libs/nss ) +" +DEPEND="${RDEPEND}" + +BDEPEND=" + doc? ( app-doc/doxygen ) + virtual/pkgconfig +" + +DOCS=( CHANGES ) + +PATCHES=( + "${FILESDIR}/${P}-gcc-10.patch" + "${FILESDIR}/${P}-nss.patch" +) + +src_prepare() { + default + + eautoreconf + + if use doc; then + echo "${PV}" > "${S}/VERSION" + fi + + # sadly, tests are too broken to even consider using work-arounds + multilib_copy_sources +} + +multilib_src_configure() { + # stdout: default error output for messages in debug + # pcap: seems to be test-only + # openssl-kdf: OpenSSL 1.1.0+ + econf \ + --enable-log-stdout \ + --disable-pcap \ + --disable-openssl-kdf \ + $(use_enable debug debug-logging) \ + $(use_enable openssl) \ + $(use_enable nss) +} + +multilib_src_compile() { + use static-libs && emake ${PN}2.a + emake shared_library + use test && emake test + if multilib_is_native_abi && use doc; then + emake libsrtp2doc + fi +} + +multilib_src_test() { + LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest + + # Makefile.in has '$(testapp): libsrtp2.a' + if ! use static-libs; then + rm libsrtp2.a || die + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use doc; then + dodoc -r doc/html + fi +} + +multilib_src_install_all() { + einstalldocs +} diff --git a/net-libs/libsrtp/metadata.xml b/net-libs/libsrtp/metadata.xml index 452aeee73ceb..1ee9c5bae6cd 100644 --- a/net-libs/libsrtp/metadata.xml +++ b/net-libs/libsrtp/metadata.xml @@ -14,6 +14,7 @@ <flag name="console"> Use /dev/console instead of stdout for error messages </flag> + <flag name="nss">Use NSS crypto primitives</flag> <flag name="openssl">Use OpenSSL crypto primitives</flag> <flag name="syslog">Use syslog for error messages</flag> </use> |