lol

zstd: fix darwin patch

Since v1.4.9, another stat command has been added to playTests.sh.
Similar to other uses in this file, it attempts to use BSD syntax on
Darwin/BSD, and must be patched to unconditionally use GNU syntax.

+10 -5
+10 -5
pkgs/tools/compression/zstd/playtests-darwin.patch
··· 1 1 --- a/tests/playTests.sh 2 2 +++ b/tests/playTests.sh 3 - @@ -112,17 +112,10 @@ case "$OS" in 3 + @@ -112,22 +112,12 @@ case "$OS" in 4 4 esac 5 5 6 6 case "$UNAME" in ··· 16 16 - Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;; 17 17 -esac 18 18 19 - DIFF="diff" 20 - case "$UNAME" in 21 - @@ -842,7 +835,6 @@ $MD5SUM dirTestDict/* > tmph1 19 + GET_PERMS="stat -c %a" 20 + -case "$UNAME" in 21 + - Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;; 22 + -esac 23 + 24 + assertFilePermissions() { 25 + STAT1=$($GET_PERMS "$1") 26 + @@ -967,7 +957,6 @@ $MD5SUM dirTestDict/* > tmph1 22 27 zstd -f --rm dirTestDict/* -D tmpDictC 23 28 zstd -d --rm dirTestDict/*.zst -D tmpDictC # note : use internal checksum by default 24 29 case "$UNAME" in 25 30 - Darwin) println "md5sum -c not supported on OS-X : test skipped" ;; # not compatible with OS-X's md5 26 31 *) $MD5SUM -c tmph1 ;; 27 32 esac 28 - rm -rf dirTestDict 33 + rm -rf dirTestDict