diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-21 08:39:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-21 08:39:36 +0000 |
commit | 04c30f8cbff7e0280bd6a0b2ed1f04ffdc33f3de (patch) | |
tree | 4b013fd826891e2d5fab6e07279238c51a98fdbb | |
parent | e5930a36b38667f2cfc30d0f98166f59c747e6ff (diff) | |
download | aports-04c30f8cbff7e0280bd6a0b2ed1f04ffdc33f3de.tar.bz2 aports-04c30f8cbff7e0280bd6a0b2ed1f04ffdc33f3de.tar.xz |
main/llvm: split out static libs and clang runtime lib
-rw-r--r-- | testing/llvm/APKBUILD | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/testing/llvm/APKBUILD b/testing/llvm/APKBUILD index 99429739a5..5f2cccae94 100644 --- a/testing/llvm/APKBUILD +++ b/testing/llvm/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=llvm pkgver=3.6.0 -pkgrel=0 +pkgrel=1 pkgdesc="low level virtual machine compiler system" arch="x86_64 armhf" url="http://llvm.org/" @@ -11,7 +11,8 @@ depends="" depends_dev="perl" makedepends="$depends_dev make flex bison groff libffi-dev zlib-dev ncurses-dev libedit-dev python chrpath" install= -subpackages="clang $pkgname-dev $pkgname-doc $pkgname-libs" +subpackages="clang-libs:clang_libs clang + $pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs" source="http://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz http://llvm.org/releases/$pkgver/compiler-rt-$pkgver.src.tar.xz @@ -138,7 +139,19 @@ package() { mkdir -p "$pkgdir"/usr/share/doc mv "$pkgdir"/usr/docs/llvm "$pkgdir"/usr/share/doc/ || return 1 rmdir "$pkgdir"/usr/docs || return 1 - chrpath -d "$pkgdir"/usr/bin/* "$pkgdir"/usr/lib/*.so + chrpath -d "$pkgdir"/usr/bin/* "$pkgdir"/usr/lib/*.so || return 1 + + # remove erroneously installed example + rm "$pkgdir"/usr/lib/*LLVMHello.* || return 1 + + # remove executable bit from static libc + chmod -x "$pkgdir"/usr/lib/*.a +} + +clang_libs() { + pkgdesc="Runtime library for clang" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/libclang.so "$subpkgdir"/usr/lib/ } clang() { @@ -148,7 +161,6 @@ clang() { mv "$pkgdir"/usr/bin/clang* "$pkgdir"/usr/bin/c-index-test \ "$subpkgdir"/usr/bin/ || return 1 mv "$pkgdir"/usr/lib/clang \ - "$pkgdir"/usr/lib/libclang* \ "$subpkgdir"/usr/lib/ || return 1 mv "$pkgdir"/usr/include/clang "$pkgdir"/usr/include/clang-c \ "$subpkgdir"/usr/include/ || return 1 @@ -160,6 +172,13 @@ clang() { ln -s /usr/share/clang/scan-view/scan-view "$subpkgdir"/usr/bin/scan-view } +static() { + pkgdesc="LLVM static libraries" + depends= + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/ +} + libs() { pkgdesc="LLVM shared libraries" mkdir -p "$subpkgdir"/usr/lib/ |