dev-python/clang-python: Port to llvm.org eclass
authorMichał Górny <mgorny@gentoo.org>
Fri, 1 Nov 2019 17:43:03 +0000 (18:43 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 3 Nov 2019 11:46:16 +0000 (12:46 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/clang-python/clang-python-10.0.0.9999.ebuild
dev-python/clang-python/clang-python-9.0.0.ebuild
dev-python/clang-python/clang-python-9.0.1.9999.ebuild

index 24e14b038ecf9336ba6a3c714a3851f001355b74..3b6ab496dc3795b0a7d9b3262305a4274a0fe3d8 100644 (file)
@@ -4,13 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-inherit git-r3 python-r1
+inherit llvm.org python-r1
 
 DESCRIPTION="Python bindings for sys-devel/clang"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/clang/bindings/python
+LLVM_COMPONENTS=( clang/bindings/python )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -28,11 +27,6 @@ RDEPEND="
        ${PYTHON_DEPS}"
 DEPEND="${RDEPEND}"
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' clang/bindings/python
-}
-
 python_test() {
        "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
 }
index ad10831f6e2335ef1869727969e4956517312cdd..6796e58d1b113ffa72fd15872145e41fcf53f4ca 100644 (file)
@@ -4,13 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-inherit python-r1
+inherit llvm.org python-r1
 
-MY_P=cfe-${PV/_/}.src
 DESCRIPTION="Python bindings for sys-devel/clang"
 HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz"
-S=${WORKDIR}/${MY_P}/bindings/python
+LLVM_COMPONENTS=( clang/bindings/python )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -28,11 +27,6 @@ RDEPEND="
        ${PYTHON_DEPS}"
 DEPEND="${RDEPEND}"
 
-src_unpack() {
-       einfo "Unpacking parts of ${MY_P}.tar.xz ..."
-       tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/bindings/python" || die
-}
-
 python_test() {
        "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
 }
index 45d2a38e5e5906bf86187d1c2fe8cf020e2c36a5..3b6ab496dc3795b0a7d9b3262305a4274a0fe3d8 100644 (file)
@@ -4,14 +4,12 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
-inherit git-r3 python-r1
+inherit llvm.org python-r1
 
 DESCRIPTION="Python bindings for sys-devel/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/bindings/python
+LLVM_COMPONENTS=( clang/bindings/python )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0"
@@ -29,11 +27,6 @@ RDEPEND="
        ${PYTHON_DEPS}"
 DEPEND="${RDEPEND}"
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' clang/bindings/python
-}
-
 python_test() {
        "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
 }