summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Kitching2016-10-17 03:54:40 +0100
committerChris Kitching2016-10-17 03:56:55 +0100
commit90c19d1e062127b8ff435f205ddbf9390f2a6cde (patch)
tree68a13ded5ec4e1f2ac070107325b655fba1dfb92
downloadaur-90c19d1e062127b8ff435f205ddbf9390f2a6cde.tar.gz
Initial commit
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD99
-rw-r--r--wchar.patch31
3 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4c704e310419
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+# Generated by mksrcinfo v8
+# Mon Oct 17 02:56:50 UTC 2016
+pkgbase = lldb-git
+ pkgdesc = The LLDB Debugger, git mirror
+ pkgver = 1
+ pkgrel = 1
+ url = http://llvm.org/
+ arch = i686
+ arch = x86_64
+ license = custom:University of Illinois/NCSA
+ makedepends = svn
+ makedepends = cmake
+ makedepends = swig
+ makedepends = rsync
+ depends = gcc-libs
+ depends = libffi
+ depends = python2
+ depends = gcc>=
+ depends = libedit
+ depends = llvm
+ depends = clang
+ provides = lldb
+ conflicts = lldb
+ source = llvm::git+https://github.com/llvm-mirror/llvm.git
+ source = clang::git+https://github.com/llvm-mirror/clang.git
+ source = lldb::git+https://github.com/llvm-mirror/lldb.git
+ source = wchar.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 0c89b7a2edb4761023815f953902da1fdde2642a513698927dd5a894636f71c8
+
+pkgname = lldb-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b007374fbcbc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Chris Kitching <chriskitching@linux.com>
+
+pkgname=lldb-git
+pkgver=1
+pkgrel=1
+pkgdesc="The LLDB Debugger, git mirror"
+arch=('i686' 'x86_64')
+url="http://llvm.org/"
+license=('custom:University of Illinois/NCSA')
+depends=('gcc-libs' 'libffi' 'python2' "gcc>=$_gcc_ver" 'libedit' 'llvm' 'clang')
+makedepends=('svn' 'cmake' 'swig' 'rsync')
+provides=('lldb')
+conflicts=('lldb')
+source=(
+ "llvm::git+https://github.com/llvm-mirror/llvm.git"
+ "clang::git+https://github.com/llvm-mirror/clang.git"
+ "lldb::git+https://github.com/llvm-mirror/lldb.git"
+ "wchar.patch"
+)
+sha256sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '0c89b7a2edb4761023815f953902da1fdde2642a513698927dd5a894636f71c8'
+)
+
+pkgver() {
+ cd "$srcdir/lldb"
+ echo $(git describe --always)
+}
+
+prepare() {
+ cd "$srcdir"
+
+ msg2 "Applying fix for https://bugs.archlinux.org/task/49974"
+ cd lldb
+ patch -p1 -i "$srcdir/wchar.patch"
+ cd -
+
+ msg2 "Shifting Clang/LLDB into LLVM tree (because they are idiots and don't use submodules) ..."
+ yes | rm -Rf llvm/tools/clang llvm/tools/lldb
+ cp -R clang llvm/tools/clang
+ cp -R lldb llvm/tools/lldb
+}
+
+build() {
+ cd "$srcdir"
+ msg2 "Starting build ..."
+
+ [[ -d build ]] && rm -r build
+ mkdir build && cd build
+
+ # libffi's includes are in a non-standard location :(
+ _libffi_include=$(pkg-config libffi --cflags-only-I | sed 's/-I//')
+
+ export CFLAGS="$CFLAGS -fno-tree-pre"
+ export CXXFLAGS="$CXXFLAGS -fno-tree-pre"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_FFI=ON \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DFFI_INCLUDE_PATH=$_libffi_include \
+ "$srcdir/llvm"
+
+ make
+}
+
+package() {
+ cd "$srcdir/llvm"
+
+ # Install the license
+ install -Dm644 tools/lldb/LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ cd "$srcdir/build"
+
+ # Install the lldb binaries
+ install -Dm755 bin/lldb "$pkgdir/usr/bin/lldb"
+ install -Dm755 bin/lldb-mi "$pkgdir/usr/bin/lldb-mi"
+ install -Dm755 bin/lldb-server "$pkgdir/usr/bin/lldb-server"
+
+ # Install the lldb library
+ install -Dm755 lib/liblldb.so "$pkgdir/usr/lib/liblldb.so"
+
+ # Install the lldb python libraries.
+ python_dir="$pkgdir/usr/lib/python2.7/site-packages"
+ mkdir -p "$python_dir"
+ cp -a lib/python2.7/site-packages/lldb "$python_dir"
+
+ # Relink the _lldb.so for python
+ ln -sf /usr/lib/liblldb.so "$python_dir/lldb/_lldb.so"
+
+ # Install the lldb headers
+ mkdir -p "$pkgdir/usr/include"
+ rsync -rl --exclude=Makefile "$srcdir/lldb/include/lldb" "$pkgdir/usr/include"
+}
+
+# vim:set sts=2 sw=2 et:
diff --git a/wchar.patch b/wchar.patch
new file mode 100644
index 000000000000..58affed94508
--- /dev/null
+++ b/wchar.patch
@@ -0,0 +1,31 @@
+From c682e123447da23cef7f7bda63c40618434f83e2 Mon Sep 17 00:00:00 2001
+From: Chris Kitching <chriskitching@linux.com>
+Date: Sun, 16 Oct 2016 22:35:18 +0100
+Subject: [PATCH] Unconditionally set LLDB_EDITLINE_USE_WCHAR
+
+Workaround for:
+https://bugs.archlinux.org/task/49974
+---
+ include/lldb/Host/Editline.h | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
+index 758f87d..522a43e 100644
+--- a/include/lldb/Host/Editline.h
++++ b/include/lldb/Host/Editline.h
+@@ -43,12 +43,8 @@
+ // will only be
+ // used in cases where this is true. This is a compile time dependecy, for now
+ // selected per target Platform
+-#if defined(__APPLE__) || defined(__NetBSD__)
+ #define LLDB_EDITLINE_USE_WCHAR 1
+ #include <codecvt>
+-#else
+-#define LLDB_EDITLINE_USE_WCHAR 0
+-#endif
+
+ #include "lldb/Host/ConnectionFileDescriptor.h"
+ #include "lldb/lldb-private.h"
+--
+2.10.0
+