From fa80406426cce05dc28c97c211116801fea3f5f1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 21 Jul 2021 18:46:48 +0300 Subject: [PATCH] x264: fix portability issues with ksh. Closes #297 --- extra/x264/build | 2 +- extra/x264/checksums | 2 +- .../{x264-no-bash.patch => portability.patch} | 20 +++++++++++++++++++ extra/x264/sources | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) rename extra/x264/patches/{x264-no-bash.patch => portability.patch} (92%) diff --git a/extra/x264/build b/extra/x264/build index 34535ed9..3472f21a 100755 --- a/extra/x264/build +++ b/extra/x264/build @@ -1,6 +1,6 @@ #!/bin/sh -e -patch -p1 < x264-no-bash.patch +patch -p1 < portability.patch ./configure \ --prefix=/usr \ diff --git a/extra/x264/checksums b/extra/x264/checksums index 977b8066..f5f28a0b 100644 --- a/extra/x264/checksums +++ b/extra/x264/checksums @@ -1,2 +1,2 @@ 404e7ba61123720a7b2cc45356ace6859860ef4ce3503758465e92c1ce11995e -a78a518c3685813fdfdc8813acd48e292968892e6ff5ea60d91f5c514c35acee +ff0292e4cf86e8352e174091091e842c2e9ab444d8f5f292b3f1a7d11a392f41 diff --git a/extra/x264/patches/x264-no-bash.patch b/extra/x264/patches/portability.patch similarity index 92% rename from extra/x264/patches/x264-no-bash.patch rename to extra/x264/patches/portability.patch index 07e8dd2b..60fb04e3 100644 --- a/extra/x264/patches/x264-no-bash.patch +++ b/extra/x264/patches/portability.patch @@ -1,3 +1,23 @@ +diff --git a/tools/cltostr.sh b/tools/cltostr.sh +index 23b6cc7..3feaafe 100755 +--- a/tools/cltostr.sh ++++ b/tools/cltostr.sh +@@ -18,7 +18,7 @@ dump() { + } + + # Print MD5 hash w/o newline character to not embed the character in the array. +-hash() { ++_hash() { + # md5sum is not standard, so try different platform-specific alternatives. + { md5sum "$1" || md5 -q "$1" || digest -a md5 "$1"; } 2>/dev/null | + cut -b -32 | tr -d '\n\r' +@@ -29,5 +29,5 @@ trap 'rm -f "$1.temp"' EXIT + sanitize | tee "$1.temp" | + dump 'x264_opencl_source' > "$1" + +-hash "$1.temp" | ++_hash "$1.temp" | + dump 'x264_opencl_source_hash' >> "$1" diff --git a/configure b/configure-posix index 3cf63e0..1e1fce5 100755 --- a/configure-posix diff --git a/extra/x264/sources b/extra/x264/sources index 5a03a442..8ecad85b 100644 --- a/extra/x264/sources +++ b/extra/x264/sources @@ -1,2 +1,2 @@ https://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-VERSION-stable.tar.bz2 -patches/x264-no-bash.patch +patches/portability.patch