blob: a37b2f96d0ee74f1c89b35adc0245a7e3c7a322a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer:
pkgname=lldb
# Note: Update together with llvm.
pkgver=5.0.2
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-dev py2-$pkgname:py2"
source="https://releases.llvm.org/$pkgver/$pkgname-$pkgver.src.tar.xz
musl-include-ptrace.aarch64.patch
cmake-include-ClangConfig.patch
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 \
-DPYTHON_EXECUTABLE=/usr/bin/python2
ninja
}
package() {
cd "$builddir"/build
DESTDIR="$pkgdir" ninja install
# XXX: I have no idea why this is installed to bindir. Moving it to
# libdir may break it, but I don't know how to test this.
mv "$pkgdir"/usr/bin/liblldb-intel-mpxtable.so "$pkgdir"/usr/lib/ || true
# 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%/*}/
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="66eaaead60cc908ac061bedb4fac9cb96cecb7f4e5a79a51b6fa080e8f61f718b14e5f3581ead832b495bf10f055d4253d199236a0947dd22395ec80bf2afcf4 lldb-5.0.2.src.tar.xz
1613a1cb042edd430aba6b86e4971ebb01f7d2bc3f13a5a1264cb94da7612188897e9dcaaa9233be8af5c8f4bad013dd0cfb821e323cd73dfe07fe125869ccef musl-include-ptrace.aarch64.patch
18ea4cd3ef357299833e243613031ad67ff82f7c93c1f3fbe2cbce8876ffeec2d8ff2f94c8242ea540c2604ffbc023fb2678643fc9d3b64231f096054d186aef cmake-include-ClangConfig.patch
3c611fa5d45b6cb3f2925a31deeb8a34c295277aedcd55c22851d373897acd376fa92f4ef953c96a25c8dae4c93b6a88de0918550672141d324a3813d8283d48 fix-embedded_interpreter.patch"
|