diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /eclass/llvm.org.eclass | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'eclass/llvm.org.eclass')
-rw-r--r-- | eclass/llvm.org.eclass | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index e532c953cb70..394df33df047 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -89,6 +89,11 @@ inherit multiprocessing # the manpages. If set to 'pregenerated', fetch and install # pregenerated manpages from the archive. +# @ECLASS-VARIABLE: LLVM_PATCHSET +# @DEFAULT_UNSET +# @DESCRIPTION: +# LLVM patchset version. No patchset is used if unset. + # == global scope logic == @@ -145,6 +150,11 @@ llvm.org_set_globals() { die "Invalid LLVM_MANPAGES=${LLVM_MANPAGES}" esac + if [[ -n ${LLVM_PATCHSET} ]]; then + SRC_URI+=" + https://dev.gentoo.org/~mgorny/dist/llvm/llvm-gentoo-patchset-${LLVM_PATCHSET}.tar.xz" + fi + # === useful defaults for cmake-based packages === # least intrusive of all @@ -192,6 +202,15 @@ llvm.org_src_unpack() { [[ ${x} != ${archive} ]] && unpack "${x}" done fi + + if [[ -n ${LLVM_PATCHSET} ]]; then + # strip patches that don't match current components + local IFS='|' + grep -E -r -L "^Gentoo-Component:.*(${components[*]})" \ + "${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" | + xargs rm + assert + fi } # @FUNCTION: llvm.org_src_prepare @@ -201,6 +220,13 @@ llvm.org_src_unpack() { # ${WORKDIR}, so that patches straight from llvm-project repository # work correctly with -p1. llvm.org_src_prepare() { + if [[ -n ${LLVM_PATCHSET} ]]; then + local PATCHES=( + "${PATCHES[@]}" + "${WORKDIR}/llvm-gentoo-patchset-${LLVM_PATCHSET}" + ) + fi + if declare -f cmake_src_prepare >/dev/null; then # cmake eclasses force ${S} for default_src_prepare # but use ${CMAKE_USE_DIR} for everything else |