summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-06-11 10:35:27 +0200
committerMichał Górny <mgorny@gentoo.org>2022-06-11 13:07:00 +0200
commit8f2b809efdd701d2a7929b77a9c5f91ff71923a7 (patch)
tree71911287cc535e9a32d8dd8d3de5ac9341a626d7 /eclass/llvm.org.eclass
parentsys-devel/clang: Replace obsolete LLVM_MANPAGES value (diff)
downloadgentoo-8f2b809efdd701d2a7929b77a9c5f91ff71923a7.tar.gz
gentoo-8f2b809efdd701d2a7929b77a9c5f91ff71923a7.tar.bz2
gentoo-8f2b809efdd701d2a7929b77a9c5f91ff71923a7.zip
llvm.org.eclass: Switch to upstream tarballs in 14.0.5+
Switch from the autogenerated GitHub tarballs to the official tarballs published upstream. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/llvm.org.eclass')
-rw-r--r--eclass/llvm.org.eclass27
1 files changed, 22 insertions, 5 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 8b37ca73dbc4..a6f9ca3084e2 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -193,8 +193,15 @@ llvm.org_set_globals() {
[[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] &&
EGIT_BRANCH="release/${PV%%.*}.x"
elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then
- SRC_URI+="
- https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz"
+ if ver_test -ge 14.0.5; then
+ SRC_URI+="
+ https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/llvm-project-${PV}.src.tar.xz
+ "
+ else
+ SRC_URI+="
+ https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz
+ "
+ fi
else
die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}"
fi
@@ -281,10 +288,20 @@ llvm.org_src_unpack() {
default_src_unpack
else
local archive=llvmorg-${PV/_/-}.tar.gz
+ if ver_test -ge 14.0.5; then
+ archive=llvm-project-${PV/_/-}.src.tar.xz
+ fi
+
ebegin "Unpacking from ${archive}"
- tar -x -z -o --strip-components 1 \
- -f "${DISTDIR}/${archive}" \
- "${components[@]/#/llvm-project-${archive%.tar*}/}" || die
+ if ver_test -ge 14.0.5; then
+ tar -x -J -o --strip-components 1 \
+ -f "${DISTDIR}/${archive}" \
+ "${components[@]/#/${archive%.tar*}/}" || die
+ else
+ tar -x -z -o --strip-components 1 \
+ -f "${DISTDIR}/${archive}" \
+ "${components[@]/#/llvm-project-${archive%.tar*}/}" || die
+ fi
eend ${?}
# unpack all remaining distfiles