From 4ab6db5717ef23f29320d4c6fb9ebdb8dec1f193 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 21 Dec 2017 20:47:17 +0000 Subject: gentoo resync : 21.12.2017 --- sys-libs/libcxx/Manifest | 4 +- sys-libs/libcxx/libcxx-5.0.1.ebuild | 199 ++++++++++++++++++++++++++++++++ sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild | 199 -------------------------------- 3 files changed, 201 insertions(+), 201 deletions(-) create mode 100644 sys-libs/libcxx/libcxx-5.0.1.ebuild delete mode 100644 sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild (limited to 'sys-libs/libcxx') diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest index 56a32803a309..ec81b292a85b 100644 --- a/sys-libs/libcxx/Manifest +++ b/sys-libs/libcxx/Manifest @@ -9,14 +9,14 @@ DIST libcxx-3.9.0.src.tar.xz 1198308 BLAKE2B 689fed969562466bd230445a0edb886880d DIST libcxx-3.9.1.src.tar.xz 1209020 BLAKE2B 510e77c2c1163babbba904933f441e8720b0d366b9f0cfa2cdde2401368c224e00efd66afc1403b0087c40549cda4ebbc4d0c4b2d0906178324fa6158502d5ad SHA512 a5976e4096624a7307b3e43f4a22ac2dc74572226e0f57af9f3ef537a14c3cff1601b7042aef9dc40a0ee53ca76b08d72eb9c253dcf34f115d3153c302db7070 DIST libcxx-4.0.1.src.tar.xz 1446380 BLAKE2B cd871eff4c4ca25a1fe4d27f778e913fe536a0b5863ea7dd3c8895f6b743b6f039e4df71f9ba5124c98761a8099666f68e1dfd073b5ec7b9fe0007ef09a9117d SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a DIST libcxx-5.0.0.src.tar.xz 1518940 BLAKE2B 5ffb6dd99bef7cdf800dd458b4f9ef6ade9270221a60165cbbe8480f550235f12d877818c8272a04b5077e1f1c56f8e4dfde42dccfe6c1d8875ceed6fb339d5d SHA512 210749f6585d8fd39fc63a32dd85d68de4aa480c91915cbf419b9e8a3b300fa4624f03200ed963cecc8ab233777c36e8c522fa0762a2aa068bc65e6f48118328 -DIST libcxx-5.0.1rc2.src.tar.xz 1533332 BLAKE2B 7ac60315ca68054cafdfa3814daea3fe288c140e397b78474b657d7816dfb00c0b84715fac41a7257e85c61f27d7eaefaed7096356c39f02ff2c305440e00bd3 SHA512 aaf9aeded70f948440cb55f3c8a7633be6edb8abde496d5f1571d62fb5d34d8f3ec27935a774224e620b26845ab1081189511a5eb223b5611ec4adfbbc3a2641 +DIST libcxx-5.0.1.src.tar.xz 1527852 BLAKE2B 9454fbca8228ee456feb79b65a63ce5daa27bf2e47e457d79592f4974dceeace19fe6cdeee51cc51f94e9072d7ce3c03e5acb617507670153647b9c435feadbd SHA512 994681d3c79047fc2d618c5584b08e9b5c925dab48f8812fc0adc81a575b49a637e9481bb9a0f7ae6f7f352b2b33f40056c347c27123cd6c96c6c226febd002c EBUILD libcxx-3.7.1.ebuild 5341 BLAKE2B 10bb770ac1f8567c88dfe30f58f51530f5d767c7d7aad9a4840ad684052eb549d82883cd7e372000699260e53973e19b297850dabfba72d889d61dce0fcd6251 SHA512 12d94732f3446447a0ed025dd7df4ec7711c3d3278c98c2922c85c6b78afe369bcbebee65e259825b4008417decfa4f6438ed803a8e271418b061864ee5de9c0 EBUILD libcxx-3.8.1.ebuild 5720 BLAKE2B 4904374d9992591026be582dd932d48969fdd8383d96a010643e75803df5baf056b647c544324173c637ccf884a34608cd87435de0fe66722261454f9e35b276 SHA512 f674c2647756a1157bdaaa0dfb2ceb923830369d473f4d20bc896f94a3b4aaa5c6e8500b3449ec5e8b7c9b54a74a0002706848f60355a688c5c25425d0a3d1c4 EBUILD libcxx-3.9.0.ebuild 6794 BLAKE2B 13927aed8c4338f138eb4eff989e013b99371aca40976ed27197c59460dede6350114ec0364327b0698bd01cb2d17a00f4468635a3ee502d103efc0de1733f47 SHA512 326cbb999424e5fca216a57b90b850c0d98d43bd93835525aed06fc6fc9354d35cfd51fb1d08683fa06da595dbb4719bf3d90dc67dd5b881b6242f964aba0438 EBUILD libcxx-3.9.1.ebuild 6815 BLAKE2B d15c83602e244f8a50e0a9d15869dbd4c7be226d8b1f93249cb6658149ad2408f0feada97403a0dfa3dcd8ac25b98ae084d1d17c879f67ae24d33f8497aba569 SHA512 9c9632590b49cd01ad324641ee296f08442940ab1dda1f0c7cdc77abe6b653f70d0baa9b796ef7d77e1f4728e96fe27fcd42d79a389cfcf2b2427b087b9985af EBUILD libcxx-4.0.1.ebuild 6301 BLAKE2B d4a17d742479e7532c986046fe12b4aed0d1e59faaebead864f7e3f91c4be82aa5d708a7efe2038a146151d10530b0f31a34006e8af6c4dc24f18537dc8c0feb SHA512 8e4a82071fd5945f7876adc9cd20ed2d35ee952711574e8ac2b735d60299b480e269b07ad829c015377c8042a54b6604ffcfe41f98869b25844c00b62bec3b46 EBUILD libcxx-5.0.0.ebuild 6303 BLAKE2B c56d390a2d9ec464af90befc35e3e8c37003e90a5a9a131110edf49a4b31749c586463556555c9ceeb234201d560c3adf5355422b73a38919ce45760b99a6636 SHA512 72a1d367d03be76b8cc43ea3653563be2c86376c796b759fc99feff4e7489a86875548fffe89ab87b26885a94028a1131a5f295c5e5ec5270dea80f2a6e189aa -EBUILD libcxx-5.0.1_rc2.ebuild 6287 BLAKE2B a361f04fb00f24d81df73c2e7b80969b5c1df4bafeaa60c23a865a9324a05ffd5e10c9d770ee433b80870022197e859907a8e5db44209474b4bf80c022e3bc59 SHA512 f366f12fbe623b384ba92fcbe6befd4e8603c50d37cc93973d088d3f9dd350a159a965173a787a7083819ab150d2d8f3b6fa94a298ccb82bffb9cc5c40a99242 +EBUILD libcxx-5.0.1.ebuild 6303 BLAKE2B c56d390a2d9ec464af90befc35e3e8c37003e90a5a9a131110edf49a4b31749c586463556555c9ceeb234201d560c3adf5355422b73a38919ce45760b99a6636 SHA512 72a1d367d03be76b8cc43ea3653563be2c86376c796b759fc99feff4e7489a86875548fffe89ab87b26885a94028a1131a5f295c5e5ec5270dea80f2a6e189aa EBUILD libcxx-5.0.9999.ebuild 6641 BLAKE2B cb8d68f8044165c202ce44c28dfd4546f32e2350d27f41c40928f0c22353f043aa68d72e9d16c2663606f117db7712eb0ef3bdc44586625c9f4b65ce21a8f073 SHA512 b25bd5d47e401f6ae8a29806a0f0259a6a1cdb7726d0ad093f87308a7510ff5aaeb2a59a619dfa8fe69f1c16b004fca720af769f7e3370914336ef4dbc4d4a16 EBUILD libcxx-9999.ebuild 6485 BLAKE2B 09a9fc6dcf7240816f5a6eeec43446e983749eb5ae97a15f5df752c32c827bc5fef9c3b7cb3ff6b6dc290d8d2f7b00c239a93eec15809e12a0ff04cba2f1130b SHA512 18d69115e73f777ac6b98778bb64ef80da638394271ab71b07838fb7aa80661844829cf724664da4d6e56c1e22f8da6caa351e13d04119ed2c8f96df4c07048a MISC metadata.xml 854 BLAKE2B f731ffbb07722face32cfe5ef0576c572fc45d93e8d78ec4adb46c43b95999dc4eb48f20311517fe08a397f2e5dec56c530bb6787a058358cfd1af8d79ffad90 SHA512 8ef3feab266e09442a42baced2d72667fa8b1290624c2c84bab7b173ead72669568847f6e995388fc1d7bc722381f60805d87b2a0cc2d04ae0c49e36bec3802a diff --git a/sys-libs/libcxx/libcxx-5.0.1.ebuild b/sys-libs/libcxx/libcxx-5.0.1.ebuild new file mode 100644 index 000000000000..43a14f9abb6b --- /dev/null +++ b/sys-libs/libcxx/libcxx-5.0.1.ebuild @@ -0,0 +1,199 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Ninja provides better scalability and cleaner verbose output, and is used +# throughout all LLVM projects. +: ${CMAKE_MAKEFILE_GENERATOR:=ninja} +# (needed due to CMAKE_BUILD_TYPE != Gentoo) +CMAKE_MIN_VERSION=3.7.0-r1 +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-multilib llvm python-any-r1 toolchain-funcs + +DESCRIPTION="New implementation of the C++ standard library, targeting C++11" +HOMEPAGE="https://libcxx.llvm.org/" +SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz" + +LICENSE="|| ( UoI-NCSA MIT )" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test" +REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) ) + ?? ( libcxxabi libcxxrt )" + +RDEPEND=" + libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) + libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) + !libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )" +# LLVM 4 required for llvm-config --cmakedir +# clang-3.9.0 installs necessary target symlinks unconditionally +# which removes the need for MULTILIB_USEDEP +DEPEND="${RDEPEND} + test? ( >=sys-devel/clang-3.9.0 + $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') ) + app-arch/xz-utils + >=sys-devel/llvm-4" + +S=${WORKDIR}/${P/_/}.src + +DOCS=( CREDITS.TXT ) + +PATCHES=( + # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a + # out-of-tree build. + "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch" +) + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +python_check_deps() { + has_version "dev-python/lit[${PYTHON_USEDEP}]" +} + +pkg_setup() { + llvm_pkg_setup + use test && python-any-r1_pkg_setup + + if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then + eerror "To build ${PN} against libsupc++, you have to use gcc. Other" + eerror "compilers are not supported. Please set CC=gcc and CXX=g++" + eerror "and try again." + die + fi + if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then + eerror "${PN} needs to be built with gcc-4.7 or later (or other" + eerror "conformant compilers). Please use gcc-config to switch to" + eerror "gcc-4.7 or later version." + die + fi +} + +multilib_src_configure() { + local cxxabi cxxabi_incs + if use libcxxabi; then + cxxabi=libcxxabi + cxxabi_incs="${EPREFIX}/usr/include/libcxxabi" + elif use libcxxrt; then + cxxabi=libcxxrt + cxxabi_incs="${EPREFIX}/usr/include/libcxxrt" + else + local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" + cxxabi=libsupc++ + cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" + fi + + # we want -lgcc_s for unwinder, and for compiler runtime when using + # gcc, clang with gcc runtime (or any unknown compiler) + local extra_libs=() want_gcc_s=ON + if use libunwind; then + # work-around missing -lunwind upstream + extra_libs+=( -lunwind ) + # if we're using libunwind and clang with compiler-rt, we want + # to link to compiler-rt instead of -lgcc_s + if tc-is-clang; then + # get the full library list out of 'pretend mode' + # and grep it for libclang_rt references + local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) ) + local i + for i in "${args[@]}"; do + if [[ ${i} == *libclang_rt* ]]; then + want_gcc_s=OFF + extra_libs+=( "${i}" ) + fi + done + fi + fi + + local libdir=$(get_libdir) + local mycmakeargs=( + -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib} + -DLIBCXX_ENABLE_SHARED=ON + -DLIBCXX_ENABLE_STATIC=$(usex static-libs) + -DLIBCXX_CXX_ABI=${cxxabi} + -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} + # we're using our own mechanism for generating linker scripts + -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF + -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) + -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s} + -DLIBCXX_INCLUDE_TESTS=$(usex test) + -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}" + ) + + if use test; then + mycmakeargs+=( + # this can be any directory, it just needs to exist... + # FIXME: remove this once https://reviews.llvm.org/D25093 is merged + -DLLVM_MAIN_SRC_DIR="${T}" + -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit + ) + fi + cmake-utils_src_configure +} + +multilib_src_test() { + local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) + + [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" + sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die + + cmake-utils_src_make check-libcxx +} + +# 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() { + local libdir=$(get_libdir) + local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")") + + # Move it first. + mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${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="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)" + # On Linux/glibc it does not link without libpthread or libdl. It is + # fine on FreeBSD. + use elibc_glibc && deps+=" libpthread.a libdl.a" + + gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die +} + +gen_shared_ldscript() { + local libdir=$(get_libdir) + # libsupc++ doesn't have a shared version + local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")") + + mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die + local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)" + + gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die +} + +multilib_src_install() { + cmake-utils_src_install + gen_shared_ldscript + use static-libs && gen_static_ldscript +} + +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-5.0.1_rc2.ebuild b/sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild deleted file mode 100644 index ab78b95992b4..000000000000 --- a/sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild +++ /dev/null @@ -1,199 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -# Ninja provides better scalability and cleaner verbose output, and is used -# throughout all LLVM projects. -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python2_7 ) - -inherit cmake-multilib llvm python-any-r1 toolchain-funcs - -DESCRIPTION="New implementation of the C++ standard library, targeting C++11" -HOMEPAGE="https://libcxx.llvm.org/" -SRC_URI="http://prereleases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz" - -LICENSE="|| ( UoI-NCSA MIT )" -SLOT="0" -KEYWORDS="" -IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test" -REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) ) - ?? ( libcxxabi libcxxrt )" - -RDEPEND=" - libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) - libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] ) - !libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )" -# LLVM 4 required for llvm-config --cmakedir -# clang-3.9.0 installs necessary target symlinks unconditionally -# which removes the need for MULTILIB_USEDEP -DEPEND="${RDEPEND} - test? ( >=sys-devel/clang-3.9.0 - $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') ) - app-arch/xz-utils - >=sys-devel/llvm-4" - -S=${WORKDIR}/${P/_/}.src - -DOCS=( CREDITS.TXT ) - -PATCHES=( - # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a - # out-of-tree build. - "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch" -) - -# least intrusive of all -CMAKE_BUILD_TYPE=RelWithDebInfo - -python_check_deps() { - has_version "dev-python/lit[${PYTHON_USEDEP}]" -} - -pkg_setup() { - llvm_pkg_setup - use test && python-any-r1_pkg_setup - - if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then - eerror "To build ${PN} against libsupc++, you have to use gcc. Other" - eerror "compilers are not supported. Please set CC=gcc and CXX=g++" - eerror "and try again." - die - fi - if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later (or other" - eerror "conformant compilers). Please use gcc-config to switch to" - eerror "gcc-4.7 or later version." - die - fi -} - -multilib_src_configure() { - local cxxabi cxxabi_incs - if use libcxxabi; then - cxxabi=libcxxabi - cxxabi_incs="${EPREFIX}/usr/include/libcxxabi" - elif use libcxxrt; then - cxxabi=libcxxrt - cxxabi_incs="${EPREFIX}/usr/include/libcxxrt" - else - local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)" - cxxabi=libsupc++ - cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}" - fi - - # we want -lgcc_s for unwinder, and for compiler runtime when using - # gcc, clang with gcc runtime (or any unknown compiler) - local extra_libs=() want_gcc_s=ON - if use libunwind; then - # work-around missing -lunwind upstream - extra_libs+=( -lunwind ) - # if we're using libunwind and clang with compiler-rt, we want - # to link to compiler-rt instead of -lgcc_s - if tc-is-clang; then - # get the full library list out of 'pretend mode' - # and grep it for libclang_rt references - local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) ) - local i - for i in "${args[@]}"; do - if [[ ${i} == *libclang_rt* ]]; then - want_gcc_s=OFF - extra_libs+=( "${i}" ) - fi - done - fi - fi - - local libdir=$(get_libdir) - local mycmakeargs=( - -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib} - -DLIBCXX_ENABLE_SHARED=ON - -DLIBCXX_ENABLE_STATIC=$(usex static-libs) - -DLIBCXX_CXX_ABI=${cxxabi} - -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs} - # we're using our own mechanism for generating linker scripts - -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF - -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl) - -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s} - -DLIBCXX_INCLUDE_TESTS=$(usex test) - -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}" - ) - - if use test; then - mycmakeargs+=( - # this can be any directory, it just needs to exist... - # FIXME: remove this once https://reviews.llvm.org/D25093 is merged - -DLLVM_MAIN_SRC_DIR="${T}" - -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit - ) - fi - cmake-utils_src_configure -} - -multilib_src_test() { - local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null) - - [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests" - sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die - - cmake-utils_src_make check-libcxx -} - -# 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() { - local libdir=$(get_libdir) - local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")") - - # Move it first. - mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${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="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)" - # On Linux/glibc it does not link without libpthread or libdl. It is - # fine on FreeBSD. - use elibc_glibc && deps+=" libpthread.a libdl.a" - - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die -} - -gen_shared_ldscript() { - local libdir=$(get_libdir) - # libsupc++ doesn't have a shared version - local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")") - - mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die - local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)" - - gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die -} - -multilib_src_install() { - cmake-utils_src_install - gen_shared_ldscript - use static-libs && gen_static_ldscript -} - -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." -} -- cgit v1.2.3