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

index fee62ad9c75acf3569c7eac5f4851e41a6ec56e0..1c0ee0530affeb9bc6961fb43c62ace6dd082f21 100644 (file)
@@ -4,14 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \
+inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \
        python-any-r1 toolchain-funcs
 
 DESCRIPTION="Compiler runtime library for clang (built-in part)"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/compiler-rt
+LLVM_COMPONENTS=( compiler-rt )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="$(ver_cut 1-3)"
@@ -45,11 +44,6 @@ pkg_setup() {
        python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' compiler-rt
-}
-
 test_compiler() {
        $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
                <<<'int main() { return 0; }' &>/dev/null
index 658306b72f46def6ee80dfd8d8bee6369c97029e..ed72a058928f81f3c14ba35f3a93125017323f49 100644 (file)
@@ -4,14 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-utils flag-o-matic llvm multiprocessing \
+inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \
        python-any-r1 toolchain-funcs
 
-MY_P=${P}.src
 DESCRIPTION="Compiler runtime library for clang (built-in part)"
 HOMEPAGE="https://llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz"
-S=${WORKDIR}/${MY_P}
+LLVM_COMPONENTS=( compiler-rt )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="$(ver_cut 1-3)"
index 1d00f77cdca7b2da3305b5819e2149087f144d95..1c0ee0530affeb9bc6961fb43c62ace6dd082f21 100644 (file)
@@ -4,15 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \
+inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \
        python-any-r1 toolchain-funcs
 
 DESCRIPTION="Compiler runtime library for clang (built-in part)"
 HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/compiler-rt
+LLVM_COMPONENTS=( compiler-rt )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="$(ver_cut 1-3)"
@@ -46,11 +44,6 @@ pkg_setup() {
        python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' compiler-rt
-}
-
 test_compiler() {
        $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
                <<<'int main() { return 0; }' &>/dev/null