1 |
commit: bc9eb52c4e3bde8af4167bd13878f2fde322cfc7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 23 16:50:36 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 24 19:03:48 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc9eb52c |
7 |
|
8 |
sys-libs/libcxxabi: Branch for 5.0.0 release |
9 |
|
10 |
sys-libs/libcxxabi/libcxxabi-5.0.9999.ebuild | 99 ++++++++++++++++++++++++++++ |
11 |
1 file changed, 99 insertions(+) |
12 |
|
13 |
diff --git a/sys-libs/libcxxabi/libcxxabi-5.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-5.0.9999.ebuild |
14 |
new file mode 100644 |
15 |
index 00000000000..8a83444b8e8 |
16 |
--- /dev/null |
17 |
+++ b/sys-libs/libcxxabi/libcxxabi-5.0.9999.ebuild |
18 |
@@ -0,0 +1,99 @@ |
19 |
+# Copyright 1999-2017 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_50" |
37 |
+ |
38 |
+LICENSE="|| ( UoI-NCSA MIT )" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="" |
41 |
+IUSE="+libunwind +static-libs test" |
42 |
+ |
43 |
+RDEPEND=" |
44 |
+ libunwind? ( |
45 |
+ || ( |
46 |
+ >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}] |
47 |
+ >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}] |
48 |
+ ) |
49 |
+ )" |
50 |
+# LLVM 4 required for llvm-config --cmakedir |
51 |
+DEPEND="${RDEPEND} |
52 |
+ >=sys-devel/llvm-4 |
53 |
+ test? ( >=sys-devel/clang-3.9.0 |
54 |
+ ~sys-libs/libcxx-${PV}[libcxxabi(-)] |
55 |
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )" |
56 |
+ |
57 |
+# least intrusive of all |
58 |
+CMAKE_BUILD_TYPE=RelWithDebInfo |
59 |
+ |
60 |
+python_check_deps() { |
61 |
+ has_version "dev-python/lit[${PYTHON_USEDEP}]" |
62 |
+} |
63 |
+ |
64 |
+pkg_setup() { |
65 |
+ llvm_pkg_setup |
66 |
+ use test && python-any-r1_pkg_setup |
67 |
+} |
68 |
+ |
69 |
+src_unpack() { |
70 |
+ # we need the headers |
71 |
+ git-r3_fetch "https://git.llvm.org/git/libcxx.git |
72 |
+ https://github.com/llvm-mirror/libcxx.git" |
73 |
+ git-r3_fetch |
74 |
+ |
75 |
+ git-r3_checkout https://llvm.org/git/libcxx.git \ |
76 |
+ "${WORKDIR}"/libcxx |
77 |
+ git-r3_checkout |
78 |
+} |
79 |
+ |
80 |
+multilib_src_configure() { |
81 |
+ local libdir=$(get_libdir) |
82 |
+ local mycmakeargs=( |
83 |
+ -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib} |
84 |
+ -DLIBCXXABI_ENABLE_SHARED=ON |
85 |
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs) |
86 |
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind) |
87 |
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test) |
88 |
+ |
89 |
+ -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include |
90 |
+ # upstream is omitting standard search path for this |
91 |
+ # probably because gcc & clang are bundling their own unwind.h |
92 |
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include |
93 |
+ # this only needs to exist, it does not have to make sense |
94 |
+ # FIXME: remove this once https://reviews.llvm.org/D25314 is merged |
95 |
+ -DLIBCXXABI_LIBUNWIND_SOURCES="${T}" |
96 |
+ ) |
97 |
+ if use test; then |
98 |
+ mycmakeargs+=( |
99 |
+ -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit |
100 |
+ ) |
101 |
+ fi |
102 |
+ cmake-utils_src_configure |
103 |
+} |
104 |
+ |
105 |
+multilib_src_test() { |
106 |
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) |
107 |
+ |
108 |
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" |
109 |
+ sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die |
110 |
+ |
111 |
+ cmake-utils_src_make check-libcxxabi |
112 |
+} |
113 |
+ |
114 |
+multilib_src_install_all() { |
115 |
+ insinto /usr/include/libcxxabi |
116 |
+ doins -r include/. |
117 |
+} |