From b71fbcbd46a4de00681f63c61c1b35620432c4e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 1 Nov 2019 19:01:57 +0100 Subject: [PATCH] sys-libs/libcxxabi: Port to llvm.org eclass MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../libcxxabi/libcxxabi-10.0.0.9999.ebuild | 18 ++++++------------ sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild | 16 ++++------------ .../libcxxabi/libcxxabi-9.0.1.9999.ebuild | 19 ++++++------------- 3 files changed, 16 insertions(+), 37 deletions(-) diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild index 894c6fce6355..df108a4e0237 100644 --- a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild @@ -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= diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild index 61d4e760ed02..eb2960357792 100644 --- a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild @@ -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=( diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild index 4874faaacc70..df108a4e0237 100644 --- a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild @@ -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= -- 2.26.2