# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=llvm-libunwind _pkgname=libunwind pkgver=3.9.1 _llvmver=3.9 pkgrel=1 pkgdesc="LLVM version of libunwind library" url="http://llvm.org/" arch="all !ppc64le" license="BSD" depends_dev="!libunwind-dev" makedepends="cmake llvm$_llvmver-dev" subpackages="$pkgname-dev" source="http://www.llvm.org/releases/$pkgver/$_pkgname-$pkgver.src.tar.xz" builddir="$srcdir/$_pkgname-$pkgver.src" options="!check" build() { local flag; for flag in 0 1; do mkdir -p "$builddir"/build-$flag cd "$builddir"/build-$flag cmake .. \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DLIBUNWIND_ENABLE_SHARED=$flag \ -DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=0 \ -DLLVM_CONFIG="/usr/bin/llvm-config-$_llvmver" make done } package() { local flag; for flag in 0 1; do make install -C "$builddir"/build-$flag DESTDIR="$pkgdir" done cd "$builddir" mkdir -p "$pkgdir"/usr/include cp include/*.h "$pkgdir"/usr/include/ } sha512sums="a80f5d0660e209f5bf709316b5df2ca63b9f0db49f5f74dfe9c9e580c654f61a15acc071a739fdb84baf5ffa9420b92498f8560331173642d80f6b74e1e2afb7 libunwind-3.9.1.src.tar.xz"