configure: check for lzma

Some packages are available as LZMA tarballs. LZMA is a relatively recent
compression algorithm; it's slightly better than bzip2, but offers much
faster decompression. LZMA is now deprecated in favor of XZ, but some
packages switched to LZMA when XZ was not yet available, or still in its
infancy. Latest XZ (which totaly obsoletes LZMA) offers a backward LZMA-
compatible utility, so we can check for 'lzma' nonetheless.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
Yann E. MORIN"
2011-08-25 18:30:18 +02:00
parent 4bf42bfd02
commit 04250cc896
2 changed files with 7 additions and 0 deletions

View File

@ -403,6 +403,9 @@ CT_DoListTarballExt() {
if [ "${CT_CONFIGURE_has_xzutils}" = "y" ]; then
printf ".tar.xz\n"
fi
if [ "${CT_CONFIGURE_has_lzma}" = "y" ]; then
printf ".tar.lzma\n"
fi
printf ".tar.bz2\n"
printf ".tar.gz\n.tgz\n"
printf ".tar\n"
@ -757,6 +760,7 @@ CT_Extract() {
tar_opts+=( "-xv" )
case "${ext}" in
.tar.xz) CT_DoExecLog FILE tar "${tar_opts[@]}" --use-compress-program=xz -f "${full_file}";;
.tar.lzma) CT_DoExecLog FILE tar "${tar_opts[@]}" --use-compress-program=lzma -f "${full_file}";;
.tar.bz2) CT_DoExecLog FILE tar "${tar_opts[@]}" -j -f "${full_file}";;
.tar.gz|.tgz) CT_DoExecLog FILE tar "${tar_opts[@]}" -z -f "${full_file}";;
.tar) CT_DoExecLog FILE tar "${tar_opts[@]}" -f "${full_file}";;