summaryrefslogtreecommitdiffstats
path: root/testing/llvm/APKBUILD
blob: fb96a8c547a4d75802d7443772c5a97f70e82fbc (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=llvm
pkgver=2.8
pkgrel=0
pkgdesc="low level virtual machine compiler system"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
depends=
makedepends="groff perl"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="http://llvm.org/releases/$pkgver/llvm-$pkgver.tgz
	http://llvm.org/releases/$pkgver/clang-$pkgver.tgz
        llvm-uclibc-errno-fsckery.patch"

_builddir="$srcdir"/build

prepare() {
	mkdir "$_builddir"

	msg "Preparing CLANG sources..."

	mv "$srcdir"/clang-$pkgver "$srcdir"/$pkgname-$pkgver/tools/clang

	msg "Patching LLVM core..."

	cd "$srcdir"/$pkgname-$pkgver

	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i..."
			patch -s -p1 -N -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	cd "$_builddir"
	../$pkgname-$pkgver/configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
}

md5sums="220d361b4d17051ff4bb21c64abe05ba  llvm-2.8.tgz
10e14c901fc3728eecbd5b829e011b59  clang-2.8.tgz
089441aa2369c90a0fd0edaa311cb7d6  llvm-uclibc-errno-fsckery.patch"