summaryrefslogtreecommitdiff
path: root/sys-libs/libcxx
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-03 16:17:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-03 16:17:22 +0000
commit4cd2370bed609c118b6edfde5d3f116e5c35b897 (patch)
treeec58f2c41f49754e41521d5ebc9dce4597ddd0a5 /sys-libs/libcxx
parentf443475c824b4b5c086e6d040961cb35ad81bc60 (diff)
gentoo resync : 03.12.2017
Diffstat (limited to 'sys-libs/libcxx')
-rw-r--r--sys-libs/libcxx/Manifest2
-rw-r--r--sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild199
2 files changed, 201 insertions, 0 deletions
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 02d1af0f4528..2c0c0ea9fd23 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -9,12 +9,14 @@ DIST libcxx-3.9.0.src.tar.xz 1198308 SHA256 d0b38d51365c6322f5666a2a8105785f2e11
DIST libcxx-3.9.1.src.tar.xz 1209020 SHA256 25e615e428f60e651ed09ffd79e563864e3f4bc69a9e93ee41505c419d1a7461 SHA512 a5976e4096624a7307b3e43f4a22ac2dc74572226e0f57af9f3ef537a14c3cff1601b7042aef9dc40a0ee53ca76b08d72eb9c253dcf34f115d3153c302db7070 WHIRLPOOL cad439979570192b195338d752a24fb0ad8704c0c8efed3b6d7724437763eab7bc3b8baaf2f0e6fff55c6d9be211dff6f7baf18dec55e3a29ad3b8a423cefb1e
DIST libcxx-4.0.1.src.tar.xz 1446380 SHA256 520a1171f272c9ff82f324d5d89accadcec9bc9f3c78de11f5575cdb99accc4c SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a WHIRLPOOL fe7c71e8dc2d17d14e94896837229c5ed872e7c04aea79a207e8fa98aa4539a7445e402b848d0c0d009f154f00d970159ad009d16bfdb9ae012ce5c7c6d9ba51
DIST libcxx-5.0.0.src.tar.xz 1518940 SHA256 eae5981e9a21ef0decfcac80a1af584ddb064a32805f95a57c7c83a5eb28c9b1 SHA512 210749f6585d8fd39fc63a32dd85d68de4aa480c91915cbf419b9e8a3b300fa4624f03200ed963cecc8ab233777c36e8c522fa0762a2aa068bc65e6f48118328 WHIRLPOOL c791f6718e1c2a97fae26741284d861fc869721fca11b4ab4d3e9b4052ce17fca1fd99f945f406fdcdbfde43622cb7afe351e0268d773f6b42d1da2f5dc0f1f5
+DIST libcxx-5.0.1rc2.src.tar.xz 1533332 BLAKE2B 7ac60315ca68054cafdfa3814daea3fe288c140e397b78474b657d7816dfb00c0b84715fac41a7257e85c61f27d7eaefaed7096356c39f02ff2c305440e00bd3 SHA512 aaf9aeded70f948440cb55f3c8a7633be6edb8abde496d5f1571d62fb5d34d8f3ec27935a774224e620b26845ab1081189511a5eb223b5611ec4adfbbc3a2641
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 6302 BLAKE2B a23e26a409bd1ac5cb2af2ee0afcea40c81d78aeb3bb60c7820c09331a903265f84dbf89851aae6d8c6113099877a1021a2ea432794dc330848a1cb93a3f9a49 SHA512 5ec4235312e071ff5b48ff803af94426a5235cdea8b14362a7552b36fe2ceae3fbbccf86348f046cdc7e69fed8fa6118cd1274762dd2bae0d72ba6bc5fed6a48
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.9999.ebuild 6614 BLAKE2B f9d459cbeb42546be39ec9d024a1784f0d40ee4fb6ddc9ea7b109b5adc3769edcad5f7c48bea70b3f087205f1e08c9f88ec38101db1662e48f13f88c517f94d5 SHA512 b15a6eb21ea58907beed4603cab1088ee9b53adece3a8fded74c50763afe5b565d2cd7ac80b4b5326829a9e32fdf728ddb99c17f5bd3a9a691689a56c8203522
EBUILD libcxx-9999.ebuild 6458 BLAKE2B 9c11d52454631b6b2ad2fc792a644efdbad95d874d85e0a358ee78579a202faecd6db98c4f78407bd9eb31105b92ca04d4311038cbefe2b73a83329fc8518010 SHA512 7f73a4a5c868c67e2c479740e6c98f53fea359956fd3758d8f4270a0107158354a4c703810976c65e5d943c46394870f965ffa3d0f930e694d037f400859f36f
MISC metadata.xml 854 BLAKE2B f731ffbb07722face32cfe5ef0576c572fc45d93e8d78ec4adb46c43b95999dc4eb48f20311517fe08a397f2e5dec56c530bb6787a058358cfd1af8d79ffad90 SHA512 8ef3feab266e09442a42baced2d72667fa8b1290624c2c84bab7b173ead72669568847f6e995388fc1d7bc722381f60805d87b2a0cc2d04ae0c49e36bec3802a
diff --git a/sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild b/sys-libs/libcxx/libcxx-5.0.1_rc2.ebuild
new file mode 100644
index 000000000000..ab78b95992b4
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-5.0.1_rc2.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="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."
+}