Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/, dev-lang/rust/files/
Date: Fri, 12 Apr 2019 05:08:29
Message-Id: 1555045682.dad9246cf2dd4fc349139ceb963efe11bce75e63.gyakovlev@gentoo
1 commit: dad9246cf2dd4fc349139ceb963efe11bce75e63
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 12 05:00:42 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 12 05:08:02 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dad9246c
7
8 dev-lang/rust: fix cblas headers again, don't build RISCV
9
10 Bug: https://bugs.gentoo.org/676278
11 Bug: https://bugs.gentoo.org/678186
12 Bug: https://bugs.gentoo.org/683128
13 Package-Manager: Portage-2.3.62, Repoman-2.3.12
14 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
15
16 ...Add-additional-headers-only-if-they-exist.patch | 41 ++++++++++++++++++++++
17 .../{rust-1.34.0.ebuild => rust-1.34.0-r1.ebuild} | 3 ++
18 2 files changed, 44 insertions(+)
19
20 diff --git a/dev-lang/rust/files/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch b/dev-lang/rust/files/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
21 new file mode 100644
22 index 00000000000..b33311c0de8
23 --- /dev/null
24 +++ b/dev-lang/rust/files/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
25 @@ -0,0 +1,41 @@
26 +From 1f68002cb725c6a8fb5ca8425c1c86495a053f4f Mon Sep 17 00:00:00 2001
27 +From: Michal Gorny <mgorny@g.o>
28 +Date: Thu, 4 Apr 2019 14:21:38 +0000
29 +Subject: [PATCH] [llvm] [cmake] Add additional headers only if they exist
30 +
31 +Modify the add_header_files_for_glob() function to only add files
32 +that do exist, rather than all matches of the glob. This fixes CMake
33 +error when one of the include directories (which happen to include
34 +/usr/include) contain broken symlinks.
35 +
36 +Differential Revision: https://reviews.llvm.org/D59632
37 +
38 +llvm-svn: 357701
39 +---
40 + llvm/cmake/modules/LLVMProcessSources.cmake | 10 +++++++++-
41 + 1 file changed, 9 insertions(+), 1 deletion(-)
42 +
43 +diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
44 +index 7cbd2863500..d0be0e8b3ba 100644
45 +--- a/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
46 ++++ b/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
47 +@@ -30,7 +30,15 @@ endmacro(add_td_sources)
48 +
49 + function(add_header_files_for_glob hdrs_out glob)
50 + file(GLOB hds ${glob})
51 +- set(${hdrs_out} ${hds} PARENT_SCOPE)
52 ++ set(filtered)
53 ++ foreach(file ${hds})
54 ++ # Explicit existence check is necessary to filter dangling symlinks
55 ++ # out. See https://bugs.gentoo.org/674662.
56 ++ if(EXISTS ${file})
57 ++ list(APPEND filtered ${file})
58 ++ endif()
59 ++ endforeach()
60 ++ set(${hdrs_out} ${filtered} PARENT_SCOPE)
61 + endfunction(add_header_files_for_glob)
62 +
63 + function(find_all_header_files hdrs_out additional_headerdirs)
64 +--
65 +2.21.0
66 +
67
68 diff --git a/dev-lang/rust/rust-1.34.0.ebuild b/dev-lang/rust/rust-1.34.0-r1.ebuild
69 similarity index 98%
70 rename from dev-lang/rust/rust-1.34.0.ebuild
71 rename to dev-lang/rust/rust-1.34.0-r1.ebuild
72 index 93f20ba1ce3..7a082deb150 100644
73 --- a/dev-lang/rust/rust-1.34.0.ebuild
74 +++ b/dev-lang/rust/rust-1.34.0-r1.ebuild
75 @@ -82,6 +82,8 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
76 x86? ( cpu_flags_x86_sse2 )
77 "
78
79 +PATCHES=( "${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch )
80 +
81 S="${WORKDIR}/${MY_P}-src"
82
83 toml_usex() {
84 @@ -159,6 +161,7 @@ src_configure() {
85 release-debuginfo = $(toml_usex debug)
86 assertions = $(toml_usex debug)
87 targets = "${LLVM_TARGETS// /;}"
88 + experimental-targets = ""
89 link-shared = $(toml_usex system-llvm)
90 [build]
91 build = "${rust_target}"