PKGBUILDs/extra/compiler-rt/PKGBUILD

55 lines
1.7 KiB
Bash
Raw Normal View History

2018-03-22 23:38:23 +00:00
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build v5 with -DCOMPILER_RT_BUILD_BUILTINS=OFF
pkgname=compiler-rt
2021-01-11 15:00:50 +00:00
pkgver=11.0.1
2019-12-30 16:09:18 +00:00
pkgrel=1
2018-03-22 23:38:23 +00:00
pkgdesc="Compiler runtime libraries for clang"
arch=('x86_64')
url="https://compiler-rt.llvm.org/"
2019-10-11 00:10:09 +00:00
license=('custom:Apache 2.0 with LLVM Exception')
2018-03-22 23:38:23 +00:00
depends=('gcc-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python')
# Build 32-bit compiler-rt libraries on x86_64 (FS#41911)
makedepends_x86_64=('lib32-gcc-libs')
options=('staticlibs')
2020-04-19 16:33:30 +00:00
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
2019-12-30 16:09:18 +00:00
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig})
2021-01-11 15:00:50 +00:00
sha256sums=('087be3f1116e861cd969c9b0b0903c27028b52eaf45157276f50a9c2500687fc'
2018-10-02 12:42:00 +00:00
'SKIP')
2018-03-22 23:38:23 +00:00
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
2018-07-10 00:11:46 +00:00
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
2018-03-22 23:38:23 +00:00
prepare() {
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
}
build() {
cd "$srcdir/$pkgname-$pkgver.src/build"
[[ $CARCH == "arm" ]] && CONFIG="-DCOMPILER_RT_BUILD_BUILTINS=OFF"
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
$CONFIG
ninja
}
package() {
cd "$srcdir/$pkgname-$pkgver.src/build"
DESTDIR="$pkgdir" ninja install
install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2018-10-02 12:42:00 +00:00
mkdir -p "$pkgdir"/usr/lib/clang/$pkgver/{lib,share}
2018-03-22 23:38:23 +00:00
mv "$pkgdir"/usr/lib/{linux,clang/$pkgver/lib/}
2018-10-02 12:42:00 +00:00
mv "$pkgdir"/usr/{share/*.txt,lib/clang/$pkgver/share/}
2018-03-22 23:38:23 +00:00
}
# vim:set ts=2 sw=2 et: