1 |
commit: 53b557d74a46377d01187116dc50c8509e992f10 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 28 21:25:58 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 28 21:31:31 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53b557d7 |
7 |
|
8 |
sys-devel/llvm: Backport EAPI=6 changes to 3.7.1-r1 and 3.8.0-r1 |
9 |
|
10 |
.../clang-3.4-darwin_prefix-include-paths.patch | 4 +- |
11 |
.../llvm/files/cmake/llvm-3.7.0-lldb_tinfo.patch | 4 +- |
12 |
sys-devel/llvm/llvm-3.7.1-r1.ebuild | 56 +++++++++------------- |
13 |
sys-devel/llvm/llvm-3.8.0-r1.ebuild | 46 +++++++----------- |
14 |
4 files changed, 43 insertions(+), 67 deletions(-) |
15 |
|
16 |
diff --git a/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch |
17 |
index f5f1d9e..ed332f3 100644 |
18 |
--- a/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch |
19 |
+++ b/sys-devel/llvm/files/clang-3.4-darwin_prefix-include-paths.patch |
20 |
@@ -1,5 +1,5 @@ |
21 |
---- tools/clang/lib/Frontend/InitHeaderSearch.cpp |
22 |
-+++ tools/clang/lib/Frontend/InitHeaderSearch.cpp |
23 |
+--- a/tools/clang/lib/Frontend/InitHeaderSearch.cpp |
24 |
++++ b/tools/clang/lib/Frontend/InitHeaderSearch.cpp |
25 |
@@ -233,6 +233,7 @@ |
26 |
case llvm::Triple::Bitrig: |
27 |
break; |
28 |
|
29 |
diff --git a/sys-devel/llvm/files/cmake/llvm-3.7.0-lldb_tinfo.patch b/sys-devel/llvm/files/cmake/llvm-3.7.0-lldb_tinfo.patch |
30 |
index c0f3a5f..626498c 100644 |
31 |
--- a/sys-devel/llvm/files/cmake/llvm-3.7.0-lldb_tinfo.patch |
32 |
+++ b/sys-devel/llvm/files/cmake/llvm-3.7.0-lldb_tinfo.patch |
33 |
@@ -1,5 +1,5 @@ |
34 |
---- tools/lldb/cmake/LLDBDependencies.cmake 2015/09/16 20:13:53 247841 |
35 |
-+++ tools/lldb/cmake/LLDBDependencies.cmake 2015/09/16 20:14:01 247842 |
36 |
+--- a/tools/lldb/cmake/LLDBDependencies.cmake 2015/09/16 20:13:53 247841 |
37 |
++++ b/tools/lldb/cmake/LLDBDependencies.cmake 2015/09/16 20:14:01 247842 |
38 |
@@ -141,6 +141,9 @@ |
39 |
endif() |
40 |
if (NOT LLDB_DISABLE_CURSES) |
41 |
|
42 |
diff --git a/sys-devel/llvm/llvm-3.7.1-r1.ebuild b/sys-devel/llvm/llvm-3.7.1-r1.ebuild |
43 |
index 5ae3bc6..7bd5432 100644 |
44 |
--- a/sys-devel/llvm/llvm-3.7.1-r1.ebuild |
45 |
+++ b/sys-devel/llvm/llvm-3.7.1-r1.ebuild |
46 |
@@ -2,7 +2,7 @@ |
47 |
# Distributed under the terms of the GNU General Public License v2 |
48 |
# $Id$ |
49 |
|
50 |
-EAPI=5 |
51 |
+EAPI=6 |
52 |
|
53 |
: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
54 |
PYTHON_COMPAT=( python2_7 ) |
55 |
@@ -111,18 +111,6 @@ pkg_pretend() { |
56 |
|
57 |
local CHECKREQS_DISK_BUILD=${build_size}M |
58 |
check-reqs_pkg_pretend |
59 |
- |
60 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
61 |
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
62 |
- ebegin "Trying to build a C++11 test program" |
63 |
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
64 |
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
65 |
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
66 |
- eerror "to gcc-4.7 or an equivalent version supporting C++11." |
67 |
- die "Currently active compiler does not support -std=c++11" |
68 |
- fi |
69 |
- eend ${?} |
70 |
- fi |
71 |
} |
72 |
|
73 |
pkg_setup() { |
74 |
@@ -151,21 +139,21 @@ src_prepare() { |
75 |
# Make ocaml warnings non-fatal, bug #537308 |
76 |
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
77 |
# Fix libdir for ocaml bindings install, bug #559134 |
78 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch |
79 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch |
80 |
# Do not build/install ocaml docs with USE=-doc, bug #562008 |
81 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch |
82 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch |
83 |
|
84 |
# Make it possible to override Sphinx HTML install dirs |
85 |
# https://llvm.org/bugs/show_bug.cgi?id=23780 |
86 |
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
87 |
+ eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
88 |
|
89 |
# Prevent race conditions with parallel Sphinx runs |
90 |
# https://llvm.org/bugs/show_bug.cgi?id=23781 |
91 |
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
92 |
+ eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
93 |
|
94 |
# Prevent installing libgtest |
95 |
# https://llvm.org/bugs/show_bug.cgi?id=18341 |
96 |
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
97 |
+ eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
98 |
|
99 |
# Fix llvm-config for shared linking, sane flags and return values |
100 |
# in order: |
101 |
@@ -175,24 +163,24 @@ src_prepare() { |
102 |
# - backported r260343 that fixes cross-compilation |
103 |
# combination of backported upstream r252532 with our patch |
104 |
# https://bugs.gentoo.org/show_bug.cgi?id=565358 |
105 |
- epatch "${FILESDIR}"/llvm-3.7.1-llvm-config-0.patch |
106 |
- epatch "${FILESDIR}"/llvm-3.7.1-llvm-config-1.patch |
107 |
- epatch "${FILESDIR}"/llvm-3.7.1-llvm-config-2.patch |
108 |
- epatch "${FILESDIR}"/llvm-3.7.1-llvm-config-3.patch |
109 |
+ eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-0.patch |
110 |
+ eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-1.patch |
111 |
+ eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-2.patch |
112 |
+ eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-3.patch |
113 |
|
114 |
# Fix msan with newer kernels, #569894 |
115 |
- epatch "${FILESDIR}"/llvm-3.7-msan-fix.patch |
116 |
+ eapply "${FILESDIR}"/llvm-3.7-msan-fix.patch |
117 |
|
118 |
# disable use of SDK on OSX, bug #568758 |
119 |
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die |
120 |
|
121 |
if use clang; then |
122 |
# Automatically select active system GCC's libraries, bugs #406163 and #417913 |
123 |
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
124 |
+ eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
125 |
|
126 |
- epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch |
127 |
+ eapply "${FILESDIR}"/clang-3.6-gentoo-install.patch |
128 |
|
129 |
- epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
130 |
+ eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
131 |
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
132 |
|
133 |
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ |
134 |
@@ -200,22 +188,22 @@ src_prepare() { |
135 |
|
136 |
# Install clang runtime into /usr/lib/clang |
137 |
# https://llvm.org/bugs/show_bug.cgi?id=23792 |
138 |
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
139 |
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
140 |
+ eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch |
141 |
+ eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
142 |
|
143 |
# Do not force -march flags on arm platforms |
144 |
# https://bugs.gentoo.org/show_bug.cgi?id=562706 |
145 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-compiler_rt_arm_march_flags.patch |
146 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-compiler_rt_arm_march_flags.patch |
147 |
|
148 |
# Make it possible to override CLANG_LIBDIR_SUFFIX |
149 |
# (that is used only to find LLVMgold.so) |
150 |
# https://llvm.org/bugs/show_bug.cgi?id=23793 |
151 |
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
152 |
+ eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
153 |
|
154 |
pushd projects/compiler-rt >/dev/null || die |
155 |
|
156 |
# Fix msan with newer kernels, compiler-rt part, #569894 |
157 |
- epatch "${FILESDIR}"/compiler-rt-3.7-msan-fix.patch |
158 |
+ eapply "${FILESDIR}"/compiler-rt-3.7-msan-fix.patch |
159 |
|
160 |
# Fix WX sections, bug #421527 |
161 |
find lib/builtins -type f -name '*.S' -exec sed \ |
162 |
@@ -232,17 +220,17 @@ src_prepare() { |
163 |
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die |
164 |
|
165 |
# Fix Python paths, bugs #562436 and #562438 |
166 |
- epatch "${FILESDIR}"/${PN}-3.7-lldb_python.patch |
167 |
+ eapply "${FILESDIR}"/${PN}-3.7-lldb_python.patch |
168 |
sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \ |
169 |
-i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die |
170 |
|
171 |
# Fix build with ncurses[tinfo], #560474 |
172 |
# http://llvm.org/viewvc/llvm-project?view=revision&revision=247842 |
173 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-lldb_tinfo.patch |
174 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-lldb_tinfo.patch |
175 |
fi |
176 |
|
177 |
# User patches |
178 |
- epatch_user |
179 |
+ eapply_user |
180 |
|
181 |
python_setup |
182 |
|
183 |
|
184 |
diff --git a/sys-devel/llvm/llvm-3.8.0-r1.ebuild b/sys-devel/llvm/llvm-3.8.0-r1.ebuild |
185 |
index 41f1d79..fe8e3e7 100644 |
186 |
--- a/sys-devel/llvm/llvm-3.8.0-r1.ebuild |
187 |
+++ b/sys-devel/llvm/llvm-3.8.0-r1.ebuild |
188 |
@@ -2,7 +2,7 @@ |
189 |
# Distributed under the terms of the GNU General Public License v2 |
190 |
# $Id$ |
191 |
|
192 |
-EAPI=5 |
193 |
+EAPI=6 |
194 |
|
195 |
: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
196 |
PYTHON_COMPAT=( python2_7 ) |
197 |
@@ -112,18 +112,6 @@ pkg_pretend() { |
198 |
|
199 |
local CHECKREQS_DISK_BUILD=${build_size}M |
200 |
check-reqs_pkg_pretend |
201 |
- |
202 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
203 |
- echo 'int main() {return 0;}' > "${T}"/test.cxx || die |
204 |
- ebegin "Trying to build a C++11 test program" |
205 |
- if ! $(tc-getCXX) -std=c++11 -o /dev/null "${T}"/test.cxx; then |
206 |
- eerror "LLVM-${PV} requires C++11-capable C++ compiler. Your current compiler" |
207 |
- eerror "does not seem to support -std=c++11 option. Please upgrade your compiler" |
208 |
- eerror "to gcc-4.7 or an equivalent version supporting C++11." |
209 |
- die "Currently active compiler does not support -std=c++11" |
210 |
- fi |
211 |
- eend ${?} |
212 |
- fi |
213 |
} |
214 |
|
215 |
pkg_setup() { |
216 |
@@ -152,41 +140,41 @@ src_prepare() { |
217 |
# Make ocaml warnings non-fatal, bug #537308 |
218 |
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die |
219 |
# Fix libdir for ocaml bindings install, bug #559134 |
220 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch |
221 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch |
222 |
# Do not build/install ocaml docs with USE=-doc, bug #562008 |
223 |
- epatch "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch |
224 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch |
225 |
|
226 |
# Make it possible to override Sphinx HTML install dirs |
227 |
# https://llvm.org/bugs/show_bug.cgi?id=23780 |
228 |
- epatch "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
229 |
+ eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch |
230 |
|
231 |
# Prevent race conditions with parallel Sphinx runs |
232 |
# https://llvm.org/bugs/show_bug.cgi?id=23781 |
233 |
- epatch "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
234 |
+ eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch |
235 |
|
236 |
# Prevent installing libgtest |
237 |
# https://llvm.org/bugs/show_bug.cgi?id=18341 |
238 |
- epatch "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
239 |
+ eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch |
240 |
|
241 |
# Allow custom cmake build types (like 'Gentoo') |
242 |
- epatch "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch |
243 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch |
244 |
|
245 |
# Fix llvm-config for shared linking and sane flags |
246 |
# https://bugs.gentoo.org/show_bug.cgi?id=565358 |
247 |
- epatch "${FILESDIR}"/llvm-3.8-llvm-config.patch |
248 |
+ eapply "${FILESDIR}"/llvm-3.8-llvm-config.patch |
249 |
|
250 |
# Restore SOVERSIONs for shared libraries |
251 |
# https://bugs.gentoo.org/show_bug.cgi?id=578392 |
252 |
- epatch "${FILESDIR}"/llvm-3.8-soversion.patch |
253 |
+ eapply "${FILESDIR}"/llvm-3.8-soversion.patch |
254 |
|
255 |
# disable use of SDK on OSX, bug #568758 |
256 |
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die |
257 |
|
258 |
if use clang; then |
259 |
# Automatically select active system GCC's libraries, bugs #406163 and #417913 |
260 |
- epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
261 |
+ eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch |
262 |
|
263 |
- epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
264 |
+ eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch |
265 |
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp |
266 |
|
267 |
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \ |
268 |
@@ -194,17 +182,17 @@ src_prepare() { |
269 |
|
270 |
# Install clang runtime into /usr/lib/clang |
271 |
# https://llvm.org/bugs/show_bug.cgi?id=23792 |
272 |
- epatch "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch |
273 |
- epatch "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
274 |
+ eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch |
275 |
+ eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch |
276 |
|
277 |
# Do not force -march flags on arm platforms |
278 |
# https://bugs.gentoo.org/show_bug.cgi?id=562706 |
279 |
- epatch "${FILESDIR}"/cmake/${PN}-3.8.0-compiler_rt_arm_march_flags.patch |
280 |
+ eapply "${FILESDIR}"/cmake/${PN}-3.8.0-compiler_rt_arm_march_flags.patch |
281 |
|
282 |
# Make it possible to override CLANG_LIBDIR_SUFFIX |
283 |
# (that is used only to find LLVMgold.so) |
284 |
# https://llvm.org/bugs/show_bug.cgi?id=23793 |
285 |
- epatch "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
286 |
+ eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch |
287 |
|
288 |
pushd projects/compiler-rt >/dev/null || die |
289 |
|
290 |
@@ -222,11 +210,11 @@ src_prepare() { |
291 |
sed -e 's/add_subdirectory(readline)/#&/' \ |
292 |
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die |
293 |
# Do not install bundled six module |
294 |
- epatch "${FILESDIR}"/${PN}-3.8-lldb_six.patch |
295 |
+ eapply "${FILESDIR}"/${PN}-3.8-lldb_six.patch |
296 |
fi |
297 |
|
298 |
# User patches |
299 |
- epatch_user |
300 |
+ eapply_user |
301 |
|
302 |
python_setup |