summaryrefslogtreecommitdiff
path: root/media-video/rtmpdump
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/rtmpdump')
-rw-r--r--media-video/rtmpdump/Manifest8
-rw-r--r--media-video/rtmpdump/files/rtmpdump-openssl-1.1.patch249
-rw-r--r--media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2.patch13
-rw-r--r--media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2_part_2.patch21
-rw-r--r--media-video/rtmpdump/metadata.xml10
-rw-r--r--media-video/rtmpdump/rtmpdump-2.4_p20161210-r2.ebuild99
-rw-r--r--media-video/rtmpdump/rtmpdump-9999.ebuild34
7 files changed, 426 insertions, 8 deletions
diff --git a/media-video/rtmpdump/Manifest b/media-video/rtmpdump/Manifest
index f95629859564..e6d6ffd3144d 100644
--- a/media-video/rtmpdump/Manifest
+++ b/media-video/rtmpdump/Manifest
@@ -1,5 +1,9 @@
+AUX rtmpdump-openssl-1.1.patch 9309 BLAKE2B f66a968c16f5c7c8c0eba28370131941a9352054ed3db6dc6e380dbdf96cac0d76bd66dcbe6f9e2aa5c8f720fd92b780bcd0018c7392ed2064cdac8ebb1bb57d SHA512 41f213c9f419d3b8c566746d8df1400fefd2350992bfca76531a98a3338a4a4ac0f77598466a642f4b811bf1889a012f28427f1369e00aa7e46a3a0abff8e73e
+AUX rtmpdump-swf_vertification_type_2.patch 545 BLAKE2B e6db03f060ead7122029f15c0cc259e04863c2d5d0d2509a21de69f7fc61c1d3fb0ac062759c52e22e60733acdfb495cb4e6892ba7acb8e1f36ce1fe42f3ccd9 SHA512 5b5b4582b488429f8192b1158903047986d8ebc117c2ed81f7ab18bf59bcf8b8f6bc9a38fae89aff04af2342ca1362288a39516660f2163b94781c838652ad06
+AUX rtmpdump-swf_vertification_type_2_part_2.patch 868 BLAKE2B a5014fdc8bcf2cecbe5120297d4563c7d396e54c34e5f6dddf420fcfdbea4797c865daa0750cb1fa65f7c959d36381ce257ec48b3f4f377ce9ead3b3fe4cf833 SHA512 a0c1c46561384961bbb45962d416664cbd7a4a8c2e16eda4370d9acf76be809541ade182e41320102f252ed4e69dd2d6a0de37ad4085b52a22dc6ff0135d8894
DIST rtmpdump-2.4_p20161210.tar.gz 142837 BLAKE2B 412a7c3b21738db643042e51e03b11e115ae1d68214e644374e8c10f3b2ab3f659ce1af884135d0e89f2e0ba44ebdf41937bc0f02d875c463ca711d9ae95698c SHA512 76617f02c13d7e8e3a7cf2734c6174e56fb321a881c9e4869bf6393786b193e0c01a8c530ecbf0679cc888c523af5712f2dcb2031fbd09729b7ddeebc3a4b133
EBUILD rtmpdump-2.4_p20161210-r1.ebuild 2237 BLAKE2B caf1dc99de57985a504a8eff880b62659dd65b2b7cf6a0e75861f5f46827216027b50d62372536333bc5704de60977eacd554080c0f5ae771efb569716b65f2a SHA512 9db37815cc030cfc37d1427d38e79bae3b2df4b63b53fec11a313ec05edc19223454a4a304a3430d8d39bb0251517b71955e2e2c632dcd3d0f2dc657effbef72
+EBUILD rtmpdump-2.4_p20161210-r2.ebuild 2644 BLAKE2B ad5b3f1a6314495537bcd2c124f25d5d2d6262d0bc5d69681d60724f6a1737b8c062f5a496ff0e15594b835d58f3d7042406fe1231234db239dff6494ba8d000 SHA512 5c2a1964d1289795ac8f97a7ae9e7080d8427f0e886e7dc4971550c396c7f63ed345f856649688ccbeda85b812deb623293c592df6b177accad06cab17c595b7
EBUILD rtmpdump-2.4_p20161210.ebuild 2216 BLAKE2B 9e1eb7f275056f75971e791f7272bb46e440935dbf4bb5d48f0c5162d4bafb625001fd7a7005da4b96e83647c29facb0d206278a32bbaadb5ac5f7f7c4f96a93 SHA512 c54aa1492092479ed60fa69af7f81058b13e7af9c65c419c60c658e5c689576a483b35c21fca6c72a13095b133e5c8ab60643eec6ce2bc9d5f4a56749e8e3e04
-EBUILD rtmpdump-9999.ebuild 2033 BLAKE2B 8dfb9b1b7e098bd01577060f3ecef396f4aa28039e53fe9ee1aaece7de98f4e3a4cb3c6d5646b5c6140a67813a75b61409b70227cadf33852be14abe71956793 SHA512 45c08fb69e3c5e8ffd1cefd707bdf37bc8ac29a3b96f23dbc53d99ce53bbf87b0b57e272b09f108af9571cc0f35a272bd55ae066dfc2840bf76f8e4df8632cf2
-MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
+EBUILD rtmpdump-9999.ebuild 2644 BLAKE2B ad5b3f1a6314495537bcd2c124f25d5d2d6262d0bc5d69681d60724f6a1737b8c062f5a496ff0e15594b835d58f3d7042406fe1231234db239dff6494ba8d000 SHA512 5c2a1964d1289795ac8f97a7ae9e7080d8427f0e886e7dc4971550c396c7f63ed345f856649688ccbeda85b812deb623293c592df6b177accad06cab17c595b7
+MISC metadata.xml 444 BLAKE2B 97f64854abc028cf6eb902008992a94e434db6de7258b8065666b31af4b92118044e4c3427792782cf7ac7a2eb8bb0fbaee047027ca2f648178cc07f46c6ac88 SHA512 38b9987993f4a3ed479c50aeda81436a8cbec7ad48c1e509fc351a58557c3922fe0834a680cda9996a5c5ca1b0b48377772e3eef775281eb40962f95ac095e7c
diff --git a/media-video/rtmpdump/files/rtmpdump-openssl-1.1.patch b/media-video/rtmpdump/files/rtmpdump-openssl-1.1.patch
new file mode 100644
index 000000000000..b3bb508af21a
--- /dev/null
+++ b/media-video/rtmpdump/files/rtmpdump-openssl-1.1.patch
@@ -0,0 +1,249 @@
+https://github.com/xbmc/inputstream.rtmp/blob/dc9353823f9cfd2943f97b586230fe387cc55dc6/depends/common/librtmp/0003-openssl-1.1.patch
+--- a/librtmp/dh.h
++++ b/librtmp/dh.h
+@@ -253,20 +253,44 @@
+ if (!dh)
+ goto failed;
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ MP_new(dh->g);
+
+ if (!dh->g)
+ goto failed;
++#else
++ BIGNUM *g = NULL;
++ MP_new(g);
++ if (!g)
++ goto failed;
++
++ DH_set0_pqg(dh, NULL, g, NULL);
++#endif
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */
++#else
++ BIGNUM* p = NULL;
++ DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL);
++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */
++#endif
+ if (!res)
+ {
+ goto failed;
+ }
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ MP_set_w(dh->g, 2); /* base 2 */
++#else
++ MP_set_w(g, 2); /* base 2 */
++ DH_set0_pqg(dh, NULL, g, NULL);
++#endif
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ dh->length = nKeyBits;
++#else
++ DH_set_length(dh, nKeyBits);
++#endif
+ return dh;
+
+ failed:
+@@ -293,12 +317,24 @@
+ MP_gethex(q1, Q1024, res);
+ assert(res);
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ res = isValidPublicKey(dh->pub_key, dh->p, q1);
++#else
++ BIGNUM const* pub_key = NULL;
++ BIGNUM const* p = NULL;
++ DH_get0_key(dh, &pub_key, NULL);
++ DH_get0_pqg(dh, &p, NULL, NULL);
++ res = isValidPublicKey((BIGNUM*)pub_key, (BIGNUM*)p, q1);
++#endif
+ if (!res)
+ {
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ MP_free(dh->pub_key);
+ MP_free(dh->priv_key);
+ dh->pub_key = dh->priv_key = 0;
++#else
++ DH_free(dh);
++#endif
+ }
+
+ MP_free(q1);
+@@ -314,15 +350,29 @@
+ DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen)
+ {
+ int len;
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ if (!dh || !dh->pub_key)
++#else
++ BIGNUM const* pub_key = NULL;
++ DH_get0_key(dh, &pub_key, NULL);
++ if (!dh || !pub_key)
++#endif
+ return 0;
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ len = MP_bytes(dh->pub_key);
++#else
++ len = MP_bytes(pub_key);
++#endif
+ if (len <= 0 || len > (int) nPubkeyLen)
+ return 0;
+
+ memset(pubkey, 0, nPubkeyLen);
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len);
++#else
++ MP_setbin(pub_key, pubkey + (nPubkeyLen - len), len);
++#endif
+ return 1;
+ }
+
+@@ -364,7 +414,13 @@
+ MP_gethex(q1, Q1024, len);
+ assert(len);
+
++#if !defined(USE_OPENSSL) || !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ if (isValidPublicKey(pubkeyBn, dh->p, q1))
++#else
++ BIGNUM const* p = NULL;
++ DH_get0_pqg(dh, &p, NULL, NULL);
++ if (isValidPublicKey(pubkeyBn, (BIGNUM*)p, q1))
++#endif
+ res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh);
+ else
+ res = -1;
+--- a/librtmp/handshake.h
++++ b/librtmp/handshake.h
+@@ -31,9 +31,9 @@
+ #define SHA256_DIGEST_LENGTH 32
+ #endif
+ #define HMAC_CTX sha2_context
+-#define HMAC_setup(ctx, key, len) sha2_hmac_starts(&ctx, (unsigned char *)key, len, 0)
+-#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(&ctx, buf, len)
+-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig)
++#define HMAC_setup(ctx, key, len) sha2_hmac_starts(ctx, (unsigned char *)key, len, 0)
++#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(ctx, buf, len)
++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig)
+
+ typedef arc4_context * RC4_handle;
+ #define RC4_alloc(h) *h = malloc(sizeof(arc4_context))
+@@ -50,9 +50,9 @@
+ #endif
+ #undef HMAC_CTX
+ #define HMAC_CTX struct hmac_sha256_ctx
+-#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key)
+-#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf)
+-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig)
++#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(ctx, len, key)
++#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(ctx, len, buf)
++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig)
+ #define HMAC_close(ctx)
+
+ typedef struct arcfour_ctx* RC4_handle;
+@@ -64,14 +64,23 @@
+
+ #else /* USE_OPENSSL */
+ #include <openssl/sha.h>
++#include <openssl/ossl_typ.h>
+ #include <openssl/hmac.h>
+ #include <openssl/rc4.h>
+ #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH)
+ #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256
+ #endif
+-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0)
+-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len)
+-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define HMAC_setup(ctx, key, len) HMAC_CTX_init(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0)
++#else
++#define HMAC_setup(ctx, key, len) HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0)
++#endif
++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_cleanup(ctx)
++#else
++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx)
++#endif
+
+ typedef RC4_KEY * RC4_handle;
+ #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY))
+@@ -117,7 +126,7 @@
+ {
+ uint8_t digest[SHA256_DIGEST_LENGTH];
+ unsigned int digestLen = 0;
+- HMAC_CTX ctx;
++ HMAC_CTX* ctx = NULL;
+
+ RC4_alloc(rc4keyIn);
+ RC4_alloc(rc4keyOut);
+@@ -266,7 +275,7 @@
+ size_t keylen, uint8_t *digest)
+ {
+ unsigned int digestLen;
+- HMAC_CTX ctx;
++ HMAC_CTX* ctx = NULL;
+
+ HMAC_setup(ctx, key, keylen);
+ HMAC_crunch(ctx, message, messageLen);
+--- a/librtmp/hashswf.c
++++ b/librtmp/hashswf.c
+@@ -37,9 +37,9 @@
+ #define SHA256_DIGEST_LENGTH 32
+ #endif
+ #define HMAC_CTX sha2_context
+-#define HMAC_setup(ctx, key, len) sha2_hmac_starts(&ctx, (unsigned char *)key, len, 0)
+-#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(&ctx, buf, len)
+-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(&ctx, dig)
++#define HMAC_setup(ctx, key, len) sha2_hmac_starts(ctx, (unsigned char *)key, len, 0)
++#define HMAC_crunch(ctx, buf, len) sha2_hmac_update(ctx, buf, len)
++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; sha2_hmac_finish(ctx, dig)
+ #define HMAC_close(ctx)
+ #elif defined(USE_GNUTLS)
+ #include <nettle/hmac.h>
+@@ -48,19 +48,27 @@
+ #endif
+ #undef HMAC_CTX
+ #define HMAC_CTX struct hmac_sha256_ctx
+-#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(&ctx, len, key)
+-#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(&ctx, len, buf)
+-#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(&ctx, SHA256_DIGEST_LENGTH, dig)
++#define HMAC_setup(ctx, key, len) hmac_sha256_set_key(ctx, len, key)
++#define HMAC_crunch(ctx, buf, len) hmac_sha256_update(ctx, len, buf)
++#define HMAC_finish(ctx, dig, dlen) dlen = SHA256_DIGEST_LENGTH; hmac_sha256_digest(ctx, SHA256_DIGEST_LENGTH, dig)
+ #define HMAC_close(ctx)
+ #else /* USE_OPENSSL */
+ #include <openssl/ssl.h>
+ #include <openssl/sha.h>
+ #include <openssl/hmac.h>
+ #include <openssl/rc4.h>
+-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0)
+-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len)
+-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen);
+-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define HMAC_setup(ctx, key, len) HMAC_CTX_init(ctx); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0)
++#else
++#define HMAC_setup(ctx, key, len) HMAC_CTX_reset(ctx); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0)
++#endif
++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len)
++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen);
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#define HMAC_close(ctx) HMAC_CTX_cleanup(ctx)
++#else
++#define HMAC_close(ctx) HMAC_CTX_reset(ctx); HMAC_CTX_free(ctx)
++#endif
+ #endif
+
+ extern void RTMP_TLS_Init();
+@@ -289,7 +297,7 @@
+ struct info
+ {
+ z_stream *zs;
+- HMAC_CTX ctx;
++ HMAC_CTX *ctx;
+ int first;
+ int zlib;
+ int size;
diff --git a/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2.patch b/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2.patch
new file mode 100644
index 000000000000..0e9c8302e8c6
--- /dev/null
+++ b/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2.patch
@@ -0,0 +1,13 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index 5311a8a..79fefae 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -2854,7 +2854,7 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet)
+ if (nType == 0x1A)
+ {
+ RTMP_Log(RTMP_LOGDEBUG, "%s, SWFVerification ping received: ", __FUNCTION__);
+- if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01)
++ if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x02)
+ {
+ RTMP_Log(RTMP_LOGERROR,
+ "%s: SWFVerification Type %d request not supported! Patches welcome...",
diff --git a/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2_part_2.patch b/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2_part_2.patch
new file mode 100644
index 000000000000..55d02692464c
--- /dev/null
+++ b/media-video/rtmpdump/files/rtmpdump-swf_vertification_type_2_part_2.patch
@@ -0,0 +1,21 @@
+diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
+index df2cb27..b72dc64 100644
+--- a/librtmp/rtmp.c
++++ b/librtmp/rtmp.c
+@@ -2857,14 +2857,14 @@ HandleCtrl(RTMP *r, const RTMPPacket *packet)
+ if (packet->m_nBodySize > 2 && packet->m_body[2] > 0x01)
+ {
+ RTMP_Log(RTMP_LOGERROR,
+- "%s: SWFVerification Type %d request not supported! Patches welcome...",
++ "%s: SWFVerification Type %d request not supported, attempting to use SWFVerification Type 1! Patches welcome...",
+ __FUNCTION__, packet->m_body[2]);
+ }
+ #ifdef CRYPTO
+ /*RTMP_LogHex(packet.m_body, packet.m_nBodySize); */
+
+ /* respond with HMAC SHA256 of decompressed SWF, key is the 30byte player key, also the last 30 bytes of the server handshake are applied */
+- else if (r->Link.SWFSize)
++ if (r->Link.SWFSize)
+ {
+ RTMP_SendCtrl(r, 0x1B, 0, 0);
+ } \ No newline at end of file
diff --git a/media-video/rtmpdump/metadata.xml b/media-video/rtmpdump/metadata.xml
index 6f49eba8f496..b36893c1b2a1 100644
--- a/media-video/rtmpdump/metadata.xml
+++ b/media-video/rtmpdump/metadata.xml
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<!-- maintainer-needed -->
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <longdescription>
+ rtmpdump is a toolkit for RTMP streams.
+ All forms of RTMP are supported, including
+ rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://.
+ </longdescription>
</pkgmetadata>
diff --git a/media-video/rtmpdump/rtmpdump-2.4_p20161210-r2.ebuild b/media-video/rtmpdump/rtmpdump-2.4_p20161210-r2.ebuild
new file mode 100644
index 000000000000..8a45c29d0d07
--- /dev/null
+++ b/media-video/rtmpdump/rtmpdump-2.4_p20161210-r2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit multilib toolchain-funcs multilib-minimal flag-o-matic
+
+DESCRIPTION="RTMP client 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="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="gnutls ssl libressl"
+
+DEPEND="ssl? (
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP},nettle(+)] )
+ !gnutls? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl )
+ )
+ >=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"
+)
+
+if [[ ${PV} == *9999 ]] ; then
+ KEYWORDS=""
+ SRC_URI=""
+ EGIT_REPO_URI="https://git.ffmpeg.org/rtmpdump.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+ SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+fi
+
+pkg_setup() {
+ if ! use ssl && use gnutls ; then
+ ewarn "USE='gnutls' is ignored without USE='ssl'."
+ ewarn "Please review the local USE flags for this package."
+ fi
+}
+
+src_unpack() {
+ if [[ ${PV} == *9999 ]] ; then
+ git-r3_src_unpack
+ else
+ mkdir -p "${S}" || die "Can't create source directory"
+ cd "${S}" || die
+ unpack ${A}
+ 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 && use !libressl && eapply "${FILESDIR}/${PN}-openssl-1.1.patch"
+ default
+ multilib_copy_sources
+}
+
+multilib_src_compile() {
+ if use ssl ; then
+ if use gnutls ; then
+ crypto="GNUTLS"
+ else
+ crypto="OPENSSL"
+ fi
+ fi
+ #fix multilib-script support. Bug #327449
+ sed -i "/^libdir/s:lib$:$(get_libdir):" librtmp/Makefile || die
+ if ! multilib_is_native_abi; then
+ cd librtmp || die
+ fi
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" \
+ OPT="${CFLAGS}" XLDFLAGS="${LDFLAGS}" CRYPTO="${crypto}" SYS=posix
+}
+
+multilib_src_install() {
+ mkdir -p "${ED}"/usr/$(get_libdir) || die
+ if multilib_is_native_abi; 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}" install
+}
diff --git a/media-video/rtmpdump/rtmpdump-9999.ebuild b/media-video/rtmpdump/rtmpdump-9999.ebuild
index 83fe157d7a38..8a45c29d0d07 100644
--- a/media-video/rtmpdump/rtmpdump-9999.ebuild
+++ b/media-video/rtmpdump/rtmpdump-9999.ebuild
@@ -1,18 +1,16 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
-inherit git-r3 multilib toolchain-funcs multilib-minimal flag-o-matic
+inherit multilib toolchain-funcs multilib-minimal flag-o-matic
DESCRIPTION="RTMP client intended to stream audio or video flash content"
HOMEPAGE="https://rtmpdump.mplayerhq.hu/"
-EGIT_REPO_URI="https://git.ffmpeg.org/rtmpdump.git"
# the library is LGPL-2.1, the command is GPL-2
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS=""
IUSE="gnutls ssl libressl"
DEPEND="ssl? (
@@ -25,6 +23,21 @@ DEPEND="ssl? (
)"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-swf_vertification_type_2.patch"
+ "${FILESDIR}/${PN}-swf_vertification_type_2_part_2.patch"
+)
+
+if [[ ${PV} == *9999 ]] ; then
+ KEYWORDS=""
+ SRC_URI=""
+ EGIT_REPO_URI="https://git.ffmpeg.org/rtmpdump.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+ SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+fi
+
pkg_setup() {
if ! use ssl && use gnutls ; then
ewarn "USE='gnutls' is ignored without USE='ssl'."
@@ -32,6 +45,16 @@ pkg_setup() {
fi
}
+src_unpack() {
+ if [[ ${PV} == *9999 ]] ; then
+ git-r3_src_unpack
+ else
+ mkdir -p "${S}" || die "Can't create source directory"
+ cd "${S}" || die
+ unpack ${A}
+ fi
+}
+
src_prepare() {
# fix #571106 by restoring pre-GCC5 inline semantics
append-cflags -std=gnu89
@@ -42,7 +65,8 @@ src_prepare() {
-e 's:OPT:OPTS:' \
-e 's:CFLAGS=.*:& $(OPT):' librtmp/Makefile \
|| die "failed to fix Makefile"
- eapply_user
+ use ssl && use !gnutls && use !libressl && eapply "${FILESDIR}/${PN}-openssl-1.1.patch"
+ default
multilib_copy_sources
}