diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-04-27 10:57:11 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-04-27 14:26:51 +0200 |
commit | 1d7d652a512ef2e9a775f4d80ab267f953a85787 (patch) | |
tree | 68309e8397d368841b6537f97b99f0b113317777 /eclass | |
parent | llvm.org.eclass: Revert "add sam to distfile paths" (diff) | |
download | gentoo-1d7d652a512ef2e9a775f4d80ab267f953a85787.tar.gz gentoo-1d7d652a512ef2e9a775f4d80ab267f953a85787.tar.bz2 gentoo-1d7d652a512ef2e9a775f4d80ab267f953a85787.zip |
llvm.org.eclass: Update cmake calls for EAPI 8
Update the cmake calls to account for eclass changes in EAPI 8, that is:
- src_prepare() now works in the current directory rather than ${S}
- CMAKE_USE_DIR defaults to the current directory
Make sure to call cmake_src_prepare in the current directory, and set
CMAKE_USE_DIR early.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/llvm.org.eclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass index fa23782cc244..23393039fb58 100644 --- a/eclass/llvm.org.eclass +++ b/eclass/llvm.org.eclass @@ -321,17 +321,19 @@ llvm.org_src_prepare() { ) fi + pushd "${WORKDIR}" >/dev/null || die 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 - CMAKE_USE_DIR=${S} \ - S=${WORKDIR} \ + CMAKE_USE_DIR=${S} + if [[ ${EAPI} == 7 ]]; then + # cmake eclasses force ${S} for default_src_prepare in EAPI 7 + # but use ${CMAKE_USE_DIR} for everything else + local S=${WORKDIR} + fi cmake_src_prepare else - pushd "${WORKDIR}" >/dev/null || die default_src_prepare - popd >/dev/null || die fi + popd >/dev/null || die } |