# Contributor: Eric Molitor # Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=llvm-libunwind # Note: Update together with llvm. pkgver=8.0.1 _pkgname=libunwind _llvmver=${pkgver%%.*} pkgrel=0 pkgdesc="LLVM version of libunwind library" url="http://llvm.org/" arch="aarch64 armhf armv7 ppc64le x86 x86_64" license="BSD" depends_dev="!libunwind-dev" makedepends="cmake llvm$_llvmver-dev" subpackages="$pkgname-dev" source="https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/libunwind-$pkgver.src.tar.xz" builddir="$srcdir/$_pkgname-$pkgver.src" options="!check" build() { mkdir -p "$builddir/build" cd "$builddir/build" local crossopts='' [ "$CBUILD" != "$CHOST" ] && crossopts=" -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux -DLIBUNWIND_SYSROOT=$CBUILDROOT" cmake .. \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \ -DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \ -DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ \ -DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \ -DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF \ $crossopts make } package() { cd "$builddir" make -C build install DESTDIR="$pkgdir" mkdir -p "$pkgdir"/usr/include cp include/*.h "$pkgdir"/usr/include/ } sha512sums="c115582ca879e215b97d24e4aa80696796383e79856cf26e40b4ddd6b255d598f9fa9867b30f0fd1691be770779835ac1d4b9a5e4a71424b18499b79ea37d060 libunwind-8.0.1.src.tar.xz"