archrelease: copy trunk to extra-x86_64
[arch-packages.git] / polly / trunk / PKGBUILD
blob5a18dc0dbea51029fbd45ae4eef0d6cce668bce5
1 # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
3 pkgname=polly
4 pkgver=15.0.7
5 pkgrel=2
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         $_source_base/cmake-$pkgver.src.tar.xz{,.sig})
16 sha256sums=('1053610cace401c0b4e6d430d441277b0283dd4112581e2acc90e174d3192819'
17             'SKIP'
18             '4ad8b2cc8003c86d0078d15d987d84e3a739f24aae9033865c027abae93ee7a4'
19             'SKIP'
20             '8986f29b634fdaa9862eedda78513969fe9788301c9f2d938f4c10a3e7a3e7ea'
21             'SKIP')
22 validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A'  # Tom Stellard <tstellar@redhat.com>
23               'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta <tobias@hieta.se>
25 prepare() {
26   mv cmake{-$pkgver.src,}
27   cd polly-$pkgver.src
28   mkdir build
31 build() {
32   cd polly-$pkgver.src/build
34   CFLAGS+=' -ffat-lto-objects'
35   CXXFLAGS+=' -ffat-lto-objects'
37   local cmake_args=(
38     -G Ninja
39     -DCMAKE_BUILD_TYPE=Release
40     -DCMAKE_INSTALL_DOCDIR=share/doc
41     -DCMAKE_INSTALL_PREFIX=/usr
42     -DLLVM_BUILD_DOCS=ON
43     -DLLVM_BUILD_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
44     -DLLVM_BUILD_TESTS=ON
45     -DLLVM_ENABLE_SPHINX=ON
46     -DLLVM_EXTERNAL_LIT=/usr/bin/lit
47     -DLLVM_LINK_LLVM_DYLIB=ON
48     -DSPHINX_WARNINGS_AS_ERRORS=OFF
49   )
50   cmake .. "${cmake_args[@]}"
51   ninja
54 check() {
55   cd polly-$pkgver.src/build
56   ninja check-polly
59 package() {
60   cd polly-$pkgver.src/build
62   DESTDIR="$pkgdir" ninja install
63   install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
65   # Remove documentation sources
66   rm -r "$pkgdir"/usr/share/doc/polly/html/{_sources,.buildinfo}
69 # vim:set ts=2 sw=2 et: