diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-11-01 19:00:05 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-03 12:46:21 +0100 |
commit | b7712b100afd17c4ad829c65ddf700a06bd7c9f6 (patch) | |
tree | f2ad1a9bc7338ccba65fc268c2a4d6e1a34389be /sys-libs | |
parent | sys-libs/compiler-rt-sanitizers: Port to llvm.org eclass (diff) | |
download | gentoo-b7712b100afd17c4ad829c65ddf700a06bd7c9f6.tar.gz gentoo-b7712b100afd17c4ad829c65ddf700a06bd7c9f6.tar.bz2 gentoo-b7712b100afd17c4ad829c65ddf700a06bd7c9f6.zip |
sys-libs/llvm-libunwind: Port to llvm.org eclass
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-libs')
3 files changed, 23 insertions, 53 deletions
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild index 2edd3ca69fd1..29ee78399316 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-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="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" -S=${WORKDIR}/${P}/libunwind +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -29,13 +29,6 @@ BDEPEND=" # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -src_unpack() { - local dirs=( libunwind ) - use test && dirs+=( libcxx{,abi} ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } @@ -66,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/${P}/libcxx" + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi @@ -75,7 +68,7 @@ multilib_src_configure() { build_libcxxabi() { local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)" - local CMAKE_USE_DIR=${WORKDIR}/${P}/libcxxabi + local CMAKE_USE_DIR=${WORKDIR}/libcxxabi local BUILD_DIR=${BUILD_DIR}/libcxxabi local mycmakeargs=( -DLIBCXXABI_LIBDIR_SUFFIX= @@ -84,7 +77,7 @@ build_libcxxabi() { -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_INCLUDE_TESTS=OFF - -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}/${P}"/libcxx/include + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include ) @@ -94,7 +87,7 @@ build_libcxxabi() { build_libcxx() { local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -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= @@ -103,7 +96,7 @@ build_libcxx() { -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXX_CXX_ABI=libcxxabi - -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}/${P}"/libcxxabi/include + -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) -DLIBCXX_HAS_GCC_S_LIB=OFF diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild index 3cdeb8d20c26..373f7d8c03ae 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild @@ -4,19 +4,13 @@ EAPI=7 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-multilib llvm multiprocessing python-any-r1 - -MY_P=libunwind-${PV/_/}.src -LIBCXX_P=libcxx-${PV/_/}.src -LIBCXXABI_P=libcxxabi-${PV/_/}.src +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - test? ( - https://releases.llvm.org/${PV}/${LIBCXX_P}.tar.xz - https://releases.llvm.org/${PV}/${LIBCXXABI_P}.tar.xz )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -43,15 +37,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - default - - if use test; then - mv "${LIBCXX_P}" libcxx || die - mv "${LIBCXXABI_P}" libcxxabi || die - fi -} - multilib_src_configure() { local libdir=$(get_libdir) @@ -74,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild index 91a1c4334596..29ee78399316 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-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="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="" -EGIT_REPO_URI="https://github.com/llvm/llvm-project.git" -EGIT_BRANCH="release/9.x" -S=${WORKDIR}/${P}/libunwind +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -30,13 +29,6 @@ BDEPEND=" # least intrusive of all CMAKE_BUILD_TYPE=RelWithDebInfo -src_unpack() { - local dirs=( libunwind ) - use test && dirs+=( libcxx{,abi} ) - git-r3_fetch - git-r3_checkout '' '' '' "${dirs[@]}" -} - python_check_deps() { has_version "dev-python/lit[${PYTHON_USEDEP}]" } @@ -67,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/${P}/libcxx" + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi @@ -76,7 +68,7 @@ multilib_src_configure() { build_libcxxabi() { local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)" - local CMAKE_USE_DIR=${WORKDIR}/${P}/libcxxabi + local CMAKE_USE_DIR=${WORKDIR}/libcxxabi local BUILD_DIR=${BUILD_DIR}/libcxxabi local mycmakeargs=( -DLIBCXXABI_LIBDIR_SUFFIX= @@ -85,7 +77,7 @@ build_libcxxabi() { -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXXABI_INCLUDE_TESTS=OFF - -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}/${P}"/libcxx/include + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include ) @@ -95,7 +87,7 @@ build_libcxxabi() { build_libcxx() { local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -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= @@ -104,7 +96,7 @@ build_libcxx() { -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF -DLIBCXXABI_USE_LLVM_UNWINDER=ON -DLIBCXX_CXX_ABI=libcxxabi - -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}/${P}"/libcxxabi/include + -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) -DLIBCXX_HAS_GCC_S_LIB=OFF |