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: Sat, 25 Apr 2020 06:14:02
Message-Id: 1587794750.bb80483ead24db59cd1b0df05ac0446a0dde4b0c.gyakovlev@gentoo
1 commit: bb80483ead24db59cd1b0df05ac0446a0dde4b0c
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 25 02:32:56 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 25 06:05:50 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb80483e
7
8 dev-lang/rust-bin: bump to 1.43.0, multilib on amd64
9
10 Bug: https://bugs.gentoo.org/701362
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 dev-lang/rust-bin/Manifest | 14 +++
15 dev-lang/rust-bin/rust-bin-1.43.0.ebuild | 184 +++++++++++++++++++++++++++++++
16 2 files changed, 198 insertions(+)
17
18 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
19 index d39edcaddb8..2f9684c805a 100644
20 --- a/dev-lang/rust-bin/Manifest
21 +++ b/dev-lang/rust-bin/Manifest
22 @@ -26,3 +26,17 @@ DIST rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz 109926880 BLAKE2B 92a9067f
23 DIST rust-1.42.0-s390x-unknown-linux-gnu.tar.xz 116937084 BLAKE2B 4d68801c7c40aa0aca24d19d25e80614b5b40aa2715aacddb6b9f5441b1c7e19e7b0d396caea860607df1dc580deadc43d9cd1f988cbe654b3132b665f9032af SHA512 85b1331a9a71cc43a2fa628b8510590ff072e409c2c38ebfd9089ab7a245182e23b52f6221b25c63f6048e1bf4ada0f561dd8f3f810680c9727040bc8a0d8d46
24 DIST rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz 110826392 BLAKE2B 8c90bacc9b350d64c4084edf104e9004461d681e19f8e8179ff6eb0b2bc50e25d95e3ed13c83f77224cc60f374f3961f0069dfe20512c844598b8eb2393300b0 SHA512 87c06d4503e7ba12bd3dfc8dd279a3bdf33a24d2c22eec1378b79b2c17ccdad9b4c8dbd0d4704eae1f3476aec5639d3ba143e8c74a296d631b17b57da7447e70
25 DIST rust-1.42.0-x86_64-unknown-linux-musl.tar.xz 97471188 BLAKE2B 29e7089a33a20e5c57a68c171e6b049e5dbc97d4c940106bbf7116c970e7ddb2271b1cf33162b4141d89b0b59049e09ca49c848a326036eefbc03e369f3ab18e SHA512 d804a08e38fa6735ce57067a3c39c59e2932943aa8baf43419815e9c743f50e198d88ef80d87fc193b8bcba011c685471146c0741954095eed74e41f86de38c8
26 +DIST rust-1.43.0-aarch64-unknown-linux-gnu.tar.xz 103995164 BLAKE2B 176c7fe79ab9bc28acae5836bd1af024320e89debe31713f611fe9338656a1357e7538035a8d9da8c2258715ea4724cabfca60af67df2c521e5a92c48f0b6daf SHA512 99cc7913d49c58a6a5f5b065afaff58ecf6cb00f5a83b8047944d2bde94eed9a33a7edc88373c52a371bad4f1b5f8d8742ac22ac9c05911223e76f13ffece70a
27 +DIST rust-1.43.0-arm-unknown-linux-gnueabi.tar.xz 103463680 BLAKE2B 32c158b7e36ee311a920db1e46bfd6463f9700c55332b0daee507e52fbca5733045efb5a0d14de07eabf1c311d5e23e2cbd3946731b4658b9e6e335970e94042 SHA512 63d8a68f227b64247dd2592dc249dbca2317a769035210147d507d836ed1f729474fbb38f8057064779052a78904ae6a378ffcb92ef652e818aa618ae8d971ac
28 +DIST rust-1.43.0-arm-unknown-linux-gnueabihf.tar.xz 104566108 BLAKE2B c2c12f3e81972bc7e00088ec05aeb6a3cdd9e7bdad75f7444829fe5212c1d9540373331e3b67bcc3985985c3c26c9a159a1558bf0dcb4d6c1cc93255fc5de715 SHA512 5c4aaf87d9a320d146c9698751ad7ca6ea4f0db1de1add70271133c2d412268955932a014e97962f82b32529f6e9845a392a622b4cdf5905f93444d56483645f
29 +DIST rust-1.43.0-armv7-unknown-linux-gnueabihf.tar.xz 108910044 BLAKE2B 7d9e6528caacd4deea26e2f61b499ac64407c2993f91c80f490d6b90a6c7463186de73b2cfdcda6b9d9cbe7ca46163eda91392daaf3ba5df6b7e0bd9053627f0 SHA512 728ed2d12079989f4547b1756e9e5b9fdf551f54626b02141346e8e42df1b2a4039b16131864021ab95b6011084e00e3edc2c072a4917a3a4fde965c0a0e2c15
30 +DIST rust-1.43.0-i686-unknown-linux-gnu.tar.xz 126712424 BLAKE2B 4803c58374bc9a6a415f34560b54137d0470b6dcebc874baaa630e3a924b25a656c156cd52e0770c7beca57e0836080299d8ff6cb3de45fa22d5d6839a38b309 SHA512 25fa8203874cac4f0c57da77c0ee9d2750b595f43590b666ad609ad1fe85fdc2604658be5fe7059aff6d0d567be0c6ae01e1e9d7fceb22bd602f1548201aa0eb
31 +DIST rust-1.43.0-mips-unknown-linux-gnu.tar.xz 95888196 BLAKE2B 36d85527e56181575061172d73c3d81a8978587bc2586fa7d41159601ac81ac00f9cc5ca582086a1a5564f5284caf297dc7bf703884d1206d86ecfff951c5f15 SHA512 bd94d3a64eeb22a720b04ee3ad0d5b488ba6f981fff5e93b5a140d6a68cbf6489eaba1f4c9f9f028f34b12623f89b72ff07a0cf03c611ba4b97a715459d6f4d0
32 +DIST rust-1.43.0-mips64-unknown-linux-gnuabi64.tar.xz 100772304 BLAKE2B 5d958d5c16b36eff4138edf5d1cdd6852b17ee05c804ad7896c17dcf68b2417a1cb5dad530c6c8e51612b3e229e19e78505798506317da63148b7f3e7bd45426 SHA512 f3c87264f5585c6b8d6d76de298b9585e9b5700c0a4246b2eefcb773466ae9a0958a83c4f7b8460186f89f4d0f73cb43719a8d6b985c65bdbd69746bd6fd7bb1
33 +DIST rust-1.43.0-mipsel-unknown-linux-gnu.tar.xz 97727252 BLAKE2B 19054f41e6278cfc419dec3a3a8b59101611de1e55699f63974898a14197fecece5fc78f3fb431fb610d062b8d082e652183f511135afcaa4ee2e4b1cd7e18e1 SHA512 808f2ce7afd5f6464d53fdece7f3f54e5bafc2c6757b6472e8070c3418b17daaef34d980e435c086c86fa228c8f11349ac7902eae73cf3bd4fd57ce552ccc192
34 +DIST rust-1.43.0-powerpc-unknown-linux-gnu.tar.xz 102103936 BLAKE2B 7cc4919d4e197aff4d24f9f8ad9c8230f8cc132b56469d6c39543141b4538bd74f5f80668fbd3eec2a8e60a3f7c6a9934f648312dfc84f21e0fafbc14377877d SHA512 6255171dd035278daf304812ce57c32553db59494bc40dbb610afae26fe889239e724511bef5197d28412279aded2d36cb5733c2e2fc42fae1a795405e635a6b
35 +DIST rust-1.43.0-powerpc64-unknown-linux-gnu.tar.xz 109310784 BLAKE2B 397dc8a29d2c8ddf3fcbbe540cd1197edfd64e5156b10a36d15d9c64e37a116e92323dd2fa3d929d27d98d6a4089ed6693519d8c64c6c3f0698a7981601db3e6 SHA512 d67193607cb78ed0284553d014e3faea059c7ac7e6d76c54dcc5affdc70f54a88c9d084589a3ccd91cd39fe07f0dd5920e65cfdcb7aba3ea0dcc75bab941f7b5
36 +DIST rust-1.43.0-powerpc64le-unknown-linux-gnu.tar.xz 111611976 BLAKE2B c3a730fc97ea17ced8f6de2ab4d291feeee567343d766ea52456455950b5b0aed5a8ddc0ff6b0604850b95fe2ffe85f8a7a927ca3ae65a90c53cd5156a9395e1 SHA512 800df0c10cd188f6aa9c4f16a61a33e51de091781c463e64409f79d9f16b8de0e49f93c0185ea27355724cc032ef6469c020163ef27357287d091cce9e57635d
37 +DIST rust-1.43.0-s390x-unknown-linux-gnu.tar.xz 119622236 BLAKE2B 358ba8387bf19d0d2338a17ff8364b63a99f35de30e754af6279c9edf26d011cf0c833f4b24a7c715d4524f60dcf53721339c1c5ad7b3dc2a9f35bf38a82b33f SHA512 9202c0cca2feb03fec26c3fd1367f7f5ace3194c7f668753cffa23f7ced7f53291c64873de7dcc6d813ef2986f907191ee24e8a027cc83da36006f590660ffe1
38 +DIST rust-1.43.0-x86_64-unknown-linux-gnu.tar.xz 112598556 BLAKE2B 4c5ca5dee24b5a3f48ade89c80e1fd0180d7dac5c8040b034a72bd165001b59f3da15d7ac6c234ca199240638c797e4d31e52e52cff9170ec5cc53f0959b1acd SHA512 3fb0630e76f78565cafa9882d1c09a2bb31d0de145748ba4506d7b6a5ea508c4fb533ac3f60df8335d9c4944ba8f028752441d3c3443e3990fe3cc4e676c1670
39 +DIST rust-1.43.0-x86_64-unknown-linux-musl.tar.xz 100659284 BLAKE2B 4dbfcbf3526e3ec0a51eadb410876c27c110b59f18a54db30b358b5b2b61edaed907a4584bb0678e5754364f5fca6ca0f9f11f6a2099e9440f70731ddf31f251 SHA512 f1b449a8f0d585c648ec04723126865ddbcc1b101a2f38d53832e8f2bae0fbe3ab1751074511f5a053404bee06646cec5d32937cf6c32f9ccc022d04bd021cf0
40
41 diff --git a/dev-lang/rust-bin/rust-bin-1.43.0.ebuild b/dev-lang/rust-bin/rust-bin-1.43.0.ebuild
42 new file mode 100644
43 index 00000000000..2eced9c11b7
44 --- /dev/null
45 +++ b/dev-lang/rust-bin/rust-bin-1.43.0.ebuild
46 @@ -0,0 +1,184 @@
47 +# Copyright 1999-2020 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +EAPI=7
51 +
52 +MULTILIB_COMPAT=( abi_x86_{32,64} )
53 +
54 +inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal
55 +
56 +MY_P="rust-${PV}"
57 +
58 +DESCRIPTION="Systems programming language from Mozilla"
59 +HOMEPAGE="https://www.rust-lang.org/"
60 +SRC_URI="$(rust_all_arch_uris ${MY_P})"
61 +
62 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
63 +SLOT="stable"
64 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
65 +IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
66 +
67 +DEPEND=""
68 +RDEPEND="
69 + >=app-eselect/eselect-rust-20190311
70 + sys-libs/zlib
71 + !libressl? ( dev-libs/openssl:0= )
72 + libressl? ( dev-libs/libressl:0= )
73 + net-libs/libssh2
74 + net-misc/curl[ssl]
75 +"
76 +
77 +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
78 +
79 +QA_PREBUILT="
80 + opt/${P}/bin/*-${PV}
81 + opt/${P}/lib/*.so
82 + opt/${P}/lib/rustlib/*/bin/*
83 + opt/${P}/lib/rustlib/*/lib/*.so
84 + opt/${P}/lib/rustlib/*/lib/*.rlib*
85 +"
86 +
87 +pkg_pretend() {
88 + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
89 + die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
90 + fi
91 +}
92 +
93 +src_unpack() {
94 + default
95 + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
96 +}
97 +
98 +multilib_src_install() {
99 + if multilib_is_native_abi; then
100 +
101 + # start native abi install
102 + pushd ${S} >/dev/null || die
103 + local std
104 + std="$(grep 'std' ./components)"
105 + local components="rustc,cargo,${std}"
106 + use doc && components="${components},rust-docs"
107 + use clippy && components="${components},clippy-preview"
108 + use rustfmt && components="${components},rustfmt-preview"
109 + ./install.sh \
110 + --components="${components}" \
111 + --disable-verify \
112 + --prefix="${ED}/opt/${P}" \
113 + --mandir="${ED}/opt/${P}/man" \
114 + --disable-ldconfig \
115 + || die
116 +
117 + local rustc=rustc-bin-${PV}
118 + local rustdoc=rustdoc-bin-${PV}
119 + local rustgdb=rust-gdb-bin-${PV}
120 + local rustgdbgui=rust-gdbgui-bin-${PV}
121 + local rustlldb=rust-lldb-bin-${PV}
122 +
123 + mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
124 + mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
125 + mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
126 + mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
127 + mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
128 +
129 + dosym "${rustc}" "/opt/${P}/bin/rustc"
130 + dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
131 + dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
132 + dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
133 + dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
134 +
135 + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
136 + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
137 + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
138 + dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
139 + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
140 +
141 + local cargo=cargo-bin-${PV}
142 + mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
143 + dosym "${cargo}" "/opt/${P}/bin/cargo"
144 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
145 +
146 + if use clippy; then
147 + local clippy_driver=clippy-driver-bin-${PV}
148 + local cargo_clippy=cargo-clippy-bin-${PV}
149 + mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
150 + mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
151 + dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
152 + dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
153 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
154 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
155 + fi
156 + if use rustfmt; then
157 + local rustfmt=rustfmt-bin-${PV}
158 + local cargo_fmt=cargo-fmt-bin-${PV}
159 + mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
160 + mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
161 + dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
162 + dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
163 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
164 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
165 + fi
166 +
167 + cat <<-EOF > "${T}"/50${P}
168 + LDPATH="/opt/${P}/lib"
169 + MANPATH="/opt/${P}/man"
170 + EOF
171 + doenvd "${T}"/50${P}
172 +
173 + # note: eselect-rust adds EROOT to all paths below
174 + cat <<-EOF > "${T}/provider-${P}"
175 + /usr/bin/rustdoc
176 + /usr/bin/rust-gdb
177 + /usr/bin/rust-gdbgui
178 + /usr/bin/rust-lldb
179 + EOF
180 + echo /usr/bin/cargo >> "${T}/provider-${P}"
181 + if use clippy; then
182 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
183 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
184 + fi
185 + if use rustfmt; then
186 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
187 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
188 + fi
189 +
190 + insinto /etc/env.d/rust
191 + doins "${T}/provider-${P}"
192 + popd >/dev/null || die
193 + #end native abi install
194 +
195 + else
196 + local rust_target
197 + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
198 + dodir "/opt/${P}/lib/rustlib"
199 + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
200 + "${ED}/opt/${P}/lib/rustlib" || die
201 + fi
202 +}
203 +
204 +pkg_postinst() {
205 + eselect rust update --if-unset
206 +
207 + elog "Rust installs a helper script for calling GDB now,"
208 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
209 +
210 + if has_version app-editors/emacs; then
211 + elog "install app-emacs/rust-mode to get emacs support for rust."
212 + fi
213 +
214 + if has_version app-editors/gvim || has_version app-editors/vim; then
215 + elog "install app-vim/rust-vim to get vim support for rust."
216 + fi
217 +
218 + if use elibc_musl; then
219 + ewarn "${PN} on *-musl targets is configured with crt-static"
220 + ewarn ""
221 + ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf"
222 + ewarn "to use it with portage, otherwise you may see failures like"
223 + ewarn "error: cannot produce proc-macro for serde_derive as the target "
224 + ewarn "x86_64-unknown-linux-musl does not support these crate types"
225 + fi
226 +}
227 +
228 +pkg_postrm() {
229 + eselect rust cleanup
230 +}