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: sys-devel/llvm/files/9999/, sys-devel/llvm/
Date: Fri, 02 Sep 2016 21:40:15
Message-Id: 1472852402.a1621d0c04dd6ddc4b5e4ebcef40501289292470.mgorny@gentoo
1 commit: a1621d0c04dd6ddc4b5e4ebcef40501289292470
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 2 20:45:36 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 21:40:02 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1621d0c
7
8 sys-devel/llvm: Stop installing llvm-lit
9
10 Stop installing lit as llvm-lit since the correct install layout is
11 still unclear (wrt https://reviews.llvm.org/D23743), installed version
12 search is inconsistent and broken, and all reverse dependencies require
13 LLVM source checkout anyway and therefore use the internal lit package
14 included in it. The install will eventually be addressed later, most
15 likely as a split package.
16
17 ...ystem-llvm-lit-when-lit.py-does-not-exist.patch | 33 ----------------------
18 ...y-Install-as-llvm-lit-as-cmake-expects-it.patch | 30 --------------------
19 sys-devel/llvm/llvm-9999.ebuild | 25 ++++------------
20 3 files changed, 5 insertions(+), 83 deletions(-)
21
22 diff --git a/sys-devel/llvm/files/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch b/sys-devel/llvm/files/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch
23 deleted file mode 100644
24 index 7245af0..00000000
25 --- a/sys-devel/llvm/files/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch
26 +++ /dev/null
27 @@ -1,33 +0,0 @@
28 -From bcdf2c49b7686046f8a9a5664f0e46117997baf4 Mon Sep 17 00:00:00 2001
29 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
30 -Date: Sun, 21 Aug 2016 23:19:40 +0200
31 -Subject: [PATCH 09/10] cmake: Use system llvm-lit when lit.py does not exist
32 - in srcdir
33 -
34 -Modify the add_lit_target function to use lit.py from LLVM_MAIN_SRC_DIR
35 -only when one does exist there, and otherwise fall back to looking for
36 -system install of llvm-lit. This is based on a similar conditional in
37 -clang's CMakeLists.txt, and makes it possible to run clang's tests when
38 -built separately from LLVM with no access to the original sources.
39 -
40 -Patch: https://reviews.llvm.org/D23742
41 ----
42 - cmake/modules/AddLLVM.cmake | 2 +-
43 - 1 file changed, 1 insertion(+), 1 deletion(-)
44 -
45 -diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
46 -index 83a2359..87540d5 100644
47 ---- a/cmake/modules/AddLLVM.cmake
48 -+++ b/cmake/modules/AddLLVM.cmake
49 -@@ -1081,7 +1081,7 @@ function(add_lit_target target comment)
50 - if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
51 - list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
52 - endif ()
53 -- if (LLVM_MAIN_SRC_DIR)
54 -+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
55 - set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
56 - else()
57 - find_program(LIT_COMMAND llvm-lit)
58 ---
59 -2.9.3
60 -
61
62 diff --git a/sys-devel/llvm/files/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch b/sys-devel/llvm/files/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch
63 deleted file mode 100644
64 index 53726aa..00000000
65 --- a/sys-devel/llvm/files/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch
66 +++ /dev/null
67 @@ -1,30 +0,0 @@
68 -From 242fd2cbad1075d4cc0e3a3b64652dbc766bd117 Mon Sep 17 00:00:00 2001
69 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
70 -Date: Sun, 21 Aug 2016 23:20:11 +0200
71 -Subject: [PATCH 10/10] lit/setup.py: Install as llvm-lit (as cmake expects it)
72 -
73 -Modify the setup.py for lit to install the entry point as llvm-lit
74 -(instead of lit) since this is the name expected by functions in
75 -AddLLVM.cmake.
76 -
77 -Patch: https://reviews.llvm.org/D23743
78 ----
79 - utils/lit/setup.py | 2 +-
80 - 1 file changed, 1 insertion(+), 1 deletion(-)
81 -
82 -diff --git a/utils/lit/setup.py b/utils/lit/setup.py
83 -index 10de6bb..c57e0aa 100644
84 ---- a/utils/lit/setup.py
85 -+++ b/utils/lit/setup.py
86 -@@ -71,7 +71,7 @@ http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit.
87 - packages = find_packages(),
88 - entry_points = {
89 - 'console_scripts': [
90 -- 'lit = lit:main',
91 -+ 'llvm-lit = lit:main',
92 - ],
93 - }
94 - )
95 ---
96 -2.9.3
97 -
98
99 diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild
100 index 6fbe8c8..2f4485f 100644
101 --- a/sys-devel/llvm/llvm-9999.ebuild
102 +++ b/sys-devel/llvm/llvm-9999.ebuild
103 @@ -7,11 +7,10 @@ EAPI=6
104 : ${CMAKE_MAKEFILE_GENERATOR:=ninja}
105 # (needed due to lib32 find_library fix)
106 CMAKE_MIN_VERSION=3.6.1-r1
107 -DISTUTILS_OPTIONAL=1
108 PYTHON_COMPAT=( python2_7 )
109
110 -inherit check-reqs cmake-utils distutils-r1 flag-o-matic git-r3 \
111 - multilib-minimal pax-utils toolchain-funcs
112 +inherit check-reqs cmake-utils flag-o-matic git-r3 \
113 + multilib-minimal pax-utils python-any-r1 toolchain-funcs
114
115 DESCRIPTION="Low Level Virtual Machine"
116 HOMEPAGE="http://llvm.org/"
117 @@ -25,7 +24,6 @@ KEYWORDS=""
118 IUSE="debug +doc gold libedit +libffi multitarget ncurses ocaml test
119 video_cards_radeon elibc_musl kernel_Darwin"
120
121 -# python is needed for llvm-lit (which is installed)
122 RDEPEND="
123 sys-libs/zlib:0=
124 gold? ( >=sys-devel/binutils-2.22:*[cxx] )
125 @@ -35,8 +33,7 @@ RDEPEND="
126 ocaml? (
127 >=dev-lang/ocaml-4.00.0:0=
128 dev-ml/findlib
129 - dev-ml/ocaml-ctypes )
130 - ${PYTHON_DEPS}"
131 + dev-ml/ocaml-ctypes )"
132 # configparser-3.2 breaks the build (3.3 or none at all are fine)
133 DEPEND="${RDEPEND}
134 dev-lang/perl
135 @@ -49,7 +46,8 @@ DEPEND="${RDEPEND}
136 gold? ( sys-libs/binutils-libs )
137 libffi? ( virtual/pkgconfig )
138 ocaml? ( test? ( dev-ml/ounit ) )
139 - !!<dev-python/configparser-3.3.0.2"
140 + !!<dev-python/configparser-3.3.0.2
141 + ${PYTHON_DEPS}"
142
143 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
144
145 @@ -113,11 +111,6 @@ src_prepare() {
146 # https://bugs.gentoo.org/show_bug.cgi?id=578392
147 eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
148
149 - # Fix lit tests to find installed llvm-lit correctly
150 - eapply "${FILESDIR}"/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch
151 - # Install lit as llvm-lit (as expected by cmake)
152 - eapply "${FILESDIR}"/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch
153 -
154 # support building llvm against musl-libc
155 use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch
156
157 @@ -225,10 +218,6 @@ multilib_src_compile() {
158 pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
159 pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
160 fi
161 -
162 - # Run setup.py for lit
163 - cd "${S}"/utils/lit || die
164 - distutils-r1_src_compile
165 }
166
167 multilib_src_test() {
168 @@ -247,10 +236,6 @@ src_install() {
169 )
170
171 multilib-minimal_src_install
172 -
173 - # Install lit
174 - cd "${S}"/utils/lit || die
175 - distutils-r1_src_install
176 }
177
178 multilib_src_install() {