summaryrefslogtreecommitdiff
path: root/dev-lang/rust
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-18 09:38:27 +0000
commit536c3711867ec947c1738f2c4b96f22e4863322d (patch)
tree697733f5cb713908dcf378e13fd15a798a906a91 /dev-lang/rust
parentf65628136faa35d0c4d3b5e7332275c7b35fcd96 (diff)
gentoo resync : 18.11.2018
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest22
-rw-r--r--dev-lang/rust/files/1.30.1-clippy-sysroot.patch62
-rw-r--r--dev-lang/rust/metadata.xml1
-rw-r--r--dev-lang/rust/rust-1.29.1-r1.ebuild (renamed from dev-lang/rust/rust-1.29.1.ebuild)10
-rw-r--r--dev-lang/rust/rust-1.29.2-r1.ebuild (renamed from dev-lang/rust/rust-1.29.2.ebuild)10
-rw-r--r--dev-lang/rust/rust-1.30.1-r1.ebuild274
6 files changed, 366 insertions, 13 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 898cc405c36f..77d5893cdf45 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,4 +1,5 @@
AUX 1.29.2-clippy-sysroot.patch 2571 BLAKE2B 1f65355cf47fb1ee2bd15f7424b6bf98106028fa46a8f89ab639acdc3a131684898dcda42abd6d5d7bc09c857990dcea86467b3c96e8e6d47b90726d9176a221 SHA512 2577c7540be9a197343bc06b5de52ba42832cbb2799997bb9778e6e392a421cfe6bce9ce48793d60af7a8f3e0ade0c79e0adbfc1125fbcd89b01e97ab96b8d30
+AUX 1.30.1-clippy-sysroot.patch 2870 BLAKE2B 84f6c52fc8f757b509655852810d52c7aef50c7a5678e746d525e41888c50995d23f030373e4c37d829ed794d1890f380bc944eae601b97957d2b35d733b5d6b SHA512 8b2601e7699d3a1b004ac5559add37eb939332aacf136b9b6397f314dbcbe9015f1ff5ac906e80a4a913b0cdf4f5410d779721b136ecbe1a4af8380668bb7765
DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c
DIST rust-1.28.0-arm-unknown-linux-gnueabi.tar.xz 104676648 BLAKE2B b26b23c3605e6584c51e0e914dbb3be60996e079e52ff2d4850ed43c1f1f7cd5ac575b40dbe852f927d36654f5ab7e384548f3a92b3466bfbb1cda7f9f069bcb SHA512 a1eaf1d7826ebfe222d233cabd8b88073ca2c8dd42a0b870e324dfc63e7290308418222c56802bc421c9bda119dc7c5f3e225ff33cacad5776b79cbcc1a877b2
DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.xz 104992084 BLAKE2B df97766d7abf73f668a2936834bc0f35739289eeeb5395276a2fdfd5b6c0baee3ba1eee1099f19d4f4f1cbd1a33cf62ad888dd3d1856b613ac853c6a17650741 SHA512 3b58b83f38bf8d8e841ae6614d72bb6e6faf75fb7c19abc5451548b0e6de0ef3b64dfbc70481a1e40f74074bfad701aa7a58296b4a0d07957a418bd3cd769917
@@ -12,8 +13,23 @@ DIST rust-1.28.0-powerpc64-unknown-linux-gnu.tar.xz 105788856 BLAKE2B 8280826125
DIST rust-1.28.0-powerpc64le-unknown-linux-gnu.tar.xz 105822856 BLAKE2B 0cf534a55efff99daf700127fc7bc7b82b93054d054fbf8479a8b247b41381fd82f8672ac12f3e3f53566d816964d83069593817d1932b33902f83994f1bdc33 SHA512 bdbdf3a64a184dd4510a113bbe20c058f42e35321cd2fb7c938487dfc9b1f04320b523ea215dd92a23c2537292eeb064097119e2097d6e24a1c4e237d9d4fc8b
DIST rust-1.28.0-s390x-unknown-linux-gnu.tar.xz 98839840 BLAKE2B bbff015b3d2daf1443781cccb80527cf8c7f86a01ed928b49cc7e87e17f8c6354f6a47dd2356ff75357e09f7f79ec85812bd8458aee9455800fdf88761243e94 SHA512 5ffb44d16c990b8a6377b64e5042a3b2e709bcc7187013dbe4ab3c9d8cd781b6bf07b0d374340e2ccabe9f84fd4731b606cb05a10a739ebcfa49652518a2aa46
DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f
+DIST rust-1.29.2-aarch64-unknown-linux-gnu.tar.xz 99702524 BLAKE2B 669066ada5c88ad966125edca77723fbe0ebc0e19859a96cf02eb28a107df87647bc552358cb5e1f8be1fb79d836f8202f4e59349f123bd95383a3a9cb82d0f0 SHA512 f871359a3b1ac54fb237921204d98ef4fac06830e9835849538397c27d40283662c0f6ab3f6eafe0e9ef63182a460e26d615111055430ece0fe94ddf7ad03914
+DIST rust-1.29.2-arm-unknown-linux-gnueabi.tar.xz 105368092 BLAKE2B 7764689fdaeb2ade9aff248707f472ed35d06d4240b138ddf083ef614227845bf6e1d0be38ebc771e95b0998dab3f550de5abe50ffe89625690611d4bdf53aad SHA512 2ef8fda575b00bf7c6f20a8f2a1b6cb8c3b1de6287c9e07889c9a3a682f73f9470bb5649425652ac47af8f61f49abf21209f6b151c4a5ae42dcea59f6e79f84b
+DIST rust-1.29.2-arm-unknown-linux-gnueabihf.tar.xz 105657004 BLAKE2B 5813dde3020afda41e307f4d9ba57c3840ff800bceb0ef494d743095ce6d4da333da208fc72bb36e21209a9ae16e081ca3e7580d59a984ce561d85bcf4b2e2dc SHA512 81d4e392afe3f4bd1ad76a78610e92e8a27afe8f6d0ff1773dbdf35f2041a587c2a0d71db0658ff50fb43460b4f15f23bbb1cc03a018d49d153314e636befb8a
+DIST rust-1.29.2-armv7-unknown-linux-gnueabihf.tar.xz 105958932 BLAKE2B 569cbee0ad0eba41c280be934fc5a59c52331b0853d890aad2188c1979a259d90f4092d72dc9e8027255e2ea6b5ea422a06dd9d82f6b2a865fb1d3bcf146c13d SHA512 bff1220781eca904a93d2cefafed3587e3f76e1dc04fbef09a0281295b6c06491c5fa327830c430d31df80eb7a3e64eac7f45739bc118e3626854f96dce246e2
+DIST rust-1.29.2-i686-unknown-linux-gnu.tar.xz 150567444 BLAKE2B d3b3cfa88e89e29cf2e502a2ee11b22ea45cf9fa5ca0611de273062a8885dc0b9206a43175895a873cbfbaa08bf0bbdcf38cca45436b77b47dbac1b09e0fdb68 SHA512 faac22aec54d0754ff991f2a34ed7b8bfefa8dc9720d247eec1c6b671bbc701907146a796699591e4a677a0f378b9d96bfea5b33452f05dd876c668525f9f33d
+DIST rust-1.29.2-mips-unknown-linux-gnu.tar.xz 96027696 BLAKE2B e12dbd41e45a5009c218be07f085d75ce99bd7a7daf8917db0127aa03ac78f4883b344b566d3a8947b836d55750388ea5387264e036c75de7ef4ba5dda081d63 SHA512 21d860c6f7219f51b65dced57e0173500e054d2d13300f0ee7721262a8354e5dbc272deb8387fcaaeb16ad793808f87edc6c087f7e442e7434264a3302acf537
+DIST rust-1.29.2-mips64-unknown-linux-gnuabi64.tar.xz 102149796 BLAKE2B 1f40dd40e461769cfb75a671d6f83c650c74031302bd8872861cfdd3432e270e47c150382c6f02c38e7823f35a158de395cbc33f0061e51632d130b6fd0910f9 SHA512 5b98632b80d2ed4cef17bd068adabbe26146a6df68e6e70f2535f61f981c8f935b2491a2dcf388a2afe0cc225f10f9f262342457ce9def8c800364253cac7e67
+DIST rust-1.29.2-mipsel-unknown-linux-gnu.tar.xz 97362256 BLAKE2B 4d3170a8c48a68a606eff5631d198b16ca09953b0d8079c39f5edc6284a037c0b2212c74d098da4fa0a40a0917139022a9746734e9fdeb62e2564337430a4edb SHA512 9c5ca864da672a975730073e3291c2be218c2624a11ec5fc9a2637bdf58c7437ae77910bccbc6678d584a3464036377d4717d7f6ebdd5712e9bc86973e91d0ad
+DIST rust-1.29.2-powerpc-unknown-linux-gnu.tar.xz 93639612 BLAKE2B 54fe353f32bedb2567784bfe28ac741f137cc55928e874157f420460831cdb4617fee262c4d3b56d6720dba37bb7b6281c970d4a3002c673aaa85aa70eed922d SHA512 f217cd5169225b290870821b5ba17ad9dfffc99906057c79e91e2a2db5cfd8bc5a83d4e20023e9b73171d15c988e4b28cdbf3f8af2c70657566e6d89658998b0
+DIST rust-1.29.2-powerpc64-unknown-linux-gnu.tar.xz 103432092 BLAKE2B ed700d298770b621767f5439841e3be79c3c02d2b05feb211b8508933d4ca2d13c30cf689c5376cfc93bd374c09aaa4fdc4fb84dd4db264eef6a70cba62b6647 SHA512 1af0b55bc62d7641d33e2d33aadaf474298d3284cb2d914be0240eae54e20f464513db4b04f7518385dc5135498c58ec18e0d4cc6341c9e165847536479f44dc
+DIST rust-1.29.2-powerpc64le-unknown-linux-gnu.tar.xz 106607384 BLAKE2B de19f341dcc1cc580e68865d3b0034f781ed4ca0ac1b07c89352409684670c7d0fd5c95ea6018fc7de4fbfacf4f7d0ebeec34c036c0062ca7f776403511df7dd SHA512 b9181da601a467f46713f2f438fc7ad69c46fc310e62a8d45f665744c8578491d832b8624ff454c19c94f1694fa406846a82289250241030a70b2cb4b88913d1
+DIST rust-1.29.2-s390x-unknown-linux-gnu.tar.xz 99114900 BLAKE2B 08e9251bd8e9c9ac6352ab81735b720052b3288b5fd344f6ba69205c7971f362270f0acce7dbd3763b20d3b1e976ff5404151253acb9c29708f36038d23299f1 SHA512 f76a030257edbdd993d7a4e83da895c8b4749904fb2252a125b3e4ef4331a1cb2c389ec54a372bea413718e3dad987e4b17eb29d301c29ba330222502e6b9b75
+DIST rust-1.29.2-x86_64-unknown-linux-gnu.tar.xz 148275708 BLAKE2B bd7c974f5c8cf78a1fbfc73544ecdab97b7f9ab28ed9ab66759eca3e0fa085fdb2689ba5dfc6dccc6746bab91b6b0b544c44cb729e493dddde2f9ed84c96a247 SHA512 8bc05942a72b186ea1765831bea6921f734e2dd58790a8e427a6d63a2db0d9064937d3198ca3febffeba73b1cc3bef716155ef6cb32127ddeef29ac884cde4b8
DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38
-EBUILD rust-1.29.1.ebuild 7965 BLAKE2B f84b3e11c73b20abf236f457435c56fc2ef160cbd174bb048a24c307a6627680ce266cdd276974a569d0ba715c13f0e1e2e36c2fef3d1600bc4eefefdbc0e3da SHA512 23d46b6feff4016ad6b9e508c58a7d41dfe1568b45b6332efd56c08100d8790f40509cc16b0aed699a839b47ae6bdba700b428c74ed7aa6bd03d8927d6af7233
-EBUILD rust-1.29.2.ebuild 7496 BLAKE2B a51ef2ee6137a2e8f7fb700614af173b6f6ccafbf37cff705f9188a74009d56a0dc3333b1f3b419bd1fdf9b8aa5c59168d23b75b36efd2864200e0bc54bc8918 SHA512 c473c48286ba8cc512ea045f65ab25bfc2343d166ebaa17f0d4738a63e9f1039ab4fdbbe1427b0f5df38ac05447bbece40e7e972c111818389f8d1990cddaebe
-MISC metadata.xml 570 BLAKE2B 84133a816858a9787c2e5c5ca839e8e1c4586bd428711f356c64ea23396b0fd2d4f00abb66f0de8f9c81f34058c537491dee5c539c27be58e709972a5d344dc0 SHA512 f3c7511b766a86fb0ebc7a8a9c88226ec71761da29f0b2a12eb593f3205170504d733cf09b0fb72103fea12ac323fa115a121ab9deb0609c6115ac571330ad01
+DIST rustc-1.30.1-src.tar.xz 96086232 BLAKE2B 170767b64efe670086e7c4e73838b489a155a72c703148f83cad29d401a825a94a1def3aa462ba527e1bd08181c7a9be0e404c25f012906541c3d739eb57e9e5 SHA512 e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
+EBUILD rust-1.29.1-r1.ebuild 8003 BLAKE2B f6f026fd27037603c83b0b68f5cc202d118322e11fce7448f764f81fcb6f55f26ec0b5d7c484b515e54066ca6c65be2c07b91df0175daf1ea0b4d3ae6c0dc1a3 SHA512 c31e38c3294c11355504e6fc8a5e2e199250cd6d0ab471ec72d08c5f62d31642fb76b1de1b5d0c097af3fd57a9299700ebf39ff01d07e2c06c9b868cbf7db1d6
+EBUILD rust-1.29.2-r1.ebuild 7535 BLAKE2B 91d1465b4a5265d019b7cfeeb6b7154e5bce0b83f3d4b36449457875df55823b2319803a68ea59724c6703962471b489af76b773063dbccce84768ae52d61ef9 SHA512 69827d7fd22cfc8fbcdf2885af62c1c9468a8d6afa982fba34435b40430151467fda0715258cb4e3b8db9a861a921dacf5fcd7bd34c3474846516e067fc71931
+EBUILD rust-1.30.1-r1.ebuild 7521 BLAKE2B 2535af0a7add7a05b428732f5a23fb8ce6f9b30d19a2c1627b1743d9810ad45f9536b605b150bf898d50518c9ef471a53b24b1ee9acc6bc021b2ca845d2c48b2 SHA512 0846956025a49f4edc88dd66dd8c60c443b9346a48b533da12fb767743375cdeb31ef078ce106b8f57235cc74e3d87c7b1745579b29b44d3946d41cca1fa6f16
+MISC metadata.xml 634 BLAKE2B 394e75b1b5b5d9fad1d87dca27d7807bfce9eb723bc339dbb7c0630dc5abd3669e9469a9e75da74925d16d63c78971b0e7c84710db9b2cd15e87d81f49968903 SHA512 9e02acc0ad17e2f502c6082b5df9aeb6b9655783892a85d67855b3f6a79ec36dca610170bb002116c354626d44282c4e35e30cdf6b5e49745cfc6a990f55731c
diff --git a/dev-lang/rust/files/1.30.1-clippy-sysroot.patch b/dev-lang/rust/files/1.30.1-clippy-sysroot.patch
new file mode 100644
index 000000000000..d38f8ba5bae8
--- /dev/null
+++ b/dev-lang/rust/files/1.30.1-clippy-sysroot.patch
@@ -0,0 +1,62 @@
+--- a/src/tools/clippy/src/driver.rs 2018-10-25 20:09:06.143109996 +0300
++++ b/src/tools/clippy/src/driver.rs 2018-10-25 20:11:09.204106005 +0300
+@@ -29,54 +29,22 @@
+ exit(0);
+ }
+
+- let sys_root = option_env!("SYSROOT")
+- .map(String::from)
+- .or_else(|| std::env::var("SYSROOT").ok())
+- .or_else(|| {
+- let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
+- let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
+- home.and_then(|home| toolchain.map(|toolchain| format!("{}/toolchains/{}", home, toolchain)))
+- })
+- .or_else(|| {
+- Command::new("rustc")
+- .arg("--print")
+- .arg("sysroot")
+- .output()
+- .ok()
+- .and_then(|out| String::from_utf8(out.stdout).ok())
+- .map(|s| s.trim().to_owned())
+- })
+- .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
+-
+ // Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
+ // We're invoking the compiler programmatically, so we ignore this/
+- let mut orig_args: Vec<String> = env::args().collect();
+- if orig_args.len() <= 1 {
++ let mut args: Vec<String> = env::args().collect();
++ if args.len() <= 1 {
+ std::process::exit(1);
+ }
+- if Path::new(&orig_args[1]).file_stem() == Some("rustc".as_ref()) {
++ if Path::new(&args[1]).file_stem() == Some("rustc".as_ref()) {
+ // we still want to be able to invoke it normally though
+- orig_args.remove(1);
++ args.remove(1);
+ }
+- // this conditional check for the --sysroot flag is there so users can call
+- // `clippy_driver` directly
+- // without having to pass --sysroot or anything
+- let mut args: Vec<String> = if orig_args.iter().any(|s| s == "--sysroot") {
+- orig_args.clone()
+- } else {
+- orig_args
+- .clone()
+- .into_iter()
+- .chain(Some("--sysroot".to_owned()))
+- .chain(Some(sys_root))
+- .collect()
+- };
+
+ // this check ensures that dependencies are built but not linted and the final
+ // crate is
+ // linted but not built
+ let clippy_enabled = env::var("CLIPPY_TESTS").ok().map_or(false, |val| val == "true")
+- || orig_args.iter().any(|s| s == "--emit=dep-info,metadata");
++ || args.iter().any(|s| s == "--emit=dep-info,metadata");
+
+ if clippy_enabled {
+ args.extend_from_slice(&["--cfg".to_owned(), r#"feature="cargo-clippy""#.to_owned()]);
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index c6a534bebad8..cd1133751de1 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -8,6 +8,7 @@
<use>
<flag name="cargo">Install cargo component</flag>
<flag name="clippy">Install clippy component</flag>
+ <flag name="system-llvm">Use the system LLVM install</flag>
<flag name="rls">Install rls component</flag>
<flag name="rustfmt">Install rustfmt component</flag>
<flag name="wasm">Build support for the wasm32-unknown-unknown
diff --git a/dev-lang/rust/rust-1.29.1.ebuild b/dev-lang/rust/rust-1.29.1-r1.ebuild
index 71a52599320e..7e2cf6102204 100644
--- a/dev-lang/rust/rust-1.29.1.ebuild
+++ b/dev-lang/rust/rust-1.29.1-r1.ebuild
@@ -50,7 +50,7 @@ LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
IUSE="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
jemalloc? ( dev-libs/jemalloc )
cargo? (
sys-libs/zlib
@@ -60,16 +60,16 @@ RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
net-libs/http-parser:=
net-misc/curl[ssl]
)"
-DEPEND="${RDEPEND}
+DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
|| (
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
+ dev-util/cmake"
+RDEPEND="${COMMON_DEPEND}
cargo? ( !dev-util/cargo )
- rustfmt? ( !dev-util/rustfmt )
- dev-util/cmake
-"
+ rustfmt? ( !dev-util/rustfmt )"
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
diff --git a/dev-lang/rust/rust-1.29.2.ebuild b/dev-lang/rust/rust-1.29.2-r1.ebuild
index a78fda48444d..724b161b99d4 100644
--- a/dev-lang/rust/rust-1.29.2.ebuild
+++ b/dev-lang/rust/rust-1.29.2-r1.ebuild
@@ -40,7 +40,7 @@ LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
IUSE="cargo clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
jemalloc? ( dev-libs/jemalloc )
cargo? (
sys-libs/zlib
@@ -50,16 +50,16 @@ RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
net-libs/http-parser:=
net-misc/curl[ssl]
)"
-DEPEND="${RDEPEND}
+DEPEND="${COMMON_DEPEND}
${PYTHON_DEPS}
|| (
>=sys-devel/gcc-4.7
>=sys-devel/clang-3.5
)
+ dev-util/cmake"
+RDEPEND="${COMMOND_DEPEND}
cargo? ( !dev-util/cargo )
- rustfmt? ( !dev-util/rustfmt )
- dev-util/cmake
-"
+ rustfmt? ( !dev-util/rustfmt )"
PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
diff --git a/dev-lang/rust/rust-1.30.1-r1.ebuild b/dev-lang/rust/rust-1.30.1-r1.ebuild
new file mode 100644
index 000000000000..620583b6ecb9
--- /dev/null
+++ b/dev-lang/rust/rust-1.30.1-r1.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit eapi7-ver llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).2"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
+
+COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )
+ sys-libs/zlib
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ net-libs/libssh2
+ net-libs/http-parser:=
+ net-misc/curl[ssl]
+ system-llvm? ( >=sys-devel/llvm-6:= )"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake"
+RDEPEND="${COMMON_DEPEND}
+ !dev-util/cargo
+ rustfmt? ( !dev-util/rustfmt )"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
+ x86? ( cpu_flags_x86_sse2 )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+PATCHES=( "${FILESDIR}"/${PV}-clippy-sysroot.patch )
+
+toml_usex() {
+ usex "$1" true false
+}
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ llvm_pkg_setup
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local extended="true" tools="\"cargo\","
+ if use clippy; then
+ tools="\"clippy\",$tools"
+ fi
+ if use rls; then
+ tools="\"rls\",\"analysis\",\"src\",$tools"
+ fi
+ if use rustfmt; then
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target="$(rust_abi)"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ link-shared = $(toml_usex system-llvm)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = ${extended}
+ tools = [${tools}]
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ channel = "stable"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ if use system-llvm; then
+ cat <<- EOF >> "${S}"/config.toml
+ llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
+ EOF
+ fi
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "rust-lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
+ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+ mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
+ if use clippy; then
+ mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
+ mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
+ fi
+ if use rls; then
+ mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
+ mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-lldb
+ EOF
+ echo /usr/bin/cargo >> "${T}/provider-${P}"
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}