diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-01 18:37:43 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-03 12:46:14 +0100 |
commit | 05f08a39526bfb5819027c592a786402784a355e (patch) | |
tree | 1d62c38b326c5c9e280df45010ac6d97709bb049 /sys-devel | |
parent | sys-devel/clang-common: Port 9+ to llvm.org.eclass (diff) | |
download | gentoo-05f08a39526bfb5819027c592a786402784a355e.tar.gz gentoo-05f08a39526bfb5819027c592a786402784a355e.tar.bz2 gentoo-05f08a39526bfb5819027c592a786402784a355e.zip |
sys-devel/clang: Port 9+ to llvm.org.eclass
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/clang-10.0.0.9999.ebuild | 28 | ||||
-rw-r--r-- | sys-devel/clang/clang-9.0.0.ebuild | 39 | ||||
-rw-r--r-- | sys-devel/clang/clang-9.0.1.9999.ebuild | 29 |
3 files changed, 40 insertions, 56 deletions
diff --git a/sys-devel/clang/clang-10.0.0.9999.ebuild b/sys-devel/clang/clang-10.0.0.9999.ebuild index 62dad5681721..6910230d08e5 100644 --- a/sys-devel/clang/clang-10.0.0.9999.ebuild +++ b/sys-devel/clang/clang-10.0.0.9999.ebuild @@ -4,15 +4,19 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ +inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} +) +llvm.org_set_globals # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/${P}/clang +S=${WORKDIR}/x/y/clang # Keep in sync with sys-devel/llvm ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR ) @@ -76,16 +80,10 @@ pkg_setup() { src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR - mkdir -p x || die - - local dirs=( clang clang-tools-extra ) - use test && dirs+=( - llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} - ) - git-r3_fetch - git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" - mv "${WORKDIR}/x/${P}/clang-tools-extra" \ - "${WORKDIR}/x/${P}/clang/tools/extra" || die + mkdir -p x/y || die + cd x/y || die + llvm.org_src_unpack + mv clang-tools-extra clang/tools/extra || die } check_distribution_components() { @@ -242,7 +240,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) diff --git a/sys-devel/clang/clang-9.0.0.ebuild b/sys-devel/clang/clang-9.0.0.ebuild index 9d3313fc33df..d6ca87c13d50 100644 --- a/sys-devel/clang/clang-9.0.0.ebuild +++ b/sys-devel/clang/clang-9.0.0.ebuild @@ -4,21 +4,21 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils llvm multilib-minimal multiprocessing \ +inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs -MY_P=cfe-${PV/_/}.src -EXTRA_P=clang-tools-extra-${PV/_/}.src -LLVM_P=llvm-${PV/_/}.src - DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - https://releases.llvm.org/${PV}/${EXTRA_P}.tar.xz - test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz ) +SRC_URI=" !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/llvm-${PV}-manpages.tar.bz2 )" +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} +) +llvm.org_set_globals # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/y/${MY_P} +S=${WORKDIR}/x/y/clang # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -94,24 +94,13 @@ src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR mkdir -p x/y || die cd x/y || die - - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die - einfo "Unpacking ${EXTRA_P}.tar.xz ..." - tar -xf "${DISTDIR}/${EXTRA_P}.tar.xz" || die - - mv "${EXTRA_P}" "${S}"/tools/extra || die - if use test; then - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ - "${LLVM_P}"/lib/Testing/Support \ - "${LLVM_P}"/utils/{lit,llvm-lit,unittest} || die - mv "${LLVM_P}" "${WORKDIR}"/llvm || die - fi + llvm.org_src_unpack + mv clang-tools-extra clang/tools/extra || die if ! use doc; then - einfo "Unpacking llvm-${PV}-manpages.tar.bz2 ..." + ebegin "Unpacking llvm-${PV}-manpages.tar.bz2" tar -xf "${DISTDIR}/llvm-${PV}-manpages.tar.bz2" || die + eend fi } @@ -146,7 +135,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) diff --git a/sys-devel/clang/clang-9.0.1.9999.ebuild b/sys-devel/clang/clang-9.0.1.9999.ebuild index 638896ff089a..1042dac71eef 100644 --- a/sys-devel/clang/clang-9.0.1.9999.ebuild +++ b/sys-devel/clang/clang-9.0.1.9999.ebuild @@ -4,16 +4,19 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-utils git-r3 llvm multilib-minimal multiprocessing \ +inherit cmake-utils llvm llvm.org multilib-minimal multiprocessing \ pax-utils python-single-r1 toolchain-funcs DESCRIPTION="C language family frontend for LLVM" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" -EGIT_BRANCH="release/9.x" +LLVM_COMPONENTS=( clang clang-tools-extra ) +LLVM_TEST_COMPONENTS=( + llvm/lib/Testing/Support + llvm/utils/{lit,llvm-lit,unittest} +) +llvm.org_set_globals # We need extra level of indirection for CLANG_RESOURCE_DIR -S=${WORKDIR}/x/${P}/clang +S=${WORKDIR}/x/y/clang # Keep in sync with sys-devel/llvm ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 @@ -84,16 +87,10 @@ pkg_setup() { src_unpack() { # create extra parent dir for CLANG_RESOURCE_DIR - mkdir -p x || die - - local dirs=( clang clang-tools-extra ) - use test && dirs+=( - llvm/lib/Testing/Support llvm/utils/{lit,llvm-lit,unittest} - ) - git-r3_fetch - git-r3_checkout "${EGIT_REPO_URI}" "${WORKDIR}/x/${P}" '' "${dirs[@]}" - mv "${WORKDIR}/x/${P}/clang-tools-extra" \ - "${WORKDIR}/x/${P}/clang/tools/extra" || die + mkdir -p x/y || die + cd x/y || die + llvm.org_src_unpack + mv clang-tools-extra clang/tools/extra || die } multilib_src_configure() { @@ -127,7 +124,7 @@ multilib_src_configure() { -DCLANG_ENABLE_STATIC_ANALYZER=$(usex static-analyzer) ) use test && mycmakeargs+=( - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/${P}/llvm" + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/x/y/llvm" -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" ) |