public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH 8/8] sys-devel/lld: Port 9+ to llvm.org.eclass
Date: Fri,  1 Nov 2019 18:39:27 +0100	[thread overview]
Message-ID: <20191101173927.146967-8-mgorny@gentoo.org> (raw)
In-Reply-To: <20191101173927.146967-1-mgorny@gentoo.org>

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 sys-devel/lld/lld-10.0.0.9999.ebuild | 17 +++++------------
 sys-devel/lld/lld-9.0.0.ebuild       | 23 ++++-------------------
 sys-devel/lld/lld-9.0.1.9999.ebuild  | 18 +++++-------------
 3 files changed, 14 insertions(+), 44 deletions(-)

diff --git a/sys-devel/lld/lld-10.0.0.9999.ebuild b/sys-devel/lld/lld-10.0.0.9999.ebuild
index c0a2e884c80d..0938eee4baad 100644
--- a/sys-devel/lld/lld-10.0.0.9999.ebuild
+++ b/sys-devel/lld/lld-10.0.0.9999.ebuild
@@ -8,13 +8,13 @@ EAPI=7
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 
-inherit cmake-utils git-r3 llvm multiprocessing python-any-r1
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1
 
 DESCRIPTION="The LLVM linker (link editor)"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/lld
+LLVM_COMPONENTS=( lld )
+LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -38,13 +38,6 @@ pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-	local dirs=( lld )
-	use test && dirs+=( llvm/utils/{lit,unittest} )
-	git-r3_fetch
-	git-r3_checkout '' '' '' "${dirs[@]}"
-}
-
 src_configure() {
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=OFF
@@ -53,7 +46,7 @@ src_configure() {
 	)
 	use test && mycmakeargs+=(
 		-DLLVM_BUILD_TESTS=ON
-		-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-devel/lld/lld-9.0.0.ebuild b/sys-devel/lld/lld-9.0.0.ebuild
index c938e81bb902..f411d28781d4 100644
--- a/sys-devel/lld/lld-9.0.0.ebuild
+++ b/sys-devel/lld/lld-9.0.0.ebuild
@@ -8,16 +8,13 @@ EAPI=7
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 
-inherit cmake-utils llvm multiprocessing python-any-r1
-
-MY_P=${P/_/}.src
-LLVM_P=llvm-${PV/_/}.src
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1
 
 DESCRIPTION="The LLVM linker (link editor)"
 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=( lld )
+LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -41,18 +38,6 @@ pkg_setup() {
 	use test && 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/{lit,unittest} || die
-		mv "${LLVM_P}" llvm || die
-	fi
-}
-
 src_configure() {
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=ON
diff --git a/sys-devel/lld/lld-9.0.1.9999.ebuild b/sys-devel/lld/lld-9.0.1.9999.ebuild
index 07ffc6f41c97..60ae216d4d6b 100644
--- a/sys-devel/lld/lld-9.0.1.9999.ebuild
+++ b/sys-devel/lld/lld-9.0.1.9999.ebuild
@@ -8,14 +8,13 @@ EAPI=7
 CMAKE_MIN_VERSION=3.7.0-r1
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
 
-inherit cmake-utils git-r3 llvm multiprocessing python-any-r1
+inherit cmake-utils llvm llvm.org multiprocessing python-any-r1
 
 DESCRIPTION="The LLVM linker (link editor)"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/lld
+LLVM_COMPONENTS=( lld )
+LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -39,13 +38,6 @@ pkg_setup() {
 	use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-	local dirs=( lld )
-	use test && dirs+=( llvm/utils/{lit,unittest} )
-	git-r3_fetch
-	git-r3_checkout '' '' '' "${dirs[@]}"
-}
-
 src_configure() {
 	local mycmakeargs=(
 		-DBUILD_SHARED_LIBS=ON
@@ -54,7 +46,7 @@ src_configure() {
 	)
 	use test && mycmakeargs+=(
 		-DLLVM_BUILD_TESTS=ON
-		-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)")}"
 	)
-- 
2.23.0



      parent reply	other threads:[~2019-11-01 17:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-01 17:39 [gentoo-dev] [PATCH 1/8] llvm.org.eclass: New eclass to help maintaining LLVM Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 2/8] sys-devel/llvm-common: Port 9+ to llvm.org.eclass Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 3/8] sys-devel/llvm: " Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 4/8] dev-ml/llvm-ocaml: " Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 5/8] dev-python/lit: " Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 6/8] sys-devel/clang-common: " Michał Górny
2019-11-01 17:39 ` [gentoo-dev] [PATCH 7/8] sys-devel/clang: " Michał Górny
2019-11-01 17:39 ` Michał Górny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191101173927.146967-8-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox