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 6/8] sys-devel/clang-common: Port 9+ to llvm.org.eclass
Date: Fri, 01 Nov 2019 17:41:45
Message-Id: 20191101173927.146967-6-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>
---
 .../clang-common-10.0.0.9999.ebuild           | 19 +++++-------------
 .../clang-common/clang-common-9.0.0.ebuild    | 19 +++++-------------
 .../clang-common-9.0.1.9999.ebuild            | 20 +++++--------------
 3 files changed, 15 insertions(+), 43 deletions(-)

diff --git a/sys-devel/clang-common/clang-common-10.0.0.9999.ebuild b/sys-devel/clang-common/clang-common-10.0.0.9999.ebuild
index 6b707e3d41ff..d1bfe71d2f80 100644
--- a/sys-devel/clang-common/clang-common-10.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-10.0.0.9999.ebuild
@@ -3,13 +3,13 @@
 
 EAPI=7
 
-inherit bash-completion-r1 git-r3
+inherit bash-completion-r1 llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of clang"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/clang
+LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
+llvm.org_set_globals
+S=${WORKDIR}/clang/utils
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -18,15 +18,6 @@ IUSE=""
 
 PDEPEND="sys-devel/clang:*"
 
-src_unpack() {
-	git-r3_fetch
-	git-r3_checkout '' '' '' clang/utils/bash-autocomplete.sh
-}
-
-src_configure() { :; }
-src_compile() { :; }
-src_test() { :; }
-
 src_install() {
-	newbashcomp utils/bash-autocomplete.sh clang
+	newbashcomp bash-autocomplete.sh clang
 }
diff --git a/sys-devel/clang-common/clang-common-9.0.0.ebuild b/sys-devel/clang-common/clang-common-9.0.0.ebuild
index 609bdcde4cc0..3fc7a056a923 100644
--- a/sys-devel/clang-common/clang-common-9.0.0.ebuild
+++ b/sys-devel/clang-common/clang-common-9.0.0.ebuild
@@ -3,13 +3,13 @@
 
 EAPI=7
 
-inherit bash-completion-r1
+inherit bash-completion-r1 llvm.org
 
-MY_P=cfe-${PV/_/}.src
 DESCRIPTION="Common files shared between multiple slots of clang"
 HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz"
-S=${WORKDIR}/${MY_P}
+LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
+llvm.org_set_globals
+S=${WORKDIR}/clang/utils
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -18,15 +18,6 @@ IUSE=""
 
 PDEPEND="sys-devel/clang:*"
 
-src_unpack() {
-	einfo "Unpacking parts of ${MY_P}.tar.xz ..."
-	tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/utils/bash-autocomplete.sh" || die
-}
-
-src_configure() { :; }
-src_compile() { :; }
-src_test() { :; }
-
 src_install() {
-	newbashcomp utils/bash-autocomplete.sh clang
+	newbashcomp bash-autocomplete.sh clang
 }
diff --git a/sys-devel/clang-common/clang-common-9.0.1.9999.ebuild b/sys-devel/clang-common/clang-common-9.0.1.9999.ebuild
index eecb0ff749dc..d1bfe71d2f80 100644
--- a/sys-devel/clang-common/clang-common-9.0.1.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-9.0.1.9999.ebuild
@@ -3,14 +3,13 @@
 
 EAPI=7
 
-inherit bash-completion-r1 git-r3
+inherit bash-completion-r1 llvm.org
 
 DESCRIPTION="Common files shared between multiple slots of clang"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/clang
+LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
+llvm.org_set_globals
+S=${WORKDIR}/clang/utils
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -19,15 +18,6 @@ IUSE=""
 
 PDEPEND="sys-devel/clang:*"
 
-src_unpack() {
-	git-r3_fetch
-	git-r3_checkout '' '' '' clang/utils/bash-autocomplete.sh
-}
-
-src_configure() { :; }
-src_compile() { :; }
-src_test() { :; }
-
 src_install() {
-	newbashcomp utils/bash-autocomplete.sh clang
+	newbashcomp bash-autocomplete.sh clang
 }
-- 
2.23.0