summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-01-05 08:39:20 +0100
committerAlexis Ballier <aballier@gentoo.org>2016-01-05 09:27:02 +0100
commitef032c2949d812cc968e4d33ac64a33e36eb7eb7 (patch)
treed97c16210c31b0cef21acdb3d0b4325fc882f3e3 /sys-libs/libcxx
parentgames-strategy/uqm: add slot dep for media-libs/libpng (diff)
downloadgentoo-ef032c2949d812cc968e4d33ac64a33e36eb7eb7.tar.gz
gentoo-ef032c2949d812cc968e4d33ac64a33e36eb7eb7.tar.bz2
gentoo-ef032c2949d812cc968e4d33ac64a33e36eb7eb7.zip
sys-libs/libcxx: remove old
Package-Manager: portage-2.2.26 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest6
-rw-r--r--sys-libs/libcxx/libcxx-0.0_p20130725.ebuild168
-rw-r--r--sys-libs/libcxx/libcxx-0.0_p20131222.ebuild169
-rw-r--r--sys-libs/libcxx/libcxx-0.0_p20140322.ebuild169
-rw-r--r--sys-libs/libcxx/libcxx-3.6.0.ebuild170
-rw-r--r--sys-libs/libcxx/libcxx-3.6.1.ebuild170
-rw-r--r--sys-libs/libcxx/libcxx-3.6.2.ebuild170
7 files changed, 0 insertions, 1022 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index ea3c237a5f65..39d0adb89fab 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -1,7 +1 @@
-DIST libcxx-0.0_p20130725.tar.xz 833240 SHA256 16428d2a493d2f833bc695300f4fc4e2bfd756fa4eb8e0b7696af10ff5e82653 SHA512 756cb089dc6514125b53623a410039c0edc2fb56a734b7faabee018e073adb96a30f7413546ba42fb40dd815697f27735fbbb6bbcce2e7dea10d284a3ed394d3 WHIRLPOOL 329817e70c27e13d37d75d3d15f0b49375e59d660d784b2e174b059046090a2514d7ddd39ac8fc917da784899f7d394842e73f7c81301d4fdf9add74d259f086
-DIST libcxx-0.0_p20131222.tar.xz 872416 SHA256 d77b7555daa368a493a71c99d9d5868706cc3a66a4e37e002a860733407d21ee SHA512 d4466a4e66365d38c552813f9d4be251bbc956ca0f2800dcd08b3d5633e6bd1a48601016e0e63a92cb4cd2f7863b31ece0ce9b68f2de2c76cf457a7093920fec WHIRLPOOL 07acd16939694e2cfc946f8f021a2b8a4d4ae40dfe2128273a6e0c76b9a2ac8d9f2e6347d091861219044674ea02b76caf80b3f55f74e8e504c58fe96b19eb91
-DIST libcxx-0.0_p20140322.tar.xz 879256 SHA256 b5eae28ced378349e4b7ec6f2e944d0630213462159a0bb2393dc82b536d77d8 SHA512 a80cc3b47acdc1de1a24f5aad19ed0b2518529fe6e8d56cbbe6801874ea334dabd6cec38c27cccbaec961de69b731e22462f0faae30f371e3acb8ecd1b46b2b4 WHIRLPOOL 9374e2b717a3a00f3046f06920775a31403e36ee9a6c5049e4a50173eae947c5e4641dafd178e459ab3caf6dcad6c99baf37cd5587ebf8a3e2d021e18ac36793
-DIST libcxx-3.6.0.src.tar.xz 946380 SHA256 299c1e82b0086a79c5c1aa1885ea3be3bbce6979aaa9b886409b14f9b387fbb7 SHA512 fe16d129a4e2429677a2b87aa2da27fcb5331d6335a0b819ea67de6498e82293bc13661602baafabb56a7f0a4e8f304d468088b8d3e0b5d1c0d01976f7cf3e92 WHIRLPOOL 527b4d1c54e5d76d0958c6d8ac622be4cb7b1a2feb3a9f2d2efa09564ab8d2f8f8cb15a536b8390f80c327dc8b86fee4fcc0b3d7c3771b11ca64885505fb449a
-DIST libcxx-3.6.1.src.tar.xz 943756 SHA256 5a5c653becf3978d4c4f6095708660855bed691210a9426bb839eecd88b6c0f9 SHA512 96d7700ef1c15327b68e8865c2294a3455f09e166991d4465c45bf870fe2d9ce4ddc9af1cd52b900a8a6a9f89c096b9ee1b2c2af58b550f7bc224505eb04d8ea WHIRLPOOL e7eba2d69d679198725147845d2e92631294b27ab2eb73bc057f6851bffbae941fb2570d66bdc28a7382b69d7dc87558e12b730f87a7e9a54f9d149eea1209c9
-DIST libcxx-3.6.2.src.tar.xz 944020 SHA256 52f3d452f48209c9df1792158fdbd7f3e98ed9bca8ebb51fcd524f67437c8b81 SHA512 1eb575921ca0d636c4b7ba21b3ad2c09468d779c69b3106ceefde294344cf20a48a03f9d38ea0db9f8b909f56f0fd1a56a255101305318e04d9f2d20af358ba6 WHIRLPOOL ec225d10cbfe3ca5eba2ed5f16ac6c19914ee75d71db2a1d8ca30f326c9fd5576899361f4397f2ee5d09dd3e8abaca82080c63e303b90d6f19f755465a11a065
DIST libcxx-3.7.0.src.tar.xz 994580 SHA256 c18f3c8333cd7e678c1424a57fe5e25efe740ca7caf62ac67152b4723f3ad08e SHA512 e71d04efa0fafab129a97ca6f4fd7b5f185258de7455c7a25d0964f459bc6068c69c5d67199f6d7cd3541bdce630106cbaf3b7099e4737dddbdd57c77a3fe054 WHIRLPOOL 26672e3f6e0772504e7ee174c37e5fc20079c730ac8bd0d2563d5415ca9589360aa3be42a8aac15eb5a63c69227bd4911aa822b158b9a35e3d74ec0d71bb1300
diff --git a/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild b/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild
deleted file mode 100644
index dde2eea354f8..000000000000
--- a/sys-libs/libcxx/libcxx-0.0_p20130725.ebuild
+++ /dev/null
@@ -1,168 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="mirror://gentoo/${P}.tar.xz"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm" \
- ./testit || die
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild b/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild
deleted file mode 100644
index 4ceb09fe3904..000000000000
--- a/sys-libs/libcxx/libcxx-0.0_p20131222.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="mirror://gentoo/${P}.tar.xz"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
- ./testit || die
- # TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild b/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild
deleted file mode 100644
index 4ceb09fe3904..000000000000
--- a/sys-libs/libcxx/libcxx-0.0_p20140322.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="mirror://gentoo/${P}.tar.xz"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
- ./testit || die
- # TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-3.6.0.ebuild b/sys-libs/libcxx/libcxx-3.6.0.ebuild
deleted file mode 100644
index 92689d826fc6..000000000000
--- a/sys-libs/libcxx/libcxx-3.6.0.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
- S="${WORKDIR}/${P}.src"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt +static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
- ./testit || die
- # TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-3.6.1.ebuild b/sys-libs/libcxx/libcxx-3.6.1.ebuild
deleted file mode 100644
index 92689d826fc6..000000000000
--- a/sys-libs/libcxx/libcxx-3.6.1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
- S="${WORKDIR}/${P}.src"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt +static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
- ./testit || die
- # TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}
diff --git a/sys-libs/libcxx/libcxx-3.6.2.ebuild b/sys-libs/libcxx/libcxx-3.6.2.ebuild
deleted file mode 100644
index 92689d826fc6..000000000000
--- a/sys-libs/libcxx/libcxx-3.6.2.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-ESVN_REPO_URI="http://llvm.org/svn/llvm-project/libcxx/trunk"
-
-[ "${PV%9999}" != "${PV}" ] && SCM="subversion" || SCM=""
-
-inherit ${SCM} flag-o-matic toolchain-funcs multilib multilib-minimal
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="http://libcxx.llvm.org/"
-if [ "${PV%9999}" = "${PV}" ] ; then
- SRC_URI="http://llvm.org/releases/${PV}/${P}.src.tar.xz"
- S="${WORKDIR}/${P}.src"
-else
- SRC_URI=""
-fi
-
-LICENSE="|| ( UoI-NCSA MIT )"
-SLOT="0"
-if [ "${PV%9999}" = "${PV}" ] ; then
- KEYWORDS="~amd64 ~mips ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- KEYWORDS=""
-fi
-IUSE="elibc_glibc +libcxxrt +static-libs test"
-
-RDEPEND="libcxxrt? ( >=sys-libs/libcxxrt-0.0_p20130725[static-libs?,${MULTILIB_USEDEP}] )
- !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] )"
-DEPEND="${RDEPEND}
- test? ( sys-devel/clang )
- app-arch/xz-utils"
-
-DOCS=( CREDITS.TXT )
-
-pkg_setup() {
- if ! use libcxxrt ; then
- ewarn "You have disabled USE=libcxxrt. This will build ${PN} against"
- ewarn "libsupc++. Please note that this is not well supported."
- ewarn "In particular, static linking will not work."
- fi
- if [[ $(gcc-version) < 4.7 ]] && [[ $(tc-getCXX) != *clang++* ]] ; then
- eerror "${PN} needs to be built with clang++ or gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
-}
-
-src_prepare() {
- cp -f "${FILESDIR}/Makefile" lib/ || die
- multilib_copy_sources
-}
-
-src_configure() {
- export LIBS="-lpthread -lrt -lc -lgcc_s"
- if use libcxxrt ; then
- append-cppflags -DLIBCXXRT "-I${EPREFIX}/usr/include/libcxxrt/"
- LIBS="-lcxxrt ${LIBS}"
- cp "${EPREFIX}/usr/include/libcxxrt/"*.h "${S}/include"
- else
- # Very hackish, see $HOMEPAGE
- # If someone has a clever idea, please share it!
- 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' ' ')"
- local libcxx_gcc_dirs="$(echo | ${CHOST}-g++ -Wp,-v -x c++ - -fsyntax-only 2>&1 | grep -C 2 '#include.*<...>' | tail -n 2 | tr '\n' ' ')"
- append-cppflags -D__GLIBCXX__ ${includes}
- LIBS="-lsupc++ ${LIBS}"
- 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"
- for i in ${libsupcxx_includes} ; do
- local found=""
- [ -d "${S}/include/$(dirname ${i})/" ] || mkdir -p "${S}/include/$(dirname ${i})"
- for j in ${libcxx_gcc_dirs} ; do
- if [ -f "${j}/${i}" ] ; then
- cp "${j}/${i}" "${S}/include/$(dirname ${i})/" || die
- found=yes
- fi
- done
- [ -n "${found}" ] || die "Header not found: ${i}"
- done
- fi
-
- tc-export AR CC CXX
-
- append-ldflags "-Wl,-z,defs" # make sure we are not underlinked
-}
-
-multilib_src_compile() {
- cd "${BUILD_DIR}/lib" || die
- emake shared
- use static-libs && emake static
-}
-
-# Tests fail for now, if anybody is able to fix them, help is very welcome.
-multilib_src_test() {
- cd "${BUILD_DIR}/test"
- LD_LIBRARY_PATH="${BUILD_DIR}/lib:${LD_LIBRARY_PATH}" \
- CC="clang++ $(get_abi_CFLAGS) ${CXXFLAGS}" \
- HEADER_INCLUDE="-I${BUILD_DIR}/include" \
- SOURCE_LIB="-L${BUILD_DIR}/lib" \
- LIBS="-lm $(usex libcxxrt -lcxxrt "")" \
- ./testit || die
- # TODO: fix link against libsupc++
-}
-
-# Usage: deps
-gen_ldscript() {
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
-
- cat <<-END_LDSCRIPT
-/* GNU ld script
- Include missing dependencies
-*/
-${output_format}
-GROUP ( $@ )
-END_LDSCRIPT
-}
-
-gen_static_ldscript() {
- if use libcxxrt ; then
- # Move it first.
- mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die
-
- # Generate libc++.a ldscript for inclusion of its dependencies so that
- # clang++ -stdlib=libc++ -static works out of the box.
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a"
- # On Linux/glibc it does not link without libpthread or libdl. It is
- # fine on FreeBSD.
- use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a"
-
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a"
- fi
- # TODO: Generate a libc++.a ldscript when building against libsupc++
-}
-
-gen_shared_ldscript() {
- if use libcxxrt ; then
- mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die
- local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so"
- gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so"
- fi
- # TODO: Generate the linker script for other confiurations too.
-}
-
-multilib_src_install() {
- cd "${BUILD_DIR}/lib"
- if use static-libs ; then
- dolib.a libc++.a
- gen_static_ldscript
- fi
- dolib.so libc++.so*
- gen_shared_ldscript
-}
-
-multilib_src_install_all() {
- einstalldocs
- insinto /usr/include/c++/v1
- doins -r include/*
-}
-
-pkg_postinst() {
- elog "This package (${PN}) is mainly intended as a replacement for the C++"
- elog "standard library when using clang."
- elog "To use it, instead of libstdc++, use:"
- elog " clang++ -stdlib=libc++"
- elog "to compile your C++ programs."
-}