[arch-commits] Commit in llvm10/repos (staging-x86_64 staging-x86_64/PKGBUILD)

Felix Yan felixonmars at archlinux.org
Tue Nov 10 04:56:59 UTC 2020


    Date: Tuesday, November 10, 2020 @ 04:56:59
  Author: felixonmars
Revision: 400019

archrelease: copy trunk to staging-x86_64

Added:
  llvm10/repos/staging-x86_64/
  llvm10/repos/staging-x86_64/PKGBUILD
    (from rev 400018, llvm10/trunk/PKGBUILD)

----------+
 PKGBUILD |   83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

Copied: llvm10/repos/staging-x86_64/PKGBUILD (from rev 400018, llvm10/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2020-11-10 04:56:59 UTC (rev 400019)
@@ -0,0 +1,83 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+
+pkgname=('llvm10' 'llvm10-libs')
+pkgver=10.0.1
+pkgrel=2
+arch=('x86_64')
+url="https://llvm.org/"
+license=('custom:Apache 2.0 with LLVM Exception')
+makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
+             'python-setuptools')
+options=('staticlibs')
+_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
+source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig})
+sha256sums=('c5d8e30b57cbded7128d78e5e8dad811bff97a8d471896812f57fa99ee82cdf3'
+            'SKIP')
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
+validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
+
+prepare() {
+  cd "$srcdir/llvm-$pkgver.src"
+  mkdir build
+}
+
+build() {
+  cd "$srcdir/llvm-$pkgver.src/build"
+
+  cmake .. -G Ninja \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DLLVM_HOST_TRIPLE=$CHOST \
+    -DLLVM_BUILD_LLVM_DYLIB=ON \
+    -DLLVM_LINK_LLVM_DYLIB=ON \
+    -DLLVM_INSTALL_UTILS=ON \
+    -DLLVM_ENABLE_RTTI=ON \
+    -DLLVM_ENABLE_FFI=ON \
+    -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \
+    -DLLVM_BUILD_TESTS=ON \
+    -DLLVM_BINUTILS_INCDIR=/usr/include
+  ninja
+}
+
+check() {
+  cd "$srcdir/llvm-$pkgver.src/build"
+  ninja check
+}
+
+package_llvm10() {
+  pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
+  depends=('llvm10-libs' 'perl')
+  optdepends=('python-setuptools: for using lit (LLVM Integrated Tester)')
+  conflicts=('llvm')
+
+  cd "$srcdir/llvm-$pkgver.src/build"
+
+  DESTDIR="$pkgdir" ninja install
+
+  # Include lit for running lit-based tests in other projects
+  pushd ../utils/lit
+  python3 setup.py install --root="$pkgdir" -O1
+  popd
+
+  # The runtime libraries go into llvm10-libs
+  mv -f "$pkgdir"/usr/lib/lib{LLVM-*.so,{LTO,Remarks}.so.*} "$srcdir"
+
+  # Remove files which conflict with llvm-libs
+  rm "$pkgdir"/usr/lib/{LLVMgold,lib{LLVM,LTO,Remarks}}.so
+
+  install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm10-libs() {
+  pkgdesc="LLVM 10 runtime libraries"
+  depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
+
+  install -d "$pkgdir/usr/lib"
+  cp -P "$srcdir"/lib{LLVM-*.so,{LTO,Remarks}.so.*} "$pkgdir/usr/lib/"
+
+  install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list