Support early xz/lzma decompression, and use it wherever possible

This commit is contained in:
Gábor Stefanik 2024-02-09 02:47:07 +01:00
parent 34cb6758d2
commit 65953732a0
32 changed files with 41 additions and 34 deletions

View file

@ -307,8 +307,13 @@ extract_file() {
*.tar.bz2)
# Initial bzip2 built against meslibc has broken pipes
bzip2 -dc "${DISTFILES}/${f}" | tar -xf - ${extract} ;;
*.tar.xz)
tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract} ;;
*.tar.xz | *.tar.lzma)
if test -e "${PREFIX}/bin/xz"; then
tar -xf "${DISTFILES}/${f}" --use-compress-program=xz ${extract}
else
unxz --file "${DISTFILES}/${f}" | tar -xf - ${extract}
fi
;;
esac
fi
;;