Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxxabi/
Date: Wed, 03 Jan 2018 22:22:35
Message-Id: 1515018102.f5a7de0289a86ef047f4214572fd951c27f2ac51.mgorny@gentoo
1 commit: f5a7de0289a86ef047f4214572fd951c27f2ac51
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 3 21:27:27 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 3 22:21:42 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5a7de02
7
8 sys-libs/libcxxabi: Add a live ebuild for 6.0 branch
9
10 sys-libs/libcxxabi/libcxxabi-6.0.9999.ebuild | 98 ++++++++++++++++++++++++++++
11 1 file changed, 98 insertions(+)
12
13 diff --git a/sys-libs/libcxxabi/libcxxabi-6.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-6.0.9999.ebuild
14 new file mode 100644
15 index 00000000000..8af1083737b
16 --- /dev/null
17 +++ b/sys-libs/libcxxabi/libcxxabi-6.0.9999.ebuild
18 @@ -0,0 +1,98 @@
19 +# Copyright 1999-2018 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
25 +# (needed due to CMAKE_BUILD_TYPE != Gentoo)
26 +CMAKE_MIN_VERSION=3.7.0-r1
27 +PYTHON_COMPAT=( python2_7 )
28 +
29 +inherit cmake-multilib git-r3 llvm python-any-r1
30 +
31 +DESCRIPTION="Low level support for a standard C++ library"
32 +HOMEPAGE="https://libcxxabi.llvm.org/"
33 +SRC_URI=""
34 +EGIT_REPO_URI="https://git.llvm.org/git/libcxxabi.git
35 + https://github.com/llvm-mirror/libcxxabi.git"
36 +EGIT_BRANCH="release_60"
37 +
38 +LICENSE="|| ( UoI-NCSA MIT )"
39 +SLOT="0"
40 +KEYWORDS=""
41 +IUSE="+libunwind +static-libs test"
42 +RESTRICT="!test? ( test )"
43 +
44 +RDEPEND="
45 + libunwind? (
46 + || (
47 + >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
48 + >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
49 + )
50 + )"
51 +# LLVM 4 required for llvm-config --cmakedir
52 +DEPEND="${RDEPEND}
53 + >=sys-devel/llvm-4
54 + test? ( >=sys-devel/clang-3.9.0
55 + ~sys-libs/libcxx-${PV}[libcxxabi(-)]
56 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
57 +
58 +# least intrusive of all
59 +CMAKE_BUILD_TYPE=RelWithDebInfo
60 +
61 +python_check_deps() {
62 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
63 +}
64 +
65 +pkg_setup() {
66 + llvm_pkg_setup
67 + use test && python-any-r1_pkg_setup
68 +}
69 +
70 +src_unpack() {
71 + # we need the headers
72 + git-r3_fetch "https://git.llvm.org/git/libcxx.git
73 + https://github.com/llvm-mirror/libcxx.git"
74 + git-r3_fetch
75 +
76 + git-r3_checkout https://llvm.org/git/libcxx.git \
77 + "${WORKDIR}"/libcxx '' include utils/libcxx
78 + git-r3_checkout
79 +}
80 +
81 +multilib_src_configure() {
82 + local libdir=$(get_libdir)
83 + local mycmakeargs=(
84 + -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
85 + -DLIBCXXABI_ENABLE_SHARED=ON
86 + -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
87 + -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
88 + -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
89 +
90 + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
91 + # upstream is omitting standard search path for this
92 + # probably because gcc & clang are bundling their own unwind.h
93 + -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
94 + )
95 + if use test; then
96 + mycmakeargs+=(
97 + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
98 + -DLLVM_LIT_ARGS="-vv"
99 + )
100 + fi
101 + cmake-utils_src_configure
102 +}
103 +
104 +multilib_src_test() {
105 + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
106 +
107 + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
108 + sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
109 +
110 + cmake-utils_src_make check-libcxxabi
111 +}
112 +
113 +multilib_src_install_all() {
114 + insinto /usr/include/libcxxabi
115 + doins -r include/.
116 +}