summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2022-05-09 09:26:31 -0400
committerCraig Andrews <candrews@gentoo.org>2022-05-09 09:30:59 -0400
commit8925a1e09b6a8990ff55115e43d4fa88424801c5 (patch)
tree2bf00136e29e1286206fb1182cd366e01655e009
parentapp-emacs/racket-mode: drop old 20220310 (diff)
downloadgentoo-8925a1e09b6a8990ff55115e43d4fa88424801c5.tar.gz
gentoo-8925a1e09b6a8990ff55115e43d4fa88424801c5.tar.bz2
gentoo-8925a1e09b6a8990ff55115e43d4fa88424801c5.zip
media-video/rtmpdump: Bump, EAPI=8, fix-chunk-size.patch
See: https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=bf39fb1177ee77eee6c214a7393cc0054958ce08 See: https://git.alpinelinux.org/aports/commit/main/rtmpdump/fix-chunk-size.patch?id=69bc162319b12e9b6c6d3ea345dbf7c218753594 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Craig Andrews <candrews@gentoo.org>
-rw-r--r--media-video/rtmpdump/Manifest1
-rw-r--r--media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch46
-rw-r--r--media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild92
-rw-r--r--media-video/rtmpdump/rtmpdump-9999.ebuild9
4 files changed, 144 insertions, 4 deletions
diff --git a/media-video/rtmpdump/Manifest b/media-video/rtmpdump/Manifest
index 544f56a93968..bd3f5fadcdf9 100644
--- a/media-video/rtmpdump/Manifest
+++ b/media-video/rtmpdump/Manifest
@@ -1,2 +1,3 @@
DIST rtmpdump-2.4_p20161210.tar.gz 142837 BLAKE2B 412a7c3b21738db643042e51e03b11e115ae1d68214e644374e8c10f3b2ab3f659ce1af884135d0e89f2e0ba44ebdf41937bc0f02d875c463ca711d9ae95698c SHA512 76617f02c13d7e8e3a7cf2734c6174e56fb321a881c9e4869bf6393786b193e0c01a8c530ecbf0679cc888c523af5712f2dcb2031fbd09729b7ddeebc3a4b133
DIST rtmpdump-2.4_p20190330.tar.gz 143037 BLAKE2B ab0edbca444fc71034a1c6386f304d8f49f92075f6d4ca87992a7b9c4b4058f84333011e86cf38470f7b1dbf5e69f27e8b1fe34267104191c447342a03c18e3c SHA512 5357d01b51d3ec8c3c584c4e5aa9720a4c04b86573bc6cb7d724d660937b04b6dd35338b17721d6521fde2627e83763ed3b7c010f959bd72573016f3c47480b0
+DIST rtmpdump-2.4_p20210219.tar.gz 143043 BLAKE2B 312a44fa6caba3fbae19c248d76dccd22c637884ce37c207afe9de80eb0655a97af51101cd2800a2aea52620578f63e1ccede5070772126297e1c75baff0217b SHA512 2bcd169c8c142390e4a37a5f115bb722f8878188920818349aead50ad6c40b8e96c4f929f1b4d6c26ebc05ee264e6675d3843bf963ad4fbac04c3ce74b7fbb20
diff --git a/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch b/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch
new file mode 100644
index 000000000000..b714273273aa
--- /dev/null
+++ b/media-video/rtmpdump/files/rtmpdump-fix-chunk-size.patch
@@ -0,0 +1,46 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index a2863b0..ac1b3be 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -2077,6 +2077,29 @@ RTMP_SendClientBW(RTMP *r)
+ }
+
+ static int
++SendClientChunkSize(RTMP *r, int chunkSize)
++{
++ RTMPPacket packet;
++ char pbuf[256], *pend = pbuf + sizeof(pbuf);
++ int ret;
++
++ packet.m_nChannel = 0x02; /* control channel (invoke) */
++ packet.m_headerType = RTMP_PACKET_SIZE_LARGE;
++ packet.m_packetType = RTMP_PACKET_TYPE_CHUNK_SIZE;
++ packet.m_nTimeStamp = 0;
++ packet.m_nInfoField2 = 0;
++ packet.m_hasAbsTimestamp = 0;
++ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE;
++
++ packet.m_nBodySize = 4;
++
++ AMF_EncodeInt32(packet.m_body, pend, chunkSize);
++ ret = RTMP_SendPacket(r, &packet, FALSE);
++ r->m_outChunkSize = chunkSize;
++ return ret;
++}
++
++static int
+ SendBytesReceived(RTMP *r)
+ {
+ RTMPPacket packet;
+@@ -3349,6 +3372,11 @@ HandleChangeChunkSize(RTMP *r, const RTMPPacket *packet)
+ r->m_inChunkSize = AMF_DecodeInt32(packet->m_body);
+ RTMP_Log(RTMP_LOGDEBUG, "%s, received: chunk size change to %d", __FUNCTION__,
+ r->m_inChunkSize);
++ if (r->Link.protocol & RTMP_FEATURE_WRITE)
++ {
++ RTMP_Log(RTMP_LOGDEBUG, "%s, updating outChunkSize too", __FUNCTION__);
++ SendClientChunkSize(r, r->m_inChunkSize);
++ }
+ }
+ }
+
diff --git a/media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild b/media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild
new file mode 100644
index 000000000000..edd05e9dc2dd
--- /dev/null
+++ b/media-video/rtmpdump/rtmpdump-2.4_p20210219.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit multilib toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="RTMP client, librtmp library intended to stream audio or video flash content"
+HOMEPAGE="https://rtmpdump.mplayerhq.hu/"
+
+# the library is LGPL-2.1, the command is GPL-2
+LICENSE="LGPL-2.1 tools? ( GPL-2 )"
+SLOT="0"
+IUSE="gnutls ssl static-libs +tools"
+
+DEPEND="ssl? (
+ gnutls? (
+ >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP},nettle(+)]
+ dev-libs/nettle:0=[${MULTILIB_USEDEP}]
+ )
+ !gnutls? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-swf_vertification_type_2.patch"
+ "${FILESDIR}/${PN}-swf_vertification_type_2_part_2.patch"
+ "${FILESDIR}/${PN}-fix-chunk-size.patch"
+)
+
+if [[ ${PV} == *9999 ]] ; then
+ SRC_URI=""
+ EGIT_REPO_URI="https://git.ffmpeg.org/rtmpdump.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+ SRC_URI="https://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-f1b83c1"
+fi
+
+pkg_setup() {
+ if ! use ssl; then
+ if use gnutls; then
+ ewarn "USE='gnutls' is ignored without USE='ssl'."
+ ewarn "Please review the local USE flags for this package."
+ fi
+ fi
+}
+
+src_prepare() {
+ # fix #571106 by restoring pre-GCC5 inline semantics
+ append-cflags -std=gnu89
+ # fix Makefile ( bug #298535 , bug #318353 and bug #324513 )
+ sed -i 's/\$(MAKEFLAGS)//g' Makefile \
+ || die "failed to fix Makefile"
+ sed -i -e 's:OPT=:&-fPIC :' \
+ -e 's:OPT:OPTS:' \
+ -e 's:CFLAGS=.*:& $(OPT):' librtmp/Makefile \
+ || die "failed to fix Makefile"
+ use ssl && use !gnutls && eapply "${FILESDIR}/${PN}-openssl-1.1-v2.patch"
+ default
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ if use ssl ; then
+ if use gnutls ; then
+ crypto="GNUTLS"
+ else
+ crypto="OPENSSL"
+ fi
+ fi
+ if ! multilib_is_native_abi || ! use tools ; then
+ cd librtmp || die
+ fi
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
+ OPT="${CFLAGS}" XLDFLAGS="${LDFLAGS}" CRYPTO="${crypto}" SYS=posix
+}
+
+multilib_src_install() {
+ mkdir -p "${ED}"/usr/$(get_libdir) || die
+ if multilib_is_native_abi && use tools ; then
+ dodoc README ChangeLog rtmpdump.1.html rtmpgw.8.html
+ else
+ cd librtmp || die
+ fi
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" mandir='$(prefix)/share/man' \
+ CRYPTO="${crypto}" libdir="${EPREFIX}/usr/$(get_libdir)" install
+ find "${D}" -name '*.la' -delete || die
+ use static-libs || find "${D}" -name '*.a' -delete || die
+}
diff --git a/media-video/rtmpdump/rtmpdump-9999.ebuild b/media-video/rtmpdump/rtmpdump-9999.ebuild
index 77b536382925..edd05e9dc2dd 100644
--- a/media-video/rtmpdump/rtmpdump-9999.ebuild
+++ b/media-video/rtmpdump/rtmpdump-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI="8"
inherit multilib toolchain-funcs multilib-minimal flag-o-matic
@@ -26,6 +26,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${PN}-swf_vertification_type_2.patch"
"${FILESDIR}/${PN}-swf_vertification_type_2_part_2.patch"
+ "${FILESDIR}/${PN}-fix-chunk-size.patch"
)
if [[ ${PV} == *9999 ]] ; then
@@ -34,8 +35,8 @@ if [[ ${PV} == *9999 ]] ; then
inherit git-r3
else
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
- SRC_URI="http://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/c5f04a58fc2aeea6296ca7c44ee4734c18401aa3.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/${PN}-c5f04a5"
+ SRC_URI="https://git.ffmpeg.org/gitweb/rtmpdump.git/snapshot/f1b83c10d8beb43fcc70a6e88cf4325499f25857.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-f1b83c1"
fi
pkg_setup() {