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/files/, sys-libs/libcxxabi/
Date: Wed, 05 Oct 2016 14:46:57
Message-Id: 1475678803.07af6bec6e523703114dca54fa355d5685a5b25e.mgorny@gentoo
1 commit: 07af6bec6e523703114dca54fa355d5685a5b25e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 5 14:02:32 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 5 14:46:43 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07af6bec
7
8 sys-libs/libcxxabi: Wrap up 3.9.0 release
9
10 sys-libs/libcxxabi/Manifest | 2 +
11 .../files/libcxxabi-3.9.0-cmake-path.patch | 34 ++++++++
12 sys-libs/libcxxabi/libcxxabi-3.9.0.ebuild | 90 ++++++++++++++++++++++
13 3 files changed, 126 insertions(+)
14
15 diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
16 new file mode 100644
17 index 00000000..6831ec4
18 --- /dev/null
19 +++ b/sys-libs/libcxxabi/Manifest
20 @@ -0,0 +1,2 @@
21 +DIST libcxx-3.9.0.src.tar.xz 1198308 SHA256 d0b38d51365c6322f5666a2a8105785f2e114430858de4c25a86b49f227f5b06 SHA512 55d5c4adff378ee02b0b99d732bc9f326910f9e49ab8c320a588eccdd0362fe009bc9a6a4337d29faf6338420c91b10d0d7d67f66128268f01258d30502c4f4a WHIRLPOOL 3ee3519acfe95287a862a6c44e30ed52ced1204332913007797da4e4da40dfdc5991ae120f5686827cc208b559936da5bc5485dab75617bdd5cbbd9e95a6032a
22 +DIST libcxxabi-3.9.0.src.tar.xz 511324 SHA256 b037a92717856882e05df57221e087d7d595a2ae9f170f7bc1a23ec7a92c8019 SHA512 500207bfd59664bd42d920741d6b467c4b88569453742db6470af081c77be04894e097a14b8419e333b51abce484566366e35cbc3ed2607cd86dfc0ec0ddd0c5 WHIRLPOOL 7b2d3b022c4c539596ce7be0afac724df929f19fb80e6f5b14074e240fb252b04389fe121f987ceaf6f3567d59735238b2940546475e4107f3c32eb55a5f8a80
23
24 diff --git a/sys-libs/libcxxabi/files/libcxxabi-3.9.0-cmake-path.patch b/sys-libs/libcxxabi/files/libcxxabi-3.9.0-cmake-path.patch
25 new file mode 100644
26 index 00000000..b80c0f5
27 --- /dev/null
28 +++ b/sys-libs/libcxxabi/files/libcxxabi-3.9.0-cmake-path.patch
29 @@ -0,0 +1,34 @@
30 +From 8d4d9af454a985d8c10ffdb0c56e87efec25ddff Mon Sep 17 00:00:00 2001
31 +From: Logan Chien <tzuhsiang.chien@×××××.com>
32 +Date: Mon, 3 Oct 2016 11:08:17 +0000
33 +Subject: [PATCH] [CMake] Fix libc++abi standalone cmake build.
34 +
35 +The cmake files install directory has been changed to
36 +${prefix}/lib/cmake/llvm since r259821. Searching cmake modules in
37 +${prefix}/share/llvm/cmake will result in fatal errors.
38 +
39 +This commit fixes the out-of-tree build by changing the CMake module
40 +search path to: "$(llvm-config --obj-root)/lib/cmake/llvm"
41 +
42 +
43 +git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@283100 91177308-0d34-0410-b5e6-96231b3b80d8
44 +---
45 + CMakeLists.txt | 2 +-
46 + 1 file changed, 1 insertion(+), 1 deletion(-)
47 +
48 +diff --git a/CMakeLists.txt b/CMakeLists.txt
49 +index a33cf48..e75c0b8 100644
50 +--- a/CMakeLists.txt
51 ++++ b/CMakeLists.txt
52 +@@ -49,7 +49,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
53 + set(LLVM_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
54 + set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
55 + set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
56 +- set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake")
57 ++ set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
58 + set(LLVM_LIT_PATH "${LLVM_PATH}/utils/lit/lit.py")
59 + else()
60 + message(FATAL_ERROR "llvm-config not found and LLVM_MAIN_SRC_DIR not defined. "
61 +--
62 +2.10.1
63 +
64
65 diff --git a/sys-libs/libcxxabi/libcxxabi-3.9.0.ebuild b/sys-libs/libcxxabi/libcxxabi-3.9.0.ebuild
66 new file mode 100644
67 index 00000000..4684548
68 --- /dev/null
69 +++ b/sys-libs/libcxxabi/libcxxabi-3.9.0.ebuild
70 @@ -0,0 +1,90 @@
71 +# Copyright 1999-2016 Gentoo Foundation
72 +# Distributed under the terms of the GNU General Public License v2
73 +# $Id$
74 +
75 +EAPI=6
76 +
77 +: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
78 +CMAKE_MIN_VERSION=3.4.3
79 +PYTHON_COMPAT=( python2_7 )
80 +
81 +inherit cmake-multilib python-any-r1
82 +
83 +DESCRIPTION="Low level support for a standard C++ library"
84 +HOMEPAGE="http://libcxxabi.llvm.org/"
85 +# also needs libcxx sources for headers
86 +SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz
87 + http://llvm.org/releases/${PV}/${P/abi/}.src.tar.xz"
88 +LICENSE="|| ( UoI-NCSA MIT )"
89 +SLOT="0"
90 +KEYWORDS="~amd64 ~x86"
91 +IUSE="libunwind +static-libs test"
92 +
93 +RDEPEND="
94 + libunwind? (
95 + || (
96 + >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
97 + sys-libs/llvm-libunwind[static-libs?,${MULTILIB_USEDEP}]
98 + )
99 + )"
100 +DEPEND="${RDEPEND}
101 + >=sys-devel/llvm-3.9.0
102 + test? ( >=sys-devel/clang-3.9.0
103 + ~sys-libs/libcxx-${PV}[libcxxabi(-)]
104 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
105 +
106 +S=${WORKDIR}/${P}.src
107 +
108 +python_check_deps() {
109 + has_version "dev-python/lit[${PYTHON_USEDEP}]"
110 +}
111 +
112 +pkg_setup() {
113 + use test && python-any-r1_pkg_setup
114 +}
115 +
116 +src_prepare() {
117 + default
118 +
119 + # backport cmake path fix for llvm-3.9+
120 + eapply "${FILESDIR}/${P}-cmake-path.patch"
121 +}
122 +
123 +src_configure() {
124 + NATIVE_LIBDIR=$(get_libdir)
125 + cmake-multilib_src_configure
126 +}
127 +
128 +multilib_src_configure() {
129 + local libdir=$(get_libdir)
130 + local mycmakeargs=(
131 + -DLLVM_LIBDIR_SUFFIX=${NATIVE_LIBDIR#lib}
132 + -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
133 + -DLIBCXXABI_ENABLE_SHARED=ON
134 + -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
135 + -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
136 + -DLLVM_INCLUDE_TESTS=$(usex test)
137 +
138 + -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx-${PV}.src/include
139 + )
140 + if use test; then
141 + mycmakeargs+=(
142 + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
143 + )
144 + fi
145 + cmake-utils_src_configure
146 +}
147 +
148 +multilib_src_test() {
149 + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
150 +
151 + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
152 + sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
153 +
154 + cmake-utils_src_make check-libcxxabi
155 +}
156 +
157 +multilib_src_install_all() {
158 + insinto /usr/include/libcxxabi
159 + doins -r include/.
160 +}