APKBUILD 1.25 KB
Newer Older
1 2 3
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=llvm-libunwind
4
# Note: Update together with llvm.
5
pkgver=5.0.1
6
_pkgname=libunwind
7 8
_llvmver=${pkgver%%.*}
pkgrel=0
9 10
pkgdesc="LLVM version of libunwind library"
url="http://llvm.org/"
11
arch="all !ppc64le !s390x"
12 13
license="BSD"
depends_dev="!libunwind-dev"
14
makedepends="cmake llvm$_llvmver-dev"
15
subpackages="$pkgname-dev"
16
source="https://www.llvm.org/releases/$pkgver/$_pkgname-$pkgver.src.tar.xz"
17 18 19 20
builddir="$srcdir/$_pkgname-$pkgver.src"
options="!check"

build() {
21 22
	mkdir -p "$builddir/build"
	cd "$builddir/build"
23

24
	cmake .. \
25
		-DCMAKE_BUILD_TYPE=MinSizeRel \
26 27 28
		-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
		-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
		-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
29
		-DCMAKE_INSTALL_PREFIX=/usr \
30
		\
31 32
		-DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \
		-DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF
33

34
	make
35 36 37 38
}

package() {
	cd "$builddir"
39
	make -C build install DESTDIR="$pkgdir"
40 41 42 43 44

	mkdir -p "$pkgdir"/usr/include
	cp include/*.h "$pkgdir"/usr/include/
}

45
sha512sums="6c0f7a286c1ffa46769685ee36604cd90ed40470e1c3d3ef03c46bcc9e5f9e36e68a0a1f67b9b300823170b48c9b8d2db4625afd885f1d024905db1dffd9fc49  libunwind-5.0.1.src.tar.xz"