From 6e356edde093fb3589ab7a5859685e85c2873ab0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 16 Sep 2022 17:15:17 +0100 Subject: gentoo auto-resync : 16:09:2022 - 17:15:17 --- eclass/Manifest.gz | Bin 37139 -> 37138 bytes eclass/llvm.org.eclass | 152 ++++++++++++++++++++++++++++++------------------- 2 files changed, 95 insertions(+), 57 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 7a8302689a45..056adb0ae65e 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index 578077f67ed5..527b4fca0a9f 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -56,13 +56,28 @@ _LLVM_NEWEST_MANPAGE_RELEASE=15.0.0 # @ECLASS_VARIABLE: _LLVM_SOURCE_TYPE # @INTERNAL # @DESCRIPTION: -# Source type to use: 'git' or 'tar'. +# Source type to use: 'git', 'tar' or 'snapshot'. if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then - if [[ ${PV} == *.9999 ]]; then - _LLVM_SOURCE_TYPE=git - else - _LLVM_SOURCE_TYPE=tar - fi + case ${PV} in + *.9999) + _LLVM_SOURCE_TYPE=git + ;; + *_pre*) + _LLVM_SOURCE_TYPE=snapshot + + case ${PV} in + 16.0.0_pre20220915) + EGIT_COMMIT=02a27b38909edc46c41732f79a837c95c9992d5a + ;; + *) + die "Unknown snapshot: ${PV}" + ;; + esac + ;; + *) + _LLVM_SOURCE_TYPE=tar + ;; + esac fi [[ ${_LLVM_SOURCE_TYPE} == git ]] && inherit git-r3 @@ -193,33 +208,42 @@ llvm.org_set_globals() { fi fi - if [[ ${_LLVM_SOURCE_TYPE} == git ]]; then - EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" + case ${_LLVM_SOURCE_TYPE} in + git) + EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" - [[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] && - EGIT_BRANCH="release/${PV%%.*}.x" - elif [[ ${_LLVM_SOURCE_TYPE} == tar ]]; then - 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 - verify-sig? ( - https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV/_/-}/llvm-project-${PV/_/}.src.tar.xz.sig - ) - " - BDEPEND+=" - verify-sig? ( - >=sec-keys/openpgp-keys-llvm-15 - ) - " - VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/llvm.asc - else + [[ ${PV} != ${_LLVM_MASTER_MAJOR}.* ]] && + EGIT_BRANCH="release/${PV%%.*}.x" + ;; + tar) + 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 + verify-sig? ( + https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV/_/-}/llvm-project-${PV/_/}.src.tar.xz.sig + ) + " + BDEPEND+=" + verify-sig? ( + >=sec-keys/openpgp-keys-llvm-15 + ) + " + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/llvm.asc + else + SRC_URI+=" + https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz + " + fi + ;; + snapshot) SRC_URI+=" - https://github.com/llvm/llvm-project/archive/llvmorg-${PV/_/-}.tar.gz + https://github.com/llvm/llvm-project/archive/${EGIT_COMMIT}.tar.gz + -> llvm-project-${EGIT_COMMIT}.tar.gz " - fi - else - die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" - fi + ;; + *) + die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" + esac S=${WORKDIR}/${LLVM_COMPONENTS[0]} @@ -295,38 +319,52 @@ llvm.org_src_unpack() { components+=( "${LLVM_TEST_COMPONENTS[@]}" ) fi - if [[ ${_LLVM_SOURCE_TYPE} == git ]]; then - git-r3_fetch - git-r3_checkout '' . '' "${components[@]}" - 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 - if use verify-sig; then - verify-sig_verify_detached \ - "${DISTDIR}/${archive}" "${DISTDIR}/${archive}.sig" + local archive= + case ${_LLVM_SOURCE_TYPE} in + git) + git-r3_fetch + git-r3_checkout '' . '' "${components[@]}" + ;; + tar) + archive=llvmorg-${PV/_/-}.tar.gz + if ver_test -ge 14.0.5; then + archive=llvm-project-${PV/_/}.src.tar.xz + if use verify-sig; then + verify-sig_verify_detached \ + "${DISTDIR}/${archive}" "${DISTDIR}/${archive}.sig" + fi fi - fi - ebegin "Unpacking from ${archive}" - if ver_test -ge 14.0.5; then - tar -x -J -o --strip-components 1 \ - -f "${DISTDIR}/${archive}" \ - "${components[@]/#/${archive%.tar*}/}" || die - else + ebegin "Unpacking from ${archive}" + 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 ${?} + ;; + snapshot) + archive=llvm-project-${EGIT_COMMIT}.tar.gz + ebegin "Unpacking from ${archive}" tar -x -z -o --strip-components 1 \ -f "${DISTDIR}/${archive}" \ - "${components[@]/#/llvm-project-${archive%.tar*}/}" || die - fi - eend ${?} + "${components[@]/#/${archive%.tar*}/}" || die + eend ${?} + ;; + *) + die "Invalid _LLVM_SOURCE_TYPE: ${LLVM_SOURCE_TYPE}" + ;; + esac - # unpack all remaining distfiles - local x - for x in ${A}; do - [[ ${x} != ${archive} ]] && unpack "${x}" - done - fi + # unpack all remaining distfiles + local x + for x in ${A}; do + [[ ${x} != ${archive} ]] && unpack "${x}" + done if [[ -n ${LLVM_PATCHSET} ]]; then local nocomp=$(grep -r -L "^Gentoo-Component:" \ -- cgit v1.2.3