mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 21:07:54 +00:00
Make lzip an optional dependency
Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
857b7928b8
commit
9b9e5c4162
@ -3,6 +3,9 @@
|
||||
config CONFIGURE_has_static_link
|
||||
@KCONFIG_static_link@
|
||||
|
||||
config CONFIGURE_has_lzip
|
||||
@KCONFIG_lzip@
|
||||
|
||||
config CONFIGURE_has_wget
|
||||
@KCONFIG_wget@
|
||||
|
||||
|
13
configure.ac
13
configure.ac
@ -122,13 +122,24 @@ CTNG_CHECK_PROGS_REQ([readlink], [readlink])
|
||||
CTNG_CHECK_PROGS_REQ([tar], [tar])
|
||||
CTNG_CHECK_PROGS_REQ([gzip], [gzip])
|
||||
CTNG_CHECK_PROGS_REQ([bzip2], [bzip2])
|
||||
CTNG_CHECK_PROGS_REQ([lzip], [lzip])
|
||||
CTNG_CHECK_PROGS_REQ([xz], [xz])
|
||||
CTNG_CHECK_PROGS_REQ([unzip], [unzip])
|
||||
CTNG_CHECK_PROGS_REQ([help2man], [help2man])
|
||||
CTNG_CHECK_PROGS_REQ([file], [file])
|
||||
CTNG_CHECK_PROGS_REQ([which], [which])
|
||||
|
||||
# Lzip is optional; all the packages that provide tarballs in .tar.lz format
|
||||
# also provide them in some other format. All other formats are currently
|
||||
# mandatory as there is at least one package that has no fallback for each
|
||||
# of them.
|
||||
# FIXME: this configure.ac should be only used for detecting the dependencies
|
||||
# of the ct-ng framework itself; anything needed at build time should be
|
||||
# determined by crosstool-NG.sh - perhaps, through another 'configure' that
|
||||
# runs during `ct-ng build`.
|
||||
AC_CHECK_PROGS([lzip], [lzip])
|
||||
CTNG_SET_KCONFIG_OPTION([lzip])
|
||||
AC_SUBST([lzip])
|
||||
|
||||
# Not a fatal failure even if we have neither - the tarballs may
|
||||
# be provided in a local directory.
|
||||
AC_CHECK_PROGS([wget], [wget])
|
||||
|
@ -669,7 +669,9 @@ CT_DoListTarballExt()
|
||||
{
|
||||
printf ".tar.xz\n"
|
||||
printf ".tar.lzma\n"
|
||||
printf ".tar.lz\n"
|
||||
if [ "${CT_CONFIGURE_has_lzip}" = "y" ]; then
|
||||
printf ".tar.lz\n"
|
||||
fi
|
||||
printf ".tar.bz2\n"
|
||||
printf ".tar.gz\n.tgz\n"
|
||||
printf ".tar\n"
|
||||
@ -2074,6 +2076,7 @@ CT_PackageRun()
|
||||
CT_DoFetch()
|
||||
{
|
||||
local tmp_dir
|
||||
local extensions e a
|
||||
|
||||
if [ "${src_release}" = "y" ]; then
|
||||
# Some packages do not contain any directory level at all
|
||||
@ -2083,8 +2086,17 @@ CT_DoFetch()
|
||||
basename="${pkg_name}-${version}"
|
||||
fi
|
||||
pkg_dir="${pkg_name}/${version}"
|
||||
# Check which extensions we are allowed to fetch
|
||||
for a in ${archive_formats}; do
|
||||
for e in $(CT_DoListTarballExt); do
|
||||
if [ "${a}" = "${e}" ]; then
|
||||
extensions="${extensions} ${a}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
if ! CT_GetFile package="${pkg_name}" pkg_dir="${pkg_dir}" dir_name="${dir_name}" \
|
||||
basename="${archive_filename}" extensions="${archive_formats}" \
|
||||
basename="${archive_filename}" extensions="${extensions}" \
|
||||
digest="${CT_VERIFY_DOWNLOAD_DIGEST}" \
|
||||
signature_format="${CT_VERIFY_DOWNLOAD_SIGNATURE:+${signature_format}}" \
|
||||
mirrors="${mirrors}"; then
|
||||
|
Loading…
Reference in New Issue
Block a user