From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0B54C138334 for ; Sat, 23 Nov 2019 07:58:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B2C6E081A; Sat, 23 Nov 2019 07:58:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9C0E6E0805 for ; Sat, 23 Nov 2019 07:58:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 45EE834D258 for ; Sat, 23 Nov 2019 07:58:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 933E95FF for ; Sat, 23 Nov 2019 07:58:25 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1574494950.f8e669b811c76e3754fe8dc22094bcf0998f78e7.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/llvm.org.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: f8e669b811c76e3754fe8dc22094bcf0998f78e7 X-VCS-Branch: master Date: Sat, 23 Nov 2019 07:58:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d9395473-cdea-4286-b2e7-f561e0f583d3 X-Archives-Hash: 726a9c97fa1ba69e8eac33465c262e28 commit: f8e669b811c76e3754fe8dc22094bcf0998f78e7 Author: Michał Górny gentoo org> AuthorDate: Sat Nov 23 07:42:30 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Nov 23 07:42:30 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8e669b8 llvm.org.eclass: Support 9.0.1+ RCs Signed-off-by: Michał Górny gentoo.org> eclass/llvm.org.eclass | 77 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 28 deletions(-) diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index 5a704c1d980..f07441e863c 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -124,12 +124,18 @@ llvm.org_set_globals() { [[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] && EGIT_BRANCH="release/${PV%%.*}.x" elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then - local a archives=() - _llvm.org_get_archives "${LLVM_COMPONENTS[@]}" - for a in "${archives[@]}"; do - SRC_URI+=" - https://releases.llvm.org/${PV}/${a}" - done + 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 else die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" fi @@ -141,17 +147,23 @@ llvm.org_set_globals() { RESTRICT+=" !test? ( test )" if [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then - SRC_URI+=" - test? (" - - _llvm.org_get_archives "${LLVM_TEST_COMPONENTS[@]}" - for a in "${archives[@]}"; do + if ver_test -ge 9.0.1_rc1; then + # everything already fetched + : + else + # split 9.0.0 release and older SRC_URI+=" - https://releases.llvm.org/${PV}/${a}" - done + test? (" + + _llvm.org_get_archives "${LLVM_TEST_COMPONENTS[@]}" + for a in "${archives[@]}"; do + SRC_URI+=" + https://releases.llvm.org/${PV}/${a}" + done - SRC_URI+=" - )" + SRC_URI+=" + )" + fi fi fi @@ -180,19 +192,28 @@ llvm.org_src_unpack() { git-r3_fetch git-r3_checkout '' . '' "${components[@]}" 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 + 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 - done + 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 fi }