summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-04-11 22:00:42 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-04-11 22:08:02 -0700
commitdad9246cf2dd4fc349139ceb963efe11bce75e63 (patch)
tree654e34767637727e7a57812f98738f2153f4aede /dev-lang/rust
parentdev-python/pyasn1: version bump to 0.4.3 (diff)
downloadgentoo-dad9246cf2dd4fc349139ceb963efe11bce75e63.tar.gz
gentoo-dad9246cf2dd4fc349139ceb963efe11bce75e63.tar.bz2
gentoo-dad9246cf2dd4fc349139ceb963efe11bce75e63.zip
dev-lang/rust: fix cblas headers again, don't build RISCV
Bug: https://bugs.gentoo.org/676278 Bug: https://bugs.gentoo.org/678186 Bug: https://bugs.gentoo.org/683128 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/files/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch41
-rw-r--r--dev-lang/rust/rust-1.34.0-r1.ebuild (renamed from dev-lang/rust/rust-1.34.0.ebuild)3
2 files changed, 44 insertions, 0 deletions
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
new file mode 100644
index 000000000000..b33311c0de88
--- /dev/null
+++ b/dev-lang/rust/files/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch
@@ -0,0 +1,41 @@
+From 1f68002cb725c6a8fb5ca8425c1c86495a053f4f Mon Sep 17 00:00:00 2001
+From: Michal Gorny <mgorny@gentoo.org>
+Date: Thu, 4 Apr 2019 14:21:38 +0000
+Subject: [PATCH] [llvm] [cmake] Add additional headers only if they exist
+
+Modify the add_header_files_for_glob() function to only add files
+that do exist, rather than all matches of the glob. This fixes CMake
+error when one of the include directories (which happen to include
+/usr/include) contain broken symlinks.
+
+Differential Revision: https://reviews.llvm.org/D59632
+
+llvm-svn: 357701
+---
+ llvm/cmake/modules/LLVMProcessSources.cmake | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
+index 7cbd2863500..d0be0e8b3ba 100644
+--- a/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
++++ b/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
+@@ -30,7 +30,15 @@ endmacro(add_td_sources)
+
+ function(add_header_files_for_glob hdrs_out glob)
+ file(GLOB hds ${glob})
+- set(${hdrs_out} ${hds} PARENT_SCOPE)
++ set(filtered)
++ foreach(file ${hds})
++ # Explicit existence check is necessary to filter dangling symlinks
++ # out. See https://bugs.gentoo.org/674662.
++ if(EXISTS ${file})
++ list(APPEND filtered ${file})
++ endif()
++ endforeach()
++ set(${hdrs_out} ${filtered} PARENT_SCOPE)
+ endfunction(add_header_files_for_glob)
+
+ function(find_all_header_files hdrs_out additional_headerdirs)
+--
+2.21.0
+
diff --git a/dev-lang/rust/rust-1.34.0.ebuild b/dev-lang/rust/rust-1.34.0-r1.ebuild
index 93f20ba1ce3f..7a082deb1503 100644
--- a/dev-lang/rust/rust-1.34.0.ebuild
+++ b/dev-lang/rust/rust-1.34.0-r1.ebuild
@@ -82,6 +82,8 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
x86? ( cpu_flags_x86_sse2 )
"
+PATCHES=( "${FILESDIR}"/0001-llvm-cmake-Add-additional-headers-only-if-they-exist.patch )
+
S="${WORKDIR}/${MY_P}-src"
toml_usex() {
@@ -159,6 +161,7 @@ src_configure() {
release-debuginfo = $(toml_usex debug)
assertions = $(toml_usex debug)
targets = "${LLVM_TARGETS// /;}"
+ experimental-targets = ""
link-shared = $(toml_usex system-llvm)
[build]
build = "${rust_target}"