aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2020-03-01 23:49:56 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-03-02 10:15:51 +0100
commit9588503236fa4cc4cab34e249e815abf265563cb (patch)
tree85a766f399eab660fc336040f5ea81461e10f3a4 /community
parent9f3c6cd034506d8980866f91b3b6bb00c5f53c88 (diff)
downloadaports-9588503236fa4cc4cab34e249e815abf265563cb.tar.bz2
aports-9588503236fa4cc4cab34e249e815abf265563cb.tar.xz
community/lldb: move from testing
Diffstat (limited to 'community')
-rw-r--r--community/lldb/APKBUILD77
-rw-r--r--community/lldb/fix-embedded_interpreter.patch14
2 files changed, 91 insertions, 0 deletions
diff --git a/community/lldb/APKBUILD b/community/lldb/APKBUILD
new file mode 100644
index 0000000000..3287b12229
--- /dev/null
+++ b/community/lldb/APKBUILD
@@ -0,0 +1,77 @@
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
+# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+pkgname=lldb
+# Note: Update together with llvm.
+pkgver=9.0.1
+pkgrel=0
+_vermajor=${pkgver%%.*}
+pkgdesc="Next generation, high-performance debugger"
+arch="aarch64 armv7 s390x x86_64"
+url="https://llvm.org/"
+license="Apache-2.0"
+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
+ python3-dev
+ swig
+ "
+subpackages="$pkgname-dev py3-$pkgname:py3"
+source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/lldb-$pkgver.src.tar.xz
+ fix-embedded_interpreter.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/python3
+ ninja
+}
+
+package() {
+ cd "$builddir"/build
+
+ DESTDIR="$pkgdir" ninja install
+}
+
+py3() {
+ pkgdesc="Python3 module for LLDB"
+ depends="$pkgname python3 py3-six"
+ replaces="py-lldb"
+
+ local sitedir=$(python3 -c "import site; print(site.getsitepackages()[0])")
+
+ mkdir -p "$subpkgdir"/$sitedir
+
+ mv "$pkgdir"/"$sitedir"/* "$subpkgdir"/"$sitedir"
+ rm -rf "$pkgdir"/"$sitedir"
+
+ # Remove bundled module.
+ rm "$subpkgdir"/"$sitedir"/six.py
+
+ python3 -m compileall -fq "$subpkgdir"/"$sitedir"
+}
+
+sha512sums="8ec31129933d95cead2c5dcf9ead71b7fd69a49bbc10544a86025edc8f4deaf070b7c4309df01e4569b2de54a1d2028dbf9489a889d7c7c484dd899e58939b6a lldb-9.0.1.src.tar.xz
+3c611fa5d45b6cb3f2925a31deeb8a34c295277aedcd55c22851d373897acd376fa92f4ef953c96a25c8dae4c93b6a88de0918550672141d324a3813d8283d48 fix-embedded_interpreter.patch"
diff --git a/community/lldb/fix-embedded_interpreter.patch b/community/lldb/fix-embedded_interpreter.patch
new file mode 100644
index 0000000000..599e30a440
--- /dev/null
+++ b/community/lldb/fix-embedded_interpreter.patch
@@ -0,0 +1,14 @@
+Hack so that lldb can find its custom readline.so, because we move it
+after install.
+
+This is based on Fedora package.
+
+--- a/source/Interpreter/embedded_interpreter.py
++++ b/source/Interpreter/embedded_interpreter.py
+@@ -1,4 +1,6 @@
+ import sys
++sys.path.insert(1, '%{python_sitearch}/lldb')
++
+ if sys.version_info[0] < 3:
+ import __builtin__ as builtins
+ else: