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, 26 Apr 2019 04:48:06
Message-Id: 1556254061.ef0778dcaf38c36cea914bdc501890171726297d.gyakovlev@gentoo
1 commit: ef0778dcaf38c36cea914bdc501890171726297d
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 26 03:48:19 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 26 04:47:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef0778dc
7
8 dev-lang/rust-bin: bump to 1.34.1
9
10 Bug: https://bugs.gentoo.org/667286
11 Package-Manager: Portage-2.3.64, Repoman-2.3.12
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 dev-lang/rust-bin/Manifest | 13 +++
15 dev-lang/rust-bin/rust-bin-1.34.1.ebuild | 171 +++++++++++++++++++++++++++++++
16 2 files changed, 184 insertions(+)
17
18 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
19 index 8c6ffbca2ba..c93fd614cca 100644
20 --- a/dev-lang/rust-bin/Manifest
21 +++ b/dev-lang/rust-bin/Manifest
22 @@ -82,3 +82,16 @@ DIST rust-1.34.0-powerpc64-unknown-linux-gnu.tar.xz 125810152 BLAKE2B 6ae7fd1e78
23 DIST rust-1.34.0-powerpc64le-unknown-linux-gnu.tar.xz 129639888 BLAKE2B eeb3e27d677f5dd816ca8395e66bb063d3f0a82af9ed1a123f9bcb1124441e740a8e8511c848f10533398a0008b6b1668a1f4bbcecdacd1772eca02a89164456 SHA512 2bf9aa71af041c45e29ad8d10d96088e4fb04dac70bd278f9896b25b63c4c673bca954aaf3a139ef13100e252871d0a1fb4c69d5b88b1ac3fe8657642580e802
24 DIST rust-1.34.0-s390x-unknown-linux-gnu.tar.xz 134441480 BLAKE2B 423071ec0799f0b0608b71b7d3e65e6797474f4769adb22756b467187dcbe95cb8f377f3574571d9d45a890372fac037e66b4ff23691ae28e545b8e451ec23f9 SHA512 14f46e08f0251ed302ad71c20b5797cd73063b0396fb6654b8d5ee9e27d59f9477a4819a1ae8e04ebd8b25006e92f43a0ef9b2fc53e5029b621746a256153f3c
25 DIST rust-1.34.0-x86_64-unknown-linux-gnu.tar.xz 157382624 BLAKE2B 0e87efe48dfe5a9b588ea86378057a31c84b08f5f1bc0740c197962d8cae320b0418c42efdf7573dd22fbfd829f29f2a1d1a8c942d65051c14c2fe25cfe15071 SHA512 2ad2a9a2871be53498876db6146e6bff12c4f63a0cb3f71cfdc62602cf7be91ef3a9f6a2ba8f426d68e5ed31ae53c5d28fe4ca898e4774227bb98b770b0a36c4
26 +DIST rust-1.34.1-aarch64-unknown-linux-gnu.tar.xz 120842956 BLAKE2B 12593640903692fa651ef392accb7e438225d4b29886964244afe1e7d62d7a255a065baa931109b87f0aab3caa6394d67075abd77c27f1343c500dac831014c5 SHA512 9c0b09faad1b19f3d758657ce37dbcc94a1fe76857648d90f51dbebdbe169183eb86a267d920b4bc88f7cd8c057d77bcafc2060082eee27a18c6e965098f21e0
27 +DIST rust-1.34.1-arm-unknown-linux-gnueabi.tar.xz 122498772 BLAKE2B 05da544b995c371ba189ac89b2ccfe172c0700cf487d30a456ae3ce63f68ec8cd56ec0f339acc8742910c14bf135c9615224dbdd1e593fd41ba8457ae148ffa4 SHA512 edf56e72e88484226c4a97e3741b2074cc720e134d093d31d4e7df93ab15aa4700a4daad718fb8bd4073f41f7de6950b6ff901704a7b15e8d966dfa03625c89a
28 +DIST rust-1.34.1-arm-unknown-linux-gnueabihf.tar.xz 122856028 BLAKE2B 916355132d3a9f7a2f3845f03a48d2dbcae5cfac03af510c0453eb51f65f83c4cb3acc93e32deed96d534b048de595e13168b6d83da03ccf1d575083408be524 SHA512 42edef7faeb76e31449193348445c89f1958380c14c31b9b5ecfaa32cb6b32ede46edf9a450993a475152bc3b9e342d2432513bd0e80196964ddb2cd8ec80400
29 +DIST rust-1.34.1-armv7-unknown-linux-gnueabihf.tar.xz 124571496 BLAKE2B b5282d706352e39dd986afd68565a0eb35b029f3b513e5c3e4e07dc4fc36a351536e4976c65db532acd9db4d07ea24ec5bb65238571e5bf17f0d9589c889aec5 SHA512 5955acdfba0f330903fdb3e2b550db246c91dedc1a42a56818c918e1ce656217d0a6117a1493e444ba35187a5bb4ecb78a8ace76aff1741aa7fcedef97741068
30 +DIST rust-1.34.1-i686-unknown-linux-gnu.tar.xz 169612152 BLAKE2B de955ed364060f5458f2c65a51c8b9e75f881bf1e3a1d5f53847205684ef8ac856d459f2f7552f746100fc8f9f8732a5b44cdddb5425f23f6754ba874834d106 SHA512 a68a69107d21f3cf9a5541a85d96cbe64aba6fa0f433690643edcb837c029276d14e72b0b7500257e57aeee476d516bd0eb09fe1d558118a67bb9c986b218ca1
31 +DIST rust-1.34.1-mips-unknown-linux-gnu.tar.xz 113489824 BLAKE2B caf2a320cb579b65da17383749ecb35ed3f8a3774b2ceab3cd9ed84d4d6b2462c4c69dbc8d95a8de653ccb8b3fe2ee52044a955bad073cfb627b6a00378c235a SHA512 9e6a50541cacb7242c99b63094f6150b466ddfc1306b5912b3dfd46b11babc87e2cbd97c8c8ea7be3df6f40ae10f79ca169476408c83730cedd1260d2e096809
32 +DIST rust-1.34.1-mips64-unknown-linux-gnuabi64.tar.xz 119091428 BLAKE2B 2075aafbcbde8c27c232446165ed7d1cde0fdd3d00df3ba82ec768cd0e4ce88ec2f7498600482c49c74a4e9e383fe5ca9ab00f6d18307518c284adbb73415920 SHA512 b8f9762ed07a83291d04263acd277a466f65d8a05fe34381e608368aa3c94a41e942ed724694814db52a36d19f6ba0c8902238266d6c981cd2b0eb6b10308821
33 +DIST rust-1.34.1-mipsel-unknown-linux-gnu.tar.xz 115830252 BLAKE2B 62213b476a806acaab54849fc463cfdd363ae74fd054fe2084063c40ce132bb17eda20182fb1971763b0c77de877bfd8225d87f954c4d6f7d9af5be18a723d44 SHA512 bbc8c0eb907caf3efa6e0e6b4d8a77121c95024367f5e8b42c32e67b5c19394044d98fa96492d35b0f83472316a99824c6291a6839baf44ba271afd5e41200a5
34 +DIST rust-1.34.1-powerpc-unknown-linux-gnu.tar.xz 116813560 BLAKE2B 52060b202cb504d06e9d3b34e1c2ce22ccc7faed5d259b7d671ea05b73dae3313738090ffddffebf1b5e4cb59585ef8ff266ca07ae39429a40a412406e2e7b47 SHA512 67cfb13bb0d2b05729cfb1fc3d243a28ead878fe1b766c6f94f2f24555c595719e504aefd0e3c69bafc1dc64f27471c9055ec4cb00a2009e9a747d3af496b05a
35 +DIST rust-1.34.1-powerpc64-unknown-linux-gnu.tar.xz 125707228 BLAKE2B 51261982774dcb4f644ba1e6f401406e22871bbc9d92584ccbb941929a045bb5bf2ef34b4c8c30fe401fa11939208379e8aea48e89badd85cc8529f2051df32e SHA512 d26208042f31624acc38846973d4e2f5b6d8eb00b5661083e42bfe3a0e960fa9b1fafe5d7cd803acb9ef82082d2ee818043dddf52e6d0df0eac44e022f5086e6
36 +DIST rust-1.34.1-powerpc64le-unknown-linux-gnu.tar.xz 129553036 BLAKE2B 5a069bdb4ee78ee9791c4d38d5fa999b5503f7969fdf1c97ec71fca00c659dfc83a27749549f14c3cf37288c9ad5e809eb3ece7b7cd436b9dd6086f837c31bfe SHA512 539d76729b96fc7047f785f167926e6673f3ff02e06fdd78c23b4b29228b60f8151b3b1455a83e3b7f81ec3d428e3980f3607e07c505e62e84cf1afe5b0c03b4
37 +DIST rust-1.34.1-s390x-unknown-linux-gnu.tar.xz 134397572 BLAKE2B e51487209fca4dd894abca3b6a1c595ca00ef6c6248dd9ebfc3899ab1d40b2c24d1841579acf251350b28ae57db9648dba7bb19b2d523771e63c91447d2373c5 SHA512 20ef3fe57537d09d7f230e57db59fa2030fd6378e911dc2cfec47849c6a551d48e7d54824770aa00751f953f895a7718832a687b3be5f632d8c95c2e5fed0861
38 +DIST rust-1.34.1-x86_64-unknown-linux-gnu.tar.xz 157366684 BLAKE2B c55f03046d7aa98372b8642152391536f8bce4f7e39a1d1292e44b0f434e8278fe7353362f35c966dad7a985849b5ab94977b7320e8b15f54a0b360d9ae8ff54 SHA512 88226cc1c4492fec35ed32433d9f1a2a2b284d5803d37111ff3d1ee63b2f0500722ea1b9a771cd80853dbc5b9a0ad382baeb362d7edf82ef49a093ae780470ee
39
40 diff --git a/dev-lang/rust-bin/rust-bin-1.34.1.ebuild b/dev-lang/rust-bin/rust-bin-1.34.1.ebuild
41 new file mode 100644
42 index 00000000000..ab89e254ae0
43 --- /dev/null
44 +++ b/dev-lang/rust-bin/rust-bin-1.34.1.ebuild
45 @@ -0,0 +1,171 @@
46 +# Copyright 1999-2019 Gentoo Authors
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=6
50 +
51 +inherit eutils bash-completion-r1 rust-toolchain toolchain-funcs
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 ~arm64 ~ppc64 ~x86"
62 +IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt"
63 +
64 +DEPEND=""
65 +RDEPEND=">=app-eselect/eselect-rust-20190311
66 + sys-libs/zlib
67 + !libressl? ( dev-libs/openssl:0= )
68 + libressl? ( dev-libs/libressl:0= )
69 + net-libs/libssh2
70 + net-misc/curl[ssl]
71 + !dev-lang/rust:0
72 + !dev-util/cargo
73 + rustfmt? ( !dev-util/rustfmt )"
74 +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
75 +
76 +QA_PREBUILT="
77 + opt/${P}/bin/*-${PV}
78 + opt/${P}/lib/*.so
79 + opt/${P}/lib/rustlib/*/bin/*
80 + opt/${P}/lib/rustlib/*/lib/*.so
81 + opt/${P}/lib/rustlib/*/lib/*.rlib*
82 +"
83 +
84 +pkg_pretend () {
85 + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
86 + die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
87 + fi
88 +}
89 +
90 +src_unpack() {
91 + default
92 + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
93 +}
94 +
95 +src_install() {
96 + local std=$(grep 'std' ./components)
97 + local components="rustc,cargo,${std}"
98 + use doc && components="${components},rust-docs"
99 + use clippy && components="${components},clippy-preview"
100 + use rustfmt && components="${components},rustfmt-preview"
101 + ./install.sh \
102 + --components="${components}" \
103 + --disable-verify \
104 + --prefix="${D}/opt/${P}" \
105 + --mandir="${D}/usr/share/${P}/man" \
106 + --disable-ldconfig \
107 + || die
108 +
109 + local rustc=rustc-bin-${PV}
110 + local rustdoc=rustdoc-bin-${PV}
111 + local rustgdb=rust-gdb-bin-${PV}
112 + local rustgdbgui=rust-gdbgui-bin-${PV}
113 + local rustlldb=rust-lldb-bin-${PV}
114 +
115 + mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
116 + mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
117 + mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
118 + mv "${D}/opt/${P}/bin/rust-gdbgui" "${D}/opt/${P}/bin/${rustgdbgui}" || die
119 + mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
120 +
121 + dosym "${rustc}" "/opt/${P}/bin/rustc"
122 + dosym "${rustdoc}" "/opt/${P}/bin/rustdoc"
123 + dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb"
124 + dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui"
125 + dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb"
126 +
127 + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
128 + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
129 + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
130 + dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}"
131 + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
132 +
133 + local cargo=cargo-bin-${PV}
134 + # ugly hack for https://bugs.gentoo.org/679806
135 + if use ppc64; then
136 + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die
137 + sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die
138 + cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}"
139 + #!/bin/sh
140 + OPENSSL_ppccap=0 $(realpath $0).bin "${@}"
141 + EOF
142 + fperms +x "/opt/${P}/bin/${cargo}"
143 + else
144 + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
145 + fi
146 + dosym "${cargo}" "/opt/${P}/bin/cargo"
147 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
148 + if use clippy; then
149 + local clippy_driver=clippy-driver-bin-${PV}
150 + local cargo_clippy=cargo-clippy-bin-${PV}
151 + mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
152 + mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
153 + dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver"
154 + dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy"
155 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
156 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
157 + fi
158 + if use rustfmt; then
159 + local rustfmt=rustfmt-bin-${PV}
160 + local cargo_fmt=cargo-fmt-bin-${PV}
161 + mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
162 + mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
163 + dosym "${rustfmt}" "/opt/${P}/bin/rustfmt"
164 + dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt"
165 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
166 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
167 + fi
168 +
169 + cat <<-EOF > "${T}"/50${P}
170 + LDPATH="/opt/${P}/lib"
171 + MANPATH="/usr/share/${P}/man"
172 + EOF
173 + doenvd "${T}"/50${P}
174 +
175 + cat <<-EOF > "${T}/provider-${P}"
176 + /usr/bin/rustdoc
177 + /usr/bin/rust-gdb
178 + /usr/bin/rust-gdbgui
179 + /usr/bin/rust-lldb
180 + EOF
181 + echo /usr/bin/cargo >> "${T}/provider-${P}"
182 + if use clippy; then
183 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
184 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
185 + fi
186 + if use rustfmt; then
187 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
188 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
189 + fi
190 + dodir /etc/env.d/rust
191 + insinto /etc/env.d/rust
192 + doins "${T}/provider-${P}"
193 +}
194 +
195 +pkg_postinst() {
196 + eselect rust update --if-unset
197 +
198 + elog "Rust installs a helper script for calling GDB now,"
199 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
200 +
201 + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
202 + elog "install app-emacs/rust-mode to get emacs support for rust."
203 + fi
204 +
205 + if has_version app-editors/gvim || has_version app-editors/vim; then
206 + elog "install app-vim/rust-vim to get vim support for rust."
207 + fi
208 +
209 + if has_version 'app-shells/zsh'; then
210 + elog "install app-shells/rust-zshcomp to get zsh completion for rust."
211 + fi
212 +}
213 +
214 +pkg_postrm() {
215 + eselect rust unset --if-invalid
216 +}