aboutsummaryrefslogtreecommitdiffstats
path: root/main/clang/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-04-16 14:05:48 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-04-16 15:09:33 +0200
commit549294b4ebababb21ad978d8d6ff71c468dd88a2 (patch)
tree8dcbdd00c25afd568d6b4b3e46ab2a7c1b3d599b /main/clang/APKBUILD
parent2f03bd64f5aac2f44fcaf95f047d57482eb9d177 (diff)
downloadaports-549294b4ebababb21ad978d8d6ff71c468dd88a2.tar.bz2
aports-549294b4ebababb21ad978d8d6ff71c468dd88a2.tar.xz
main/clang: clean-up abuild
Diffstat (limited to 'main/clang/APKBUILD')
-rw-r--r--main/clang/APKBUILD129
1 files changed, 25 insertions, 104 deletions
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index f4a8d68bbf..cff46736a4 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -7,23 +7,19 @@ pkgdesc="A C language family front-end for LLVM"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
-depends=""
-depends_dev=""
-makedepends="$depends_dev
+makedepends="
cmake
isl-dev
libxml2-dev
libxml2-utils
- llvm-dev llvm llvm-static
- make
+ llvm
+ llvm-dev
+ llvm-static
paxmark
python2
"
-install=
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-analyzer"
-source="
- http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz
-
+source="http://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz
clang-0001-Add-Alpine-Linux-distro.patch
clang-0002-Use-z-relro-on-Alpine-Linux.patch
clang-0003-Use-hash-style-gnu-for-Alpine-Linux.patch
@@ -32,34 +28,13 @@ source="
clang-0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch
"
-
-
-_builddir="$srcdir"/build
-# -DLINK_POLLY_INTO_TOOLS=YES \
-# -DPOLLY_ENABLE_GPGPU_CODEGEN=NO \
-# -DWITH_POLLY=YES \
-
-
-_builddir="$srcdir"/build
-_srcdir="$srcdir"/cfe-$pkgver.src
-
-prepare() {
- msg "Patching clang..."
- 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
-}
+builddir="$srcdir/cfe-$pkgver.src"
build() {
- mkdir -p "$_builddir"
- cd "$_builddir"
- cmake -G "Unix Makefiles" -Wno-dev \
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ cmake .. -G "Unix Makefiles" -Wno-dev \
-DCLANG_PLUGIN_SUPPORT=YES \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -68,94 +43,40 @@ build() {
-DCLANG_INCLUDE_TESTS:BOOL=ON \
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
-DLIBCLANG_BUILD_STATIC:BOOL=ON \
- "${_srcdir}" || return 1
-# -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
+ || return 1
make clang-tblgen || return 1
- make || return 1
-
- case "$CARCH" in
- arm*)
- # ARM has few failures in test suite
- # that we don't care about currently
- ;;
- *)
- # needs lit.py from llvm source tree
- # make check-clang || return 1
- ;;
- esac
+ make
}
package() {
- cd "$_builddir"
+ cd "$builddir"/build
+
make DESTDIR="$pkgdir" install || return 1
- install lib/libclang.a "$pkgdir"/usr/lib || return 1
+ install -m 644 lib/libclang.a "$pkgdir"/usr/lib
}
static() {
- pkgdesc="static libraries for clang"
+ pkgdesc="Static libraries for clang"
+
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
-#clang_libs() {
-# pkgdesc="Runtime library for clang"
-# mkdir -p "$subpkgdir"/usr/lib/
-# mv "$pkgdir"/usr/lib/libclang*.so.* \
-# "$pkgdir"/usr/lib/libclang*.so \
-# "$subpkgdir"/usr/lib/
-#}
-
-clang() {
- pkgdesc="A C language family front-end for LLVM"
-
- mkdir -p "$subpkgdir"/usr/bin \
- "$subpkgdir"/usr/lib \
- "$subpkgdir"/usr/share \
- "$subpkgdir"/usr/include \
- || return 1
- 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
- mv "$pkgdir"/usr/share/clang "$subpkgdir"/usr/share/ || return 1
-}
-
analyzer() {
- pkgdesc="clang source code analysis framework"
+ pkgdesc="Clang source code analysis framework"
depends="python2"
+
+ cd "$pkgdir"
+
mkdir -p "$subpkgdir"/usr/bin \
"$subpkgdir"/usr/libexec \
- "$subpkgdir"/usr/share/ \
- || return 1
- mv "$pkgdir"/usr/bin/scan-* \
- "$subpkgdir"/usr/bin/ || return 1
- mv "$pkgdir"/usr/libexec/*-analyzer \
- "$subpkgdir"/usr/libexec/ || return 1
- mv "$pkgdir"/usr/share/scan-* \
- "$subpkgdir"/usr/share/ || return 1
+ "$subpkgdir"/usr/share/
+ mv usr/bin/scan-* "$subpkgdir"/usr/bin/ || return 1
+ mv usr/libexec/*-analyzer "$subpkgdir"/usr/libexec/ || return 1
+ mv usr/share/scan-* "$subpkgdir"/usr/share/
}
-md5sums="4ff2f8844a786edb0220f490f7896080 cfe-3.8.1.src.tar.xz
-4f1454992cf8aab70ac5eff62e6ea883 clang-0001-Add-Alpine-Linux-distro.patch
-4c6531bed2dbfa945b761aa371e86b9a clang-0002-Use-z-relro-on-Alpine-Linux.patch
-8e866582b4ee7f7d282e49ab43d2b511 clang-0003-Use-hash-style-gnu-for-Alpine-Linux.patch
-31084621d11fe722acc41d4e0d7e340f clang-0004-Add-musl-targets-and-dynamic-linker.patch
-636b294bc8af983f1fd5084df48dad00 clang-0005-Enable-PIE-by-default-for-alpine-linux.patch
-227884842639a3862aff22d9a7af1740 clang-0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
-6daf6d90da9561818098922101af09f4 clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch"
-sha256sums="4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf cfe-3.8.1.src.tar.xz
-d2c0666ecf8640ff85ea418ed8c0286b112962139a5ad5644019e69b1214a3dd clang-0001-Add-Alpine-Linux-distro.patch
-3f7f3c7d185420707dc7572603b963ca5ec5a0425d1f7f53473948d9fb7f149b clang-0002-Use-z-relro-on-Alpine-Linux.patch
-5bb41e118184aee03ef3dec47d2ada38516040f903c630283617399db21dc27e clang-0003-Use-hash-style-gnu-for-Alpine-Linux.patch
-15d9a0c6422b426f790e496fe43223d0f36cf7dbe32d30272a1208616245db4c clang-0004-Add-musl-targets-and-dynamic-linker.patch
-3603e6008dfc63cea1da6ee82a624710ba82683347207b4f39f2fcb5e67c43c9 clang-0005-Enable-PIE-by-default-for-alpine-linux.patch
-8b5f95c981379967972db9a3b607b05687ce0c5e0067f6cc1ea52fde6f5a3005 clang-0006-Link-with-z-now-by-default-for-Alpine-Linux.patch
-ffeb06bc8042f8715a3413a7556a113645835a7bc6332f725ce1b7b952846930 clang-0007-Enable-stack-protector-by-default-for-alpine-linux.patch"
sha512sums="72d23a410271b50f97371b13dd7a6c6c5c0a993e35df436ab716ece8521d83406aa3d4bf8fdecd8154139f39fd5e011e480d405225d8c3ff152d0a2ac4573e04 cfe-3.8.1.src.tar.xz
ed19cb50fe96a5b05754887b055d75f0c0466f77e07e4d4f69b9cea17a3fa88e449d54bd47a791780bee095716cf6b6d8bf16352317192b0ce88d09c603af657 clang-0001-Add-Alpine-Linux-distro.patch
22ad0e449c633f3d5a849207c5e2ed048998e03820c743ad90242d4637c23ba3d2dc8f3c51b923fdfa1891d08d10e934f65dd7b6a90adeb3ce35c3ab923370d3 clang-0002-Use-z-relro-on-Alpine-Linux.patch