summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-10-26 11:31:13 +0100
committerMichał Górny <mgorny@gentoo.org>2020-10-26 17:48:38 +0100
commit93b1bdad544f0fa01791f099945d8f2fd41540e1 (patch)
treee7871433523b830f36241d1aa2ac0c167e765846 /eclass/llvm.org.eclass
parentdev-util/catfish: Bump to 4.15.0 (diff)
downloadgentoo-93b1bdad544f0fa01791f099945d8f2fd41540e1.tar.gz
gentoo-93b1bdad544f0fa01791f099945d8f2fd41540e1.tar.bz2
gentoo-93b1bdad544f0fa01791f099945d8f2fd41540e1.zip
llvm.org.eclass: Remove support for pre-9.0.1 archives
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/llvm.org.eclass')
-rw-r--r--eclass/llvm.org.eclass84
1 files changed, 8 insertions, 76 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 3bb0465c3773..42fa04734d25 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -85,27 +85,6 @@ inherit multiprocessing
# == global scope logic ==
-# @FUNCTION: _llvm.org_get_archives
-# @USAGE: <components>
-# @INTERNAL
-# @DESCRIPTION:
-# Set 'archives' array to list of unique archive filenames
-# for components passed as parameters.
-_llvm.org_get_archives() {
- local c
- archives=()
-
- for c; do
- local cn=${c%%/*}
- case ${cn} in
- clang) cn=cfe;;
- esac
-
- local a=${cn}-${PV}.src.tar.xz
- has "${a}" "${archives[@]}" || archives+=( "${a}" )
- done
-}
-
# @FUNCTION: llvm.org_set_globals
# @DESCRIPTION:
# Set global variables. This must be called after setting LLVM_*
@@ -126,18 +105,8 @@ llvm.org_set_globals() {
[[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] &&
EGIT_BRANCH="release/${PV%%.*}.x"
elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then
- if ver_test -ge 9.0.1_rc1; then
- # 9.0.1 RCs as GitHub archive
- SRC_URI+="
- https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz"
- else
- local a archives=()
- _llvm.org_get_archives "${LLVM_COMPONENTS[@]}"
- for a in "${archives[@]}"; do
- SRC_URI+="
- https://releases.llvm.org/${PV}/${a}"
- done
- fi
+ SRC_URI+="
+ https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz"
else
die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}"
fi
@@ -147,26 +116,6 @@ llvm.org_set_globals() {
if [[ -n ${LLVM_TEST_COMPONENTS+1} ]]; then
IUSE+=" test"
RESTRICT+=" !test? ( test )"
-
- if [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then
- if ver_test -ge 9.0.1_rc1; then
- # everything already fetched
- :
- else
- # split 9.0.0 release and older
- SRC_URI+="
- test? ("
-
- _llvm.org_get_archives "${LLVM_TEST_COMPONENTS[@]}"
- for a in "${archives[@]}"; do
- SRC_URI+="
- https://releases.llvm.org/${PV}/${a}"
- done
-
- SRC_URI+="
- )"
- fi
- fi
fi
# === useful defaults for cmake-based packages ===
@@ -202,29 +151,12 @@ llvm.org_src_unpack() {
git-r3_fetch
git-r3_checkout '' . '' "${components[@]}"
else
- if ver_test -ge 9.0.1_rc1; then
- local archive=llvmorg-${PV/_/-}.tar.gz
- ebegin "Unpacking from ${archive}"
- tar -x -z -o --strip-components 1 \
- -f "${DISTDIR}/${archive}" \
- "${components[@]/#/llvm-project-${archive%.tar*}/}" || die
- eend ${?}
- else
- local c archives
- # TODO: optimize this
- for c in "${components[@]}"; do
- local top_dir=${c%%/*}
- _llvm.org_get_archives "${c}"
- local sub_path=${archives[0]%.tar.xz}
- [[ ${c} == */* ]] && sub_path+=/${c#*/}
-
- ebegin "Unpacking ${sub_path} from ${archives[0]}"
- mkdir -p "${top_dir}" || die
- tar -C "${top_dir}" -x -J -o --strip-components 1 \
- -f "${DISTDIR}/${archives[0]}" "${sub_path}" || die
- eend ${?}
- done
- fi
+ local archive=llvmorg-${PV/_/-}.tar.gz
+ ebegin "Unpacking from ${archive}"
+ tar -x -z -o --strip-components 1 \
+ -f "${DISTDIR}/${archive}" \
+ "${components[@]/#/llvm-project-${archive%.tar*}/}" || die
+ eend ${?}
fi
}