# Contributor: Bartłomiej Piotrowski # Maintainer: pkgname=lldb # Note: Update together with llvm. pkgver=4.0.0 pkgrel=0 _vermajor=${pkgver%%.*} pkgdesc="Next generation, high-performance debugger" arch="all !x86 !ppc64le" url="http://llvm.org/" license="UOI-NCSA" makedepends=" clang-dev>=$_vermajor clang-static>=$_vermajor cmake doxygen libedit-dev libffi-dev libxml2-dev linux-headers llvm-dev>=$_vermajor llvm-static>=$_vermajor ncurses-dev ninja python2-dev swig " subpackages="$pkgname-dev py2-$pkgname:py2" source="http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz musl-include-limits.h.patch musl-include-ptrace.aarch64.patch" builddir="$srcdir/$pkgname-$pkgver.src" build() { mkdir -p "$builddir"/build cd "$builddir"/build CC=clang CXX=clang++ cmake .. -G Ninja -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLDB_DISABLE_LIBEDIT=ON \ -DPYTHON_EXECUTABLE=/usr/bin/python2 ninja } package() { cd "$builddir"/build DESTDIR="$pkgdir" ninja install # Remove static libraries. rm -f "$pkgdir"/usr/lib/*.a } py2() { pkgdesc="Python module for LLDB" depends="$pkgname py2-six" replaces="py-lldb" local sitedir="usr/lib/python2.7/site-packages" mkdir -p "$subpkgdir"/$sitedir cd "$subpkgdir" mv "$pkgdir"/$sitedir ${sitedir%/*}/ # Remove bundled module. rm $sitedir/six.py python2 -m compileall -fqd /$sitedir $sitedir } sha512sums="931e8c6e74b66c4ac1c56c9d067309a319aa9a9f4c72d4ed9703be3decefeb8730084ad8c3581e4e31d61cdd4074518d2ed72bacce1e689e087b2f62ad4bb2e8 lldb-4.0.0.src.tar.xz 200b3628f091bd5c4e5de8ebd4f0f4d4746553df50db82704381ece7ae7d4d50b9766a53dd972cd04aea4ea664dbe45ca5ac23a341d436dd8366a591a0c96722 musl-include-limits.h.patch 1613a1cb042edd430aba6b86e4971ebb01f7d2bc3f13a5a1264cb94da7612188897e9dcaaa9233be8af5c8f4bad013dd0cfb821e323cd73dfe07fe125869ccef musl-include-ptrace.aarch64.patch"