summaryrefslogtreecommitdiff
path: root/pkg/ffmpeg/patch
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-04-25 16:02:53 -0700
committerMichael Forney <mforney@mforney.org>2018-05-10 12:30:59 -0700
commitf8f4562b49cd6c59b0a3384335497dc1077b9621 (patch)
treec7817ec20e7f8925bdd74d80aa7af22cb65bd2c2 /pkg/ffmpeg/patch
parentcc4725802a003e8667f7f57a14d9ad3e168fc24e (diff)
ffmpeg: Update to 4.0
Diffstat (limited to 'pkg/ffmpeg/patch')
-rw-r--r--pkg/ffmpeg/patch/0002-Fix-build-with-LibreSSL.patch32
-rw-r--r--pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch29
2 files changed, 45 insertions, 16 deletions
diff --git a/pkg/ffmpeg/patch/0002-Fix-build-with-LibreSSL.patch b/pkg/ffmpeg/patch/0002-Fix-build-with-LibreSSL.patch
index 84d7a233..5e4a070c 100644
--- a/pkg/ffmpeg/patch/0002-Fix-build-with-LibreSSL.patch
+++ b/pkg/ffmpeg/patch/0002-Fix-build-with-LibreSSL.patch
@@ -1,4 +1,4 @@
-From a558cf34cab8bcb2162f40014cb469105a3abc59 Mon Sep 17 00:00:00 2001
+From 22d9fc0b4c4b8e83d638a3dffa848292f6b58437 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Fri, 28 Oct 2016 00:33:53 -0700
Subject: [PATCH] Fix build with LibreSSL
@@ -9,7 +9,7 @@ Signed-off-by: Michael Forney <mforney@mforney.org>
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c
-index 38af8a21c0..473d3cb7ff 100644
+index 59a86150a7..eb9e0bc24f 100644
--- a/libavformat/tls_openssl.c
+++ b/libavformat/tls_openssl.c
@@ -43,7 +43,7 @@ typedef struct TLSContext {
@@ -21,7 +21,16 @@ index 38af8a21c0..473d3cb7ff 100644
BIO_METHOD* url_bio_method;
#endif
} TLSContext;
-@@ -68,7 +68,7 @@ static unsigned long openssl_thread_id(void)
+@@ -137,7 +137,7 @@ static int tls_close(URLContext *h)
+ SSL_CTX_free(c->ctx);
+ if (c->tls_shared.tcp)
+ ffurl_close(c->tls_shared.tcp);
+-#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
++#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2070000f)
+ if (c->url_bio_method)
+ BIO_meth_free(c->url_bio_method);
+ #endif
+@@ -147,7 +147,7 @@ static int tls_close(URLContext *h)
static int url_bio_create(BIO *b)
{
@@ -30,7 +39,7 @@ index 38af8a21c0..473d3cb7ff 100644
BIO_set_init(b, 1);
BIO_set_data(b, NULL);
BIO_set_flags(b, 0);
-@@ -85,7 +85,7 @@ static int url_bio_destroy(BIO *b)
+@@ -164,7 +164,7 @@ static int url_bio_destroy(BIO *b)
return 1;
}
@@ -39,7 +48,7 @@ index 38af8a21c0..473d3cb7ff 100644
#define GET_BIO_DATA(x) BIO_get_data(x)
#else
#define GET_BIO_DATA(x) (x)->ptr
-@@ -129,7 +129,7 @@ static int url_bio_bputs(BIO *b, const char *str)
+@@ -212,7 +212,7 @@ static int url_bio_bputs(BIO *b, const char *str)
return url_bio_bwrite(b, str, strlen(str));
}
@@ -48,16 +57,7 @@ index 38af8a21c0..473d3cb7ff 100644
static BIO_METHOD url_bio_method = {
.type = BIO_TYPE_SOURCE_SINK,
.name = "urlprotocol bio",
-@@ -208,7 +208,7 @@ static int tls_close(URLContext *h)
- SSL_CTX_free(c->ctx);
- if (c->tls_shared.tcp)
- ffurl_close(c->tls_shared.tcp);
--#if OPENSSL_VERSION_NUMBER >= 0x1010000fL
-+#if OPENSSL_VERSION_NUMBER >= 0x1010000fL && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER >= 0x2070000fL)
- if (c->url_bio_method)
- BIO_meth_free(c->url_bio_method);
- #endif
-@@ -266,7 +266,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
+@@ -276,7 +276,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
ret = AVERROR(EIO);
goto fail;
}
@@ -67,5 +67,5 @@ index 38af8a21c0..473d3cb7ff 100644
BIO_meth_set_write(p->url_bio_method, url_bio_bwrite);
BIO_meth_set_read(p->url_bio_method, url_bio_bread);
--
-2.16.3
+2.17.0
diff --git a/pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch b/pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch
new file mode 100644
index 00000000..1cf4c4e0
--- /dev/null
+++ b/pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch
@@ -0,0 +1,29 @@
+From 99d770f3a43ce44659d6dd81caf93040721cc628 Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Sun, 22 Apr 2018 23:46:33 -0700
+Subject: [PATCH] configure: Use awk to implement unique()
+
+Otherwise, if printf is not a builtin it runs very very slowly.
+---
+ configure | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/configure b/configure
+index dee507cb6a..9b7ddfee24 100755
+--- a/configure
++++ b/configure
+@@ -838,10 +838,7 @@ prepend(){
+
+ unique(){
+ var=$1
+- uniq_list=""
+- for tok in $(eval echo \$$var); do
+- uniq_list="$(filter_out $tok $uniq_list) $tok"
+- done
++ uniq_list=$(eval "printf '%s\n' \$$var" | awk '!($0 in seen) { seen[$0] = 1; printf "%s ", $0 }')
+ eval "$var=\"${uniq_list}\""
+ }
+
+--
+2.17.0
+