aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/clang/APKBUILD18
1 files changed, 16 insertions, 2 deletions
diff --git a/main/clang/APKBUILD b/main/clang/APKBUILD
index d37d981851..c05cde053f 100644
--- a/main/clang/APKBUILD
+++ b/main/clang/APKBUILD
@@ -1,10 +1,11 @@
# Contributor Eric Molitor <eric@molitor.org>
+# Contributor Patrick Gansterer <paroga@paroga.com>
# Contributor Travis Tilley <ttilley@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=clang
# Note: Update together with llvm.
pkgver=10.0.0
-pkgrel=2
+pkgrel=3
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
@@ -29,7 +30,9 @@ checkdepends="diffutils bash"
depends_dev="$pkgname=$pkgver-r$pkgrel $pkgname-extra-tools=$pkgver-r$pkgrel"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
$pkgname-analyzer::noarch
- $pkgname-extra-tools:extra"
+ $pkgname-extra-tools:extra
+ py3-$pkgname:python:noarch
+ "
source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/clang-$pkgver.src.tar.xz
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/clang-tools-extra-$pkgver.src.tar.xz
10-add-musl-triples.patch
@@ -49,6 +52,8 @@ build() {
mkdir -p "$builddir"/build
cd "$builddir"/build
+ python_version=$(python3 -V | sed 's/.*\([0-9]\{1,\}\.[0-9]\{1,\}\)\..*/\1/')
+
cmake .. -G Ninja -Wno-dev \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
@@ -59,6 +64,7 @@ build() {
-DCLANG_VENDOR=Alpine \
-DCLANG_BUILD_EXAMPLES=OFF \
-DCLANG_INCLUDE_DOCS=ON \
+ -DCLANG_PYTHON_BINDINGS_VERSIONS="$python_version" \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
@@ -142,6 +148,14 @@ extra() {
#mv usr/bin/tool-template "$subpkgdir"/usr/bin/
}
+python() {
+ pkgdesc="Clang Python Bindings"
+ depends="$pkgname-libs=$pkgver-r$pkgrel python3"
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
+}
+
sha512sums="b1cccc13c46abcda3d689f51d486fa613ecec40c581c72d8b15951715100a2b8fb24370161601e6716cdba5a784337439e99ec2f0766f988e9cce92de6d775da clang-10.0.0.src.tar.xz
33b6019e64e9ac94bd7c000b77a4a927602a2705baa9b370e392a56b53fe09c8dad1ff7d583892729e9eb291440433ad7d71df768a96d927e4dbc1988fc01d99 clang-tools-extra-10.0.0.src.tar.xz
533558863dc7247202b2a739e1bd2d81a99a16be329370cb734d338284b5408ecd14fe78ac836aaf922e377334b7a3ebef532cf8395d91aafe346bf71eb8b7fc 10-add-musl-triples.patch