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

index cf08961e9c8b4769866f822a26cae29e051558e9..f5f67053d776095e26b129d0fb45fb0f26f5f6ce 100644 (file)
@@ -4,14 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 \
+inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
        toolchain-funcs
 
 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
 HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/libcxx
+LLVM_COMPONENTS=( libcxx )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
@@ -67,11 +66,6 @@ pkg_setup() {
        fi
 }
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' libcxx
-}
-
 test_compiler() {
        $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
                <<<'int main() { return 0; }' &>/dev/null
index a4208b8cb49d667d8a7eb6b41a90a32d7e03bcf5..76ae63ba35ad7e73efd18f7e3a0ade29af393ca0 100644 (file)
@@ -4,14 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-multilib llvm multiprocessing python-any-r1 \
+inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
        toolchain-funcs
 
-MY_P=${P}.src
 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
 HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz"
-S=${WORKDIR}/${MY_P}
+LLVM_COMPONENTS=( libcxx )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
index 4124a2fbf98467f22f3b681f49248f0a9236c67a..f5f67053d776095e26b129d0fb45fb0f26f5f6ce 100644 (file)
@@ -4,15 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 \
+inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \
        toolchain-funcs
 
 DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
 HOMEPAGE="https://libcxx.llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/libcxx
+LLVM_COMPONENTS=( libcxx )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
@@ -68,11 +66,6 @@ pkg_setup() {
        fi
 }
 
-src_unpack() {
-       git-r3_fetch
-       git-r3_checkout '' '' '' libcxx
-}
-
 test_compiler() {
        $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
                <<<'int main() { return 0; }' &>/dev/null