commit:     1a1d28d080df776be9c1688d054e97b3ff2c4072
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 25 18:43:59 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 18:43:59 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a1d28d0

sys-libs/libcxxabi: Add 18.0.0_pre20230925 snapshot

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

 sys-libs/libcxxabi/Manifest                        |   1 +
 .../libcxxabi/libcxxabi-18.0.0_pre20230925.ebuild  | 116 +++++++++++++++++++++
 2 files changed, 117 insertions(+)

diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index 5e4409ff769c..908f8400d4ca 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -9,3 +9,4 @@ DIST llvm-project-17.0.0rc4.src.tar.xz.sig 438 BLAKE2B 
2cda35b4a3ebddfdbe6828459
 DIST llvm-project-17.0.1.src.tar.xz 127830376 BLAKE2B 
bb3b9f7358df9006307f5eeccfc5c5ee5497498c4f091347924911cb6534e8d930024c35387456af24bf647d9e24a3d927aa49199036fb475018a610b5d792c7
 SHA512 
6fc1d5ff4fec49ef5bb495ba9d8f9ee9052c10999ec9d3ac8f825c718e3cdd64abd95408c4e5bb7f67eb9a7bfac9e26d2a949c4da9f163b5646c02e8a670ead5
 DIST llvm-project-17.0.1.src.tar.xz.sig 438 BLAKE2B 
3182e3c3a48635fdec39b945ee3b782d7c9c2a07911d9ede2e3421031bb1b4959bd495c5e39d094aeaf555579b9fe3eb834c1449077c154c629f5db605375e7c
 SHA512 
301a6e6c46d6fee13c86dec1a021c35f6bf3a97e5d6b0aa7b7eac34e7ca52f6cefffc25a9e376250b1eb721a65a5852f2f1948abd432698363a81dd7ee19d81c
 DIST llvm-project-7e5809e7e7bc9a828427b6540a51d45884d8bbbb.tar.gz 197275742 
BLAKE2B 
17df09155cf3451deffcdd71a4b0602211a4638ad961eb351802028f4fd1b8db870bef817430adb709ea7c1e85f545d7507c06d7fca26869f8a10e6ac6b03967
 SHA512 
e84aa041aadf3e50376cffd1e92c1447acdca0a2cf8e7df9cca9d0337dfeccb1d022da3a229bb0cfdc9c5fb87215682a1e4f474208b09b8800f30aa0c6e36c4b
+DIST llvm-project-f5cb9cb59d7c9c6ac3d5c41c677f68c9b75d34a3.tar.gz 198113948 
BLAKE2B 
1688920eb790421f4143e92bd7bd26794a2497e7b445dde6d55b59c9df4b1aebb848833c7cb1b7c273c5e002763f2531a341313500ce207242f992dfe343b988
 SHA512 
9817e8b7adf7c69d673124e8334c3e511dfd1cc386832c52b2fb0f2517475d29cd98513ad87188a962f9697dfac39ea03f5b2db6c549c307cf3d27b1370ffdf3

diff --git a/sys-libs/libcxxabi/libcxxabi-18.0.0_pre20230925.ebuild 
b/sys-libs/libcxxabi/libcxxabi-18.0.0_pre20230925.ebuild
new file mode 100644
index 000000000000..4fab65aee6f0
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-18.0.0_pre20230925.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2023 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 llvm.org python-any-r1 \
+       toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/";
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+clang +static-libs test"
+REQUIRED_USE="test? ( clang )"
+RESTRICT="!test? ( test )"
+
+# in 15.x, cxxabi.h is moving from libcxx to libcxxabi
+RDEPEND+="
+       !<sys-libs/libcxx-15
+"
+DEPEND="
+       ${RDEPEND}
+       sys-devel/llvm:${LLVM_MAJOR}
+"
+BDEPEND="
+       clang? (
+               sys-devel/clang:${LLVM_MAJOR}
+       )
+       !test? (
+               ${PYTHON_DEPS}
+       )
+       test? (
+               $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+       )
+"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+       use test || return 0
+       python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+       # darwin prefix builds do not have llvm installed yet, so rely on 
bootstrap-prefix
+       # to set the appropriate path vars to LLVM instead of using 
llvm_pkg_setup.
+       if [[ ${CHOST} != *-darwin* ]] || has_version sys-devel/llvm; then
+               LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+       fi
+       python-any-r1_pkg_setup
+}
+
+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
+
+       local libdir=$(get_libdir)
+       local mycmakeargs=(
+               -DCMAKE_CXX_COMPILER_TARGET="${CHOST}"
+               -DPython3_EXECUTABLE="${PYTHON}"
+               -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+               -DLLVM_INCLUDE_TESTS=OFF
+               -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+               -DLIBCXXABI_ENABLE_SHARED=ON
+               -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+               -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+               -DLIBCXXABI_USE_COMPILER_RT=${use_compiler_rt}
+
+               # upstream is omitting standard search path for this
+               # probably because gcc & clang are bundling their own unwind.h
+               -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+
+               -DLIBCXX_LIBDIR_SUFFIX=
+               -DLIBCXX_ENABLE_SHARED=ON
+               -DLIBCXX_ENABLE_STATIC=OFF
+               -DLIBCXX_CXX_ABI=libcxxabi
+               -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+               -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+               -DLIBCXX_HAS_GCC_S_LIB=OFF
+               -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+               -DLIBCXX_INCLUDE_TESTS=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_build cxxabi
+}
+
+multilib_src_test() {
+       local -x LIT_PRESERVES_TMP=1
+       cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+       DESTDIR="${D}" cmake_build install-cxxabi
+}

Reply via email to