summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-20 15:52:30 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-20 18:32:36 +0200
commite165e4831a057c0eb2a3482e169096a16ef0563f (patch)
tree241e0866df5f7e31d21c53fc136bc82eb29255b4 /sys-devel/clang
parentsys-devel/clang: Apply patches in WORKDIR in 10.0.1+ (diff)
downloadgentoo-e165e4831a057c0eb2a3482e169096a16ef0563f.tar.gz
gentoo-e165e4831a057c0eb2a3482e169096a16ef0563f.tar.bz2
gentoo-e165e4831a057c0eb2a3482e169096a16ef0563f.zip
sys-devel/clang: Port to cmake.eclass
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/clang-10.0.1.9999.ebuild29
-rw-r--r--sys-devel/clang/clang-10.0.1_rc1.ebuild29
-rw-r--r--sys-devel/clang/clang-11.0.0.9999.ebuild29
3 files changed, 36 insertions, 51 deletions
diff --git a/sys-devel/clang/clang-10.0.1.9999.ebuild b/sys-devel/clang/clang-10.0.1.9999.ebuild
index 4d77354a2fb..35b1e3c80f8 100644
--- a/sys-devel/clang/clang-10.0.1.9999.ebuild
+++ b/sys-devel/clang/clang-10.0.1.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \
+inherit cmake llvm llvm.org multilib-minimal multiprocessing \
pax-utils python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
@@ -15,8 +15,6 @@ LLVM_TEST_COMPONENTS=(
llvm/utils/{lit,llvm-lit,unittest}
)
llvm.org_set_globals
-# We need extra level of indirection for CLANG_RESOURCE_DIR
-S=${WORKDIR}/x/y/clang
# Keep in sync with sys-devel/llvm
ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR VE )
@@ -82,18 +80,15 @@ pkg_setup() {
python-single-r1_pkg_setup
}
-src_unpack() {
- # create extra parent dir for CLANG_RESOURCE_DIR
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
mkdir -p x/y || die
- cd x/y || die
- llvm.org_src_unpack
-}
+ BUILD_DIR=${WORKDIR}/x/y/clang
-src_prepare() {
# cmake eclasses suck by forcing ${S} here
CMAKE_USE_DIR=${S} \
- S=${WORKDIR}/x/y \
- cmake-utils_src_prepare
+ S=${WORKDIR} \
+ cmake_src_prepare
mv ../clang-tools-extra tools/extra || die
}
@@ -263,7 +258,7 @@ multilib_src_configure() {
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
)
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm"
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
)
@@ -302,13 +297,13 @@ multilib_src_configure() {
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake-utils_src_configure
+ cmake_src_configure
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake-utils_src_compile
+ cmake_src_compile
# provide a symlink for tests
if [[ ! -L ${WORKDIR}/lib/clang ]]; then
@@ -320,9 +315,9 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check-clang
+ cmake_build check-clang
multilib_is_native_abi &&
- cmake-utils_src_make check-clang-tools check-clangd
+ cmake_build check-clang-tools check-clangd
}
src_install() {
@@ -378,7 +373,7 @@ src_install() {
}
multilib_src_install() {
- DESTDIR=${D} cmake-utils_src_make install-distribution
+ DESTDIR=${D} cmake_build install-distribution
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
diff --git a/sys-devel/clang/clang-10.0.1_rc1.ebuild b/sys-devel/clang/clang-10.0.1_rc1.ebuild
index 236ee02bcaa..e5ba300d6bc 100644
--- a/sys-devel/clang/clang-10.0.1_rc1.ebuild
+++ b/sys-devel/clang/clang-10.0.1_rc1.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \
+inherit cmake llvm llvm.org multilib-minimal multiprocessing \
pax-utils python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
@@ -15,8 +15,6 @@ LLVM_TEST_COMPONENTS=(
llvm/utils/{lit,llvm-lit,unittest}
)
llvm.org_set_globals
-# We need extra level of indirection for CLANG_RESOURCE_DIR
-S=${WORKDIR}/x/y/clang
# Keep in sync with sys-devel/llvm
ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR )
@@ -82,18 +80,15 @@ pkg_setup() {
python-single-r1_pkg_setup
}
-src_unpack() {
- # create extra parent dir for CLANG_RESOURCE_DIR
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
mkdir -p x/y || die
- cd x/y || die
- llvm.org_src_unpack
-}
+ BUILD_DIR=${WORKDIR}/x/y/clang
-src_prepare() {
# cmake eclasses suck by forcing ${S} here
CMAKE_USE_DIR=${S} \
- S=${WORKDIR}/x/y \
- cmake-utils_src_prepare
+ S=${WORKDIR} \
+ cmake_src_prepare
mv ../clang-tools-extra tools/extra || die
}
@@ -263,7 +258,7 @@ multilib_src_configure() {
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
)
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm"
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
)
@@ -302,13 +297,13 @@ multilib_src_configure() {
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake-utils_src_configure
+ cmake_src_configure
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake-utils_src_compile
+ cmake_src_compile
# provide a symlink for tests
if [[ ! -L ${WORKDIR}/lib/clang ]]; then
@@ -320,9 +315,9 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check-clang
+ cmake_build check-clang
multilib_is_native_abi &&
- cmake-utils_src_make check-clang-tools check-clangd
+ cmake_build check-clang-tools check-clangd
}
src_install() {
@@ -378,7 +373,7 @@ src_install() {
}
multilib_src_install() {
- DESTDIR=${D} cmake-utils_src_make install-distribution
+ DESTDIR=${D} cmake_build install-distribution
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)
diff --git a/sys-devel/clang/clang-11.0.0.9999.ebuild b/sys-devel/clang/clang-11.0.0.9999.ebuild
index 5144a9d24d8..e17ea14c517 100644
--- a/sys-devel/clang/clang-11.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-11.0.0.9999.ebuild
@@ -4,7 +4,7 @@
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
-inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \
+inherit cmake llvm llvm.org multilib-minimal multiprocessing \
pax-utils python-single-r1 toolchain-funcs
DESCRIPTION="C language family frontend for LLVM"
@@ -16,8 +16,6 @@ LLVM_TEST_COMPONENTS=(
llvm/utils/{UpdateTestChecks,update_cc_test_checks.py}
)
llvm.org_set_globals
-# We need extra level of indirection for CLANG_RESOURCE_DIR
-S=${WORKDIR}/x/y/clang
# Keep in sync with sys-devel/llvm
ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
@@ -77,18 +75,15 @@ pkg_setup() {
python-single-r1_pkg_setup
}
-src_unpack() {
- # create extra parent dir for CLANG_RESOURCE_DIR
+src_prepare() {
+ # create extra parent dir for relative CLANG_RESOURCE_DIR access
mkdir -p x/y || die
- cd x/y || die
- llvm.org_src_unpack
-}
+ BUILD_DIR=${WORKDIR}/x/y/clang
-src_prepare() {
# cmake eclasses suck by forcing ${S} here
CMAKE_USE_DIR=${S} \
- S=${WORKDIR}/x/y \
- cmake-utils_src_prepare
+ S=${WORKDIR} \
+ cmake_src_prepare
mv ../clang-tools-extra tools/extra || die
}
@@ -258,7 +253,7 @@ multilib_src_configure() {
-DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer)
)
use test && mycmakeargs+=(
- -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm"
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
)
@@ -297,13 +292,13 @@ multilib_src_configure() {
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake-utils_src_configure
+ cmake_src_configure
multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake-utils_src_compile
+ cmake_src_compile
# provide a symlink for tests
if [[ ! -L ${WORKDIR}/lib/clang ]]; then
@@ -315,9 +310,9 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check-clang
+ cmake_build check-clang
multilib_is_native_abi &&
- cmake-utils_src_make check-clang-tools check-clangd
+ cmake_build check-clang-tools check-clangd
}
src_install() {
@@ -373,7 +368,7 @@ src_install() {
}
multilib_src_install() {
- DESTDIR=${D} cmake-utils_src_make install-distribution
+ DESTDIR=${D} cmake_build install-distribution
# move headers to /usr/include for wrapping & ABI mismatch checks
# (also drop the version suffix from runtime headers)