aboutsummaryrefslogtreecommitdiffstats
path: root/main/llvm4/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-17 02:36:09 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-17 03:10:01 +0200
commit24bd280a18ce673ba4f4f22601c9d5aa949895d6 (patch)
tree607ad82a433359415138e8c2c3a4207295909b61 /main/llvm4/APKBUILD
parentb01d94d46a60b5ee5241ec020971839c517215a2 (diff)
downloadaports-24bd280a18ce673ba4f4f22601c9d5aa949895d6.tar.bz2
aports-24bd280a18ce673ba4f4f22601c9d5aa949895d6.tar.xz
main/llvm4: rename lit subpkg to -test-utils, move FileCheck and not here
It seems that overriding pkgver for a subpackage really wasn't a good idea. I still don't know what the heck happened on the build servers, but for some unknown reason lit-*.apk was not uploaded to mirrors. Also builders rebuilt llvm4 twice, even when the previous build succeeded. Anyway, I'm even more convinced that it was just a bad idea. Upstream does not actually release lit, they release only llvm with bundled lit. It has some version number in setup.py, but what if they let it unchanged between two llvm releases, despite making some changes in the lit's codebase? It's true that it's wrong to call it lit-4.0.0 when its installed as a python module with version number 0.6.0. So I kinda workarounded it by renaming this subpackage to llvm4-test-utils with provides="lit-0.6.0-rX". :) And to not leave lit here alone, I've also moved FileCheck and not utils here, 'cause these are testing utils too and lit needs them.
Diffstat (limited to 'main/llvm4/APKBUILD')
-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() {