# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=llvm-libunwind # Note: Update together with llvm. pkgver=5.0.1 _pkgname=libunwind _llvmver=${pkgver%%.*} pkgrel=0 pkgdesc="LLVM version of libunwind library" url="http://llvm.org/" arch="all !s390x" license="BSD" depends_dev="!libunwind-dev" makedepends="cmake llvm$_llvmver-dev" subpackages="$pkgname-dev" source="https://www.llvm.org/releases/$pkgver/$_pkgname-$pkgver.src.tar.xz ppc64le-support.patch" builddir="$srcdir/$_pkgname-$pkgver.src" options="!check" build() { mkdir -p "$builddir/build" cd "$builddir/build" 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 make } package() { cd "$builddir" make -C build install DESTDIR="$pkgdir" mkdir -p "$pkgdir"/usr/include cp include/*.h "$pkgdir"/usr/include/ } sha512sums="6c0f7a286c1ffa46769685ee36604cd90ed40470e1c3d3ef03c46bcc9e5f9e36e68a0a1f67b9b300823170b48c9b8d2db4625afd885f1d024905db1dffd9fc49 libunwind-5.0.1.src.tar.xz 16ebe254c1aa72e6ab350f97a6c4dbfcedb6c014452f8d483b082269ce3be9ef3e96c0c6edc22cc1bac70b59c119b362729ac0d51539f3e255250a86b688f726 ppc64le-support.patch"