Skip to content

Commit

Permalink
net-libs/libsrtp: Version bump to 1.6.0 & 2.1.0
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.8
  • Loading branch information
tonyvroon committed Sep 18, 2017
1 parent ef8a069 commit 6efbbfd
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net-libs/libsrtp/Manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
DIST libsrtp-1.5.2.tar.gz 1690272 SHA256 86e1efe353397c0751f6bdd709794143bd1b76494412860f16ff2b6d9c304eda SHA512 fb09252edaca6da5b579fae34d3b6382ee0cf61a706e38283158ef10c879b9a0f80cfd0c354852e771b4649288dd5cc41158a4e046e8073cf26a586dfd41b024 WHIRLPOOL 973f27db06b725ca641a5c13184083926dbe0fd99ab18604b1d2d40fa0ab5118e9b978d729502a32bc25d05d6264ee501ff94f72e6dafd46588092f678f0a4c5
DIST libsrtp-1.5.4.tar.gz 1646184 SHA256 56a7b521c25134f48faff26b0b1e3d4378a14986a2d3d7bc6fefb48987304ff0 SHA512 fcf6a36a0f687a6aa2b245e4055332ae892c953e19ebe3bfb7d091da0a7afbfcb804d9f602bd2d849235b559d3ca7924ee00c7f0da419c23b053b096ef4ccd19 WHIRLPOOL 7f4ee1f705efeeb635bc88845f094a49a7b447736799c8fd81d8cab4aa9c75f837f7dfb01295b2497f483ba033636cc5075258144a9afb87cea48c7bf57bb463
DIST libsrtp-1.6.0.tar.gz 1648862 SHA256 1a3e7904354d55e45b3c5c024ec0eab1b8fa76fdbf4dd2ea2625dad2b3c6edde SHA512 5ac712d0d343c3b63ed248503cc7d33c637895a274c4434c91f513be117836f27cd5daba83088b4647bbd9c82d841e216e6346af8d485cb9ddcd35dee21d4887 WHIRLPOOL 833df06814810de1eef7e08d723e7e9f6bc2abe542d8835b86603d2df96f05f664ab8364a7d726bee57b4422d262f4595bcfe5800879490283cc15f15e2cebba
DIST libsrtp-2.0.0.tar.gz 265564 SHA256 2296d132fd8cadd691d1fffeabbc1b9c42ec09e9e780a0d9bd8234a98e63a5a1 SHA512 61bba9aba9bb3e888c2bbc150411d0b3d583ed71ca455c5a3d4d6d06ecd383fdd61f86ad1979fb9c04da1b824e3fb9bb63f0d97e50b4a469d56907fb9dbc42d6 WHIRLPOOL 1ff2b9305d19e49f976708a885642fedb16c1775da1be5c977de6629cb705a3944402c54dd2b7e00ee67cac5ded828e457ac21e9e93178908a03177e203873ec
DIST libsrtp-2.1.0.tar.gz 306090 SHA256 0302442ed97d34a77abf84617b657e77674bdd8e789d649f1cac0c5f0d0cf5ee SHA512 60f4eb6fd37517eb96df80ab8a9c6fd79dfc89d969bdb04673cd98364f7108fbc703a64b1898056f9220a55315574b6f3f796b6814086360f6fd143e3b20fb3f WHIRLPOOL 07f3716215cbbac9f91c8804c7df1298ae8aa4f9e48ae03c21194161e8e2d4dc7805bd825b70b2744239b883211dca4204bfaf135931cef39d34c35316a226e5
DIST srtp-1.4.4.tgz 502890 SHA256 d9c2cbb1c95172ed2dc963eff0d6ce1072326dc81cb1dd38414e9f0e430af314 SHA512 951bfec212f579daae4a5a7fc9eded163dd6790da2e3840629dbeac36d7d960f95a1f1b844505629c7815816515f0784bf9b6e1c47f2986416ec04ec9d4b7564 WHIRLPOOL 82b01ce07de0c7b82d5f99b2fda6c72653e2927c3838a15dd1bb7e36725846599f2a96675dcf5ddfd7dcab9210f554b30fcf9bcb3806a60aa732d56926a4c07f
DIST srtp-1.4.4_p20121108.tar.gz 485875 SHA256 ebc0b7b27f5ab669a058c82f62b1c96298a961d54633d7041e776bca19a4f295 SHA512 a6bf2674babed512bd90fd11d63adecf4ddf357d26652f321651fcc42d932d3d9f8713ecab4bdcddb026106a2d5bfbac0a626938f70822f5b1ee05881bb823d9 WHIRLPOOL 27296c776d60688dfa3c655999b6a87828036f9a71cff7a9ea9d1f0c6c5afa787eb625fb4ec9254b0eda459769fc0ca41cf4c1eaa38053cd365243c101f444bd
17 changes: 17 additions & 0 deletions net-libs/libsrtp/files/libsrtp-2.1.0-pcap-automagic-r0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff -uNr libsrtp-2.1.0.ORIG/configure.in libsrtp-2.1.0/configure.in
--- libsrtp-2.1.0.ORIG/configure.in 2017-09-18 23:53:18.241631991 +0100
+++ libsrtp-2.1.0/configure.in 2017-09-18 23:55:30.077635461 +0100
@@ -272,10 +272,13 @@
AC_SUBST([HMAC_OBJS])

dnl Checking for PCAP
+AC_ARG_ENABLE([pcap], AS_HELP_STRING([--disable-pcap], [Build without `pcap' library (-lpcap)]))
+AS_IF([test "x$enable_pcap" != "xno"], [
AC_CHECK_LIB([pcap], [pcap_create],
[LIBS="-lpcap $LIBS"
AC_DEFINE([HAVE_PCAP], [1], [Define to 1 if you have the `pcap' library (-lpcap)])
AC_SUBST([HAVE_PCAP], [1])])
+])

AC_MSG_CHECKING([whether to redirect logging to stdout])
AC_ARG_ENABLE([log-stdout],
83 changes: 83 additions & 0 deletions net-libs/libsrtp/libsrtp-1.6.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

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="0/1"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
IUSE="aesicm console debug doc libressl openssl static-libs syslog test"

RDEPEND="
openssl? (
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
)
"
DEPEND="${RDEPEND}"

DOCS=( CHANGES README TODO )

MULTILIB_WRAPPED_HEADERS=(
/usr/include/srtp/config.h
)
PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )

src_prepare() {
default

# 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

eautoreconf
}

multilib_src_configure() {
# stdout: default error output for messages in debug
# kernel-linux: breaks the build
# gdoi: disabled by upstream and breaks the build
# pcap: seems to be test-only
ECONF_SOURCE=${S} \
econf \
--enable-stdout \
--disable-kernel-linux \
--disable-gdoi \
--disable-pcap \
$(use_enable aesicm generic-aesicm) \
$(use_enable console) \
$(use_enable debug) \
$(use_enable openssl) \
$(use_enable syslog)
}

multilib_src_compile() {
use static-libs && emake ${PN}.a
emake shared_library
use test && emake test
}

multilib_src_test() {
# work-around tests that do not like out-of-source builds
cp "${S}"/test/{getopt_s,rtpw}.c "${BUILD_DIR}"/test/ || die

LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest

# Makefile.in has '$(testapp): libsrtp.a'
if use !static-libs; then
rm libsrtp.a || die
fi
}

multilib_src_install_all() {
# libsrtp.pdf can also be generated with doxygen
# but it would be a waste of time as an up-to-date version is built
use doc && DOCS+=( doc/*.txt doc/${PN}.pdf )
einstalldocs
}
73 changes: 73 additions & 0 deletions net-libs/libsrtp/libsrtp-2.1.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

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 ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
IUSE="aesicm console debug doc libressl openssl static-libs syslog test"

RDEPEND="
openssl? (
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
)
"
DEPEND="${RDEPEND}"

DOCS=( CHANGES )

PATCHES=( "${FILESDIR}/${P}-pcap-automagic-r0.patch" )

src_prepare() {
default

# 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

eautoreconf

# 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)
}

multilib_src_compile() {
use static-libs && emake ${PN}.a
emake shared_library
use test && emake test
}

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_all() {
# libsrtp.pdf can be generated with doxygen, but it seems to be broken.
use doc && DOCS+=( doc/*.txt )
einstalldocs
}

0 comments on commit 6efbbfd

Please sign in to comment.