Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libcxx/
Date: Tue, 05 Jan 2016 08:34:42
Message-Id: 1451982422.ef032c2949d812cc968e4d33ac64a33e36eb7eb7.aballier@gentoo
1 commit: ef032c2949d812cc968e4d33ac64a33e36eb7eb7
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 5 07:39:20 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 5 08:27:02 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef032c29
7
8 sys-libs/libcxx: remove old
9
10 Package-Manager: portage-2.2.26
11 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
12
13 sys-libs/libcxx/Manifest | 6 -
14 sys-libs/libcxx/libcxx-0.0_p20130725.ebuild | 168 ---------------------------
15 sys-libs/libcxx/libcxx-0.0_p20131222.ebuild | 169 ---------------------------
16 sys-libs/libcxx/libcxx-0.0_p20140322.ebuild | 169 ---------------------------
17 sys-libs/libcxx/libcxx-3.6.0.ebuild | 170 ----------------------------
18 sys-libs/libcxx/libcxx-3.6.1.ebuild | 170 ----------------------------
19 sys-libs/libcxx/libcxx-3.6.2.ebuild | 170 ----------------------------
20 7 files changed, 1022 deletions(-)
21
22 diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
23 index ea3c237..39d0adb 100644
24 --- a/sys-libs/libcxx/Manifest
25 +++ b/sys-libs/libcxx/Manifest
26 @@ -1,7 +1 @@
27 -DIST libcxx-0.0_p20130725.tar.xz 833240 SHA256 16428d2a493d2f833bc695300f4fc4e2bfd756fa4eb8e0b7696af10ff5e82653 SHA512 756cb089dc6514125b53623a410039c0edc2fb56a734b7faabee018e073adb96a30f7413546ba42fb40dd815697f27735fbbb6bbcce2e7dea10d284a3ed394d3 WHIRLPOOL 329817e70c27e13d37d75d3d15f0b49375e59d660d784b2e174b059046090a2514d7ddd39ac8fc917da784899f7d394842e73f7c81301d4fdf9add74d259f086
28 -DIST libcxx-0.0_p20131222.tar.xz 872416 SHA256 d77b7555daa368a493a71c99d9d5868706cc3a66a4e37e002a860733407d21ee SHA512 d4466a4e66365d38c552813f9d4be251bbc956ca0f2800dcd08b3d5633e6bd1a48601016e0e63a92cb4cd2f7863b31ece0ce9b68f2de2c76cf457a7093920fec WHIRLPOOL 07acd16939694e2cfc946f8f021a2b8a4d4ae40dfe2128273a6e0c76b9a2ac8d9f2e6347d091861219044674ea02b76caf80b3f55f74e8e504c58fe96b19eb91
29 -DIST libcxx-0.0_p20140322.tar.xz 879256 SHA256 b5eae28ced378349e4b7ec6f2e944d0630213462159a0bb2393dc82b536d77d8 SHA512 a80cc3b47acdc1de1a24f5aad19ed0b2518529fe6e8d56cbbe6801874ea334dabd6cec38c27cccbaec961de69b731e22462f0faae30f371e3acb8ecd1b46b2b4 WHIRLPOOL 9374e2b717a3a00f3046f06920775a31403e36ee9a6c5049e4a50173eae947c5e4641dafd178e459ab3caf6dcad6c99baf37cd5587ebf8a3e2d021e18ac36793
30 -DIST libcxx-3.6.0.src.tar.xz 946380 SHA256 299c1e82b0086a79c5c1aa1885ea3be3bbce6979aaa9b886409b14f9b387fbb7 SHA512 fe16d129a4e2429677a2b87aa2da27fcb5331d6335a0b819ea67de6498e82293bc13661602baafabb56a7f0a4e8f304d468088b8d3e0b5d1c0d01976f7cf3e92 WHIRLPOOL 527b4d1c54e5d76d0958c6d8ac622be4cb7b1a2feb3a9f2d2efa09564ab8d2f8f8cb15a536b8390f80c327dc8b86fee4fcc0b3d7c3771b11ca64885505fb449a
31 -DIST libcxx-3.6.1.src.tar.xz 943756 SHA256 5a5c653becf3978d4c4f6095708660855bed691210a9426bb839eecd88b6c0f9 SHA512 96d7700ef1c15327b68e8865c2294a3455f09e166991d4465c45bf870fe2d9ce4ddc9af1cd52b900a8a6a9f89c096b9ee1b2c2af58b550f7bc224505eb04d8ea WHIRLPOOL e7eba2d69d679198725147845d2e92631294b27ab2eb73bc057f6851bffbae941fb2570d66bdc28a7382b69d7dc87558e12b730f87a7e9a54f9d149eea1209c9
32 -DIST libcxx-3.6.2.src.tar.xz 944020 SHA256 52f3d452f48209c9df1792158fdbd7f3e98ed9bca8ebb51fcd524f67437c8b81 SHA512 1eb575921ca0d636c4b7ba21b3ad2c09468d779c69b3106ceefde294344cf20a48a03f9d38ea0db9f8b909f56f0fd1a56a255101305318e04d9f2d20af358ba6 WHIRLPOOL ec225d10cbfe3ca5eba2ed5f16ac6c19914ee75d71db2a1d8ca30f326c9fd5576899361f4397f2ee5d09dd3e8abaca82080c63e303b90d6f19f755465a11a065
33 DIST libcxx-3.7.0.src.tar.xz 994580 SHA256 c18f3c8333cd7e678c1424a57fe5e25efe740ca7caf62ac67152b4723f3ad08e SHA512 e71d04efa0fafab129a97ca6f4fd7b5f185258de7455c7a25d0964f459bc6068c69c5d67199f6d7cd3541bdce630106cbaf3b7099e4737dddbdd57c77a3fe054 WHIRLPOOL 26672e3f6e0772504e7ee174c37e5fc20079c730ac8bd0d2563d5415ca9589360aa3be42a8aac15eb5a63c69227bd4911aa822b158b9a35e3d74ec0d71bb1300
34
35 diff --git a/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild b/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild
36 deleted file mode 100644
37 index dde2eea..0000000
38 --- a/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild
39 +++ /dev/null
40 @@ -1,168 +0,0 @@
41 -# Copyright 1999-2015 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -# $Id$
44 -
45 -EAPI=5
46 -
47 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
48 -
49 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
50 -
51 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
52 -
53 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
54 -HOMEPAGE="http://libcxx.llvm.org/"
55 -if [ "${PV%9999}" = "${PV}" ] ; then
56 - SRC_URI="mirror://gentoo/${P}.tar.xz"
57 -else
58 - SRC_URI=""
59 -fi
60 -
61 -LICENSE="|| ( UoI-NCSA MIT )"
62 -SLOT="0"
63 -if [ "${PV%9999}" = "${PV}" ] ; then
64 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
65 -else
66 - KEYWORDS=""
67 -fi
68 -IUSE="elibc_glibc +libcxxrt static-libs test"
69 -
70 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
71 - !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
72 -DEPEND="${RDEPEND}
73 - test? ( sys-devel/clang )
74 - app-arch/xz-utils"
75 -
76 -DOCS=( CREDITS.TXT )
77 -
78 -pkg_setup() {
79 - if ! use libcxxrt ; then
80 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
81 - ewarn "libsupc++. Please note that this is not well supported."
82 - ewarn "In particular, static linking will not work."
83 - fi
84 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
85 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
86 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
87 - die
88 - fi
89 -}
90 -
91 -src_prepare() {
92 - cp -f "${FILESDIR}/Makefile" lib/ || die
93 - multilib_copy_sources
94 -}
95 -
96 -src_configure() {
97 - export LIBS="-lpthread -lrt -lc -lgcc_s"
98 - if use libcxxrt ; then
99 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
100 - LIBS="-lcxxrt ${LIBS}"
101 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
102 - else
103 - # Very hackish, see $HOMEPAGE
104 - # If someone has a clever idea, please share it!
105 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
106 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
107 - append-cppflags -D__GLIBCXX__ ${includes}
108 - LIBS="-lsupc++ ${LIBS}"
109 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
110 - for i in ${libsupcxx_includes} ; do
111 - local found=""
112 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
113 - for j in ${libcxx_gcc_dirs} ; do
114 - if [ -f "${j}/${i}" ] ; then
115 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
116 - found=yes
117 - fi
118 - done
119 - [ -n "${found}" ] || die "Header not found: ${i}"
120 - done
121 - fi
122 -
123 - tc-export AR CC CXX
124 -
125 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
126 -}
127 -
128 -multilib_src_compile() {
129 - cd "${BUILD_DIR}/lib" || die
130 - emake shared
131 - use static-libs && emake static
132 -}
133 -
134 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
135 -multilib_src_test() {
136 - cd "${BUILD_DIR}/test"
137 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
138 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
139 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
140 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
141 - LIBS="-lm" \
142 - ./testit || die
143 -}
144 -
145 -# Usage: deps
146 -gen_ldscript() {
147 - local output_format
148 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
149 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
150 -
151 - cat <<-END_LDSCRIPT
152 -/* GNU ld script
153 - Include missing dependencies
154 -*/
155 -${output_format}
156 -GROUP ( $@ )
157 -END_LDSCRIPT
158 -}
159 -
160 -gen_static_ldscript() {
161 - if use libcxxrt ; then
162 - # Move it first.
163 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
164 -
165 - # Generate libc++.a ldscript for inclusion of its dependencies so that
166 - # clang++ -stdlib=libc++ -static works out of the box.
167 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
168 - # On Linux/glibc it does not link without libpthread or libdl. It is
169 - # fine on FreeBSD.
170 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
171 -
172 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
173 - fi
174 - # TODO: Generate a libc++.a ldscript when building against libsupc++
175 -}
176 -
177 -gen_shared_ldscript() {
178 - if use libcxxrt ; then
179 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
180 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
181 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
182 - fi
183 - # TODO: Generate the linker script for other confiurations too.
184 -}
185 -
186 -multilib_src_install() {
187 - cd "${BUILD_DIR}/lib"
188 - if use static-libs ; then
189 - dolib.a libc++.a
190 - gen_static_ldscript
191 - fi
192 - dolib.so libc++.so*
193 - gen_shared_ldscript
194 -}
195 -
196 -multilib_src_install_all() {
197 - einstalldocs
198 - insinto /usr/include/c++/v1
199 - doins -r include/*
200 -}
201 -
202 -pkg_postinst() {
203 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
204 - elog "standard library when using clang."
205 - elog "To use it, instead of libstdc++, use:"
206 - elog " clang++ -stdlib=libc++"
207 - elog "to compile your C++ programs."
208 -}
209
210 diff --git a/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild b/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild
211 deleted file mode 100644
212 index 4ceb09f..0000000
213 --- a/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild
214 +++ /dev/null
215 @@ -1,169 +0,0 @@
216 -# Copyright 1999-2015 Gentoo Foundation
217 -# Distributed under the terms of the GNU General Public License v2
218 -# $Id$
219 -
220 -EAPI=5
221 -
222 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
223 -
224 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
225 -
226 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
227 -
228 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
229 -HOMEPAGE="http://libcxx.llvm.org/"
230 -if [ "${PV%9999}" = "${PV}" ] ; then
231 - SRC_URI="mirror://gentoo/${P}.tar.xz"
232 -else
233 - SRC_URI=""
234 -fi
235 -
236 -LICENSE="|| ( UoI-NCSA MIT )"
237 -SLOT="0"
238 -if [ "${PV%9999}" = "${PV}" ] ; then
239 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
240 -else
241 - KEYWORDS=""
242 -fi
243 -IUSE="elibc_glibc +libcxxrt static-libs test"
244 -
245 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
246 - !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
247 -DEPEND="${RDEPEND}
248 - test? ( sys-devel/clang )
249 - app-arch/xz-utils"
250 -
251 -DOCS=( CREDITS.TXT )
252 -
253 -pkg_setup() {
254 - if ! use libcxxrt ; then
255 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
256 - ewarn "libsupc++. Please note that this is not well supported."
257 - ewarn "In particular, static linking will not work."
258 - fi
259 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
260 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
261 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
262 - die
263 - fi
264 -}
265 -
266 -src_prepare() {
267 - cp -f "${FILESDIR}/Makefile" lib/ || die
268 - multilib_copy_sources
269 -}
270 -
271 -src_configure() {
272 - export LIBS="-lpthread -lrt -lc -lgcc_s"
273 - if use libcxxrt ; then
274 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
275 - LIBS="-lcxxrt ${LIBS}"
276 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
277 - else
278 - # Very hackish, see $HOMEPAGE
279 - # If someone has a clever idea, please share it!
280 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
281 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
282 - append-cppflags -D__GLIBCXX__ ${includes}
283 - LIBS="-lsupc++ ${LIBS}"
284 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
285 - for i in ${libsupcxx_includes} ; do
286 - local found=""
287 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
288 - for j in ${libcxx_gcc_dirs} ; do
289 - if [ -f "${j}/${i}" ] ; then
290 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
291 - found=yes
292 - fi
293 - done
294 - [ -n "${found}" ] || die "Header not found: ${i}"
295 - done
296 - fi
297 -
298 - tc-export AR CC CXX
299 -
300 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
301 -}
302 -
303 -multilib_src_compile() {
304 - cd "${BUILD_DIR}/lib" || die
305 - emake shared
306 - use static-libs && emake static
307 -}
308 -
309 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
310 -multilib_src_test() {
311 - cd "${BUILD_DIR}/test"
312 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
313 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
314 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
315 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
316 - LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
317 - ./testit || die
318 - # TODO: fix link against libsupc++
319 -}
320 -
321 -# Usage: deps
322 -gen_ldscript() {
323 - local output_format
324 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
325 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
326 -
327 - cat <<-END_LDSCRIPT
328 -/* GNU ld script
329 - Include missing dependencies
330 -*/
331 -${output_format}
332 -GROUP ( $@ )
333 -END_LDSCRIPT
334 -}
335 -
336 -gen_static_ldscript() {
337 - if use libcxxrt ; then
338 - # Move it first.
339 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
340 -
341 - # Generate libc++.a ldscript for inclusion of its dependencies so that
342 - # clang++ -stdlib=libc++ -static works out of the box.
343 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
344 - # On Linux/glibc it does not link without libpthread or libdl. It is
345 - # fine on FreeBSD.
346 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
347 -
348 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
349 - fi
350 - # TODO: Generate a libc++.a ldscript when building against libsupc++
351 -}
352 -
353 -gen_shared_ldscript() {
354 - if use libcxxrt ; then
355 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
356 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
357 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
358 - fi
359 - # TODO: Generate the linker script for other confiurations too.
360 -}
361 -
362 -multilib_src_install() {
363 - cd "${BUILD_DIR}/lib"
364 - if use static-libs ; then
365 - dolib.a libc++.a
366 - gen_static_ldscript
367 - fi
368 - dolib.so libc++.so*
369 - gen_shared_ldscript
370 -}
371 -
372 -multilib_src_install_all() {
373 - einstalldocs
374 - insinto /usr/include/c++/v1
375 - doins -r include/*
376 -}
377 -
378 -pkg_postinst() {
379 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
380 - elog "standard library when using clang."
381 - elog "To use it, instead of libstdc++, use:"
382 - elog " clang++ -stdlib=libc++"
383 - elog "to compile your C++ programs."
384 -}
385
386 diff --git a/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild b/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild
387 deleted file mode 100644
388 index 4ceb09f..0000000
389 --- a/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild
390 +++ /dev/null
391 @@ -1,169 +0,0 @@
392 -# Copyright 1999-2015 Gentoo Foundation
393 -# Distributed under the terms of the GNU General Public License v2
394 -# $Id$
395 -
396 -EAPI=5
397 -
398 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
399 -
400 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
401 -
402 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
403 -
404 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
405 -HOMEPAGE="http://libcxx.llvm.org/"
406 -if [ "${PV%9999}" = "${PV}" ] ; then
407 - SRC_URI="mirror://gentoo/${P}.tar.xz"
408 -else
409 - SRC_URI=""
410 -fi
411 -
412 -LICENSE="|| ( UoI-NCSA MIT )"
413 -SLOT="0"
414 -if [ "${PV%9999}" = "${PV}" ] ; then
415 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
416 -else
417 - KEYWORDS=""
418 -fi
419 -IUSE="elibc_glibc +libcxxrt static-libs test"
420 -
421 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
422 - !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
423 -DEPEND="${RDEPEND}
424 - test? ( sys-devel/clang )
425 - app-arch/xz-utils"
426 -
427 -DOCS=( CREDITS.TXT )
428 -
429 -pkg_setup() {
430 - if ! use libcxxrt ; then
431 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
432 - ewarn "libsupc++. Please note that this is not well supported."
433 - ewarn "In particular, static linking will not work."
434 - fi
435 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
436 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
437 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
438 - die
439 - fi
440 -}
441 -
442 -src_prepare() {
443 - cp -f "${FILESDIR}/Makefile" lib/ || die
444 - multilib_copy_sources
445 -}
446 -
447 -src_configure() {
448 - export LIBS="-lpthread -lrt -lc -lgcc_s"
449 - if use libcxxrt ; then
450 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
451 - LIBS="-lcxxrt ${LIBS}"
452 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
453 - else
454 - # Very hackish, see $HOMEPAGE
455 - # If someone has a clever idea, please share it!
456 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
457 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
458 - append-cppflags -D__GLIBCXX__ ${includes}
459 - LIBS="-lsupc++ ${LIBS}"
460 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
461 - for i in ${libsupcxx_includes} ; do
462 - local found=""
463 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
464 - for j in ${libcxx_gcc_dirs} ; do
465 - if [ -f "${j}/${i}" ] ; then
466 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
467 - found=yes
468 - fi
469 - done
470 - [ -n "${found}" ] || die "Header not found: ${i}"
471 - done
472 - fi
473 -
474 - tc-export AR CC CXX
475 -
476 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
477 -}
478 -
479 -multilib_src_compile() {
480 - cd "${BUILD_DIR}/lib" || die
481 - emake shared
482 - use static-libs && emake static
483 -}
484 -
485 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
486 -multilib_src_test() {
487 - cd "${BUILD_DIR}/test"
488 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
489 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
490 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
491 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
492 - LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
493 - ./testit || die
494 - # TODO: fix link against libsupc++
495 -}
496 -
497 -# Usage: deps
498 -gen_ldscript() {
499 - local output_format
500 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
501 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
502 -
503 - cat <<-END_LDSCRIPT
504 -/* GNU ld script
505 - Include missing dependencies
506 -*/
507 -${output_format}
508 -GROUP ( $@ )
509 -END_LDSCRIPT
510 -}
511 -
512 -gen_static_ldscript() {
513 - if use libcxxrt ; then
514 - # Move it first.
515 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
516 -
517 - # Generate libc++.a ldscript for inclusion of its dependencies so that
518 - # clang++ -stdlib=libc++ -static works out of the box.
519 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
520 - # On Linux/glibc it does not link without libpthread or libdl. It is
521 - # fine on FreeBSD.
522 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
523 -
524 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
525 - fi
526 - # TODO: Generate a libc++.a ldscript when building against libsupc++
527 -}
528 -
529 -gen_shared_ldscript() {
530 - if use libcxxrt ; then
531 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
532 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
533 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
534 - fi
535 - # TODO: Generate the linker script for other confiurations too.
536 -}
537 -
538 -multilib_src_install() {
539 - cd "${BUILD_DIR}/lib"
540 - if use static-libs ; then
541 - dolib.a libc++.a
542 - gen_static_ldscript
543 - fi
544 - dolib.so libc++.so*
545 - gen_shared_ldscript
546 -}
547 -
548 -multilib_src_install_all() {
549 - einstalldocs
550 - insinto /usr/include/c++/v1
551 - doins -r include/*
552 -}
553 -
554 -pkg_postinst() {
555 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
556 - elog "standard library when using clang."
557 - elog "To use it, instead of libstdc++, use:"
558 - elog " clang++ -stdlib=libc++"
559 - elog "to compile your C++ programs."
560 -}
561
562 diff --git a/sys-libs/libcxx/libcxx-3.6.0.ebuild b/sys-libs/libcxx/libcxx-3.6.0.ebuild
563 deleted file mode 100644
564 index 92689d8..0000000
565 --- a/sys-libs/libcxx/libcxx-3.6.0.ebuild
566 +++ /dev/null
567 @@ -1,170 +0,0 @@
568 -# Copyright 1999-2015 Gentoo Foundation
569 -# Distributed under the terms of the GNU General Public License v2
570 -# $Id$
571 -
572 -EAPI=5
573 -
574 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
575 -
576 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
577 -
578 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
579 -
580 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
581 -HOMEPAGE="http://libcxx.llvm.org/"
582 -if [ "${PV%9999}" = "${PV}" ] ; then
583 - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
584 - S="${WORKDIR}/${P}.src"
585 -else
586 - SRC_URI=""
587 -fi
588 -
589 -LICENSE="|| ( UoI-NCSA MIT )"
590 -SLOT="0"
591 -if [ "${PV%9999}" = "${PV}" ] ; then
592 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
593 -else
594 - KEYWORDS=""
595 -fi
596 -IUSE="elibc_glibc +libcxxrt +static-libs test"
597 -
598 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
599 - !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
600 -DEPEND="${RDEPEND}
601 - test? ( sys-devel/clang )
602 - app-arch/xz-utils"
603 -
604 -DOCS=( CREDITS.TXT )
605 -
606 -pkg_setup() {
607 - if ! use libcxxrt ; then
608 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
609 - ewarn "libsupc++. Please note that this is not well supported."
610 - ewarn "In particular, static linking will not work."
611 - fi
612 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
613 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
614 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
615 - die
616 - fi
617 -}
618 -
619 -src_prepare() {
620 - cp -f "${FILESDIR}/Makefile" lib/ || die
621 - multilib_copy_sources
622 -}
623 -
624 -src_configure() {
625 - export LIBS="-lpthread -lrt -lc -lgcc_s"
626 - if use libcxxrt ; then
627 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
628 - LIBS="-lcxxrt ${LIBS}"
629 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
630 - else
631 - # Very hackish, see $HOMEPAGE
632 - # If someone has a clever idea, please share it!
633 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
634 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
635 - append-cppflags -D__GLIBCXX__ ${includes}
636 - LIBS="-lsupc++ ${LIBS}"
637 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
638 - for i in ${libsupcxx_includes} ; do
639 - local found=""
640 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
641 - for j in ${libcxx_gcc_dirs} ; do
642 - if [ -f "${j}/${i}" ] ; then
643 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
644 - found=yes
645 - fi
646 - done
647 - [ -n "${found}" ] || die "Header not found: ${i}"
648 - done
649 - fi
650 -
651 - tc-export AR CC CXX
652 -
653 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
654 -}
655 -
656 -multilib_src_compile() {
657 - cd "${BUILD_DIR}/lib" || die
658 - emake shared
659 - use static-libs && emake static
660 -}
661 -
662 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
663 -multilib_src_test() {
664 - cd "${BUILD_DIR}/test"
665 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
666 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
667 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
668 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
669 - LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
670 - ./testit || die
671 - # TODO: fix link against libsupc++
672 -}
673 -
674 -# Usage: deps
675 -gen_ldscript() {
676 - local output_format
677 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
678 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
679 -
680 - cat <<-END_LDSCRIPT
681 -/* GNU ld script
682 - Include missing dependencies
683 -*/
684 -${output_format}
685 -GROUP ( $@ )
686 -END_LDSCRIPT
687 -}
688 -
689 -gen_static_ldscript() {
690 - if use libcxxrt ; then
691 - # Move it first.
692 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
693 -
694 - # Generate libc++.a ldscript for inclusion of its dependencies so that
695 - # clang++ -stdlib=libc++ -static works out of the box.
696 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
697 - # On Linux/glibc it does not link without libpthread or libdl. It is
698 - # fine on FreeBSD.
699 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
700 -
701 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
702 - fi
703 - # TODO: Generate a libc++.a ldscript when building against libsupc++
704 -}
705 -
706 -gen_shared_ldscript() {
707 - if use libcxxrt ; then
708 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
709 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
710 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
711 - fi
712 - # TODO: Generate the linker script for other confiurations too.
713 -}
714 -
715 -multilib_src_install() {
716 - cd "${BUILD_DIR}/lib"
717 - if use static-libs ; then
718 - dolib.a libc++.a
719 - gen_static_ldscript
720 - fi
721 - dolib.so libc++.so*
722 - gen_shared_ldscript
723 -}
724 -
725 -multilib_src_install_all() {
726 - einstalldocs
727 - insinto /usr/include/c++/v1
728 - doins -r include/*
729 -}
730 -
731 -pkg_postinst() {
732 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
733 - elog "standard library when using clang."
734 - elog "To use it, instead of libstdc++, use:"
735 - elog " clang++ -stdlib=libc++"
736 - elog "to compile your C++ programs."
737 -}
738
739 diff --git a/sys-libs/libcxx/libcxx-3.6.1.ebuild b/sys-libs/libcxx/libcxx-3.6.1.ebuild
740 deleted file mode 100644
741 index 92689d8..0000000
742 --- a/sys-libs/libcxx/libcxx-3.6.1.ebuild
743 +++ /dev/null
744 @@ -1,170 +0,0 @@
745 -# Copyright 1999-2015 Gentoo Foundation
746 -# Distributed under the terms of the GNU General Public License v2
747 -# $Id$
748 -
749 -EAPI=5
750 -
751 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
752 -
753 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
754 -
755 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
756 -
757 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
758 -HOMEPAGE="http://libcxx.llvm.org/"
759 -if [ "${PV%9999}" = "${PV}" ] ; then
760 - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
761 - S="${WORKDIR}/${P}.src"
762 -else
763 - SRC_URI=""
764 -fi
765 -
766 -LICENSE="|| ( UoI-NCSA MIT )"
767 -SLOT="0"
768 -if [ "${PV%9999}" = "${PV}" ] ; then
769 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
770 -else
771 - KEYWORDS=""
772 -fi
773 -IUSE="elibc_glibc +libcxxrt +static-libs test"
774 -
775 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
776 - !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
777 -DEPEND="${RDEPEND}
778 - test? ( sys-devel/clang )
779 - app-arch/xz-utils"
780 -
781 -DOCS=( CREDITS.TXT )
782 -
783 -pkg_setup() {
784 - if ! use libcxxrt ; then
785 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
786 - ewarn "libsupc++. Please note that this is not well supported."
787 - ewarn "In particular, static linking will not work."
788 - fi
789 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
790 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
791 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
792 - die
793 - fi
794 -}
795 -
796 -src_prepare() {
797 - cp -f "${FILESDIR}/Makefile" lib/ || die
798 - multilib_copy_sources
799 -}
800 -
801 -src_configure() {
802 - export LIBS="-lpthread -lrt -lc -lgcc_s"
803 - if use libcxxrt ; then
804 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
805 - LIBS="-lcxxrt ${LIBS}"
806 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
807 - else
808 - # Very hackish, see $HOMEPAGE
809 - # If someone has a clever idea, please share it!
810 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
811 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
812 - append-cppflags -D__GLIBCXX__ ${includes}
813 - LIBS="-lsupc++ ${LIBS}"
814 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
815 - for i in ${libsupcxx_includes} ; do
816 - local found=""
817 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
818 - for j in ${libcxx_gcc_dirs} ; do
819 - if [ -f "${j}/${i}" ] ; then
820 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
821 - found=yes
822 - fi
823 - done
824 - [ -n "${found}" ] || die "Header not found: ${i}"
825 - done
826 - fi
827 -
828 - tc-export AR CC CXX
829 -
830 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
831 -}
832 -
833 -multilib_src_compile() {
834 - cd "${BUILD_DIR}/lib" || die
835 - emake shared
836 - use static-libs && emake static
837 -}
838 -
839 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
840 -multilib_src_test() {
841 - cd "${BUILD_DIR}/test"
842 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
843 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
844 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
845 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
846 - LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
847 - ./testit || die
848 - # TODO: fix link against libsupc++
849 -}
850 -
851 -# Usage: deps
852 -gen_ldscript() {
853 - local output_format
854 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
855 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
856 -
857 - cat <<-END_LDSCRIPT
858 -/* GNU ld script
859 - Include missing dependencies
860 -*/
861 -${output_format}
862 -GROUP ( $@ )
863 -END_LDSCRIPT
864 -}
865 -
866 -gen_static_ldscript() {
867 - if use libcxxrt ; then
868 - # Move it first.
869 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
870 -
871 - # Generate libc++.a ldscript for inclusion of its dependencies so that
872 - # clang++ -stdlib=libc++ -static works out of the box.
873 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
874 - # On Linux/glibc it does not link without libpthread or libdl. It is
875 - # fine on FreeBSD.
876 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
877 -
878 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
879 - fi
880 - # TODO: Generate a libc++.a ldscript when building against libsupc++
881 -}
882 -
883 -gen_shared_ldscript() {
884 - if use libcxxrt ; then
885 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
886 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
887 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
888 - fi
889 - # TODO: Generate the linker script for other confiurations too.
890 -}
891 -
892 -multilib_src_install() {
893 - cd "${BUILD_DIR}/lib"
894 - if use static-libs ; then
895 - dolib.a libc++.a
896 - gen_static_ldscript
897 - fi
898 - dolib.so libc++.so*
899 - gen_shared_ldscript
900 -}
901 -
902 -multilib_src_install_all() {
903 - einstalldocs
904 - insinto /usr/include/c++/v1
905 - doins -r include/*
906 -}
907 -
908 -pkg_postinst() {
909 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
910 - elog "standard library when using clang."
911 - elog "To use it, instead of libstdc++, use:"
912 - elog " clang++ -stdlib=libc++"
913 - elog "to compile your C++ programs."
914 -}
915
916 diff --git a/sys-libs/libcxx/libcxx-3.6.2.ebuild b/sys-libs/libcxx/libcxx-3.6.2.ebuild
917 deleted file mode 100644
918 index 92689d8..0000000
919 --- a/sys-libs/libcxx/libcxx-3.6.2.ebuild
920 +++ /dev/null
921 @@ -1,170 +0,0 @@
922 -# Copyright 1999-2015 Gentoo Foundation
923 -# Distributed under the terms of the GNU General Public License v2
924 -# $Id$
925 -
926 -EAPI=5
927 -
928 -ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
929 -
930 -[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
931 -
932 -inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
933 -
934 -DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
935 -HOMEPAGE="http://libcxx.llvm.org/"
936 -if [ "${PV%9999}" = "${PV}" ] ; then
937 - SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
938 - S="${WORKDIR}/${P}.src"
939 -else
940 - SRC_URI=""
941 -fi
942 -
943 -LICENSE="|| ( UoI-NCSA MIT )"
944 -SLOT="0"
945 -if [ "${PV%9999}" = "${PV}" ] ; then
946 - KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
947 -else
948 - KEYWORDS=""
949 -fi
950 -IUSE="elibc_glibc +libcxxrt +static-libs test"
951 -
952 -RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
953 - !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
954 -DEPEND="${RDEPEND}
955 - test? ( sys-devel/clang )
956 - app-arch/xz-utils"
957 -
958 -DOCS=( CREDITS.TXT )
959 -
960 -pkg_setup() {
961 - if ! use libcxxrt ; then
962 - ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
963 - ewarn "libsupc++. Please note that this is not well supported."
964 - ewarn "In particular, static linking will not work."
965 - fi
966 - if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
967 - eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
968 - eerror "Please use gcc-config to switch to gcc-4.7 or later version."
969 - die
970 - fi
971 -}
972 -
973 -src_prepare() {
974 - cp -f "${FILESDIR}/Makefile" lib/ || die
975 - multilib_copy_sources
976 -}
977 -
978 -src_configure() {
979 - export LIBS="-lpthread -lrt -lc -lgcc_s"
980 - if use libcxxrt ; then
981 - append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
982 - LIBS="-lcxxrt ${LIBS}"
983 - cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
984 - else
985 - # Very hackish, see $HOMEPAGE
986 - # If someone has a clever idea, please share it!
987 - local includes="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | sed -e 's/^ /-I/' | tr '\n' ' ')"
988 - local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
989 - append-cppflags -D__GLIBCXX__ ${includes}
990 - LIBS="-lsupc++ ${LIBS}"
991 - local libsupcxx_includes="cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h bits/cxxabi_tweaks.h bits/cxxabi_forced.h"
992 - for i in ${libsupcxx_includes} ; do
993 - local found=""
994 - [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
995 - for j in ${libcxx_gcc_dirs} ; do
996 - if [ -f "${j}/${i}" ] ; then
997 - cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
998 - found=yes
999 - fi
1000 - done
1001 - [ -n "${found}" ] || die "Header not found: ${i}"
1002 - done
1003 - fi
1004 -
1005 - tc-export AR CC CXX
1006 -
1007 - append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
1008 -}
1009 -
1010 -multilib_src_compile() {
1011 - cd "${BUILD_DIR}/lib" || die
1012 - emake shared
1013 - use static-libs && emake static
1014 -}
1015 -
1016 -# Tests fail for now, if anybody is able to fix them, help is very welcome.
1017 -multilib_src_test() {
1018 - cd "${BUILD_DIR}/test"
1019 - LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
1020 - CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
1021 - HEADER_INCLUDE="-I${BUILD_DIR}/include" \
1022 - SOURCE_LIB="-L${BUILD_DIR}/lib" \
1023 - LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
1024 - ./testit || die
1025 - # TODO: fix link against libsupc++
1026 -}
1027 -
1028 -# Usage: deps
1029 -gen_ldscript() {
1030 - local output_format
1031 - output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
1032 - [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
1033 -
1034 - cat <<-END_LDSCRIPT
1035 -/* GNU ld script
1036 - Include missing dependencies
1037 -*/
1038 -${output_format}
1039 -GROUP ( $@ )
1040 -END_LDSCRIPT
1041 -}
1042 -
1043 -gen_static_ldscript() {
1044 - if use libcxxrt ; then
1045 - # Move it first.
1046 - mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
1047 -
1048 - # Generate libc++.a ldscript for inclusion of its dependencies so that
1049 - # clang++ -stdlib=libc++ -static works out of the box.
1050 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
1051 - # On Linux/glibc it does not link without libpthread or libdl. It is
1052 - # fine on FreeBSD.
1053 - use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
1054 -
1055 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
1056 - fi
1057 - # TODO: Generate a libc++.a ldscript when building against libsupc++
1058 -}
1059 -
1060 -gen_shared_ldscript() {
1061 - if use libcxxrt ; then
1062 - mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
1063 - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
1064 - gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
1065 - fi
1066 - # TODO: Generate the linker script for other confiurations too.
1067 -}
1068 -
1069 -multilib_src_install() {
1070 - cd "${BUILD_DIR}/lib"
1071 - if use static-libs ; then
1072 - dolib.a libc++.a
1073 - gen_static_ldscript
1074 - fi
1075 - dolib.so libc++.so*
1076 - gen_shared_ldscript
1077 -}
1078 -
1079 -multilib_src_install_all() {
1080 - einstalldocs
1081 - insinto /usr/include/c++/v1
1082 - doins -r include/*
1083 -}
1084 -
1085 -pkg_postinst() {
1086 - elog "This package (${PN}) is mainly intended as a replacement for the C++"
1087 - elog "standard library when using clang."
1088 - elog "To use it, instead of libstdc++, use:"
1089 - elog " clang++ -stdlib=libc++"
1090 - elog "to compile your C++ programs."
1091 -}