commit:     02b98fbe983300b50018b0cc380cf9474d036f33
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 16 14:16:49 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 16 14:58:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02b98fbe

sys-libs/libcxx: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-libs/libcxx/Manifest                         |   4 -
 sys-libs/libcxx/libcxx-18.1.4.ebuild             | 210 -----------------------
 sys-libs/libcxx/libcxx-19.0.0_pre20240427.ebuild | 210 -----------------------
 sys-libs/libcxx/libcxx-19.0.0_pre20240504.ebuild | 210 -----------------------
 4 files changed, 634 deletions(-)

diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 23948f7d82f1..b70ccebadbac 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -6,10 +6,6 @@ DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 
95192d39cbd2914e5609db3659
 DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 
2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a
 SHA512 
ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
 DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B 
d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2
 SHA512 
6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 
186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7
 SHA512 
f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
-DIST llvm-project-18.1.4.src.tar.xz 132054668 BLAKE2B 
94bbad3b185fd07cbace4eff79aba80fbdd5e072739250e3927fe1848bcf3f8d355eb1f384e57306707eb702acc7ab01b732590735be7950221607664d04b0a6
 SHA512 
b1b214ae91f3705d8ea345547ad53f1e5d7d884c1eb6958bc41c14ac4b3e407771ccc2b693686ff103c8232c2c3942731d6db9a9cb4f735e6c6a0674739d0b29
-DIST llvm-project-18.1.4.src.tar.xz.sig 566 BLAKE2B 
b74fd219d7bcdf197b4e711cfbb25c40e9d8d2c7341de0215d8c31f330f396e9c166ff63513829cdc9cef349f08238f66a4dc949fa97958a7af496abae369eaa
 SHA512 
4f456edf4fb454815acaef6855b1a0991f229810a32e9369af83388e37f0ef8964308e1e93bd6216024cdd67e86caaadc8d5794467857cc6fe561c9fa6ca7386
 DIST llvm-project-18.1.5.src.tar.xz 132061072 BLAKE2B 
bfdd987d5992a4d94ae8b14792df3be67a8e8fdf1daef9834cdaa2132df1b7ddb72ba0aabbb34b171a73d0f3b2b0f61e7160f0b278a67fd4850e3f501fd21531
 SHA512 
9e2f1e251b3754a24a0b39676d78c98692887c05c85cf0bee50fd44d9635290019930d4dabd1ff4ba3c9c1067e7e0e09aa1bbcd3d76687f919a1d44ba85eee20
 DIST llvm-project-18.1.5.src.tar.xz.sig 566 BLAKE2B 
ad935db71ec3b9fc885d696af440764a71fe7cafc5b3ca0b25a2963100d9cb3790392daebcac1341716c95a8da3c6243f5a8667fea1ed18b93fc8baa495414c9
 SHA512 
3cbca1059d940f3bd7bd72d68f2828039b66304980cc5f43769649e5494fc7d71117bf8aba5cc7f7a2ffca52f60ba30fadf3b28f984fd49ddb14300e30b45237
-DIST llvm-project-338561657685c1831a53563b1bc36ffc7470239e.tar.gz 209715501 
BLAKE2B 
49152479d4f2cae430e783784d0cfcc129134f5cc0bf12c72701cd15e59cb3e1be2f61385ba9baa93d1d1193e89374ac8877b909650c163b681d1fcd26732cdc
 SHA512 
d34bbe82e85c5b9d493029ad7b46e802f06f7e7a8a48515d0043c58c3251271f8f3e1e11c47eb91bd3db2477f819d33b43ddebb276eb9601c5ad141e463c9682
-DIST llvm-project-76aa042dde6ba9ba57c680950f5818259ee02690.tar.gz 210235525 
BLAKE2B 
fbbb8e70e0a08bde1fa2277746f692399fa15015b69693f5e8d3297abf02dfb7b36c535880f5c6924c870652dd3106936776d57c34b22234a5419f75b3561bb7
 SHA512 
9107551ceb2b28aa735006144b3344801ea861d7b49eae4881831af507314fb8da2bf5e8a3a407aeebd2eee01fbfad2ca90269d2331fe43cca5c2cc49dd257b7
 DIST llvm-project-a7ee81e8279e0bf6e05617a4a638e5f2f8e45022.tar.gz 210384692 
BLAKE2B 
28b85b08a42c173e1c3bf530483112b1629c7e6684a83a016fbe9f132774f7b864d793581873a6529defeabb4479ad9a3d7c025b781b2fa4952c239b6d567b11
 SHA512 
1d593818347452f96611a62fa3aa22ce4355a4ee5d5dcfcb54a286a1aa980e9531d5fb6cbee3b0ee5943c6d0f4e2ba2245e13262fe7859e5b114f9c5d5cf1417

diff --git a/sys-libs/libcxx/libcxx-18.1.4.ebuild 
b/sys-libs/libcxx/libcxx-18.1.4.ebuild
deleted file mode 100644
index a6fca47e6c29..000000000000
--- a/sys-libs/libcxx/libcxx-18.1.4.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
-inherit toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos"
-IUSE="+clang +libcxxabi +static-libs test"
-REQUIRED_USE="test? ( clang )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-       libcxxabi? (
-               ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
-       )
-       !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
-"
-DEPEND="
-       ${RDEPEND}
-       sys-devel/llvm:${LLVM_MAJOR}
-"
-BDEPEND="
-       clang? (
-               sys-devel/clang:${LLVM_MAJOR}
-       )
-       !test? (
-               ${PYTHON_DEPS}
-       )
-       test? (
-               dev-debug/gdb[python]
-               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
-       )
-"
-
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
-llvm.org_set_globals
-
-python_check_deps() {
-       use test || return 0
-       python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-       python-any-r1_pkg_setup
-
-       if ! use libcxxabi && ! 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
-}
-
-src_prepare() {
-       # hanging tests
-       # https://github.com/llvm/llvm-project/issues/73791
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || 
die
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals*
 || die
-
-       cmake_src_prepare
-}
-
-test_compiler() {
-       $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
-               <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
-       llvm_prepend_path "${LLVM_MAJOR}"
-
-       # note: we need to do this before multilib kicks in since it will
-       # alter the CHOST
-       local cxxabi cxxabi_incs
-       if use libcxxabi; then
-               cxxabi=system-libcxxabi
-               cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
-       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
-
-       multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-       if use clang; then
-               local -x CC=${CHOST}-clang
-               local -x CXX=${CHOST}-clang++
-               strip-unsupported-flags
-       fi
-
-       # link to compiler-rt
-       local use_compiler_rt=OFF
-       [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
-
-       # bootstrap: cmake is unhappy if compiler can't link to stdlib
-       local nolib_flags=( -nodefaultlibs -lc )
-       if ! test_compiler; then
-               if test_compiler "${nolib_flags[@]}"; then
-                       local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
-                       ewarn "${CXX} seems to lack runtime, trying with 
${nolib_flags[*]}"
-               fi
-       fi
-
-       local libdir=$(get_libdir)
-       local mycmakeargs=(
-               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
-               -DPython3_EXECUTABLE="${PYTHON}"
-               -DLLVM_ENABLE_RUNTIMES=libcxx
-               -DLLVM_INCLUDE_TESTS=OFF
-               -DLLVM_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_INCLUDE_BENCHMARKS=OFF
-               -DLIBCXX_INCLUDE_TESTS=$(usex test)
-               -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
-               # this is broken with standalone builds, and also meaningless
-               -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
-       )
-
-       if use test; then
-               mycmakeargs+=(
-                       -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-                       -DLLVM_LIT_ARGS="$(get_lit_flags)"
-                       -DPython3_EXECUTABLE="${PYTHON}"
-               )
-       fi
-       cmake_src_configure
-}
-
-multilib_src_compile() {
-       cmake_src_compile
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               gen_shared_ldscript
-               use static-libs && gen_static_ldscript
-       fi
-}
-
-multilib_src_test() {
-       local -x LIT_PRESERVES_TMP=1
-       cmake_build check-cxx
-}
-
-multilib_src_install() {
-       cmake_src_install
-       # since we've replaced libc++.{a,so} with ldscripts, now we have to
-       # install the extra symlinks
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               dolib.so lib/libc++_shared.so
-               use static-libs && dolib.a lib/libc++_static.a
-       fi
-}
-
-# 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() {
-       # Move it first.
-       mv lib/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
-               $(usex libcxxabi libc++abi.a libsupc++.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[*]}" > lib/libc++.a || die
-}
-
-gen_shared_ldscript() {
-       # Move it first.
-       mv lib/libc++{,_shared}.so || die
-       local deps=(
-               libc++_shared.so
-               # libsupc++ doesn't have a shared version
-               $(usex libcxxabi libc++abi.so libsupc++.a)
-       )
-
-       gen_ldscript "${deps[*]}" > lib/libc++.so || die
-}

diff --git a/sys-libs/libcxx/libcxx-19.0.0_pre20240427.ebuild 
b/sys-libs/libcxx/libcxx-19.0.0_pre20240427.ebuild
deleted file mode 100644
index e29d57a316d3..000000000000
--- a/sys-libs/libcxx/libcxx-19.0.0_pre20240427.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
-inherit toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-IUSE="+clang +libcxxabi +static-libs test"
-REQUIRED_USE="test? ( clang )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-       libcxxabi? (
-               ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
-       )
-       !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
-"
-DEPEND="
-       ${RDEPEND}
-       sys-devel/llvm:${LLVM_MAJOR}
-"
-BDEPEND="
-       clang? (
-               sys-devel/clang:${LLVM_MAJOR}
-       )
-       !test? (
-               ${PYTHON_DEPS}
-       )
-       test? (
-               dev-debug/gdb[python]
-               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
-       )
-"
-
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
-llvm.org_set_globals
-
-python_check_deps() {
-       use test || return 0
-       python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-       python-any-r1_pkg_setup
-
-       if ! use libcxxabi && ! 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
-}
-
-src_prepare() {
-       # hanging tests
-       # https://github.com/llvm/llvm-project/issues/73791
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || 
die
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals*
 || die
-
-       cmake_src_prepare
-}
-
-test_compiler() {
-       $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
-               <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
-       llvm_prepend_path "${LLVM_MAJOR}"
-
-       # note: we need to do this before multilib kicks in since it will
-       # alter the CHOST
-       local cxxabi cxxabi_incs
-       if use libcxxabi; then
-               cxxabi=system-libcxxabi
-               cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
-       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
-
-       multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-       if use clang; then
-               local -x CC=${CHOST}-clang
-               local -x CXX=${CHOST}-clang++
-               strip-unsupported-flags
-       fi
-
-       # link to compiler-rt
-       local use_compiler_rt=OFF
-       [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
-
-       # bootstrap: cmake is unhappy if compiler can't link to stdlib
-       local nolib_flags=( -nodefaultlibs -lc )
-       if ! test_compiler; then
-               if test_compiler "${nolib_flags[@]}"; then
-                       local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
-                       ewarn "${CXX} seems to lack runtime, trying with 
${nolib_flags[*]}"
-               fi
-       fi
-
-       local libdir=$(get_libdir)
-       local mycmakeargs=(
-               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
-               -DPython3_EXECUTABLE="${PYTHON}"
-               -DLLVM_ENABLE_RUNTIMES=libcxx
-               -DLLVM_INCLUDE_TESTS=OFF
-               -DLLVM_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_INCLUDE_BENCHMARKS=OFF
-               -DLIBCXX_INCLUDE_TESTS=$(usex test)
-               -DLIBCXX_INSTALL_MODULES=ON
-               -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
-               # this is broken with standalone builds, and also meaningless
-               -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
-       )
-
-       if use test; then
-               mycmakeargs+=(
-                       -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-                       -DLLVM_LIT_ARGS="$(get_lit_flags)"
-                       -DPython3_EXECUTABLE="${PYTHON}"
-               )
-       fi
-       cmake_src_configure
-}
-
-multilib_src_compile() {
-       cmake_src_compile
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               gen_shared_ldscript
-               use static-libs && gen_static_ldscript
-       fi
-}
-
-multilib_src_test() {
-       local -x LIT_PRESERVES_TMP=1
-       cmake_build check-cxx
-}
-
-multilib_src_install() {
-       cmake_src_install
-       # since we've replaced libc++.{a,so} with ldscripts, now we have to
-       # install the extra symlinks
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               dolib.so lib/libc++_shared.so
-               use static-libs && dolib.a lib/libc++_static.a
-       fi
-}
-
-# 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() {
-       # Move it first.
-       mv lib/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
-               $(usex libcxxabi libc++abi.a libsupc++.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[*]}" > lib/libc++.a || die
-}
-
-gen_shared_ldscript() {
-       # Move it first.
-       mv lib/libc++{,_shared}.so || die
-       local deps=(
-               libc++_shared.so
-               # libsupc++ doesn't have a shared version
-               $(usex libcxxabi libc++abi.so libsupc++.a)
-       )
-
-       gen_ldscript "${deps[*]}" > lib/libc++.so || die
-}

diff --git a/sys-libs/libcxx/libcxx-19.0.0_pre20240504.ebuild 
b/sys-libs/libcxx/libcxx-19.0.0_pre20240504.ebuild
deleted file mode 100644
index e29d57a316d3..000000000000
--- a/sys-libs/libcxx/libcxx-19.0.0_pre20240504.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit cmake-multilib flag-o-matic llvm.org llvm-utils python-any-r1
-inherit toolchain-funcs
-
-DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
-HOMEPAGE="https://libcxx.llvm.org/";
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="0"
-IUSE="+clang +libcxxabi +static-libs test"
-REQUIRED_USE="test? ( clang )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-       libcxxabi? (
-               ~sys-libs/libcxxabi-${PV}[static-libs?,${MULTILIB_USEDEP}]
-       )
-       !libcxxabi? ( >=sys-devel/gcc-4.7:=[cxx] )
-"
-DEPEND="
-       ${RDEPEND}
-       sys-devel/llvm:${LLVM_MAJOR}
-"
-BDEPEND="
-       clang? (
-               sys-devel/clang:${LLVM_MAJOR}
-       )
-       !test? (
-               ${PYTHON_DEPS}
-       )
-       test? (
-               dev-debug/gdb[python]
-               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
-       )
-"
-
-LLVM_COMPONENTS=( runtimes libcxx{,abi} llvm/{cmake,utils/llvm-lit} cmake )
-llvm.org_set_globals
-
-python_check_deps() {
-       use test || return 0
-       python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
-}
-
-pkg_setup() {
-       python-any-r1_pkg_setup
-
-       if ! use libcxxabi && ! 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
-}
-
-src_prepare() {
-       # hanging tests
-       # https://github.com/llvm/llvm-project/issues/73791
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/fetch_* || 
die
-       rm 
../libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/operator.*_equals*
 || die
-
-       cmake_src_prepare
-}
-
-test_compiler() {
-       $(tc-getCXX) ${CXXFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c++ - \
-               <<<'int main() { return 0; }' &>/dev/null
-}
-
-src_configure() {
-       llvm_prepend_path "${LLVM_MAJOR}"
-
-       # note: we need to do this before multilib kicks in since it will
-       # alter the CHOST
-       local cxxabi cxxabi_incs
-       if use libcxxabi; then
-               cxxabi=system-libcxxabi
-               cxxabi_incs="${EPREFIX}/usr/include/c++/v1"
-       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
-
-       multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-       if use clang; then
-               local -x CC=${CHOST}-clang
-               local -x CXX=${CHOST}-clang++
-               strip-unsupported-flags
-       fi
-
-       # link to compiler-rt
-       local use_compiler_rt=OFF
-       [[ $(tc-get-c-rtlib) == compiler-rt ]] && use_compiler_rt=ON
-
-       # bootstrap: cmake is unhappy if compiler can't link to stdlib
-       local nolib_flags=( -nodefaultlibs -lc )
-       if ! test_compiler; then
-               if test_compiler "${nolib_flags[@]}"; then
-                       local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
-                       ewarn "${CXX} seems to lack runtime, trying with 
${nolib_flags[*]}"
-               fi
-       fi
-
-       local libdir=$(get_libdir)
-       local mycmakeargs=(
-               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
-               -DPython3_EXECUTABLE="${PYTHON}"
-               -DLLVM_ENABLE_RUNTIMES=libcxx
-               -DLLVM_INCLUDE_TESTS=OFF
-               -DLLVM_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_INCLUDE_BENCHMARKS=OFF
-               -DLIBCXX_INCLUDE_TESTS=$(usex test)
-               -DLIBCXX_INSTALL_MODULES=ON
-               -DLIBCXX_USE_COMPILER_RT=${use_compiler_rt}
-               # this is broken with standalone builds, and also meaningless
-               -DLIBCXXABI_USE_LLVM_UNWINDER=OFF
-       )
-
-       if use test; then
-               mycmakeargs+=(
-                       -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-                       -DLLVM_LIT_ARGS="$(get_lit_flags)"
-                       -DPython3_EXECUTABLE="${PYTHON}"
-               )
-       fi
-       cmake_src_configure
-}
-
-multilib_src_compile() {
-       cmake_src_compile
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               gen_shared_ldscript
-               use static-libs && gen_static_ldscript
-       fi
-}
-
-multilib_src_test() {
-       local -x LIT_PRESERVES_TMP=1
-       cmake_build check-cxx
-}
-
-multilib_src_install() {
-       cmake_src_install
-       # since we've replaced libc++.{a,so} with ldscripts, now we have to
-       # install the extra symlinks
-       if [[ ${CHOST} != *-darwin* ]] ; then
-               dolib.so lib/libc++_shared.so
-               use static-libs && dolib.a lib/libc++_static.a
-       fi
-}
-
-# 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() {
-       # Move it first.
-       mv lib/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
-               $(usex libcxxabi libc++abi.a libsupc++.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[*]}" > lib/libc++.a || die
-}
-
-gen_shared_ldscript() {
-       # Move it first.
-       mv lib/libc++{,_shared}.so || die
-       local deps=(
-               libc++_shared.so
-               # libsupc++ doesn't have a shared version
-               $(usex libcxxabi libc++abi.so libsupc++.a)
-       )
-
-       gen_ldscript "${deps[*]}" > lib/libc++.so || die
-}

Reply via email to