From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A079A138334 for ; Fri, 1 Nov 2019 17:41:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41BF6E08A4; Fri, 1 Nov 2019 17:40:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D4F9DE0880 for ; Fri, 1 Nov 2019 17:40:20 +0000 (UTC) Received: from localhost.localdomain (c134-66.icpnet.pl [85.221.134.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 5233534C675; Fri, 1 Nov 2019 17:40:05 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 7/8] sys-devel/clang: Port 9+ to llvm.org.eclass Date: Fri, 1 Nov 2019 18:39:26 +0100 Message-Id: <20191101173927.146967-7-mgorny@gentoo.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191101173927.146967-1-mgorny@gentoo.org> References: <20191101173927.146967-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: ace2e16e-72ee-43af-9996-fead73783337 X-Archives-Hash: 138d29ed089cf71363c5555c9cc4b2c0 Signed-off-by: Michał Górny --- sys-devel/clang/clang-10.0.0.9999.ebuild | 28 ++++++++--------- sys-devel/clang/clang-9.0.0.ebuild | 39 +++++++++--------------- 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 7213d45d1617..6ea6bad77fa5 100644 --- a/sys-devel/clang/clang-10.0.0.9999.ebuild +++ b/sys-devel/clang/clang-10.0.0.9999.ebuild @@ -8,15 +8,19 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 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 ) @@ -80,16 +84,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() { @@ -246,7 +244,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 2eabbee087ce..a91cefda2459 100644 --- a/sys-devel/clang/clang-9.0.0.ebuild +++ b/sys-devel/clang/clang-9.0.0.ebuild @@ -8,21 +8,21 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 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 @@ -98,24 +98,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 } @@ -150,7 +139,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 788ba009941a..f681871f2015 100644 --- a/sys-devel/clang/clang-9.0.1.9999.ebuild +++ b/sys-devel/clang/clang-9.0.1.9999.ebuild @@ -8,16 +8,19 @@ EAPI=7 CMAKE_MIN_VERSION=3.7.0-r1 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 @@ -88,16 +91,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() { @@ -131,7 +128,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)")}" ) -- 2.23.0