pkgname=(libc++ libc++abi) pkgbase=libc++ pkgver=19.1.6 pkgrel=1 pkgdesc="LLVM C++ standard library" url="https://libcxx.llvm.org/" arch=('x86_64') license=('Apache-2.0 WITH LLVM-exception') depends=('gcc-libs' 'glibc') makedepends=('clang' 'cmake' 'ninja' 'python') options=('!lto' '!staticlibs') source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}/llvm-project-${pkgver}.src.tar.xz) sha256sums=(e3f79317adaa9196d2cfffe1c869d7c100b7540832bc44fe0d3f44a12861fa34) build() { cd llvm-project-${pkgver}.src/runtimes local cmake_args=( -B flarebird-build -G Ninja -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr -D LLVM_LIBDIR_SUFFIX=64 -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -D LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" -D LLVM_EXTERNAL_LIT=/usr/bin/lit -D LLVM_ENABLE_PIC=ON -D LIBCXX_INSTALL_MODULES=ON -D LIBCXXABI_USE_LLVM_UNWINDER=OFF ) cmake ${cmake_args[@]} ninja -C flarebird-build cxx cxxabi } package_libc++ () { depends+=("libc++abi=${pkgver}-$pkgrel") cd llvm-project-${pkgver}.src/runtimes DESTDIR=${pkgdir} ninja -C flarebird-build install-cxx } package_libc++abi() { pkgdesc="Low level support for the ${pkgdesc}" cd llvm-project-${pkgver}.src/runtimes DESTDIR=${pkgdir} ninja -C flarebird-build install-cxxabi }