diff options
| author | Michael Forney <mforney@mforney.org> | 2018-04-25 16:02:53 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2018-05-10 12:30:59 -0700 |
| commit | f8f4562b49cd6c59b0a3384335497dc1077b9621 (patch) | |
| tree | c7817ec20e7f8925bdd74d80aa7af22cb65bd2c2 /pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch | |
| parent | cc4725802a003e8667f7f57a14d9ad3e168fc24e (diff) | |
ffmpeg: Update to 4.0
Diffstat (limited to 'pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch')
| -rw-r--r-- | pkg/ffmpeg/patch/0003-configure-Use-awk-to-implement-unique.patch | 29 |
1 files changed, 29 insertions, 0 deletions
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 + |
