aboutsummaryrefslogtreecommitdiffstats
path: root/main/compiler-rt/APKBUILD
blob: 3b40d6f116f3eb9179499f55acd6b8c7fa667efb (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Contributor Travis Tilley <ttilley@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=compiler-rt
pkgver=3.8.1
pkgrel=0
pkgdesc="LLVM compiler-rt runtime libraries"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
depends=""
depends_dev=""
makedepends="$depends_dev
	cmake
	python2
	llvm
	llvm-dev
	llvm-static
	"
install=
subpackages=""
source="http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz
	"
_builddir="$srcdir"/build
_srcdir="$srcdir"/compiler-rt-$pkgver.src

prepare() {
	msg "Patching compiler-rt..."
	cd "$_srcdir" || return 1
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i..."
			patch -s -p1 -N -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	mkdir -p "$_builddir"
	cd "$_builddir"
	cmake \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
		"${_srcdir}" || return 1

	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	mkdir -p "$pkgdir"/usr/lib/clang || return 1
	case "$CARCH" in
	ppc64le) ;;
	*) mv "$pkgdir"/usr/lib/linux "$pkgdir"/usr/lib/clang/$pkgver;;
	esac
}


sha512sums="bed3da5f8594c4bf71af406419fbeaf7ed5d8bf46adb305233a298271d34a9af1072bcb47d474ac19bb862cc7c7bc9e1d89bc1567133553f29480030cad1cf75  compiler-rt-3.8.1.src.tar.xz"