mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-17 14:58:12 +00:00
Allow for custom archive names
... and directories therein. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
@ -16,7 +16,6 @@ config ISL_CLOOG_auto_select_2
|
|||||||
def_bool y
|
def_bool y
|
||||||
depends on CLOOG_NEEDED && !ISL_0_13_or_older
|
depends on CLOOG_NEEDED && !ISL_0_13_or_older
|
||||||
select CLOOG_REQUIRE_0_18_4_or_later
|
select CLOOG_REQUIRE_0_18_4_or_later
|
||||||
# TBD 0.12.2 should allow both!
|
|
||||||
|
|
||||||
config ISL_NEEDS_WITH_GMP
|
config ISL_NEEDS_WITH_GMP
|
||||||
bool
|
bool
|
||||||
|
@ -132,7 +132,7 @@ run_lines()
|
|||||||
{
|
{
|
||||||
local start="${1}"
|
local start="${1}"
|
||||||
local end="${2}"
|
local end="${2}"
|
||||||
local l lnext s v
|
local l lnext s s1 v
|
||||||
|
|
||||||
debug "Running lines ${start}..${end}"
|
debug "Running lines ${start}..${end}"
|
||||||
l=${start}
|
l=${start}
|
||||||
@ -142,6 +142,7 @@ run_lines()
|
|||||||
# Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below.
|
# Expand @@foo@@ to ${info[foo]}. First escape variables/backslashes for evals below.
|
||||||
s="${s//\\/\\\\}"
|
s="${s//\\/\\\\}"
|
||||||
s="${s//\$/\\\$}"
|
s="${s//\$/\\\$}"
|
||||||
|
s1=
|
||||||
while [ -n "${s}" ]; do
|
while [ -n "${s}" ]; do
|
||||||
case "${s}" in
|
case "${s}" in
|
||||||
*@@*@@*)
|
*@@*@@*)
|
||||||
@ -150,16 +151,19 @@ run_lines()
|
|||||||
if [ "${info[${v}]+set}" != "set" ]; then
|
if [ "${info[${v}]+set}" != "set" ]; then
|
||||||
error "line ${l}: reference to undefined variable '${v}'"
|
error "line ${l}: reference to undefined variable '${v}'"
|
||||||
fi
|
fi
|
||||||
s="${s%%@@*}\${info[${v}]}${s#*@@*@@}"
|
s1="${s1}${s%%@@*}\${info[${v}]}"
|
||||||
|
s="${s#*@@*@@}"
|
||||||
;;
|
;;
|
||||||
*@@*)
|
*@@*)
|
||||||
error "line ${l}: non-paired @@ markers"
|
error "line ${l}: non-paired @@ markers"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
s1="${s1}${s}"
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
s=${s1}
|
||||||
|
|
||||||
debug "Evaluate: ${s}"
|
debug "Evaluate: ${s}"
|
||||||
case "${s}" in
|
case "${s}" in
|
||||||
@ -448,7 +452,8 @@ enter_fork()
|
|||||||
info[fork]=${fork}
|
info[fork]=${fork}
|
||||||
info[name]=${fork}
|
info[name]=${fork}
|
||||||
info[mirrors]=
|
info[mirrors]=
|
||||||
info[archivesuffix]=
|
info[archive_filename]='@{pkg_name}-@{version}'
|
||||||
|
info[archive_dirname]='@{pkg_name}-@{version}'
|
||||||
|
|
||||||
eval `read_package_desc ${fork}`
|
eval `read_package_desc ${fork}`
|
||||||
|
|
||||||
|
@ -172,9 +172,13 @@ config @@pfx@@_MIRRORS
|
|||||||
string
|
string
|
||||||
default "@@mirrors@@"
|
default "@@mirrors@@"
|
||||||
|
|
||||||
config @@pfx@@_ARCHIVE_SUFFIX
|
config @@pfx@@_ARCHIVE_FILENAME
|
||||||
string
|
string
|
||||||
default "@@archivesuffix@@"
|
default "@@archive_filename@@"
|
||||||
|
|
||||||
|
config @@pfx@@_ARCHIVE_DIRNAME
|
||||||
|
string
|
||||||
|
default "@@archive_dirname@@"
|
||||||
|
|
||||||
#!end-if
|
#!end-if
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# We don't support building bionic (yet) so no official repository
|
# We don't support building bionic (yet) so no official repository
|
||||||
archivesuffix='-linux-x86_64'
|
|
||||||
mirrors='https://dl.google.com/android/repository'
|
mirrors='https://dl.google.com/android/repository'
|
||||||
|
archive_filename='@{pkg_name}-@{version}-linux-x86_64'
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
repository='cvs :pserver:anonymous@duma.cvs.sourceforge.net:/cvsroot/duma duma'
|
repository='cvs :pserver:anonymous@duma.cvs.sourceforge.net:/cvsroot/duma duma'
|
||||||
mirrors='http://downloads.sourceforge.net/project/duma/duma/${CT_DUMA_VERSION}'
|
mirrors='http://downloads.sourceforge.net/project/duma/duma/${CT_DUMA_VERSION}'
|
||||||
|
archive_filename='@{pkg_name}_@{version}'
|
||||||
|
archive_dirname='@{pkg_name}_@{version}'
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
repository='git git://git.debian.org/git/collab-maint/ltrace.git'
|
repository='git git://git.debian.org/git/collab-maint/ltrace.git'
|
||||||
bootstrap='./autogen.sh'
|
bootstrap='./autogen.sh'
|
||||||
mirrors='http://ftp.debian.org/debian/pool/main/l/ltrace ftp:://ftp.debian.org/debian/pool/main/l/ltrace'
|
mirrors='http://ftp.debian.org/debian/pool/main/l/ltrace ftp:://ftp.debian.org/debian/pool/main/l/ltrace'
|
||||||
|
archive_filename='@{pkg_name}_@{version}.orig'
|
||||||
|
archive_dirname='@{pkg_name}-@{version}'
|
||||||
|
@ -265,7 +265,7 @@ do_elf2flt_backend() {
|
|||||||
CFLAGS="${cflags}" \
|
CFLAGS="${cflags}" \
|
||||||
LDFLAGS="${ldflags}" \
|
LDFLAGS="${ldflags}" \
|
||||||
${CONFIG_SHELL} \
|
${CONFIG_SHELL} \
|
||||||
"${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
|
"${CT_SRC_DIR}/elf2flt/configure" \
|
||||||
--build=${CT_BUILD} \
|
--build=${CT_BUILD} \
|
||||||
--host=${host} \
|
--host=${host} \
|
||||||
--target=${CT_TARGET} \
|
--target=${CT_TARGET} \
|
||||||
|
@ -1688,12 +1688,20 @@ CT_PackageRun()
|
|||||||
use="${use:-${sym}}"
|
use="${use:-${sym}}"
|
||||||
|
|
||||||
# Variables that are per-fork
|
# Variables that are per-fork
|
||||||
for v in basename pkg_name version src_release mirrors archive_suffix src_devel src_custom \
|
for v in basename pkg_name version src_release mirrors archive_filename archive_dirname \
|
||||||
devel_vcs devel_url devel_branch devel_revision devel_subdir devel_bootstrap \
|
src_devel src_custom devel_vcs devel_url devel_branch devel_revision \
|
||||||
custom_location; do
|
devel_subdir devel_bootstrap custom_location; do
|
||||||
eval "local ${v}=\${CT_${use}_${v^^}}"
|
eval "local ${v}=\${CT_${use}_${v^^}}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for v in archive_filename archive_dirname; do
|
||||||
|
# kconfig and shell have different quoting rules, so it seems impossible to make
|
||||||
|
# kconfig quote '$' properly for eval (i.e. not have it expanded when loading the
|
||||||
|
# .config). Therefore, use '@' instead of '$' in kconfig files and substitute it
|
||||||
|
# here for select variables.
|
||||||
|
eval "eval ${v}=\${${v}//@/$}"
|
||||||
|
done
|
||||||
|
|
||||||
${run} "$@"
|
${run} "$@"
|
||||||
|
|
||||||
# Save certain variables that may be modified by the callback.
|
# Save certain variables that may be modified by the callback.
|
||||||
@ -1710,8 +1718,8 @@ CT_DoFetch()
|
|||||||
local tmp_dir
|
local tmp_dir
|
||||||
|
|
||||||
if [ "${src_release}" = "y" ]; then
|
if [ "${src_release}" = "y" ]; then
|
||||||
basename="${pkg_name}-${version}"
|
basename="${archive_dirname}"
|
||||||
if ! CT_GetFile "${basename}${archive_suffix}" ${mirrors}; then
|
if ! CT_GetFile "${archive_filename}" ${mirrors}; then
|
||||||
CT_Abort "${pkg_name}: download failed"
|
CT_Abort "${pkg_name}: download failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1834,7 +1842,7 @@ CT_Extract()
|
|||||||
CT_DoExtractPatch()
|
CT_DoExtractPatch()
|
||||||
{
|
{
|
||||||
local patchfunc="${1}"
|
local patchfunc="${1}"
|
||||||
local ext
|
local archive ext
|
||||||
local -a patch_dirs
|
local -a patch_dirs
|
||||||
local bundled_patch_dir
|
local bundled_patch_dir
|
||||||
local local_patch_dir
|
local local_patch_dir
|
||||||
@ -1854,9 +1862,14 @@ CT_DoExtractPatch()
|
|||||||
else
|
else
|
||||||
CT_DoLog EXTRA "Extracting ${basename}"
|
CT_DoLog EXTRA "Extracting ${basename}"
|
||||||
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
||||||
|
if [ "${src_release}" = "y" ]; then
|
||||||
|
archive="${archive_filename}"
|
||||||
|
else
|
||||||
|
archive="${basename}"
|
||||||
|
fi
|
||||||
# TBD save/discover the extension while fetching
|
# TBD save/discover the extension while fetching
|
||||||
ext=`CT_GetFileExtension "${basename}${archive_suffix}"`
|
ext=`CT_GetFileExtension "${archive}"`
|
||||||
CT_Extract "${CT_TARBALLS_DIR}/${basename}${archive_suffix}${ext}" "${CT_COMMON_SRC_DIR}"
|
CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}"
|
||||||
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted"
|
CT_DoExecLog ALL touch "${CT_COMMON_SRC_DIR}/.${basename}.extracted"
|
||||||
CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
CT_DoExecLog ALL rm -f "${CT_COMMON_SRC_DIR}/.${basename}.extracting"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user