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/
Date: Wed, 02 Nov 2016 16:20:57
Message-Id: 1478103649.c5caff97c5990cddf14d02f2079b8e1a9ea98b44.mgorny@gentoo
1 commit: c5caff97c5990cddf14d02f2079b8e1a9ea98b44
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 2 14:35:59 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 16:20:49 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5caff97
7
8 dev-util/lldb: Enable tests (need more upstream fixes though)
9
10 dev-util/lldb/lldb-9999.ebuild | 30 +++++++++++++++++++++++++++++-
11 1 file changed, 29 insertions(+), 1 deletion(-)
12
13 diff --git a/dev-util/lldb/lldb-9999.ebuild b/dev-util/lldb/lldb-9999.ebuild
14 index 0eb59c4..070e60d 100644
15 --- a/dev-util/lldb/lldb-9999.ebuild
16 +++ b/dev-util/lldb/lldb-9999.ebuild
17 @@ -19,7 +19,7 @@ EGIT_REPO_URI="http://llvm.org/git/lldb.git
18 LICENSE="UoI-NCSA"
19 SLOT="0"
20 KEYWORDS=""
21 -IUSE="libedit ncurses python"
22 +IUSE="libedit ncurses python test"
23
24 RDEPEND="
25 libedit? ( dev-libs/libedit:0= )
26 @@ -33,10 +33,26 @@ RDEPEND="
27 # upstream: https://github.com/swig/swig/issues/769
28 DEPEND="${RDEPEND}
29 python? ( <dev-lang/swig-3.0.9 )
30 + test? ( dev-python/lit[${PYTHON_USEDEP}] )
31 ${PYTHON_DEPS}"
32
33 REQUIRED_USE=${PYTHON_REQUIRED_USE}
34
35 +src_unpack() {
36 + if use test; then
37 + # needed for patched gtest
38 + git-r3_fetch "http://llvm.org/git/llvm.git
39 + https://github.com/llvm-mirror/llvm.git"
40 + fi
41 + git-r3_fetch
42 +
43 + if use test; then
44 + git-r3_checkout http://llvm.org/git/llvm.git \
45 + "${WORKDIR}"/llvm
46 + fi
47 + git-r3_checkout
48 +}
49 +
50 src_configure() {
51 local libdir=$(get_libdir)
52 local mycmakeargs=(
53 @@ -48,6 +64,10 @@ src_configure() {
54 -DLLDB_DISABLE_PYTHON=$(usex !python)
55 -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
56
57 + # compilers for tests
58 + -DLLDB_TEST_C_COMPILER="${EPREFIX}/usr/bin/clang"
59 + -DLLDB_TEST_CXX_COMPILER="${EPREFIX}/usr/bin/clang++"
60 +
61 # TODO: fix upstream to detect this properly
62 -DHAVE_LIBDL=ON
63 -DHAVE_LIBPTHREAD=ON
64 @@ -58,10 +78,18 @@ src_configure() {
65 # of -ltinfo)
66 -DCURSES_NEED_NCURSES=ON
67 )
68 + use test && mycmakeargs+=(
69 + -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
70 + -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
71 + )
72
73 cmake-utils_src_configure
74 }
75
76 +src_test() {
77 + cmake-utils_src_make check-lldb-lit
78 +}
79 +
80 src_install() {
81 cmake-utils_src_install