From 8e9de3ad006f08d8dd136db0f6ed7952e96771c5 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 17 Jul 2019 19:20:17 +0700 Subject: [PATCH] ffmpeg: new package at 4.1.4 --- testing/ffmpeg/build | 11 ++++ testing/ffmpeg/checksums | 3 + testing/ffmpeg/depends | 3 + testing/ffmpeg/patches/replace-pr-1.patch | 41 +++++++++++++ testing/ffmpeg/patches/replace-pr-2.patch | 75 +++++++++++++++++++++++ testing/ffmpeg/sources | 3 + testing/ffmpeg/version | 1 + 7 files changed, 137 insertions(+) create mode 100755 testing/ffmpeg/build create mode 100644 testing/ffmpeg/checksums create mode 100644 testing/ffmpeg/depends create mode 100644 testing/ffmpeg/patches/replace-pr-1.patch create mode 100644 testing/ffmpeg/patches/replace-pr-2.patch create mode 100644 testing/ffmpeg/sources create mode 100644 testing/ffmpeg/version diff --git a/testing/ffmpeg/build b/testing/ffmpeg/build new file mode 100755 index 00000000..4b1ab151 --- /dev/null +++ b/testing/ffmpeg/build @@ -0,0 +1,11 @@ +#!/bin/sh -e + +patch -p1 < replace-pr-1.patch +patch -p1 < replace-pr-2.patch + +./configure \ + --prefix=/usr \ + --disable-debug + +make +make DESTDIR="$1" install diff --git a/testing/ffmpeg/checksums b/testing/ffmpeg/checksums new file mode 100644 index 00000000..7d78c046 --- /dev/null +++ b/testing/ffmpeg/checksums @@ -0,0 +1,3 @@ +f1f049a82fcfbf156564e73a3935d7e750891fab2abf302e735104fd4050a7e1 ffmpeg-4.1.4.tar.xz +5fc8ff90546ea1b11fd8eece4bc190c4452cd4f92a1e5d496337635afc8847be replace-pr-1.patch +5ef42e9fa9d400940f10a45c2f877339ff1d354746a793cb4316a5e351b37cea replace-pr-2.patch diff --git a/testing/ffmpeg/depends b/testing/ffmpeg/depends new file mode 100644 index 00000000..d6645c82 --- /dev/null +++ b/testing/ffmpeg/depends @@ -0,0 +1,3 @@ +pkgconf make +perl make +yasm make diff --git a/testing/ffmpeg/patches/replace-pr-1.patch b/testing/ffmpeg/patches/replace-pr-1.patch new file mode 100644 index 00000000..f6c8ceb0 --- /dev/null +++ b/testing/ffmpeg/patches/replace-pr-1.patch @@ -0,0 +1,41 @@ +From ae6486c6251039d3a6bb5a90e1d818331cf55edc Mon Sep 17 00:00:00 2001 +From: "Guo, Yejun" +Date: Wed, 24 Apr 2019 21:13:21 +0800 +Subject: [PATCH] configure: replace 'pr' with printf since busybox does not + support pr + +This patch is based on https://trac.ffmpeg.org/ticket/5680 provided by +Kylie McClain at Wed, 29 Jun 2016 16:37:20 -0400, +and have some changes. + +contributor: Kylie McClain +contributor: avih +Signed-off-by: Guo, Yejun +--- + configure | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index 580af9c0f6..9b4305cf0d 100755 +--- a/configure ++++ b/configure +@@ -503,9 +503,13 @@ log(){ + } + + log_file(){ +- log BEGIN $1 +- pr -n -t $1 >> $logfile +- log END $1 ++ log BEGIN "$1" ++ log_file_i=1 ++ while IFS= read -r log_file_line; do ++ printf '%5d\t%s\n' "$log_file_i" "$log_file_line" ++ log_file_i=$(($log_file_i+1)) ++ done < "$1" >> "$logfile" ++ log END "$1" + } + + warn(){ +-- +2.11.0 + diff --git a/testing/ffmpeg/patches/replace-pr-2.patch b/testing/ffmpeg/patches/replace-pr-2.patch new file mode 100644 index 00000000..38ec4066 --- /dev/null +++ b/testing/ffmpeg/patches/replace-pr-2.patch @@ -0,0 +1,75 @@ +From: Alexander Strasser +Date: Sat, 27 Apr 2019 21:15:08 +0000 (+0200) +Subject: configure: print_in_columns: Replace pr with awk +X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=99147312ce6ffd3a3b70e10aacc9b64a63b6aefe + +configure: print_in_columns: Replace pr with awk + +Get rid of pr dependency and write the columns strictly +alphabetical without page size considerations (POSIX +specifies 66 lines as default). + +Setting the page size via pr's -l option was considered, +but as there is issue #5680 which wants to avoid pr +mainly because it's not in busybox, we chose to replace +pr instead. + +Before pr would attempt to write pages, thus if a page +boundary was reached, the output looked confusing as one +couldn't see there was a new page and the alphabetical +order was disrupted when scanning down one of the columns. + +This change is based on a shell implementation submitted +before by Yejun. + +Possible differences to the current version using pr: +1. pr implementations should truncate items to not overflow columns; + depending on how it's done not truncating shall be better IMHO. +2. pr implementations might balance columns differently; + we use minimum number of lines and might end up not + using all columns or might have lesser entries in the + last column(s) +3. we use spaces only for padding the columns; at least the GNU pr + version on my system also by default stuffs in tabs in addition + to a single space in between columns. I don't see that this + behaviour is demanded by POSIX, though I might be very well + overlooking things. Anyway for our use case I can't see a need + for having the additional tabs, or why it would be better compared + to padding with spaces only. + +Fixes output for sizes with width < column width, too. + +Fixes remaining part of ticket #5680 + +Contributor: Guo, Yejun +--- + +diff --git a/configure b/configure +index d885690369..7cea9d4d73 100755 +--- a/configure ++++ b/configure +@@ -3843,8 +3843,22 @@ die_unknown(){ + } + + print_in_columns() { +- cols=$(expr $ncols / 24) +- cat | tr ' ' '\n' | sort | pr -r "-$cols" -w $ncols -t ++ tr ' ' '\n' | sort | tr '\r\n' ' ' | awk -v col_width=24 -v width="$ncols" ' ++ { ++ num_cols = width > col_width ? int(width / col_width) : 1; ++ num_rows = int((NF + num_cols-1) / num_cols); ++ y = x = 1; ++ for (y = 1; y <= num_rows; y++) { ++ i = y; ++ for (x = 1; x <= num_cols; x++) { ++ if (i <= NF) { ++ line = sprintf("%s%-" col_width "s", line, $i); ++ } ++ i = i + num_rows; ++ } ++ print line; line = ""; ++ } ++ }' | sed 's/ *$//' + } + + show_list() { diff --git a/testing/ffmpeg/sources b/testing/ffmpeg/sources new file mode 100644 index 00000000..a09c1e20 --- /dev/null +++ b/testing/ffmpeg/sources @@ -0,0 +1,3 @@ +https://www.ffmpeg.org/releases/ffmpeg-4.1.4.tar.xz +patches/replace-pr-1.patch +patches/replace-pr-2.patch diff --git a/testing/ffmpeg/version b/testing/ffmpeg/version new file mode 100644 index 00000000..ab4f5b91 --- /dev/null +++ b/testing/ffmpeg/version @@ -0,0 +1 @@ +4.1.4 1