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, 16 Aug 2019 02:44:16
Message-Id: 1565923384.782e8649a87da8c9c82188a10f79ab4b69d82de9.gyakovlev@gentoo
1 commit: 782e8649a87da8c9c82188a10f79ab4b69d82de9
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 16 01:47:47 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 16 02:43:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=782e8649
7
8 dev-lang/rust-bin: bump to 1.37.0
9
10 Package-Manager: Portage-2.3.71, Repoman-2.3.17
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 dev-lang/rust-bin/Manifest | 13 +++
14 dev-lang/rust-bin/rust-bin-1.37.0.ebuild | 158 +++++++++++++++++++++++++++++++
15 2 files changed, 171 insertions(+)
16
17 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
18 index 93d2e0f582b..a10db59cc2f 100644
19 --- a/dev-lang/rust-bin/Manifest
20 +++ b/dev-lang/rust-bin/Manifest
21 @@ -37,3 +37,16 @@ DIST rust-1.36.0-powerpc64-unknown-linux-gnu.tar.xz 145880928 BLAKE2B 4922df3a7d
22 DIST rust-1.36.0-powerpc64le-unknown-linux-gnu.tar.xz 149721676 BLAKE2B e00bcc60a89354f6d4b5c89feffe5fe6dd7bf25d8dd2db2878e7c12ffc484e9258f37d80bda2b12f3965d96c73f1a03b6adbd8c20176c383e04f1a229d47d000 SHA512 02f32b544b0a55ba6f6fc4852f18766107bc0ce2c50488db11605e8a10e5965dd44e8332905c00080b08576370f2f0297ecbe12ba9fe01b4c24cdb9fd03ad64f
23 DIST rust-1.36.0-s390x-unknown-linux-gnu.tar.xz 159518028 BLAKE2B c5876ea15c9fa56a92b4c0bf2aab472b83381a7a31fbb207e4165fdc49fea2150dddd53cc771dbcb81b01fe43a3175df146d8645d04c556af3556822fc59bf25 SHA512 c637b8f50cbce3333280f43ce4b97d3f75ddae429ee34461837c3c3869e20aed8c5e76f7a58998f617dc0ffc2e6afd00908e5de05f4c7ed9a8c34d5dbc7ce916
24 DIST rust-1.36.0-x86_64-unknown-linux-gnu.tar.xz 169600936 BLAKE2B 8bf075f2b5624e4716e3058512b85b70e72ec6f0c8ce8fc38857612b02aa5702a1bb447f13f882a1b96b1f32330d0a8f7f1f1db81827b51cb7429195e070a5a3 SHA512 3f14dda1e09ef8c8168600f4d70ba60cb2a1086ad9edb5eed708d0ffc16fdb9c582ce350a93afcd64b78f87737e37d4f099703835a1ec9837a5721c2335e17c7
25 +DIST rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz 124322996 BLAKE2B 732dc36933682a18bcd5694b1715af5c442452df8232e2affda8185b9aaf0daf297cf7c4a64fc7d35898e1b3829ba9e8fbe33e8c8f7bc6183b3149f983208ba8 SHA512 c70054f589aa2aecfbd6a89f567306e0cf5d3eb56e5a544ced0a5d212f14033dab10559d22dd6b07945e45a25d8de14fc7897c9d24c0d8149548a06b404ca9d2
26 +DIST rust-1.37.0-arm-unknown-linux-gnueabi.tar.xz 124741032 BLAKE2B 88e38ea9152546c8a04bd6f93fa8d97d3e58255568a522d2774a2656a4c6dd7bad74633a10b424f6c5f6ca07ea07e473e620ab24dfdbe5c27bb5141ab0f5bba8 SHA512 bd28b8bb60b8e4373693ad9d41bfe62eb12a7272a5d7978691b0c7e1892a2df8d6ff8cf5c25dab805fab1d03dd17c76c1014d395b042118cb24603739c6dbb32
27 +DIST rust-1.37.0-arm-unknown-linux-gnueabihf.tar.xz 124971492 BLAKE2B 07614242bc500c9ca81a87ed81cc0bada9b467049b7bc2afbe6245b742ac2bec9030feb08f0ef8a2402bf2c2a19722b8b06dacd0ef56edb0522bf41e29080a01 SHA512 e380e2bf862a157cb5e06d27fa8e306474e708ce7e0ffd087531a4fa5729bef104131c256625c05515f6e7dfd43f639ce1fd5e05a2da42ad7f437d578b4acd8a
28 +DIST rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz 126583596 BLAKE2B f836c88801bde52c43726fb728d03b5f145b511a7a4b3d857de0218b87c83a4a2c939b9956aa61cef362a255209ea9e5159d2ac00edea2b9656ef320875f79a2 SHA512 6d9e055f36a2e912f30bebb25afdd3188019a438f208d3db67b38078bd5c37633c38fd48da15ba80640399babf89221e727a2bf43990aee269fcc5c91cd412b4
29 +DIST rust-1.37.0-i686-unknown-linux-gnu.tar.xz 177419360 BLAKE2B 4b28b002f0db349f9d12f2e4ae63b3fb5e9f472ec4d32d671626a56377cb87b07efd884ef3f4b23cca7072818c597fa8c693f55fd30ced5b408e8c0b0081af29 SHA512 b59377350f82efd10c7afe0f7a28ecbd5355719d841d40c98bec0f01961233f7a19bed2581a111a76cde8dd8dc68a019fa7d3da66cb7ebcb002ba52a14a7e573
30 +DIST rust-1.37.0-mips-unknown-linux-gnu.tar.xz 124577076 BLAKE2B 299d2b650c8236b94079ce4895e020bf2fe6c5d9b768da47d9716010eaa024c6b8ea743ddc7fadd660a9e49f65a02a8d0da7853cbff2bb6b43bb7771d3d42149 SHA512 1b71e1840470f7dd44cda177b7abf1cdc3f63db547fa36657b9fe5030a3d363afe1fa3ff8566351910daeef91ab4b33be46ef117342b4660fa23f76bee0ace00
31 +DIST rust-1.37.0-mips64-unknown-linux-gnuabi64.tar.xz 124565528 BLAKE2B e5bd6241ca7f2356638d39e18a71e577972143f37aa05e00e965bcce742828f25adf0f5cd6334c430d464e51b4112baeceb44a9eb41713233df6942b077983bb SHA512 1002173e608d29a2d32a6479a5c530d36e18bcce9e0813607369d3173c49b019a69ef05e8f1aba9b232285529f72837dfa8f4400866c49b6450e0f53028ebab1
32 +DIST rust-1.37.0-mipsel-unknown-linux-gnu.tar.xz 126620196 BLAKE2B 9174e7a48ba9e0f0bc2fc023991f6005614310a8db76824f5e733b0d8c4eaec6729c00b92e1c45f82fbb77f573c4bdc71004e887b9a170dc88c1a3f6e5ec0ccc SHA512 41f17b2f9bef0d5453153660d0f49aa0c8df0bfd003abac46728a477d3c00f67f5b1460aa851a92605fd628bf9dc18d9b44a16dbfc8fff22d84fd2a0a58b971e
33 +DIST rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz 124035536 BLAKE2B 2b0b2c34cbe929ff4632e13b41670fa25e765a8b954c3226da67e098a06bb59c1d2387bf64beddaa554e439dd1549dcb529048bcb1e0f00998aee7bf302d6f6c SHA512 54b08c4a5523749ee5054e000f82ffc7ec29562d1194fbc311bee0e953c49eead3c851dcaf34803bb8eb997550a64ec784f40927f52d33b18ceee7c921c0eed0
34 +DIST rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz 128662180 BLAKE2B 0df1def64d07b3eabf1aa6c993c7a01b596119abf60b1a3e3e6663b1bb3c6a945146c9cd639ee7d57462e1cbb866badfa83abb7b52b36de4b089552f624c2245 SHA512 e8e5cf1c64bd3eec389cef022e1c7bae4618fb6966505d2e762d10e7f443fece43b8b95c989c020bdf739abaf9c3f036230df46f6477a2ccd517a7bdef2ba0d7
35 +DIST rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz 131763436 BLAKE2B 76b9120e98da09344ce5af39a9b333c6ca8917516ae7108d6cc129fdda4d4d6c21e2ca4c41533e202f63b992bcede5390ec986a262ea216c1340a82c5ba798e8 SHA512 366c8920448000bfb4baa3a47588a1c7bc81e18afb8d40f0efc824e429e9e6900efbdb4c9003fb45b9d8595328bd612bd63f390a7d3dedbb30b7dc57fc12abf3
36 +DIST rust-1.37.0-s390x-unknown-linux-gnu.tar.xz 141808296 BLAKE2B 73825a004be81cca4dfff1301ea0ef45c9f55ab8d9a9a0343585377d83c4bdc03d3c027622f18e144c9355afe6f5236a6273f84b43b01a221066d3c395f71017 SHA512 14f403d3ce9df2a2baba1db13c9f039d7118d7e0c8285ca19ea0284c32e80c3f786660dedef4d1758b2227f91732b8e7deccbf3f38c2b3491738c1408d6bfd0e
37 +DIST rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz 165034364 BLAKE2B 3047fff28da00e01179d3a648cb4e5636fa15ac7f4cb9ddc14e1df86d045b69ff3e41691b4a6ef4227c4cb58137524c5e029ba21a2c3a3a171fdb6f46b44f4ff SHA512 c4d48aa12cb929d6600f9cce81bb612c504aa1b3b3f8e76352af3a76b737dcbe0d31e8d139c17884b11aef9f12a55c4908fb8f3ff63dfa92533e4bd0a729914f
38
39 diff --git a/dev-lang/rust-bin/rust-bin-1.37.0.ebuild b/dev-lang/rust-bin/rust-bin-1.37.0.ebuild
40 new file mode 100644
41 index 00000000000..180b335fff9
42 --- /dev/null
43 +++ b/dev-lang/rust-bin/rust-bin-1.37.0.ebuild
44 @@ -0,0 +1,158 @@
45 +# Copyright 1999-2019 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=7
49 +
50 +inherit bash-completion-r1 rust-toolchain toolchain-funcs
51 +
52 +MY_P="rust-${PV}"
53 +
54 +DESCRIPTION="Systems programming language from Mozilla"
55 +HOMEPAGE="https://www.rust-lang.org/"
56 +SRC_URI="$(rust_all_arch_uris ${MY_P})"
57 +
58 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
59 +SLOT="stable"
60 +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
61 +IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
62 +
63 +DEPEND=""
64 +RDEPEND=">=app-eselect/eselect-rust-20190311
65 + sys-libs/zlib
66 + !libressl? ( dev-libs/openssl:0= )
67 + libressl? ( dev-libs/libressl:0= )
68 + net-libs/libssh2
69 + net-misc/curl[ssl]
70 + !dev-lang/rust:0
71 + !dev-util/cargo
72 + rustfmt? ( !dev-util/rustfmt )"
73 +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
74 +
75 +QA_PREBUILT="
76 + opt/${P}/bin/*-${PV}
77 + opt/${P}/lib/*.so
78 + opt/${P}/lib/rustlib/*/bin/*
79 + opt/${P}/lib/rustlib/*/lib/*.so
80 + opt/${P}/lib/rustlib/*/lib/*.rlib*
81 +"
82 +
83 +pkg_pretend () {
84 + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
85 + die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
86 + fi
87 +}
88 +
89 +src_unpack() {
90 + default
91 + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
92 +}
93 +
94 +src_install() {
95 + local std=$(grep 'std' ./components)
96 + local components="rustc,cargo,${std}"
97 + use doc && components="${components},rust-docs"
98 + use clippy && components="${components},clippy-preview"
99 + use rustfmt && components="${components},rustfmt-preview"
100 + ./install.sh \
101 + --components="${components}" \
102 + --disable-verify \
103 + --prefix="${ED}/opt/${P}" \
104 + --mandir="${ED}/usr/share/${P}/man" \
105 + --disable-ldconfig \
106 + || die
107 +
108 + local rustc=rustc-bin-${PV}
109 + local rustdoc=rustdoc-bin-${PV}
110 + local rustgdb=rust-gdb-bin-${PV}
111 + local rustgdbgui=rust-gdbgui-bin-${PV}
112 + local rustlldb=rust-lldb-bin-${PV}
113 +
114 + mv "${ED}/opt/${P}/bin/rustc" "${ED}/opt/${P}/bin/${rustc}" || die
115 + mv "${ED}/opt/${P}/bin/rustdoc" "${ED}/opt/${P}/bin/${rustdoc}" || die
116 + mv "${ED}/opt/${P}/bin/rust-gdb" "${ED}/opt/${P}/bin/${rustgdb}" || die
117 + mv "${ED}/opt/${P}/bin/rust-gdbgui" "${ED}/opt/${P}/bin/${rustgdbgui}" || die
118 + mv "${ED}/opt/${P}/bin/rust-lldb" "${ED}/opt/${P}/bin/${rustlldb}" || die
119 +
120 + dosym "${rustc}" "/opt/${P}/bin/rustc"
121 + dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
122 + dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
123 + dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
124 + dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
125 +
126 + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
127 + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
128 + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
129 + dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
130 + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
131 +
132 + local cargo=cargo-bin-${PV}
133 + mv "${ED}/opt/${P}/bin/cargo" "${ED}/opt/${P}/bin/${cargo}" || die
134 + dosym "${cargo}" "/opt/${P}/bin/cargo"
135 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
136 +
137 + if use clippy; then
138 + local clippy_driver=clippy-driver-bin-${PV}
139 + local cargo_clippy=cargo-clippy-bin-${PV}
140 + mv "${ED}/opt/${P}/bin/clippy-driver" "${ED}/opt/${P}/bin/${clippy_driver}" || die
141 + mv "${ED}/opt/${P}/bin/cargo-clippy" "${ED}/opt/${P}/bin/${cargo_clippy}" || die
142 + dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
143 + dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
144 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
145 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
146 + fi
147 + if use rustfmt; then
148 + local rustfmt=rustfmt-bin-${PV}
149 + local cargo_fmt=cargo-fmt-bin-${PV}
150 + mv "${ED}/opt/${P}/bin/rustfmt" "${ED}/opt/${P}/bin/${rustfmt}" || die
151 + mv "${ED}/opt/${P}/bin/cargo-fmt" "${ED}/opt/${P}/bin/${cargo_fmt}" || die
152 + dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
153 + dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
154 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
155 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
156 + fi
157 +
158 + cat <<-EOF > "${T}"/50${P}
159 + LDPATH="/opt/${P}/lib"
160 + MANPATH="/usr/share/${P}/man"
161 + EOF
162 + doenvd "${T}"/50${P}
163 +
164 + # note: eselect-rust adds EROOT to all paths below
165 + cat <<-EOF > "${T}/provider-${P}"
166 + /usr/bin/rustdoc
167 + /usr/bin/rust-gdb
168 + /usr/bin/rust-gdbgui
169 + /usr/bin/rust-lldb
170 + EOF
171 + echo /usr/bin/cargo >> "${T}/provider-${P}"
172 + if use clippy; then
173 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
174 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
175 + fi
176 + if use rustfmt; then
177 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
178 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
179 + fi
180 + dodir /etc/env.d/rust
181 + insinto /etc/env.d/rust
182 + doins "${T}/provider-${P}"
183 +}
184 +
185 +pkg_postinst() {
186 + eselect rust update --if-unset
187 +
188 + elog "Rust installs a helper script for calling GDB now,"
189 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
190 +
191 + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
192 + elog "install app-emacs/rust-mode to get emacs support for rust."
193 + fi
194 +
195 + if has_version app-editors/gvim || has_version app-editors/vim; then
196 + elog "install app-vim/rust-vim to get vim support for rust."
197 + fi
198 +}
199 +
200 +pkg_postrm() {
201 + eselect rust cleanup
202 +}