From: Michał Górny Date: Fri, 1 Nov 2019 17:58:06 +0000 (+0100) Subject: sys-libs/compiler-rt-sanitizers: Port to llvm.org eclass X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41996de1ef92803e84cad80c05f1fc547d1cf0e4;p=gentoo.git sys-libs/compiler-rt-sanitizers: Port to llvm.org eclass Signed-off-by: Michał Górny --- diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild index 1cc96771caec..85a0884b7a92 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild @@ -4,14 +4,14 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" -S=${WORKDIR}/${P}/compiler-rt +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -55,13 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - local dirs=( compiler-rt ) - use test && dirs+=( llvm/lib/Testing/Support llvm/utils/unittest ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - src_prepare() { cmake-utils_src_prepare @@ -76,7 +69,7 @@ src_prepare() { src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang @@ -101,7 +94,7 @@ src_configure() { ) if use test; then mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild index 9ee7e14a6b3f..1ced0d080379 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild @@ -4,17 +4,14 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit check-reqs cmake-utils flag-o-matic llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 -MY_P=compiler-rt-${PV/_/}.src -LLVM_P=llvm-${PV/_/}.src - DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -58,18 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die - - if use test; then - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ - "${LLVM_P}"/utils/unittest || die - mv "${LLVM_P}" llvm || die - fi -} - src_prepare() { cmake-utils_src_prepare @@ -84,7 +69,7 @@ src_prepare() { src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild index 832207f6714e..f28bb313413d 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild @@ -4,15 +4,14 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/compiler-rt +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -56,13 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - local dirs=( compiler-rt ) - use test && dirs+=( llvm/utils/unittest ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - src_prepare() { cmake-utils_src_prepare @@ -77,7 +69,7 @@ src_prepare() { src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}/compiler-rt_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang @@ -102,7 +94,7 @@ src_configure() { ) if use test; then mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"