1 |
commit: ab09f94849c34893e8f13e58a3ba2cc6740fd5e3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 17 08:24:01 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 23:17:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab09f948 |
7 |
|
8 |
dev-util/lldb: Introduce the initial live version |
9 |
|
10 |
Introduce an initial live ebuild for split LLVM debugger package. |
11 |
The version should build and work fine to the degree of old LLVM |
12 |
ebuilds. Tests are not yet implemented, Python readline module needs to |
13 |
be thought over and static libraries need to be replaced with shared. |
14 |
|
15 |
dev-util/lldb/lldb-9999.ebuild | 80 ++++++++++++++++++++++++++++++++++++++++++ |
16 |
dev-util/lldb/metadata.xml | 7 ++++ |
17 |
2 files changed, 87 insertions(+) |
18 |
|
19 |
diff --git a/dev-util/lldb/lldb-9999.ebuild b/dev-util/lldb/lldb-9999.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000..87afff9 |
22 |
--- /dev/null |
23 |
+++ b/dev-util/lldb/lldb-9999.ebuild |
24 |
@@ -0,0 +1,80 @@ |
25 |
+# Copyright 1999-2016 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+# $Id$ |
28 |
+ |
29 |
+EAPI=6 |
30 |
+ |
31 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
32 |
+CMAKE_MIN_VERSION=3.4.3 |
33 |
+PYTHON_COMPAT=( python2_7 ) |
34 |
+ |
35 |
+inherit cmake-utils git-r3 python-single-r1 toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="The LLVM debugger" |
38 |
+HOMEPAGE="http://llvm.org/" |
39 |
+SRC_URI="" |
40 |
+EGIT_REPO_URI="http://llvm.org/git/lldb.git |
41 |
+ https://github.com/llvm-mirror/lldb.git" |
42 |
+ |
43 |
+LICENSE="UoI-NCSA" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="" |
46 |
+IUSE="libedit ncurses python" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ libedit? ( dev-libs/libedit:0= ) |
50 |
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= ) |
51 |
+ python? ( dev-python/six[${PYTHON_USEDEP}] |
52 |
+ ${PYTHON_DEPS} ) |
53 |
+ ~sys-devel/clang-${PV}[xml] |
54 |
+ ~sys-devel/llvm-${PV} |
55 |
+ !<sys-devel/llvm-4.0" |
56 |
+DEPEND="${RDEPEND} |
57 |
+ python? ( dev-lang/swig ) |
58 |
+ ${PYTHON_DEPS}" |
59 |
+ |
60 |
+REQUIRED_USE=${PYTHON_REQUIRED_USE} |
61 |
+ |
62 |
+src_configure() { |
63 |
+ local libdir=$(get_libdir) |
64 |
+ local mycmakeargs=( |
65 |
+ # used to find cmake modules |
66 |
+ -DLLVM_LIBDIR_SUFFIX="${libdir#lib}" |
67 |
+ |
68 |
+ -DLLDB_DISABLE_CURSES=$(usex !ncurses) |
69 |
+ -DLLDB_DISABLE_LIBEDIT=$(usex !libedit) |
70 |
+ -DLLDB_DISABLE_PYTHON=$(usex !python) |
71 |
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses) |
72 |
+ |
73 |
+ # TODO: fix upstream to detect this properly |
74 |
+ -DHAVE_LIBDL=ON |
75 |
+ -DHAVE_LIBPTHREAD=ON |
76 |
+ |
77 |
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO |
78 |
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use |
79 |
+ # ncurses with complete library set (including autodetection |
80 |
+ # of -ltinfo) |
81 |
+ -DCURSES_NEED_NCURSES=ON |
82 |
+ ) |
83 |
+ |
84 |
+ cmake-utils_src_configure |
85 |
+} |
86 |
+ |
87 |
+src_install() { |
88 |
+ cmake-utils_src_install |
89 |
+ |
90 |
+ # oh my... |
91 |
+ if use python; then |
92 |
+ # remove bundled six module |
93 |
+ rm "${D}$(python_get_sitedir)/six.py" || die |
94 |
+ |
95 |
+ # remove custom readline.so for now |
96 |
+ # TODO: figure out how to deal with it |
97 |
+ # upstream is basically building a custom readline.so with -ledit |
98 |
+ # to avoid symbol collisions between readline and libedit... |
99 |
+ rm "${D}$(python_get_sitedir)/readline.so" || die |
100 |
+ |
101 |
+ # byte-compile the modules |
102 |
+ python_optimize |
103 |
+ fi |
104 |
+} |
105 |
|
106 |
diff --git a/dev-util/lldb/metadata.xml b/dev-util/lldb/metadata.xml |
107 |
new file mode 100644 |
108 |
index 00000000..89c4bdb |
109 |
--- /dev/null |
110 |
+++ b/dev-util/lldb/metadata.xml |
111 |
@@ -0,0 +1,7 @@ |
112 |
+<?xml version="1.0" encoding="UTF-8"?> |
113 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
114 |
+<pkgmetadata> |
115 |
+ <maintainer type="project"> |
116 |
+ <email>llvm@g.o</email> |
117 |
+ </maintainer> |
118 |
+</pkgmetadata> |