diff options
author | Mikhail Pukhlikov <cynede@gentoo.org> | 2019-12-20 14:46:11 +0400 |
---|---|---|
committer | Mikhail Pukhlikov <cynede@gentoo.org> | 2019-12-20 14:46:30 +0400 |
commit | ab768092e28fbac99668454f3b650dafd3ff195e (patch) | |
tree | 50e8f1bf0681b59cd28f3a01d02b924f589b2b7f | |
parent | media-sound/spotify-tui: add package to overlay (diff) | |
download | rust-ab768092e28fbac99668454f3b650dafd3ff195e.tar.gz rust-ab768092e28fbac99668454f3b650dafd3ff195e.tar.bz2 rust-ab768092e28fbac99668454f3b650dafd3ff195e.zip |
Update Rust to 1.40
Signed-off-by: Mikhail Pukhlikov <cynede@gentoo.org>
-rw-r--r-- | dev-lang/rust/Manifest | 10 | ||||
-rw-r--r-- | dev-lang/rust/files/1.36.0-libressl.patch | 68 | ||||
-rw-r--r-- | dev-lang/rust/files/pr65474.patch | 512 | ||||
-rw-r--r-- | dev-lang/rust/files/pr65932.patch | 194 | ||||
-rw-r--r-- | dev-lang/rust/files/pr66103.patch | 69 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.39.0-r667.ebuild | 296 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.40.0-r666.ebuild (renamed from dev-lang/rust/rust-1.39.0-r666.ebuild) | 4 | ||||
-rw-r--r-- | virtual/cargo/cargo-1.40.0-r666.ebuild (renamed from virtual/cargo/cargo-1.39.0-r666.ebuild) | 0 | ||||
-rw-r--r-- | virtual/rust/rust-1.40.0-r666.ebuild (renamed from virtual/rust/rust-1.39.0-r666.ebuild) | 0 |
9 files changed, 77 insertions, 1076 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 5e93289..94543be 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -1,5 +1,5 @@ -DIST rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz 235231988 SHA256 6ab06ff04cc41e612dd55f3358a1239be8cceb0ad8018996d39ae3e3b23156d2 SHA512 c9dea8907d05af938c1936139c1fb8673d0db90503552f53645d71637bb7248263fd20b1c16db140694b2d467a12c474015a2077d9b26c782b44e965a01544c6 WHIRLPOOL 41108f0de4017e033f9d6c28e2268e86046fa966159d6fbeff2b3d45343dbb9d8fff0bc980735f31ccde7bce709a94a615e0ee27512123b07b54fffcd3258cc4 -DIST rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz 243411104 SHA256 c8b9ced4a6b6efe32ac41e2ec032f847223b48ead04dedd2172e08d98616a774 SHA512 ddbb2c8d2e7112c5871155890c8308080ac800795c685c4b4d06b9dd8c5abd28ee13961686c9be465d1bbd33d476c6478b90af8de0ca5a451f8b07eaff42f97d WHIRLPOOL 7edb40a6535f1aa0f6f136380d2eabba57dcf8a0dc063352425bf45a196672f19d93fa7ebf675a4fc6d4ee8259766e3a873959c6ee553a8abb4ced41ca15d1f2 -DIST rust-1.38.0-i686-unknown-linux-gnu.tar.xz 298169160 SHA256 5c488cea89cef760362868eb790896bdf31b3109e392f0d54b27b74bd214df33 SHA512 ffdea264378510c6df687a173211427f4cb5930553c9d14e33c5776b0e15d435d1be719bba8a1db50f50a3171a38802e090451dc92a6ea764cc8fdca24651f24 WHIRLPOOL 75fdf0b697c0442e1cfc6a6cdd93dcfb15e14ec716398ed4fcc6deb839a2a2c02f70cbc3e85c557a0afbee9a26642529ec2b6decd5abd99fed88762df3f7f159 -DIST rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz 279859784 SHA256 4e9a2ef90679a66c9f8c62b113b018866303645a69c4812d8290d8a7162ea190 SHA512 0b25c3049a7a213e9151c898979ec9b5b45e46a9072f9853d8f048cf401ef7ac343526d6919e68607a490e3e7bd0375b12ed9fb253caed26bb60f46473d3699b WHIRLPOOL 3722dbeeeb0e17f1d3452d429076b8f4ac8023841e0d285a7cc1784072d2729cd7d30ef5c41607cb380702f753586cf4bdff8ddb54218c35ecbbbd7b733ecb24 -DIST rustc-1.39.0-src.tar.xz 96495140 SHA256 4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29 SHA512 8610b2ec77722087c572bd84ac562a5b7c5f1a644aea58c5d5daa07a9aed242703b7816e73e2eaa049f773d5907859e259744a0de700622df005584fd798dab0 WHIRLPOOL 3c150d4dcff562fdcfbc1f0956c129e0300d3a38d12a216aeccb929ae51140aa53b58f1f51094cbaa5995623b72175793bd34611461568d9938c8f7d3c470b01 +DIST rust-1.39.0-aarch64-unknown-linux-gnu.tar.xz 238165960 SHA256 a3f6943ad00bbf7131c8571b21f641082c8ac8298ee3a8bd5428e96743e31e05 SHA512 ad37a8454acb8985a5c2b42d7f8bc4212651a16fb5af6b4314dd97faa47de79893f2f74b516af89cd7e77ef3db64247c4764585eb0a17ac328c9cba5e5b9c407 WHIRLPOOL 44a19ddd42628d841b8d923a64236f319f57ac414d97e679a2cf61834e3d32c43ccc650d085781def16ca17b51490e412ddcf563347403dcb65849d443688429 +DIST rust-1.39.0-armv7-unknown-linux-gnueabihf.tar.xz 246114456 SHA256 d98a3cfaa427e7bba95a36cbe98cc2ded3ff5ee87242add1e0c393467c069756 SHA512 db2b001a5587e2d5c8cdcb53c974f2332e76f58e362cba55fc971d7244754f1fa0b7e708ad7e73e7250652b442f06929dc1e8981536d7d76850b45ade275d406 WHIRLPOOL 4d1ba915fef3afeb197a236cdaa6af0c7c49b8db1fae9b2381e3fc226714519304d16361cb50ab0b2853ee762990fe17ddf60130cdb6508d6d7042936bacc252 +DIST rust-1.39.0-i686-unknown-linux-gnu.tar.xz 297665804 SHA256 26b57f9c76ef9119e703a5b5acb7026963f18814cc167c2d8d6a562e05ad755c SHA512 930546e79c0b1105eb0604ae33ccdbd8b00b56e56d069f19f0d802093a052fd3f940eaf1390cdecd79833b0c70457ebfee2ce3b9674fff72df1367076584394a WHIRLPOOL c77a59a825b2e73cb40670bacda632fcba93273aaa3fb67b794c82dd3038879ebbcbe7da33a70c72260c7039b5df9319267db536225f33d401983b55b505c564 +DIST rust-1.39.0-x86_64-unknown-linux-gnu.tar.xz 284967620 SHA256 095874d294355e95236e07e3e82635d95b8872f751ad21c5d1d9b53ef443e536 SHA512 02ca6c821877379d8bd0bcc38281a87e6f86bdbae1270da19e41336cc3a812d9c11c1e976655c192c39153f92cda90ddbd7b4b0bcb4f6787d6d354d2be827a8a WHIRLPOOL 9a28af0cebaac330cebe42ac939645b0ed3484558074431ecac6022e6e2c80e94718371180fee2d4536144e171ce57f7cbe718723b3ae42d215d3ebca79e60ff +DIST rustc-1.40.0-src.tar.xz 92306352 SHA256 6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace SHA512 b5ac3079acefb62d3c985b77f624d7fb68de23a59396fed9ccb292db61641c064f3146ee54d3cf59067b17ebfaadd14a6b2b466def60316bb5b13ba3aef01e1f WHIRLPOOL 2a4f366aec0a129cc3f2b18d623721070613c1ae1b51f797283a73307b5fd425dfde0e32d4308125def62e9a9dfae4503c9a750db3adbdb0d97144e94d8f1a08 diff --git a/dev-lang/rust/files/1.36.0-libressl.patch b/dev-lang/rust/files/1.36.0-libressl.patch new file mode 100644 index 0000000..cc1ce26 --- /dev/null +++ b/dev-lang/rust/files/1.36.0-libressl.patch @@ -0,0 +1,68 @@ +diff --git a/vendor/openssl-sys/.cargo-checksum.json b/vendor/openssl-sys/.cargo-checksum.json +index 5c961bcbc..a0ea2d357 100644 +--- a/vendor/openssl-sys/.cargo-checksum.json ++++ b/vendor/openssl-sys/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"681a1f8a8f389c82bbd3d2498a3692c201c63db658e7c3d162f09d5d81892fd4","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"} +\ No newline at end of file ++{"files":{"CHANGELOG.md":"a3e7e4750fe6130a93e9423d5b1b68c659dd29246602f71583c7a101c4d647be","Cargo.toml":"5fdba4ce7cf40abec303651694e79a5ae551f040a7bbaad134ed9ab54d26a613","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"96a414be6e7e061a21a9e39a61449039f6791225264032641dd044a1a9b88111","build/cfgs.rs":"61b741c4fe9612f5a70b19bec53d3ab7ec2d7038b163c35b54f0664caa104a31","build/expando.c":"c4fa8a4424b2321f1857edfc5ce1ac1f03eda54440367d3142310c0eb5553004","build/find_normal.rs":"0a2dc417eace7fc72c27b9046ebaf53c75e418b27baa877434925a81fe6c23ed","build/find_vendored.rs":"d88c47f4cf851aa67c0e3dec679910c5c7ba239bc5a1aa89e507a875b4c4ca0f","build/main.rs":"f2cd4ca8fde8298211581f9e1ca61668706d7681a38b95a63591450e1d8366a3","src/aes.rs":"660efd70f809cb2f5dbbf527be8f9592911776bab7dafa1fc4cc72dd9a576b67","src/asn1.rs":"f72d6871d38865d9e7378882135cdc6f1acd66c48a4fc846502b7f488dbbf111","src/bio.rs":"5c6f394a78f258af3babb68330fa3571610476c4c3ba3404359db928f2f706ee","src/bn.rs":"c71b9c79f704a94a889d27bf75e7e5b1f9f10b0df0aeb485aef509cf05d7467f","src/cms.rs":"95a0803286d1efbe709a3668443b5001f5cce6f9db216165b1e08950972e0bfd","src/conf.rs":"511e008c18039f54d856d70b80009426fc7f4ce34fe4304e2c58ebf465031de0","src/crypto.rs":"f6e8a116940755b2b53e3d0d49d1b451fc6e4269831fd1cfcee9d6ed404cf487","src/dh.rs":"7cc334e86d16b3eae165dfa3a6c8e488bc0fe590c17beda38893d2e9d784d5a6","src/dsa.rs":"ae79baf231681900ea76304285b3ffacf5298c90b8c04d371269cf4adbb5b9fa","src/dtls1.rs":"45e1dbf94a42d587fd948d553dc30187aa6aa2b5b82d554cf725ff36df768aa0","src/ec.rs":"5341787b108f4e9acb12428fbf993aa507e9d77b97284912f7eab414ec6aeff9","src/err.rs":"f6641be5df397086a9db80667e191fb1d92972c29151e617df86672c1a16d3ad","src/evp.rs":"300007bcf00eaff03cb1d113547a79c9495b498ede9e1b2f709a9e6e1ba42ac1","src/hmac.rs":"fa3976d94a1383f300bdec228270afb8b47c97bb019d727c7d59ba783be3c42e","src/lib.rs":"e8931dd7e59a56a247823201f52828ec15d0b8dbd15ba297cacd3dcb3ca747cf","src/macros.rs":"638fb9098f6024e82b331eeee50c64cefdb58456dba28ee42560be655a0c2bf6","src/obj_mac.rs":"9c20609db7115c9edb99185375426169cb5b7caee839d892b556e92285e65309","src/object.rs":"7539eb2164c3fe2162a339ef5b45f1c835010a1522307803815779a01825eed7","src/ocsp.rs":"1db59566d2f072f7ae981f0c07e1604fcdf60e66845afe0689d588f8e4272115","src/ossl_typ.rs":"fc7366e75c78707650c8667593ed183eca6a8ce8dd6b911e342f644d1bcf98bd","src/pem.rs":"83bb7745615a99fe2a8d5f8f51addba2024c7e6be847ab6c9244bfd04388c4f9","src/pkcs12.rs":"93aab2820008ad90dc346a7dcc02f9201d94bff0bb7d1d71031c097850287c50","src/pkcs7.rs":"5370c8d4bfbf1502fa33aff635cb730e7c87814580f1df9bdb1412a492377813","src/rand.rs":"469601b4fbb56d4dbf5cf5d7bb8483e3bde411edea18601e7d1ed6ef27180fd3","src/rsa.rs":"0e8c1f0bc37620a9208175542143bfd411ae88188974d2d5b37a2b8b77d0e2c8","src/safestack.rs":"6c39e28565d34efad707d77561d4caa99e3f028fcac3a2ef6fd403a78de1190c","src/sha.rs":"05044d221d8d205010a4e3760c0b5c0e2e923e165db0d65f9a8c9bcedaad9961","src/srtp.rs":"306047f3f31828fe7d15de154b375f071ae07012a94c0b5c909f5fe57962a11b","src/ssl.rs":"18c0c0c5ef02329be90fd279968da61d3e1a6b3a3aec102d6fefd99021d1822a","src/ssl3.rs":"9336c816e00847d552dea22587d4ac72ff3cbd469fa5ff750423a19ea11e68eb","src/stack.rs":"1a509907283e5a2bf88cf193ce607f49ce7d2d95547c2ce2abc0fd4567aad334","src/tls1.rs":"60ca3dea1bbfda645bde563b4a878dac129c3f760e3ad572381000fc7a8ef522","src/x509.rs":"20e221731587221aab00aef21b4e4bebb7635603d265d424f3dd3c60d4c511e2","src/x509_vfy.rs":"5609f6300ab37a4d4755c81f7af1e6bb93a2f1a6f333c6e42f1e73ebf83ddc05","src/x509v3.rs":"30c58ce7d80670cc597d041e0f59862c1100e38743fc9dde2aec6dc811a4a558"},"package":"33c86834957dd5b915623e94f2f4ab2c70dd8f6b70679824155d5ae21dbd495d"} +diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs +index 02b93b90a..f0cf4b4ff 100644 +--- a/vendor/openssl-sys/build/main.rs ++++ b/vendor/openssl-sys/build/main.rs +@@ -183,27 +183,31 @@ See rust-openssl README for more information: + if let Some(libressl_version) = libressl_version { + println!("cargo:libressl_version_number={:x}", libressl_version); + ++ let major = (libressl_version >> 28) as u8; + let minor = (libressl_version >> 20) as u8; + let fix = (libressl_version >> 12) as u8; +- let (minor, fix) = match (minor, fix) { +- (5, 0) => ('5', '0'), +- (5, 1) => ('5', '1'), +- (5, 2) => ('5', '2'), +- (5, _) => ('5', 'x'), +- (6, 0) => ('6', '0'), +- (6, 1) => ('6', '1'), +- (6, 2) => ('6', '2'), +- (6, _) => ('6', 'x'), +- (7, _) => ('7', 'x'), +- (8, 0) => ('8', '0'), +- (8, 1) => ('8', '1'), +- (8, _) => ('8', 'x'), +- (9, 0) => ('9', '0'), ++ let (major, minor, fix) = match (major, minor, fix) { ++ (2, 5, 0) => ('2', '5', '0'), ++ (2, 5, 1) => ('2', '5', '1'), ++ (2, 5, 2) => ('2', '5', '2'), ++ (2, 5, _) => ('2', '5', 'x'), ++ (2, 6, 0) => ('2', '6', '0'), ++ (2, 6, 1) => ('2', '6', '1'), ++ (2, 6, 2) => ('2', '6', '2'), ++ (2, 6, _) => ('2', '6', 'x'), ++ (2, 7, _) => ('2', '7', 'x'), ++ (2, 8, 0) => ('2', '8', '0'), ++ (2, 8, 1) => ('2', '8', '1'), ++ (2, 8, _) => ('2', '8', 'x'), ++ (2, 9, 0) => ('2', '9', '0'), ++ (2, 9, _) => ('2', '9', 'x'), ++ (3, 0, 0) => ('3', '0', '0'), ++ (3, 0, _) => ('3', '0', 'x'), + _ => version_error(), + }; + + println!("cargo:libressl=true"); +- println!("cargo:libressl_version=2{}{}", minor, fix); ++ println!("cargo:libressl_version={}{}{}", major, minor, fix); + println!("cargo:version=101"); + Version::Libressl + } else { +@@ -239,7 +243,7 @@ fn version_error() -> ! { + " + + This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 +-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting ++through 3.0.x, but a different version of OpenSSL was found. The build is now aborting + due to this version mismatch. + + " diff --git a/dev-lang/rust/files/pr65474.patch b/dev-lang/rust/files/pr65474.patch deleted file mode 100644 index 34cbb4d..0000000 --- a/dev-lang/rust/files/pr65474.patch +++ /dev/null @@ -1,512 +0,0 @@ -From 3a05616cb6b6df75fc54094de7f3d4b161ed8521 Mon Sep 17 00:00:00 2001 -From: Josh Stone <jistone@redhat.com> -Date: Thu, 26 Sep 2019 14:44:08 -0700 -Subject: [PATCH 1/3] minimize the rust-std component - -This splits out a rustc-dev component with the compiler crates, and -keeps the status quo of default installed files on nightly. The default -changing to not install compiler libraries by default is left for a -future pull request. - -However, on stable and beta, this does remove the compiler libraries -from the set of libraries installed by default, as they are never needed -there (per our stability story, they "cannot" be used). ---- - src/bootstrap/builder.rs | 1 + - src/bootstrap/dist.rs | 129 ++++++++++++++++++++------- - src/tools/build-manifest/src/main.rs | 15 ++++ - 3 files changed, 112 insertions(+), 33 deletions(-) - -diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs -index 0caf2d9b6db5..7e3ae7f2cc90 100644 ---- a/src/bootstrap/builder.rs -+++ b/src/bootstrap/builder.rs -@@ -443,6 +443,7 @@ impl<'a> Builder<'a> { - dist::Rustc, - dist::DebuggerScripts, - dist::Std, -+ dist::RustcDev, - dist::Analysis, - dist::Src, - dist::PlainSourceTarball, -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index d9dff77a30e6..e5a43dcb29f6 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -637,6 +637,28 @@ impl Step for DebuggerScripts { - } - } - -+fn skip_host_target_lib(builder: &Builder<'_>, compiler: Compiler) -> bool { -+ // The only true set of target libraries came from the build triple, so -+ // let's reduce redundant work by only producing archives from that host. -+ if compiler.host != builder.config.build { -+ builder.info("\tskipping, not a build host"); -+ true -+ } else { -+ false -+ } -+} -+ -+/// Copy stamped files into an image's `target/lib` directory. -+fn copy_target_libs(builder: &Builder<'_>, target: &str, image: &Path, stamp: &Path) { -+ let dst = image.join("lib/rustlib").join(target).join("lib"); -+ t!(fs::create_dir_all(&dst)); -+ for (path, host) in builder.read_stamp_file(stamp) { -+ if !host || builder.config.build == target { -+ builder.copy(&path, &dst.join(path.file_name().unwrap())); -+ } -+ } -+} -+ - #[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)] - pub struct Std { - pub compiler: Compiler, -@@ -667,44 +689,19 @@ impl Step for Std { - let target = self.target; - - let name = pkgname(builder, "rust-std"); -- -- // The only true set of target libraries came from the build triple, so -- // let's reduce redundant work by only producing archives from that host. -- if compiler.host != builder.config.build { -- builder.info("\tskipping, not a build host"); -- return distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ let archive = distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ if skip_host_target_lib(builder, compiler) { -+ return archive; - } - -- // We want to package up as many target libraries as possible -- // for the `rust-std` package, so if this is a host target we -- // depend on librustc and otherwise we just depend on libtest. -- if builder.hosts.iter().any(|t| t == target) { -- builder.ensure(compile::Rustc { compiler, target }); -- } else { -- builder.ensure(compile::Std { compiler, target }); -- } -+ builder.ensure(compile::Std { compiler, target }); - - let image = tmpdir(builder).join(format!("{}-{}-image", name, target)); - let _ = fs::remove_dir_all(&image); - -- let dst = image.join("lib/rustlib").join(target); -- t!(fs::create_dir_all(&dst)); -- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf(); -- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir -- builder.cp_filtered(&src, &dst, &|path| { -- if let Some(name) = path.file_name().and_then(|s| s.to_str()) { -- if name == builder.config.rust_codegen_backends_dir.as_str() { -- return false -- } -- if name == "bin" { -- return false -- } -- if name.contains("LLVM") { -- return false -- } -- } -- true -- }); -+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); -+ let stamp = compile::libstd_stamp(builder, compiler_to_use, target); -+ copy_target_libs(builder, &target, &image, &stamp); - - let mut cmd = rust_installer(builder); - cmd.arg("generate") -@@ -723,7 +720,73 @@ impl Step for Std { - let _time = timeit(builder); - builder.run(&mut cmd); - builder.remove_dir(&image); -- distdir(builder).join(format!("{}-{}.tar.gz", name, target)) -+ archive -+ } -+} -+ -+#[derive(Debug, PartialOrd, Ord, Copy, Clone, Hash, PartialEq, Eq)] -+pub struct RustcDev { -+ pub compiler: Compiler, -+ pub target: Interned<String>, -+} -+ -+impl Step for RustcDev { -+ type Output = PathBuf; -+ const DEFAULT: bool = true; -+ const ONLY_HOSTS: bool = true; -+ -+ fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { -+ run.path("rustc-dev") -+ } -+ -+ fn make_run(run: RunConfig<'_>) { -+ run.builder.ensure(RustcDev { -+ compiler: run.builder.compiler_for( -+ run.builder.top_stage, -+ run.builder.config.build, -+ run.target, -+ ), -+ target: run.target, -+ }); -+ } -+ -+ fn run(self, builder: &Builder<'_>) -> PathBuf { -+ let compiler = self.compiler; -+ let target = self.target; -+ -+ let name = pkgname(builder, "rustc-dev"); -+ let archive = distdir(builder).join(format!("{}-{}.tar.gz", name, target)); -+ if skip_host_target_lib(builder, compiler) { -+ return archive; -+ } -+ -+ builder.ensure(compile::Rustc { compiler, target }); -+ -+ let image = tmpdir(builder).join(format!("{}-{}-image", name, target)); -+ let _ = fs::remove_dir_all(&image); -+ -+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); -+ let stamp = compile::librustc_stamp(builder, compiler_to_use, target); -+ copy_target_libs(builder, &target, &image, &stamp); -+ -+ let mut cmd = rust_installer(builder); -+ cmd.arg("generate") -+ .arg("--product-name=Rust") -+ .arg("--rel-manifest-dir=rustlib") -+ .arg("--success-message=Rust-is-ready-to-develop.") -+ .arg("--image-dir").arg(&image) -+ .arg("--work-dir").arg(&tmpdir(builder)) -+ .arg("--output-dir").arg(&distdir(builder)) -+ .arg(format!("--package-name={}-{}", name, target)) -+ .arg(format!("--component-name=rustc-dev-{}", target)) -+ .arg("--legacy-manifest-dirs=rustlib,cargo"); -+ -+ builder.info(&format!("Dist rustc-dev stage{} ({} -> {})", -+ compiler.stage, &compiler.host, target)); -+ let _time = timeit(builder); -+ builder.run(&mut cmd); -+ builder.remove_dir(&image); -+ archive - } - } - -diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs -index f41e7dd17ede..97e758f9b823 100644 ---- a/src/tools/build-manifest/src/main.rs -+++ b/src/tools/build-manifest/src/main.rs -@@ -399,6 +399,7 @@ impl Builder { - fn add_packages_to(&mut self, manifest: &mut Manifest) { - let mut package = |name, targets| self.package(name, &mut manifest.pkg, targets); - package("rustc", HOSTS); -+ package("rustc-dev", HOSTS); - package("cargo", HOSTS); - package("rust-mingw", MINGW); - package("rust-std", TARGETS); -@@ -481,6 +482,15 @@ impl Builder { - components.push(host_component("rust-mingw")); - } - -+ // The compiler libraries are not stable for end users, but `rustc-dev` was only recently -+ // split out of `rust-std`. We'll include it by default as a transition for nightly users, -+ // but ship it as an optional component on the beta and stable channels. -+ if self.rust_release == "nightly" { -+ components.push(host_component("rustc-dev")); -+ } else { -+ extensions.push(host_component("rustc-dev")); -+ } -+ - // Tools are always present in the manifest, - // but might be marked as unavailable if they weren't built. - extensions.extend(vec![ -@@ -498,6 +508,11 @@ impl Builder { - .filter(|&&target| target != host) - .map(|target| Component::from_str("rust-std", target)) - ); -+ extensions.extend( -+ HOSTS.iter() -+ .filter(|&&target| target != host) -+ .map(|target| Component::from_str("rustc-dev", target)) -+ ); - extensions.push(Component::from_str("rust-src", "*")); - - // If the components/extensions don't actually exist for this - -From 4c906dc84ec78fad35405d5c0f2b2d58f9f26288 Mon Sep 17 00:00:00 2001 -From: Josh Stone <jistone@redhat.com> -Date: Mon, 7 Oct 2019 15:49:51 -0700 -Subject: [PATCH 2/3] Add rustc-dev to nightly default and complete profiles - ---- - src/tools/build-manifest/src/main.rs | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs -index 97e758f9b823..c0d2deab2f8b 100644 ---- a/src/tools/build-manifest/src/main.rs -+++ b/src/tools/build-manifest/src/main.rs -@@ -427,6 +427,13 @@ impl Builder { - "rls-preview", "rust-src", "llvm-tools-preview", - "lldb-preview", "rust-analysis", "miri-preview" - ]); -+ -+ // The compiler libraries are not stable for end users, but `rustc-dev` was only recently -+ // split out of `rust-std`. We'll include it by default as a transition for nightly users. -+ if self.rust_release == "nightly" { -+ self.extend_profile("default", &mut manifest.profiles, &["rustc-dev"]); -+ self.extend_profile("complete", &mut manifest.profiles, &["rustc-dev"]); -+ } - } - - fn add_renames_to(&self, manifest: &mut Manifest) { -@@ -549,6 +556,14 @@ impl Builder { - dst.insert(profile_name.to_owned(), pkgs.iter().map(|s| (*s).to_owned()).collect()); - } - -+ fn extend_profile(&mut self, -+ profile_name: &str, -+ dst: &mut BTreeMap<String, Vec<String>>, -+ pkgs: &[&str]) { -+ dst.get_mut(profile_name).expect("existing profile") -+ .extend(pkgs.iter().map(|s| (*s).to_owned())); -+ } -+ - fn package(&mut self, - pkgname: &str, - dst: &mut BTreeMap<String, Package>, - -From 7ccf492ae616b4d06eab283ab604938fd234415a Mon Sep 17 00:00:00 2001 -From: Jethro Beekman <jethro@fortanix.com> -Date: Sat, 12 Oct 2019 16:01:59 +0200 -Subject: [PATCH 3/3] Package non-rust objects - ---- - src/bootstrap/check.rs | 4 +++ - src/bootstrap/compile.rs | 63 ++++++++++++++++++++++++++-------------- - src/bootstrap/lib.rs | 1 + - 3 files changed, 46 insertions(+), 22 deletions(-) - -diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs -index cadb9a7e441f..df1c72575846 100644 ---- a/src/bootstrap/check.rs -+++ b/src/bootstrap/check.rs -@@ -55,6 +55,7 @@ impl Step for Std { - cargo, - args(builder.kind), - &libstd_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -@@ -103,6 +104,7 @@ impl Step for Rustc { - cargo, - args(builder.kind), - &librustc_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -@@ -155,6 +157,7 @@ impl Step for CodegenBackend { - cargo, - args(builder.kind), - &codegen_backend_stamp(builder, compiler, target, backend), -+ vec![], - true); - } - } -@@ -199,6 +202,7 @@ impl Step for Rustdoc { - cargo, - args(builder.kind), - &rustdoc_stamp(builder, compiler, target), -+ vec![], - true); - - let libdir = builder.sysroot_libdir(compiler, target); -diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs -index 6ea32edfb208..d48927f9bf78 100644 ---- a/src/bootstrap/compile.rs -+++ b/src/bootstrap/compile.rs -@@ -69,7 +69,7 @@ impl Step for Std { - return; - } - -- builder.ensure(StartupObjects { compiler, target }); -+ let mut target_deps = builder.ensure(StartupObjects { compiler, target }); - - let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target); - if compiler_to_use != compiler { -@@ -91,7 +91,7 @@ impl Step for Std { - return; - } - -- copy_third_party_objects(builder, &compiler, target); -+ target_deps.extend(copy_third_party_objects(builder, &compiler, target).into_iter()); - - let mut cargo = builder.cargo(compiler, Mode::Std, target, "build"); - std_cargo(builder, &compiler, target, &mut cargo); -@@ -102,6 +102,7 @@ impl Step for Std { - cargo, - vec![], - &libstd_stamp(builder, compiler, target), -+ target_deps, - false); - - builder.ensure(StdLink { -@@ -113,9 +114,22 @@ impl Step for Std { - } - - /// Copies third pary objects needed by various targets. --fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) { -+fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>) -+ -> Vec<PathBuf> -+{ - let libdir = builder.sysroot_libdir(*compiler, target); - -+ let mut target_deps = vec![]; -+ -+ let mut copy_and_stamp = |sourcedir: &Path, name: &str| { -+ let target = libdir.join(name); -+ builder.copy( -+ &sourcedir.join(name), -+ &target, -+ ); -+ target_deps.push(target); -+ }; -+ - // Copies the crt(1,i,n).o startup objects - // - // Since musl supports fully static linking, we can cross link for it even -@@ -123,19 +137,13 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: - // files. As those shipped with glibc won't work, copy the ones provided by - // musl so we have them on linux-gnu hosts. - if target.contains("musl") { -+ let srcdir = builder.musl_root(target).unwrap().join("lib"); - for &obj in &["crt1.o", "crti.o", "crtn.o"] { -- builder.copy( -- &builder.musl_root(target).unwrap().join("lib").join(obj), -- &libdir.join(obj), -- ); -+ copy_and_stamp(&srcdir, obj); - } - } else if target.ends_with("-wasi") { -- for &obj in &["crt1.o"] { -- builder.copy( -- &builder.wasi_root(target).unwrap().join("lib/wasm32-wasi").join(obj), -- &libdir.join(obj), -- ); -- } -+ let srcdir = builder.wasi_root(target).unwrap().join("lib/wasm32-wasi"); -+ copy_and_stamp(&srcdir, "crt1.o"); - } - - // Copies libunwind.a compiled to be linked wit x86_64-fortanix-unknown-sgx. -@@ -145,11 +153,11 @@ fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: - // which is provided by std for this target. - if target == "x86_64-fortanix-unknown-sgx" { - let src_path_env = "X86_FORTANIX_SGX_LIBS"; -- let obj = "libunwind.a"; - let src = env::var(src_path_env).expect(&format!("{} not found in env", src_path_env)); -- let src = Path::new(&src).join(obj); -- builder.copy(&src, &libdir.join(obj)); -+ copy_and_stamp(Path::new(&src), "libunwind.a"); - } -+ -+ target_deps - } - - /// Configure cargo to compile the standard library, adding appropriate env vars -@@ -307,7 +315,7 @@ pub struct StartupObjects { - } - - impl Step for StartupObjects { -- type Output = (); -+ type Output = Vec<PathBuf>; - - fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path("src/rtstartup") -@@ -326,13 +334,15 @@ impl Step for StartupObjects { - /// They don't require any library support as they're just plain old object - /// files, so we just use the nightly snapshot compiler to always build them (as - /// no other compilers are guaranteed to be available). -- fn run(self, builder: &Builder<'_>) { -+ fn run(self, builder: &Builder<'_>) -> Vec<PathBuf> { - let for_compiler = self.compiler; - let target = self.target; - if !target.contains("windows-gnu") { -- return -+ return vec![] - } - -+ let mut target_deps = vec![]; -+ - let src_dir = &builder.src.join("src/rtstartup"); - let dst_dir = &builder.native_dir(target).join("rtstartup"); - let sysroot_dir = &builder.sysroot_libdir(for_compiler, target); -@@ -351,7 +361,9 @@ impl Step for StartupObjects { - .arg(src_file)); - } - -- builder.copy(dst_file, &sysroot_dir.join(file.to_string() + ".o")); -+ let target = sysroot_dir.join(file.to_string() + ".o"); -+ builder.copy(dst_file, &target); -+ target_deps.push(target); - } - - for obj in ["crt2.o", "dllcrt2.o"].iter() { -@@ -359,8 +371,12 @@ impl Step for StartupObjects { - builder.cc(target), - target, - obj); -- builder.copy(&src, &sysroot_dir.join(obj)); -+ let target = sysroot_dir.join(obj); -+ builder.copy(&src, &target); -+ target_deps.push(target); - } -+ -+ target_deps - } - } - -@@ -438,6 +454,7 @@ impl Step for Rustc { - cargo, - vec![], - &librustc_stamp(builder, compiler, target), -+ vec![], - false); - - builder.ensure(RustcLink { -@@ -586,7 +603,7 @@ impl Step for CodegenBackend { - - let tmp_stamp = out_dir.join(".tmp.stamp"); - -- let files = run_cargo(builder, cargo, vec![], &tmp_stamp, false); -+ let files = run_cargo(builder, cargo, vec![], &tmp_stamp, vec![], false); - if builder.config.dry_run { - return; - } -@@ -954,6 +971,7 @@ pub fn run_cargo(builder: &Builder<'_>, - cargo: Cargo, - tail_args: Vec<String>, - stamp: &Path, -+ additional_target_deps: Vec<PathBuf>, - is_check: bool) - -> Vec<PathBuf> - { -@@ -1070,6 +1088,7 @@ pub fn run_cargo(builder: &Builder<'_>, - deps.push((path_to_add.into(), false)); - } - -+ deps.extend(additional_target_deps.into_iter().map(|d| (d, false))); - deps.sort(); - let mut new_contents = Vec::new(); - for (dep, proc_macro) in deps.iter() { -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index 9203a558f646..ad0bdd0f425f 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -1144,6 +1144,7 @@ impl Build { - pub fn copy(&self, src: &Path, dst: &Path) { - if self.config.dry_run { return; } - self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst)); -+ if src == dst { return; } - let _ = fs::remove_file(&dst); - let metadata = t!(src.symlink_metadata()); - if metadata.file_type().is_symlink() { diff --git a/dev-lang/rust/files/pr65932.patch b/dev-lang/rust/files/pr65932.patch deleted file mode 100644 index 8a7a5b3..0000000 --- a/dev-lang/rust/files/pr65932.patch +++ /dev/null @@ -1,194 +0,0 @@ -From 8d56bcc59c92c5770f585cd433230e7771da2dad Mon Sep 17 00:00:00 2001 -From: Guanqun Lu <guanqun.lu@gmail.com> -Date: Tue, 29 Oct 2019 16:48:05 +0800 -Subject: [PATCH 1/2] download .tar.xz if python3 is used - ---- - src/bootstrap/bootstrap.py | 32 +++++++++++++++++++++++--------- - 1 file changed, 23 insertions(+), 9 deletions(-) - -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 4caf36a6f2a5..9cc58e03d564 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -102,10 +102,10 @@ def verify(path, sha_path, verbose): - return verified - - --def unpack(tarball, dst, verbose=False, match=None): -+def unpack(tarball, tarball_suffix, dst, verbose=False, match=None): - """Unpack the given tarball file""" - print("extracting", tarball) -- fname = os.path.basename(tarball).replace(".tar.gz", "") -+ fname = os.path.basename(tarball).replace(tarball_suffix, "") - with contextlib.closing(tarfile.open(tarball)) as tar: - for member in tar.getnames(): - if "/" not in member: -@@ -331,6 +331,18 @@ def __init__(self): - self.use_vendored_sources = '' - self.verbose = False - -+ def support_xz(): -+ try: -+ with tempfile.NamedTemporaryFile(delete=False) as temp_file: -+ temp_path = temp_file.name -+ with tarfile.open(temp_path, "w:xz") as tar: -+ pass -+ return True -+ except tarfile.CompressionError: -+ return False -+ -+ self.tarball_suffix = '.tar.xz' if support_xz() else '.tar.gz' -+ - def download_stage0(self): - """Fetch the build system for Rust, written in Rust - -@@ -349,12 +361,13 @@ def download_stage0(self): - self.program_out_of_date(self.rustc_stamp())): - if os.path.exists(self.bin_root()): - shutil.rmtree(self.bin_root()) -- filename = "rust-std-{}-{}.tar.gz".format( -- rustc_channel, self.build) -+ filename = "rust-std-{}-{}{}".format( -+ rustc_channel, self.build, self.tarball_suffix) - pattern = "rust-std-{}".format(self.build) - self._download_stage0_helper(filename, pattern) - -- filename = "rustc-{}-{}.tar.gz".format(rustc_channel, self.build) -+ filename = "rustc-{}-{}{}".format(rustc_channel, self.build, -+ self.tarball_suffix) - self._download_stage0_helper(filename, "rustc") - self.fix_executable("{}/bin/rustc".format(self.bin_root())) - self.fix_executable("{}/bin/rustdoc".format(self.bin_root())) -@@ -365,14 +378,15 @@ def download_stage0(self): - # libraries/binaries that are included in rust-std with - # the system MinGW ones. - if "pc-windows-gnu" in self.build: -- filename = "rust-mingw-{}-{}.tar.gz".format( -- rustc_channel, self.build) -+ filename = "rust-mingw-{}-{}{}".format( -+ rustc_channel, self.build, self.tarball_suffix) - self._download_stage0_helper(filename, "rust-mingw") - - if self.cargo().startswith(self.bin_root()) and \ - (not os.path.exists(self.cargo()) or - self.program_out_of_date(self.cargo_stamp())): -- filename = "cargo-{}-{}.tar.gz".format(cargo_channel, self.build) -+ filename = "cargo-{}-{}{}".format(cargo_channel, self.build, -+ self.tarball_suffix) - self._download_stage0_helper(filename, "cargo") - self.fix_executable("{}/bin/cargo".format(self.bin_root())) - with output(self.cargo_stamp()) as cargo_stamp: -@@ -388,7 +402,7 @@ def _download_stage0_helper(self, filename, pattern): - tarball = os.path.join(rustc_cache, filename) - if not os.path.exists(tarball): - get("{}/{}".format(url, filename), tarball, verbose=self.verbose) -- unpack(tarball, self.bin_root(), match=pattern, verbose=self.verbose) -+ unpack(tarball, self.tarball_suffix, self.bin_root(), match=pattern, verbose=self.verbose) - - @staticmethod - def fix_executable(fname): - -From 0019371e3d878c1031bd7395b52ab40f2441049c Mon Sep 17 00:00:00 2001 -From: Guanqun Lu <guanqun.lu@gmail.com> -Date: Tue, 12 Nov 2019 00:16:05 +0800 -Subject: [PATCH 2/2] bootstrap: don't call support_xz in hot-path - ---- - src/bootstrap/bootstrap.py | 43 +++++++++++++++++++------------------- - 1 file changed, 22 insertions(+), 21 deletions(-) - -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 9cc58e03d564..730e8cf05d41 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -331,17 +331,6 @@ def __init__(self): - self.use_vendored_sources = '' - self.verbose = False - -- def support_xz(): -- try: -- with tempfile.NamedTemporaryFile(delete=False) as temp_file: -- temp_path = temp_file.name -- with tarfile.open(temp_path, "w:xz") as tar: -- pass -- return True -- except tarfile.CompressionError: -- return False -- -- self.tarball_suffix = '.tar.xz' if support_xz() else '.tar.gz' - - def download_stage0(self): - """Fetch the build system for Rust, written in Rust -@@ -356,19 +345,30 @@ def download_stage0(self): - rustc_channel = self.rustc_channel - cargo_channel = self.cargo_channel - -+ def support_xz(): -+ try: -+ with tempfile.NamedTemporaryFile(delete=False) as temp_file: -+ temp_path = temp_file.name -+ with tarfile.open(temp_path, "w:xz") as tar: -+ pass -+ return True -+ except tarfile.CompressionError: -+ return False -+ - if self.rustc().startswith(self.bin_root()) and \ - (not os.path.exists(self.rustc()) or - self.program_out_of_date(self.rustc_stamp())): - if os.path.exists(self.bin_root()): - shutil.rmtree(self.bin_root()) -+ tarball_suffix = '.tar.xz' if support_xz() else '.tar.gz' - filename = "rust-std-{}-{}{}".format( -- rustc_channel, self.build, self.tarball_suffix) -+ rustc_channel, self.build, tarball_suffix) - pattern = "rust-std-{}".format(self.build) -- self._download_stage0_helper(filename, pattern) -+ self._download_stage0_helper(filename, pattern, tarball_suffix) - - filename = "rustc-{}-{}{}".format(rustc_channel, self.build, -- self.tarball_suffix) -- self._download_stage0_helper(filename, "rustc") -+ tarball_suffix) -+ self._download_stage0_helper(filename, "rustc", tarball_suffix) - self.fix_executable("{}/bin/rustc".format(self.bin_root())) - self.fix_executable("{}/bin/rustdoc".format(self.bin_root())) - with output(self.rustc_stamp()) as rust_stamp: -@@ -379,20 +379,21 @@ def download_stage0(self): - # the system MinGW ones. - if "pc-windows-gnu" in self.build: - filename = "rust-mingw-{}-{}{}".format( -- rustc_channel, self.build, self.tarball_suffix) -- self._download_stage0_helper(filename, "rust-mingw") -+ rustc_channel, self.build, tarball_suffix) -+ self._download_stage0_helper(filename, "rust-mingw", tarball_suffix) - - if self.cargo().startswith(self.bin_root()) and \ - (not os.path.exists(self.cargo()) or - self.program_out_of_date(self.cargo_stamp())): -+ tarball_suffix = '.tar.xz' if support_xz() else '.tar.gz' - filename = "cargo-{}-{}{}".format(cargo_channel, self.build, -- self.tarball_suffix) -- self._download_stage0_helper(filename, "cargo") -+ tarball_suffix) -+ self._download_stage0_helper(filename, "cargo", tarball_suffix) - self.fix_executable("{}/bin/cargo".format(self.bin_root())) - with output(self.cargo_stamp()) as cargo_stamp: - cargo_stamp.write(self.date) - -- def _download_stage0_helper(self, filename, pattern): -+ def _download_stage0_helper(self, filename, pattern, tarball_suffix): - cache_dst = os.path.join(self.build_dir, "cache") - rustc_cache = os.path.join(cache_dst, self.date) - if not os.path.exists(rustc_cache): -@@ -402,7 +403,7 @@ def _download_stage0_helper(self, filename, pattern): - tarball = os.path.join(rustc_cache, filename) - if not os.path.exists(tarball): - get("{}/{}".format(url, filename), tarball, verbose=self.verbose) -- unpack(tarball, self.tarball_suffix, self.bin_root(), match=pattern, verbose=self.verbose) -+ unpack(tarball, tarball_suffix, self.bin_root(), match=pattern, verbose=self.verbose) - - @staticmethod - def fix_executable(fname): - diff --git a/dev-lang/rust/files/pr66103.patch b/dev-lang/rust/files/pr66103.patch deleted file mode 100644 index d418043..0000000 --- a/dev-lang/rust/files/pr66103.patch +++ /dev/null @@ -1,69 +0,0 @@ -From d01ebbb34b3f64099174c404b46f1f660bebbb6f Mon Sep 17 00:00:00 2001 -From: Samuel Holland <samuel@sholland.org> -Date: Mon, 4 Nov 2019 21:48:22 -0600 -Subject: [PATCH] Add target thumbv7neon-unknown-linux-musleabihf - -This is a copy of thumbv7neon-unknown-linux-gnueabihf with musl changes -merged from armv7-unknown-linux-musleabihf. ---- - src/librustc_target/spec/mod.rs | 1 + - .../thumbv7neon_unknown_linux_musleabihf.rs | 37 +++++++++++++++++++ - 2 files changed, 38 insertions(+) - create mode 100644 src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs - -diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs -index 6033d52c4411..baab7b4ca8eb 100644 ---- a/src/librustc_target/spec/mod.rs -+++ b/src/librustc_target/spec/mod.rs -@@ -362,6 +362,7 @@ supported_targets! { - ("armv7-unknown-linux-gnueabi", armv7_unknown_linux_gnueabi), - ("armv7-unknown-linux-gnueabihf", armv7_unknown_linux_gnueabihf), - ("thumbv7neon-unknown-linux-gnueabihf", thumbv7neon_unknown_linux_gnueabihf), -+ ("thumbv7neon-unknown-linux-musleabihf", thumbv7neon_unknown_linux_musleabihf), - ("armv7-unknown-linux-musleabi", armv7_unknown_linux_musleabi), - ("armv7-unknown-linux-musleabihf", armv7_unknown_linux_musleabihf), - ("aarch64-unknown-linux-gnu", aarch64_unknown_linux_gnu), -diff --git a/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs b/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs -new file mode 100644 -index 000000000000..1270f391731b ---- /dev/null -+++ b/src/librustc_target/spec/thumbv7neon_unknown_linux_musleabihf.rs -@@ -0,0 +1,37 @@ -+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; -+ -+// This target is for musl Linux on ARMv7 with thumb mode enabled -+// (for consistency with Android and Debian-based distributions) -+// and with NEON unconditionally enabled and, therefore, with 32 FPU -+// registers enabled as well. See section A2.6.2 on page A2-56 in -+// https://static.docs.arm.com/ddi0406/cd/DDI0406C_d_armv7ar_arm.pdf -+ -+pub fn target() -> TargetResult { -+ let base = super::linux_musl_base::opts(); -+ Ok(Target { -+ // It's important we use "gnueabihf" and not "musleabihf" here. LLVM -+ // uses it to determine the calling convention and float ABI, and LLVM -+ // doesn't support the "musleabihf" value. -+ llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "32".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), -+ arch: "arm".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "unknown".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ -+ // Most of these settings are copied from the thumbv7neon_unknown_linux_gnueabihf -+ // target. -+ options: TargetOptions { -+ features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(), -+ cpu: "generic".to_string(), -+ max_atomic_width: Some(64), -+ abi_blacklist: super::arm_base::abi_blacklist(), -+ target_mcount: "\u{1}mcount".to_string(), -+ .. base -+ } -+ }) -+} - diff --git a/dev-lang/rust/rust-1.39.0-r667.ebuild b/dev-lang/rust/rust-1.39.0-r667.ebuild deleted file mode 100644 index f732950..0000000 --- a/dev-lang/rust/rust-1.39.0-r667.ebuild +++ /dev/null @@ -1,296 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy ) - -inherit multiprocessing multilib-build python-any-r1 toolchain-funcs versionator - -ABI_VER="$(get_version_component_range 1-2)" -SLOT="dev/${ABI_VER}" -MY_P="rustc-${PV}" -SRC="${MY_P}-src.tar.xz" -#KEYWORDS="~amd64 ~arm64 ~x86" - -CHOST_amd64=x86_64-unknown-linux-gnu -CHOST_x86=i686-unknown-linux-gnu -CHOST_arm64=aarch64-unknown-linux-gnu -CHOST_arm=armv7-unknown-linux-gnueabihf - -RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0" -RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}" -RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}" -RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}" -RUST_STAGE0_armv7="rust-${RUST_STAGE0_VERSION}-${CHOST_arm}" - -CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2))).0" - -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 - amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz ) - x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz ) - arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz ) - arm? ( https://static.rust-lang.org/dist/${RUST_STAGE0_armv7}.tar.xz ) -" - -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 debug doc libressl rls rustfmt thumbv7neon wasm ${ALL_LLVM_TARGETS[*]}" - -RDEPEND=">=app-eselect/eselect-rust-20190311 - sys-libs/zlib - !libressl? ( <dev-libs/openssl-1.1.2:= >=dev-libs/openssl-1.0.1:= ) - libressl? ( <=dev-libs/libressl-2.9.0:= >=dev-libs/libressl-2.5:= ) - net-libs/libssh2 - net-libs/http-parser - net-misc/curl[ssl] - " -DEPEND="${RDEPEND} - ${PYTHON_DEPS} - || ( - >=sys-devel/gcc-4.7 - >=sys-devel/clang-3.5 - ) - !dev-util/cargo - rustfmt? ( !dev-util/rustfmt ) - dev-util/cmake -" -PDEPEND="" - -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" - -PATCHES=( - # https://github.com/rust-lang/rust/pull/65474 - "${FILESDIR}"/pr65474.patch - "${FILESDIR}"/pr66103.patch - ) - - -S="${WORKDIR}/${MY_P}-src" - -toml_usex() { - usex "$1" true false -} - -src_prepare() { - local rust_stage0_root="${WORKDIR}"/rust-stage0 - - local rust_stage0_name="RUST_STAGE0_${ARCH}" - local rust_stage0="${!rust_stage0_name}" - - "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die - - default -} - -src_configure() { - local rust_target="" rust_targets="" rust_target_name arch_cflags - - # Collect rust target names to compile standard libs for all ABIs. - for v in $(multilib_get_enabled_abi_pairs); do - rust_target_name="CHOST_${v##*.}" - rust_targets="${rust_targets},\"${!rust_target_name}\"" - done - if use wasm; then - rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" - fi - if use arm && use thumbv7neon; then - rust_targets="${rust_targets},\"thumbv7neon-unknown-linux-gnueabihf\"" - 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_name="CHOST_${ARCH}" - rust_target="${!rust_target_name}" - - cat <<- EOF > "${S}"/config.toml - [llvm] - optimize = $(toml_usex !debug) - release-debuginfo = $(toml_usex debug) - assertions = $(toml_usex debug) - targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" - [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}] - verbose = 2 - [install] - prefix = "${EPREFIX}/usr" - libdir = "$(get_libdir)" - docdir = "share/doc/${P}" - mandir = "share/${P}/man" - [rust] - optimize = $(toml_usex !debug) - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - default-linker = "$(tc-getCC)" - rpath = false - lld = $(toml_usex wasm) - EOF - - for v in $(multilib_get_enabled_abi_pairs); do - rust_target=$(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 - done - - if use wasm; then - cat <<- EOF >> "${S}"/config.toml - [target.wasm32-unknown-unknown] - linker = "lld" - EOF - fi - - if use arm && use thumbv7neon; then - cat <<- EOF >> "${S}"/config.toml - [target.thumbv7neon-unknown-linux-gnueabihf] - cc = "$(tc-getBUILD_CC)" - cxx = "$(tc-getBUILD_CXX)" - linker = "$(tc-getCC)" - ar = "$(tc-getAR)" - EOF - fi -} - -src_compile() { - env $(cat "${S}"/config.env)\ - ./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}" ./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=$(get_abi_CHOST ${v##*.}) - mkdir -p "${D}/usr/${abi_libdir}" - cp "${D}/usr/$(get_libdir)/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}." - - ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo." - ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some" - ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'." - - 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 -} diff --git a/dev-lang/rust/rust-1.39.0-r666.ebuild b/dev-lang/rust/rust-1.40.0-r666.ebuild index 14cdf7f..f0ba79e 100644 --- a/dev-lang/rust/rust-1.39.0-r666.ebuild +++ b/dev-lang/rust/rust-1.40.0-r666.ebuild @@ -67,6 +67,10 @@ PDEPEND="" REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" +PATCHES=( + "${FILESDIR}"/1.36.0-libressl.patch +) + S="${WORKDIR}/${MY_P}-src" toml_usex() { diff --git a/virtual/cargo/cargo-1.39.0-r666.ebuild b/virtual/cargo/cargo-1.40.0-r666.ebuild index fb4010e..fb4010e 100644 --- a/virtual/cargo/cargo-1.39.0-r666.ebuild +++ b/virtual/cargo/cargo-1.40.0-r666.ebuild diff --git a/virtual/rust/rust-1.39.0-r666.ebuild b/virtual/rust/rust-1.40.0-r666.ebuild index c0a4c99..c0a4c99 100644 --- a/virtual/rust/rust-1.39.0-r666.ebuild +++ b/virtual/rust/rust-1.40.0-r666.ebuild |