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-bin/
Date: Fri, 31 Jul 2020 09:22:18
Message-Id: 1596187233.6321b27cec75e8e1da3a5c033ff09c17ea2c074f.gyakovlev@gentoo
1 commit: 6321b27cec75e8e1da3a5c033ff09c17ea2c074f
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 31 08:02:47 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 31 09:20:33 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6321b27c
7
8 dev-lang/rust-bin: bump to 1.45.1
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 dev-lang/rust-bin/Manifest | 14 +++
14 dev-lang/rust-bin/rust-bin-1.45.1.ebuild | 175 +++++++++++++++++++++++++++++++
15 2 files changed, 189 insertions(+)
16
17 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
18 index f54c1ffcab7..af943c79f19 100644
19 --- a/dev-lang/rust-bin/Manifest
20 +++ b/dev-lang/rust-bin/Manifest
21 @@ -68,3 +68,17 @@ DIST rust-1.45.0-powerpc64le-unknown-linux-gnu.tar.xz 121610840 BLAKE2B e0763a8c
22 DIST rust-1.45.0-s390x-unknown-linux-gnu.tar.xz 125133972 BLAKE2B 03f10c887b1fade6e7b6ea822bb5bb51bfc6a426f0a50fef19612add1a0d518172155402f6675cfa81943d70940806c23b25228f69fcf0383889f84ac9c0a208 SHA512 9c8ababcf54f2de07ab39bdbc5b3c212077d22944c509eb0971eaa7e9c068eb385387abfdef8cd52ba91895847aa491acf928298566cc2382a1045097b8a543d
23 DIST rust-1.45.0-x86_64-unknown-linux-gnu.tar.xz 117891136 BLAKE2B 59f3a7883197fd3ebbcefca5ebc653fbda1b2969922545faa70cc321e51d5c1557976296f1c00cc8e344168be242cb19d669ac8415836ec5958957ba30769fa4 SHA512 e156dad517c5aefea97c2116ad7239dffc6eb5594f795aeaa4e7dbf5b2b8c833f4e7459578c1c6e18238f23379af429e73bc0c97dace0a97b1786836409f17fa
24 DIST rust-1.45.0-x86_64-unknown-linux-musl.tar.xz 124135096 BLAKE2B 683c29fb21d7cc5a523112de4cb1dd6b21c317e15435826039fb76cb280c5803ca94106625db8cff0f4d3c734340aa2b7a4b10880af8b06b9954d8bab7a1e1ba SHA512 c8b9d9555e6c7f4439cd967f7deebb0540800fd29cb5970e3d95f1ea87c100d2924a711fbd74afab61d2310bba9e5a02b5f2eb2a7881a7026bcbe762ae1da93e
25 +DIST rust-1.45.1-aarch64-unknown-linux-gnu.tar.xz 110598096 BLAKE2B a3defd33d2c223012c9eb7b094c77f338ae9beb8661412966a62b4bc868175cf91489f4328a8dc7d0b84b892dad713d2c4f4d180c55dbcd2ffd58c3920585e84 SHA512 fd64aaa3d8137d62c838f0ef554ff159c84263a4734556c0e4ef911d3f87921f846d70d76983fe8ebe9679477915255ceea69c8a9769797893827d5d67e97b0b
26 +DIST rust-1.45.1-arm-unknown-linux-gnueabi.tar.xz 115140648 BLAKE2B 537fe3874c0b09b8cad304c09ca36824cd77916508e7527b9b53a3a8a37ddeab3e760bb1f40c185a91a1eeba7953d7d9d2687e1d341b0833e2a129994e4a9014 SHA512 a3c36dee2f7cda77dd307ad61065c7ce20a433689a3396d8c286b07f0f2aea666881dd4089e2332a0793a51a72189928919a477e72e7f44a64b41101c65cf9ed
27 +DIST rust-1.45.1-arm-unknown-linux-gnueabihf.tar.xz 113215036 BLAKE2B 36cabfcf77dd533b7f5f89dd5b94244d148cc4c6e19c76a9d677c01a4daffd8075f6842b98314f5ab37c66b223901cfe8a16e7637f3f805f5e75c705979fe8e4 SHA512 770fa7b73fc08979da63f83155cd424b0b7a543a5e6c47a2cb20aeb4f3470360622b70adc9d527a9316bc6b388a696d60c9de9119fe9be448d26cd48871b533d
28 +DIST rust-1.45.1-armv7-unknown-linux-gnueabihf.tar.xz 116371752 BLAKE2B 3feecd7c1917294bd2384c36a9bfc371df1fa551f04c509e13d21ad3f95bdc06d2f0aac97edef10a87eef65b41b95bc34acae3741fd9648996f4ed43d4a54db7 SHA512 6dec92d112c0bbbe0434162d10df630505ba179b99fb51800140204fb2e52215d387162d97dadd3aff2324c81a4bbc944e45f4d39e55bf85e244d741e556a391
29 +DIST rust-1.45.1-i686-unknown-linux-gnu.tar.xz 131991636 BLAKE2B 2c012695d39e3665fc35fe5f66d4f0dcbbbd5525d1c8a8e26de2edc2edeee3985df1e5aa39e3122ac723f4dad1d9792be215748d80157d6f717584cbed656a98 SHA512 80f3bb328666766e177587c11cac4fb0db515ea16fc0462a29816a8474669f49c69461d2939919833337f3a95fbd1da09a55307f3f1936220bc2065f760a2345
30 +DIST rust-1.45.1-mips-unknown-linux-gnu.tar.xz 101183232 BLAKE2B f04ff7601935aad83e00ee062823b289d7bad8b591cd7d2ddb7c0d77be1b987621484ae829e56fd24971ac92c4dcce93d35d7313476d937b67da88cd4353aa2f SHA512 e70efa6c04f9ac4e4ef23d80457abee2219f04e81a743e67aa5305022265f0fac7db4998cae3d5587c38c17ae8f6d8e8d7052897a08c6939bce882bb6186bb2c
31 +DIST rust-1.45.1-mips64-unknown-linux-gnuabi64.tar.xz 107235492 BLAKE2B 425dca5246a6c4648fa061c73a09b38650a838e86760d55ab51cb655385f3066c29bb520d5c12271b4d04e4b961d948782b9a27078a849fafc867882720d0505 SHA512 f1ccc296c8f5e806795630aa8939ca3025cde76bf7fb0285e656b1bbf0d0e29b70f3ef7e6598a8146250d0d743d41b372018777aecde8bbde015e276d365db6c
32 +DIST rust-1.45.1-mipsel-unknown-linux-gnu.tar.xz 104260264 BLAKE2B b39b3305a1624daf0023ff5564dea21933999c2e488e6ca0da32a52be9891e4e9e3836e7509e8b7de8d3f2fab58b1360f21c2519da7bd1be8ed539f901973997 SHA512 de4e294e45d07e1544bb20e1fde78dcdf183e291f643f119959f61d075b691bff1290b3060c365a469dec7ae9bbf516e0b613b7b2b707b4fe23c37f972f40861
33 +DIST rust-1.45.1-powerpc-unknown-linux-gnu.tar.xz 106026300 BLAKE2B 73456028e79893ddb252a010ec0fa03443be874f5fd3b82f64ce221bd5685aea94acf29551ea3493155dc7caa7087b6db6df760b59dafc344f3040dd5e145ea6 SHA512 bbd6fdd879a8a7125f818946851e59f869c17997e58c90119370f4066c20db9d83f1250d59dccfc560d8b23cab45ce5c2d7edaef131f89ef7e2ce1ad903f2768
34 +DIST rust-1.45.1-powerpc64-unknown-linux-gnu.tar.xz 116528188 BLAKE2B 56a9d1a8d967b67b160aba248b50731744d21df4bb80f509a3008dbb6f2ed1c0271c9bcb621786354ece55c2f0aba63e9baad8ffdf30627b7e3167de645f9165 SHA512 12413ebf48a369ab869c4c7d40f6dcbe9cf53e094983eefbf142149759ce74a3f961dc8b68dfe4607b17c2ca34e5a97a38e0ccb2c14dea157fe93eccfd511bd5
35 +DIST rust-1.45.1-powerpc64le-unknown-linux-gnu.tar.xz 119234164 BLAKE2B 4148957ff2f95a8c440609e66956bfaed983e689dbcb5ae041e8ca092ef5da366324806d4c6075d0a73af6110c1f16d2bde09b369166b6fe47e42c104a5f2df5 SHA512 5222d1baa2836138ea65646a8ced3f186486bf7cf3b988f93280e2153371aa593c0ba660be9830ff4dd6cfdbe6cda32ead27a824a2e71c51d23749ea4a20c39d
36 +DIST rust-1.45.1-s390x-unknown-linux-gnu.tar.xz 124758156 BLAKE2B ff62e14d5ae9f7213ebc24d694317ff292cb0d7d2a67f0ca284cddd2b9f594547b01a6c647780d47989d4405072f377d37fc03933431a3df804e37bc1248e803 SHA512 278411c6308eaa4d732ff4c0f448d808a5ee74dae5f3eaf04773ccf65c9bc5963153f62346d30de0f577dd6da89c55bed280c2fb0e50d2075e3c30a3649fc4e8
37 +DIST rust-1.45.1-x86_64-unknown-linux-gnu.tar.xz 117764080 BLAKE2B cafe6e4f7c28112879089d75703a1b1ce7c0cf9b5ab5beeb4ddf343f7bc93e8704bc105ba0bd95f1df6d62439f206d8f4ae9090330af857ec0a249540eb63122 SHA512 13ee5ff7cae29440e32fb140404ff01414d66f0ea8d79777fb1586541de1ee6ef8e12f9249c35374501460a2352f7d0f6035b5bdc2f0daa91d772a157657ec0b
38 +DIST rust-1.45.1-x86_64-unknown-linux-musl.tar.xz 123820216 BLAKE2B 1afe48589e5eec15d8fdb31d52b2ada49688e78a311298d421a8b2d4c0cc6a708223e5976518d66506584dc2adc63651b62b8c1fc3c3ccfaff80e2ef7ade5078 SHA512 39875878acfeb05d7b72bab2dea51063a523fa7ad136d582ba28603df7f8b1c3360e5838e5f9b08f396969e52bb1fc672fa4c08cf5f8ffc39128af129b6b17a6
39
40 diff --git a/dev-lang/rust-bin/rust-bin-1.45.1.ebuild b/dev-lang/rust-bin/rust-bin-1.45.1.ebuild
41 new file mode 100644
42 index 00000000000..b36387480c9
43 --- /dev/null
44 +++ b/dev-lang/rust-bin/rust-bin-1.45.1.ebuild
45 @@ -0,0 +1,175 @@
46 +# Copyright 1999-2020 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=7
50 +
51 +inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal
52 +
53 +MY_P="rust-${PV}"
54 +
55 +DESCRIPTION="Systems programming language from Mozilla"
56 +HOMEPAGE="https://www.rust-lang.org/"
57 +SRC_URI="$(rust_all_arch_uris ${MY_P})"
58 +
59 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
60 +SLOT="stable"
61 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
62 +IUSE="clippy cpu_flags_x86_sse2 doc rustfmt"
63 +
64 +DEPEND=""
65 +RDEPEND=">=app-eselect/eselect-rust-20190311"
66 +
67 +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
68 +
69 +QA_PREBUILT="
70 + opt/${P}/bin/*-${PV}
71 + opt/${P}/lib/*.so
72 + opt/${P}/lib/rustlib/*/bin/*
73 + opt/${P}/lib/rustlib/*/lib/*.so
74 + opt/${P}/lib/rustlib/*/lib/*.rlib*
75 +"
76 +
77 +pkg_pretend() {
78 + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
79 + die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
80 + fi
81 +}
82 +
83 +src_unpack() {
84 + default
85 + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
86 +}
87 +
88 +multilib_src_install() {
89 + if multilib_is_native_abi; then
90 +
91 + # start native abi install
92 + pushd "${S}" >/dev/null || die
93 + local std
94 + std="$(grep 'std' ./components)"
95 + local components="rustc,cargo,${std}"
96 + use doc && components="${components},rust-docs"
97 + use clippy && components="${components},clippy-preview"
98 + use rustfmt && components="${components},rustfmt-preview"
99 + ./install.sh \
100 + --components="${components}" \
101 + --disable-verify \
102 + --prefix="${ED}/opt/${P}" \
103 + --mandir="${ED}/opt/${P}/man" \
104 + --disable-ldconfig \
105 + || die
106 +
107 + local rustc=rustc-bin-${PV}
108 + local rustdoc=rustdoc-bin-${PV}
109 + local rustgdb=rust-gdb-bin-${PV}
110 + local rustgdbgui=rust-gdbgui-bin-${PV}
111 + local rustlldb=rust-lldb-bin-${PV}
112 +
113 + mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
114 + mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
115 + mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
116 + mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
117 + mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
118 +
119 + dosym "${rustc}" "/opt/${P}/bin/rustc"
120 + dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
121 + dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
122 + dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
123 + dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
124 +
125 + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
126 + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
127 + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
128 + dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
129 + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
130 +
131 + local cargo=cargo-bin-${PV}
132 + mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
133 + dosym "${cargo}" "/opt/${P}/bin/cargo"
134 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
135 +
136 + if use clippy; then
137 + local clippy_driver=clippy-driver-bin-${PV}
138 + local cargo_clippy=cargo-clippy-bin-${PV}
139 + mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
140 + mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
141 + dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
142 + dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
143 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
144 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
145 + fi
146 + if use rustfmt; then
147 + local rustfmt=rustfmt-bin-${PV}
148 + local cargo_fmt=cargo-fmt-bin-${PV}
149 + mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
150 + mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
151 + dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
152 + dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
153 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
154 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
155 + fi
156 +
157 + cat <<-EOF > "${T}"/50${P}
158 + LDPATH="/opt/${P}/lib"
159 + MANPATH="/opt/${P}/man"
160 + EOF
161 + doenvd "${T}"/50${P}
162 +
163 + # note: eselect-rust adds EROOT to all paths below
164 + cat <<-EOF > "${T}/provider-${P}"
165 + /usr/bin/rustdoc
166 + /usr/bin/rust-gdb
167 + /usr/bin/rust-gdbgui
168 + /usr/bin/rust-lldb
169 + EOF
170 + echo /usr/bin/cargo >> "${T}/provider-${P}"
171 + if use clippy; then
172 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
173 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
174 + fi
175 + if use rustfmt; then
176 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
177 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
178 + fi
179 +
180 + insinto /etc/env.d/rust
181 + doins "${T}/provider-${P}"
182 + popd >/dev/null || die
183 + #end native abi install
184 +
185 + else
186 + local rust_target
187 + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
188 + dodir "/opt/${P}/lib/rustlib"
189 + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
190 + "${ED}/opt/${P}/lib/rustlib" || die
191 + fi
192 +}
193 +
194 +pkg_postinst() {
195 + eselect rust update --if-unset
196 +
197 + elog "Rust installs a helper script for calling GDB now,"
198 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
199 +
200 + if has_version app-editors/emacs; then
201 + elog "install app-emacs/rust-mode to get emacs support for rust."
202 + fi
203 +
204 + if has_version app-editors/gvim || has_version app-editors/vim; then
205 + elog "install app-vim/rust-vim to get vim support for rust."
206 + fi
207 +
208 + if use elibc_musl; then
209 + ewarn "${PN} on *-musl targets is configured with crt-static"
210 + ewarn ""
211 + ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
212 + ewarn "to use it with portage, otherwise you may see failures like"
213 + ewarn "error: cannot produce proc-macro for serde_derive as the target "
214 + ewarn "x86_64-unknown-linux-musl does not support these crate types"
215 + fi
216 +}
217 +
218 +pkg_postrm() {
219 + eselect rust cleanup
220 +}