OCaml 4.14.0 rebuild
[arch-packages.git] / polly / trunk / PKGBUILD
blob1c87c7d4b5ba5c5c03b87dbe1a2eb3f9caf38db8
1 # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
3 pkgname=polly
4 pkgver=14.0.6
5 pkgrel=1
6 pkgdesc="High-level loop and data-locality optimizer and optimization infrastructure for LLVM"
7 arch=('x86_64')
8 url="https://polly.llvm.org/"
9 license=('custom:Apache 2.0 with LLVM Exception')
10 depends=('gcc-libs')
11 makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx')
12 _source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
13 source=($_source_base/polly-$pkgver.src.tar.xz{,.sig}
14         $_source_base/llvm-$pkgver.src.tar.xz{,.sig})
15 sha256sums=('d4e6f58e54c0418d7b8debef0c09b77bdff6f435012be94c3edf270b89314fdd'
16             'SKIP'
17             '050922ecaaca5781fdf6631ea92bc715183f202f9d2f15147226f023414f619a'
18             'SKIP')
19 validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
21 prepare() {
22   cd polly-$pkgver.src
23   mkdir build
26 build() {
27   cd polly-$pkgver.src/build
29   CFLAGS+=' -ffat-lto-objects'
30   CXXFLAGS+=' -ffat-lto-objects'
32   local cmake_args=(
33     -G Ninja
34     -DCMAKE_BUILD_TYPE=Release
35     -DCMAKE_INSTALL_DOCDIR=share/doc
36     -DCMAKE_INSTALL_PREFIX=/usr
37     -DLLVM_BUILD_DOCS=ON
38     -DLLVM_BUILD_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
39     -DLLVM_BUILD_TESTS=ON
40     -DLLVM_ENABLE_SPHINX=ON
41     -DLLVM_EXTERNAL_LIT=/usr/bin/lit
42     -DLLVM_LINK_LLVM_DYLIB=ON
43     -DSPHINX_WARNINGS_AS_ERRORS=OFF
44   )
45   cmake .. "${cmake_args[@]}"
46   ninja
49 check() {
50   cd polly-$pkgver.src/build
51   ninja check-polly
54 package() {
55   cd polly-$pkgver.src/build
57   DESTDIR="$pkgdir" ninja install
58   install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
60   # Remove documentation sources
61   rm -r "$pkgdir"/usr/share/doc/polly/html/{_sources,.buildinfo}
64 # vim:set ts=2 sw=2 et: