Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 5/8] dev-python/lit: Port 9+ to llvm.org.eclass
Date: Fri, 01 Nov 2019 17:41:26
Message-Id: 20191101173927.146967-5-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/8] llvm.org.eclass: New eclass to help maintaining LLVM by "Michał Górny"
Signed-off-by: Michał Górny <mgorny@g.o>
---
 dev-python/lit/lit-10.0.0.9999.ebuild | 12 +++---------
 dev-python/lit/lit-9.0.0.ebuild       | 12 +++---------
 dev-python/lit/lit-9.0.1.9999.ebuild  | 13 +++----------
 3 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/dev-python/lit/lit-10.0.0.9999.ebuild b/dev-python/lit/lit-10.0.0.9999.ebuild
index 05acb219e329..e051ca51410e 100644
--- a/dev-python/lit/lit-10.0.0.9999.ebuild
+++ b/dev-python/lit/lit-10.0.0.9999.ebuild
@@ -4,13 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-inherit distutils-r1 git-r3 multiprocessing
+inherit distutils-r1 llvm.org multiprocessing
 
 DESCRIPTION="A stand-alone install of the LLVM suite testing tool"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/llvm/utils/lit
+LLVM_COMPONENTS=( llvm/utils/lit )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -27,11 +26,6 @@ BDEPEND="
 
 # TODO: move the manpage generation here (from sys-devel/llvm)
 
-src_unpack() {
-	git-r3_fetch
-	git-r3_checkout '' '' '' llvm/utils/lit
-}
-
 python_test() {
 	local -x LIT_PRESERVES_TMP=1
 	./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \
diff --git a/dev-python/lit/lit-9.0.0.ebuild b/dev-python/lit/lit-9.0.0.ebuild
index 379734458ba5..cbc3d5b9e6dd 100644
--- a/dev-python/lit/lit-9.0.0.ebuild
+++ b/dev-python/lit/lit-9.0.0.ebuild
@@ -4,13 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-inherit distutils-r1 multiprocessing
+inherit distutils-r1 llvm.org multiprocessing
 
-MY_P=llvm-${PV/_/}.src
 DESCRIPTION="A stand-alone install of the LLVM suite testing tool"
 HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz"
-S=${WORKDIR}/${MY_P}/utils/lit
+LLVM_COMPONENTS=( llvm/utils/lit )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -27,11 +26,6 @@ BDEPEND="
 
 # TODO: move the manpage generation here (from sys-devel/llvm)
 
-src_unpack() {
-	einfo "Unpacking parts of ${MY_P}.tar.xz ..."
-	tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/lit" || die
-}
-
 python_test() {
 	local -x LIT_PRESERVES_TMP=1
 	./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \
diff --git a/dev-python/lit/lit-9.0.1.9999.ebuild b/dev-python/lit/lit-9.0.1.9999.ebuild
index ca1cce6c00b2..e051ca51410e 100644
--- a/dev-python/lit/lit-9.0.1.9999.ebuild
+++ b/dev-python/lit/lit-9.0.1.9999.ebuild
@@ -4,14 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
-inherit distutils-r1 git-r3 multiprocessing
+inherit distutils-r1 llvm.org multiprocessing
 
 DESCRIPTION="A stand-alone install of the LLVM suite testing tool"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/llvm/utils/lit
+LLVM_COMPONENTS=( llvm/utils/lit )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -28,11 +26,6 @@ BDEPEND="
 
 # TODO: move the manpage generation here (from sys-devel/llvm)
 
-src_unpack() {
-	git-r3_fetch
-	git-r3_checkout '' '' '' llvm/utils/lit
-}
-
 python_test() {
 	local -x LIT_PRESERVES_TMP=1
 	./lit.py -j "${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" \
-- 
2.23.0