# Contributor: Bartłomiej Piotrowski # Maintainer: Rasmus Thomsen pkgname=lldb # Note: Update together with llvm. pkgver=8.0.0 pkgrel=0 _vermajor=${pkgver%%.*} pkgdesc="Next generation, high-performance debugger" arch="aarch64 armv7 s390x x86_64" url="https://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-static $pkgname-dev py2-$pkgname:py2" source="https://releases.llvm.org/$pkgver/$pkgname-$pkgver.src.tar.xz fix-embedded_interpreter.patch cmake-include-ClangConfig.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=MinSizeRel \ -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \ -DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \ -DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLDB_DISABLE_LIBEDIT=ON \ -DLLDB_TEST_C_COMPILER=clang \ -DLLDB_TEST_CXX_COMPILER=clang++ \ -DPYTHON_EXECUTABLE=/usr/bin/python2 ninja } package() { cd "$builddir"/build DESTDIR="$pkgdir" ninja install } 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%/*}/ rmdir "$pkgdir"/${sitedir%/*} # Move binary lib to the module's directory. mv $sitedir/readline.so $sitedir/lldb/ # Remove bundled module. rm $sitedir/six.py python2 -m compileall -fqd /$sitedir $sitedir } sha512sums="5192d6d6d1759db28569de929ba8db2a80283000f1bf8453d9cf172ac85574c8eacc13f9fe64ecabea0533bfc49c0f58ea8fb29b1f4d88c065d905d553f2e60c lldb-8.0.0.src.tar.xz 3c611fa5d45b6cb3f2925a31deeb8a34c295277aedcd55c22851d373897acd376fa92f4ef953c96a25c8dae4c93b6a88de0918550672141d324a3813d8283d48 fix-embedded_interpreter.patch 0edf6e750cd9367fccb32636c37b3d21bb781173b182b8e4b537c19c1b49898f792a3fa8139e50129af4570736e6dcda6bf390357b367c1f00179fc2b0fb6d62 cmake-include-ClangConfig.patch"