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

index 894c6fce6355cf9aadf471516a53ae402b0d2738..df108a4e02377f65b374199f2caaaa3ba797f758 100644 (file)
@@ -4,13 +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
 
 DESCRIPTION="Low level support for a standard C++ library"
 HOMEPAGE="https://libcxxabi.llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-S=${WORKDIR}/${P}/libcxxabi
+# libcxx is needed uncondtionally for the headers
+LLVM_COMPONENTS=( libcxx{abi,} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
@@ -44,12 +44,6 @@ pkg_setup() {
        use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       git-r3_fetch
-       # we always need libcxx for the headers
-       git-r3_checkout '' '' '' libcxx{,abi}
-}
-
 multilib_src_configure() {
        local libdir=$(get_libdir)
        local mycmakeargs=(
@@ -59,7 +53,7 @@ multilib_src_configure() {
                -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
                -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
 
-               -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}/${P}"/libcxx/include
+               -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
                # upstream is omitting standard search path for this
                # probably because gcc & clang are bundling their own unwind.h
                -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
@@ -80,7 +74,7 @@ multilib_src_configure() {
 
 build_libcxx() {
        local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
-       local CMAKE_USE_DIR=${WORKDIR}/${P}/libcxx
+       local CMAKE_USE_DIR=${WORKDIR}/libcxx
        local BUILD_DIR=${BUILD_DIR}/libcxx
        local mycmakeargs=(
                -DLIBCXX_LIBDIR_SUFFIX=
index 61d4e760ed02ea1e317306e39a8cdae1b735c454..eb2960357792437c0d08a257bb7c52b8d5bbe08e 100644 (file)
@@ -4,16 +4,13 @@
 EAPI=7
 
 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-inherit cmake-multilib llvm multiprocessing python-any-r1
-
-MY_P=${P/_/}.src
-LIBCXX_P=libcxx-${PV/_/}.src
+inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1
 
 DESCRIPTION="Low level support for a standard C++ library"
 HOMEPAGE="https://libcxxabi.llvm.org/"
-SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz
-       https://releases.llvm.org/${PV}/${LIBCXX_P}.tar.xz"
-S=${WORKDIR}/${MY_P}
+# libcxx is needed uncondtionally for the headers
+LLVM_COMPONENTS=( libcxx{abi,} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
@@ -47,11 +44,6 @@ pkg_setup() {
        use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       default
-       mv "${LIBCXX_P}" libcxx || die
-}
-
 multilib_src_configure() {
        local libdir=$(get_libdir)
        local mycmakeargs=(
index 4874faaacc707908efa2dc1aae62e9ea18ebee73..df108a4e02377f65b374199f2caaaa3ba797f758 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
 
 DESCRIPTION="Low level support for a standard C++ library"
 HOMEPAGE="https://libcxxabi.llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/llvm/llvm-project.git"
-EGIT_BRANCH="release/9.x"
-S=${WORKDIR}/${P}/libcxxabi
+# libcxx is needed uncondtionally for the headers
+LLVM_COMPONENTS=( libcxx{abi,} )
+llvm.org_set_globals
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="0"
@@ -45,12 +44,6 @@ pkg_setup() {
        use test && python-any-r1_pkg_setup
 }
 
-src_unpack() {
-       git-r3_fetch
-       # we always need libcxx for the headers
-       git-r3_checkout '' '' '' libcxx{,abi}
-}
-
 multilib_src_configure() {
        local libdir=$(get_libdir)
        local mycmakeargs=(
@@ -60,7 +53,7 @@ multilib_src_configure() {
                -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
                -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
 
-               -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}/${P}"/libcxx/include
+               -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
                # upstream is omitting standard search path for this
                # probably because gcc & clang are bundling their own unwind.h
                -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
@@ -81,7 +74,7 @@ multilib_src_configure() {
 
 build_libcxx() {
        local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
-       local CMAKE_USE_DIR=${WORKDIR}/${P}/libcxx
+       local CMAKE_USE_DIR=${WORKDIR}/libcxx
        local BUILD_DIR=${BUILD_DIR}/libcxx
        local mycmakeargs=(
                -DLIBCXX_LIBDIR_SUFFIX=