Date: Sunday, December 16, 2018 @ 16:07:44 Author: foutrelis Revision: 342414
archrelease: copy trunk to testing-x86_64 Added: lld/repos/testing-x86_64/ lld/repos/testing-x86_64/PKGBUILD (from rev 342413, lld/trunk/PKGBUILD) ----------+ PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) Copied: lld/repos/testing-x86_64/PKGBUILD (from rev 342413, lld/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2018-12-16 16:07:44 UTC (rev 342414) @@ -0,0 +1,65 @@ +# Maintainer: Evangelos Foutras <evange...@foutrelis.com> +# Contributor: Jan "heftig" Steffens <jan.steff...@gmail.com> + +pkgname=lld +pkgver=7.0.1 +pkgrel=1 +pkgdesc="Linker from the LLVM project" +arch=('x86_64') +url="https://lld.llvm.org/" +license=('custom:University of Illinois/NCSA Open Source License') +depends=('llvm-libs') +makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx') +source=(https://releases.llvm.org/$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig} + https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}) +sha256sums=('8869aab2dd2d8e00d69943352d3166d159d7eae2615f66a684f4a0999fc74031' + 'SKIP' + 'a38dfc4db47102ec79dcc2aa61e93722c5f6f06f0a961073bd84b78fb949419b' + 'SKIP') +validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <h...@chromium.org> +validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstel...@redhat.com> + +prepare() { + cd "$srcdir/$pkgname-$pkgver.src" + mkdir build +} + +build() { + cd "$srcdir/$pkgname-$pkgver.src/build" + + cmake .. -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DPYTHON_EXECUTABLE=/usr/bin/python \ + -DBUILD_SHARED_LIBS=ON \ + -DLLVM_LINK_LLVM_DYLIB=ON \ + -DLLVM_INCLUDE_TESTS=ON \ + -DLLVM_BUILD_TESTS=ON \ + -DLLVM_BUILD_DOCS=ON \ + -DLLVM_ENABLE_SPHINX=ON \ + -DLLVM_EXTERNAL_LIT=/usr/bin/lit \ + -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src" + ninja +} + +check() { + cd "$srcdir/$pkgname-$pkgver.src/build" + if [[ -e /usr/bin/lld ]]; then + # TODO(foutrelis): tests use system lld if it exists; check if it's fixable + error "Cannot run the tests while lld is installed to the system" + return 1 + fi + ninja check-lld +} + +package() { + cd "$srcdir/$pkgname-$pkgver.src/build" + + DESTDIR="$pkgdir" ninja install + install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # Remove documentation sources + rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo} +} + +# vim:set ts=2 sw=2 et: