Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/lldb/files/4.0.1/, dev-util/lldb/
Date: Thu, 29 Mar 2018 07:18:16
Message-Id: 1522307886.a68ac3f988e81874d5eb412f99070df55a09a60f.mgorny@gentoo
1 commit: a68ac3f988e81874d5eb412f99070df55a09a60f
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 29 07:16:29 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 29 07:18:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a68ac3f9
7
8 dev-util/lldb: Drop old 4.0.1
9
10 dev-util/lldb/Manifest | 2 -
11 ...nding-LLDB-tools-when-building-stand-alon.patch | 102 -----------------
12 dev-util/lldb/files/4.0.1/0002-Fix-bug-28898.patch | 98 -----------------
13 dev-util/lldb/lldb-4.0.1.ebuild | 121 ---------------------
14 4 files changed, 323 deletions(-)
15
16 diff --git a/dev-util/lldb/Manifest b/dev-util/lldb/Manifest
17 index 943f95115b5..4a74a52fc33 100644
18 --- a/dev-util/lldb/Manifest
19 +++ b/dev-util/lldb/Manifest
20 @@ -1,6 +1,4 @@
21 -DIST lldb-4.0.1.src.tar.xz 19088212 BLAKE2B 0fcc76de5777c0724a207330bc5e027065fa55628506fe8cbd4f4e7ab397fc3802ae9580a8e41e14c1b3448453c1f735725100fb69c3048a44bd9e5748ab3cfa SHA512 1d94d7dfcc0614b16d0ef83436bbe814b39e34ba18394361bb9f13ad408ae9b29affa9a5d58c50c8dcd83765a39ae4d59ffabb7d8cd1358fd2fbd198b2de2ab6
22 DIST lldb-5.0.1.src.tar.xz 19225084 BLAKE2B 82a0f5d40e6278147e4e2d9c7bbf0c19e512ce92c39e4ea0d9a830bf53a343c233aa528ffc3512072017ea2ffc7e6e57d1f13f9bac84a9446e41fb29f35a9da3 SHA512 ebb3c3251098cfce28ccb6a5bbc50491a16b88d1adf3c71fd38efc95482d702e1bd9e7fb11c29597304d97cc0fd88241c70ec11276426aad901e5d23f05ca53a
23 DIST lldb-6.0.0.src.tar.xz 19317956 BLAKE2B e9ebdd61c5116d3e6be3542674b1e3eebba19b4a2107da153565fd95ed24a97248fb80ce5220b4dce2b6e3ac5b61fcdb594e34d6af25e7737575c3f31cd45fbe SHA512 9679d1dda0c71681b1f8c5a22e775c0262de26dc5b091e1db189968b97ed3aed45991381d529b3fd4b3ab28112453f519045485708f97f765d3e3131b2a918b7
24 -DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
25 DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
26 DIST llvm-6.0.0.src.tar.xz 25296048 BLAKE2B 7ea90bb63d6f26cfbc1c1ed2f243b0fcd8ad2ceb7963cf768d262cd55e9a0c71a9cfdea0333fb220faacf4540d924d2512532774dcfb52b52490ad74e38c09e0 SHA512 a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c
27
28 diff --git a/dev-util/lldb/files/4.0.1/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch b/dev-util/lldb/files/4.0.1/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
29 deleted file mode 100644
30 index 1b183d860a2..00000000000
31 --- a/dev-util/lldb/files/4.0.1/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
32 +++ /dev/null
33 @@ -1,102 +0,0 @@
34 -From 6a9aab954c32a2d3d13a0fe5fc984e9787e9f794 Mon Sep 17 00:00:00 2001
35 -From: Michal Gorny <mgorny@g.o>
36 -Date: Sun, 19 Feb 2017 22:11:38 +0000
37 -Subject: [PATCH] [test] Fix finding LLDB tools when building stand-alone
38 -
39 -Use both LLDB- and LLVM-specific tool/library directories when LLDB is
40 -being built stand-alone. This ensures that the freshly-built tools
41 -(and libraries) are used correctly.
42 -
43 -Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR
44 -to locate lldb, and set PATH and LD_LIBRARY_PATH. When doing
45 -a stand-alone build, these variables represent the installed LLVM.
46 -As a result, tests either fail due to missing lldb executable
47 -or use an earlier installed LLDB version rather than the one being
48 -built.
49 -
50 -To solve this, additional LLDB_TOOLS_DIR and LLDB_LIBS_DIR variables
51 -are added and populated using LLVM_*_OUTPUT_INTDIR. Those variables
52 -contain directories used to output built executables and libraries.
53 -In stand-alone builds, they represent the build-tree directories
54 -used by LLDB. In integrated builds, they have the same values as
55 -LLVM_*_DIR and therefore using them does not harm.
56 -
57 -The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure
58 -that freshly built binaries are preferred over potentially earlier
59 -installed ones. Furthermore, paths used to locate various tools are
60 -updated to match appropriate locations.
61 -
62 -Differential Revision: https://reviews.llvm.org/D29985
63 -
64 -git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@295621 91177308-0d34-0410-b5e6-96231b3b80d8
65 ----
66 - lit/lit.cfg | 18 ++++++++++++------
67 - lit/lit.site.cfg.in | 2 ++
68 - 2 files changed, 14 insertions(+), 6 deletions(-)
69 -
70 -diff --git a/lit/lit.cfg b/lit/lit.cfg
71 -index dd89b45fa..a3d5f9ca7 100644
72 ---- a/lit/lit.cfg
73 -+++ b/lit/lit.cfg
74 -@@ -39,18 +39,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None)
75 -
76 - # Tweak the PATH to include the tools dir and the scripts dir.
77 - if lldb_obj_root is not None:
78 -+ lldb_tools_dir = getattr(config, 'lldb_tools_dir', None)
79 -+ if not lldb_tools_dir:
80 -+ lit_config.fatal('No LLDB tools dir set!')
81 - llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
82 - if not llvm_tools_dir:
83 - lit_config.fatal('No LLVM tools dir set!')
84 -- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
85 -+ path = os.path.pathsep.join((lldb_tools_dir, llvm_tools_dir, config.environment['PATH']))
86 - path = os.path.pathsep.join((os.path.join(getattr(config, 'llvm_src_root', None),'test','Scripts'),path))
87 -
88 - config.environment['PATH'] = path
89 -
90 -+ lldb_libs_dir = getattr(config, 'lldb_libs_dir', None)
91 -+ if not lldb_libs_dir:
92 -+ lit_config.fatal('No LLDB libs dir set!')
93 - llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
94 - if not llvm_libs_dir:
95 - lit_config.fatal('No LLVM libs dir set!')
96 -- path = os.path.pathsep.join((llvm_libs_dir,
97 -+ path = os.path.pathsep.join((lldb_libs_dir, llvm_libs_dir,
98 - config.environment.get('LD_LIBRARY_PATH','')))
99 - config.environment['LD_LIBRARY_PATH'] = path
100 -
101 -@@ -115,14 +121,14 @@ if config.test_exec_root is None:
102 - # Register substitutions
103 - config.substitutions.append(('%python', config.python_executable))
104 -
105 --debugserver = lit.util.which('debugserver', llvm_tools_dir)
106 --lldb = lit.util.which('lldb', llvm_tools_dir)
107 -+debugserver = lit.util.which('debugserver', lldb_tools_dir)
108 -+lldb = lit.util.which('lldb', lldb_tools_dir)
109 -
110 - if not os.path.exists(config.cc):
111 -- config.cc = lit.util.which(config.cc, llvm_tools_dir)
112 -+ config.cc = lit.util.which(config.cc, config.environment['PATH'])
113 -
114 - if not os.path.exists(config.cxx):
115 -- config.cxx = lit.util.which(config.cxx, llvm_tools_dir)
116 -+ config.cxx = lit.util.which(config.cxx, config.environment['PATH'])
117 -
118 - if platform.system() in ['Darwin']:
119 - try:
120 -diff --git a/lit/lit.site.cfg.in b/lit/lit.site.cfg.in
121 -index 904521c9d..03aa3df9a 100644
122 ---- a/lit/lit.site.cfg.in
123 -+++ b/lit/lit.site.cfg.in
124 -@@ -6,6 +6,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
125 - config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
126 - config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
127 - config.lldb_obj_root = "@LLDB_BINARY_DIR@"
128 -+config.lldb_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
129 -+config.lldb_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
130 - config.target_triple = "@TARGET_TRIPLE@"
131 - config.python_executable = "@PYTHON_EXECUTABLE@"
132 - config.cc = "@CMAKE_C_COMPILER@"
133 ---
134 -2.12.0
135 -
136
137 diff --git a/dev-util/lldb/files/4.0.1/0002-Fix-bug-28898.patch b/dev-util/lldb/files/4.0.1/0002-Fix-bug-28898.patch
138 deleted file mode 100644
139 index 563d2f6813a..00000000000
140 --- a/dev-util/lldb/files/4.0.1/0002-Fix-bug-28898.patch
141 +++ /dev/null
142 @@ -1,98 +0,0 @@
143 -From 9ad9480c3a380a04b3dbe869c0675d6bba37247b Mon Sep 17 00:00:00 2001
144 -From: Kamil Rytarowski <n54@×××.com>
145 -Date: Thu, 25 May 2017 20:12:30 +0000
146 -Subject: [PATCH] Fix bug #28898 lldb: libedit produces garbled, unusable input
147 - on Linux
148 -
149 -Apply patch from Christos Zoulas, upstream libedit developer.
150 -It has been tested on NetBSD/amd64.
151 -
152 -New code supports combination of wide libedit and disabled
153 -LLDB_EDITLINE_USE_WCHAR, which was the popular case on Linux
154 -systems.
155 -
156 -
157 -git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@303907 91177308-0d34-0410-b5e6-96231b3b80d8
158 ----
159 - include/lldb/Host/Editline.h | 12 +++++++++---
160 - source/Host/common/Editline.cpp | 8 ++++----
161 - 2 files changed, 13 insertions(+), 7 deletions(-)
162 -
163 -diff --git a/include/lldb/Host/Editline.h b/include/lldb/Host/Editline.h
164 -index 2b1a8e047..0b75e9c92 100644
165 ---- a/include/lldb/Host/Editline.h
166 -+++ b/include/lldb/Host/Editline.h
167 -@@ -82,8 +82,14 @@ using EditLineStringStreamType = std::stringstream;
168 - using EditLineCharType = char;
169 - #endif
170 -
171 -+#ifdef EL_CLIENTDATA /* editline with wide support + wide char read function */
172 -+using EditLineGetCharType = wchar_t;
173 -+#else
174 -+using EditLineGetCharType = char;
175 -+#endif
176 -+
177 - typedef int (*EditlineGetCharCallbackType)(::EditLine *editline,
178 -- EditLineCharType *c);
179 -+ EditLineGetCharType *c);
180 - typedef unsigned char (*EditlineCommandCallbackType)(::EditLine *editline,
181 - int ch);
182 - typedef const char *(*EditlinePromptCallbackType)(::EditLine *editline);
183 -@@ -270,7 +276,7 @@ private:
184 -
185 - /// Character reading implementation for EditLine that supports our multi-line
186 - /// editing trickery.
187 -- int GetCharacter(EditLineCharType *c);
188 -+ int GetCharacter(EditLineGetCharType *c);
189 -
190 - /// Prompt implementation for EditLine.
191 - const char *Prompt();
192 -@@ -323,7 +329,7 @@ private:
193 - /// single or multi-line editing.
194 - void ConfigureEditor(bool multiline);
195 -
196 -- bool CompleteCharacter(char ch, EditLineCharType &out);
197 -+ bool CompleteCharacter(char ch, EditLineGetCharType &out);
198 -
199 - private:
200 - #if LLDB_EDITLINE_USE_WCHAR
201 -diff --git a/source/Host/common/Editline.cpp b/source/Host/common/Editline.cpp
202 -index 7d4b398a1..7b580dde6 100644
203 ---- a/source/Host/common/Editline.cpp
204 -+++ b/source/Host/common/Editline.cpp
205 -@@ -474,7 +474,7 @@ unsigned char Editline::RecallHistory(bool earlier) {
206 - return CC_NEWLINE;
207 - }
208 -
209 --int Editline::GetCharacter(EditLineCharType *c) {
210 -+int Editline::GetCharacter(EditLineGetCharType *c) {
211 - const LineInfoW *info = el_wline(m_editline);
212 -
213 - // Paint a faint version of the desired prompt over the version libedit draws
214 -@@ -969,7 +969,7 @@ void Editline::ConfigureEditor(bool multiline) {
215 - }));
216 -
217 - el_wset(m_editline, EL_GETCFN, (EditlineGetCharCallbackType)([](
218 -- EditLine *editline, EditLineCharType *c) {
219 -+ EditLine *editline, EditLineGetCharType *c) {
220 - return Editline::InstanceFor(editline)->GetCharacter(c);
221 - }));
222 -
223 -@@ -1360,12 +1360,12 @@ void Editline::PrintAsync(Stream *stream, const char *s, size_t len) {
224 - }
225 - }
226 -
227 --bool Editline::CompleteCharacter(char ch, EditLineCharType &out) {
228 -+bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
229 - #if !LLDB_EDITLINE_USE_WCHAR
230 - if (ch == (char)EOF)
231 - return false;
232 -
233 -- out = ch;
234 -+ out = (unsigned char)ch;
235 - return true;
236 - #else
237 - std::codecvt_utf8<wchar_t> cvt;
238 ---
239 -2.13.1
240 -
241
242 diff --git a/dev-util/lldb/lldb-4.0.1.ebuild b/dev-util/lldb/lldb-4.0.1.ebuild
243 deleted file mode 100644
244 index 64a83e7105d..00000000000
245 --- a/dev-util/lldb/lldb-4.0.1.ebuild
246 +++ /dev/null
247 @@ -1,121 +0,0 @@
248 -# Copyright 1999-2017 Gentoo Foundation
249 -# Distributed under the terms of the GNU General Public License v2
250 -
251 -EAPI=6
252 -
253 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
254 -# (needed due to CMAKE_BUILD_TYPE != Gentoo)
255 -CMAKE_MIN_VERSION=3.7.0-r1
256 -PYTHON_COMPAT=( python2_7 )
257 -
258 -inherit cmake-utils llvm python-single-r1 toolchain-funcs
259 -
260 -DESCRIPTION="The LLVM debugger"
261 -HOMEPAGE="https://llvm.org/"
262 -SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz
263 - test? ( https://releases.llvm.org/${PV/_//}/llvm-${PV/_/}.src.tar.xz )"
264 -
265 -LICENSE="UoI-NCSA"
266 -SLOT="0"
267 -KEYWORDS="~amd64 ~arm64 ~x86"
268 -IUSE="libedit ncurses python test"
269 -
270 -RDEPEND="
271 - libedit? ( dev-libs/libedit:0= )
272 - ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
273 - python? ( dev-python/six[${PYTHON_USEDEP}]
274 - ${PYTHON_DEPS} )
275 - ~sys-devel/clang-${PV}[xml]
276 - ~sys-devel/llvm-${PV}
277 - !<sys-devel/llvm-4.0"
278 -# swig-3.0.9+ generates invalid wrappers, #598708
279 -# upstream: https://github.com/swig/swig/issues/769
280 -DEPEND="${RDEPEND}
281 - python? ( <dev-lang/swig-3.0.9 )
282 - test? ( ~dev-python/lit-${PV}[${PYTHON_USEDEP}] )
283 - ${PYTHON_DEPS}"
284 -
285 -REQUIRED_USE=${PYTHON_REQUIRED_USE}
286 -
287 -S=${WORKDIR}/${P/_/}.src
288 -
289 -# least intrusive of all
290 -CMAKE_BUILD_TYPE=RelWithDebInfo
291 -
292 -pkg_setup() {
293 - LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup
294 - python-single-r1_pkg_setup
295 -}
296 -
297 -src_unpack() {
298 - default
299 -
300 - if use test; then
301 - mv llvm-* llvm || die
302 - fi
303 -}
304 -
305 -src_prepare() {
306 - # fix tests in stand-alone build
307 - eapply "${FILESDIR}"/4.0.1/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
308 - # fix compatibility with new libedit
309 - eapply "${FILESDIR}"/4.0.1/0002-Fix-bug-28898.patch
310 -
311 - eapply_user
312 -}
313 -
314 -src_configure() {
315 - local mycmakeargs=(
316 - -DLLDB_DISABLE_CURSES=$(usex !ncurses)
317 - -DLLDB_DISABLE_LIBEDIT=$(usex !libedit)
318 - -DLLDB_DISABLE_PYTHON=$(usex !python)
319 - -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
320 -
321 - -DLLVM_BUILD_TESTS=$(usex test)
322 - # compilers for lit tests
323 - -DLLDB_TEST_C_COMPILER="$(type -P clang)"
324 - -DLLDB_TEST_CXX_COMPILER="$(type -P clang++)"
325 - # compiler for ole' python tests
326 - -DLLDB_TEST_COMPILER="$(type -P clang)"
327 -
328 - # TODO: fix upstream to detect this properly
329 - -DHAVE_LIBDL=ON
330 - -DHAVE_LIBPTHREAD=ON
331 -
332 - # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
333 - # and TERMINFO_LIBS... so just force FindCurses.cmake to use
334 - # ncurses with complete library set (including autodetection
335 - # of -ltinfo)
336 - -DCURSES_NEED_NCURSES=ON
337 - )
338 - use test && mycmakeargs+=(
339 - -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
340 - -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
341 - )
342 -
343 - cmake-utils_src_configure
344 -}
345 -
346 -src_test() {
347 - cmake-utils_src_make check-lldb-lit
348 - use python && cmake-utils_src_make check-lldb
349 -}
350 -
351 -src_install() {
352 - cmake-utils_src_install
353 -
354 - # oh my...
355 - if use python; then
356 - # remove bundled six module
357 - rm "${D}$(python_get_sitedir)/six.py" || die
358 -
359 - # remove custom readline.so for now
360 - # TODO: figure out how to deal with it
361 - # upstream is basically building a custom readline.so with -ledit
362 - # to avoid symbol collisions between readline and libedit...
363 - rm "${D}$(python_get_sitedir)/readline.so" || die
364 -
365 - # byte-compile the modules
366 - python_optimize
367 - fi
368 -}