aboutsummaryrefslogtreecommitdiffstats
path: root/testing/llvm-libunwind/APKBUILD
blob: 3168e5a33c7e8ade5efce0b41030adc74dfab940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
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"
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"