aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/llvm4/APKBUILD29
1 files changed, 17 insertions, 12 deletions
diff --git a/main/llvm4/APKBUILD b/main/llvm4/APKBUILD
index dc57b4c962..d28d7f03b7 100644
--- a/main/llvm4/APKBUILD
+++ b/main/llvm4/APKBUILD
@@ -5,9 +5,8 @@
_pkgname=llvm
pkgver=4.0.0
_majorver=${pkgver%%.*}
-_litver=0.6.0 # keep in sync with utils/lit/lit/__init__.py upstream!
pkgname=$_pkgname$_majorver
-pkgrel=3
+pkgrel=4
pkgdesc="Low Level Virtual Machine compiler system (version $_majorver)"
arch="all"
url="http://llvm.org/"
@@ -16,7 +15,7 @@ provides="llvm=$pkgver-r$pkgrel"
replaces="llvm"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="binutils-dev chrpath cmake file libffi-dev paxmark python2 py-setuptools zlib-dev"
-subpackages="$pkgname-static $pkgname-libs $pkgname-dev lit::noarch"
+subpackages="$pkgname-static $pkgname-libs $pkgname-dev $pkgname-test-utils:_test_utils"
source="http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz
llvm-fix-build-with-musl-libc.patch
llvm-fix-DynamicLibrary-to-build-with-musl-libc.patch
@@ -60,11 +59,6 @@ prepare() {
# https://bugs.llvm.org//show_bug.cgi?id=31870
rm test/tools/llvm-symbolizer/print_context.c
- local litver=$(python2 utils/lit/setup.py --version 2>/dev/null \
- | sed 's/\.dev.*$//')
- [ "$_litver" != "$litver" ] \
- && die "lit version mismatch, bump \$_litver to $litver!"
-
mkdir -p "$builddir"/build
}
@@ -135,6 +129,9 @@ package() {
# This tool is needed e.g. for running codegen tests in Rust package.
install -D -m 755 bin/FileCheck "$pkgdir"/$_prefix/bin/FileCheck
+ # This tool is required for the lit testing tool.
+ install -D -m 755 bin/not "$pkgdir"/$_prefix/bin/not
+
cd "$pkgdir"/$_prefix
# Remove RPATHs.
@@ -211,17 +208,25 @@ dev() {
_mv "$pkgdir"/$_prefix/lib $_prefix/
_mv "$pkgdir"/$_prefix/include $_prefix/
- _mv "$pkgdir"/$_prefix/bin/FileCheck $_prefix/bin/
_mv "$pkgdir"/$_prefix/bin/llvm-config $_prefix/bin/
}
-lit() {
- pkgdesc="A portable tool for executing LLVM and Clang style test suites"
- pkgver="$_litver"
+_test_utils() {
+ pkgdesc="LLVM $_majorver utilities for executing LLVM and Clang style test suites"
+ provides="llvm-test-utils=$pkgver-r$pkgrel"
depends="python2"
+ local litver=$(python2 "$builddir"/utils/lit/setup.py --version 2>/dev/null \
+ | sed 's/\.dev.*$//')
+ test -n "$litver" || return 1
+ provides="$provides lit=$litver-r$pkgrel"
+
cd "$builddir"/build
python2 ../utils/lit/setup.py install --prefix=/usr --root="$subpkgdir"
+
+ cd "$subpkgdir"
+ _mv "$pkgdir"/$_prefix/bin/FileCheck $_prefix/bin/
+ _mv "$pkgdir"/$_prefix/bin/not $_prefix/bin/
}
_mv() {