Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust-bin/
Date: Fri, 18 Jan 2019 01:19:50
Message-Id: 1547774371.08a9b7f9fbc942784686182f17e089b76fb49caa.chutzpah@gentoo
1 commit: 08a9b7f9fbc942784686182f17e089b76fb49caa
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri Jan 18 00:57:29 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 18 01:19:31 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08a9b7f9
7
8 dev-lang/rust-bin: Version bump to 1.32.0
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.56, Repoman-2.3.12
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 dev-lang/rust-bin/Manifest | 13 +++
15 dev-lang/rust-bin/rust-bin-1.32.0.ebuild | 144 +++++++++++++++++++++++++++++++
16 2 files changed, 157 insertions(+)
17
18 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
19 index 997d5d33d27..5b2d8ccc82d 100644
20 --- a/dev-lang/rust-bin/Manifest
21 +++ b/dev-lang/rust-bin/Manifest
22 @@ -43,3 +43,16 @@ DIST rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz 122297864 BLAKE2B 3cc4e867e3
23 DIST rust-1.31.1-powerpc64le-unknown-linux-gnu.tar.xz 125272712 BLAKE2B 5a1cb8226ac6209c451841b2ae40ecf452d14fefb7ce8f5f0e681a2f08954d643628b28ceae03e7a164f5fd5415a408843bb2ddcd86b9e3486b7ddbbd3b6bb99 SHA512 e64f586b632b85d07e18c61e5ce18a69404d89e302ecd8b4495e09e2b2f62bd3f32455b3d0d81cfa2d0031c003f23797421587cf6f314ce5b18b12157e1e9a3b
24 DIST rust-1.31.1-s390x-unknown-linux-gnu.tar.xz 127867704 BLAKE2B be4b097506561db4f84db4e8b6224dbcd104f15bb95f7ec56b5c0410b85cc8de8f8b559760d7c01d274b7d031354349eed7b49a816fe404ea319d238af64b932 SHA512 ce6999f7d27468143a9a288fd1bda9f3ec42475f8b8473518be41358a2144317abf8076ed9527a10db94b5b89cf920f04217ce7a78ec214aa3e073a8419675bc
25 DIST rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz 148394364 BLAKE2B 92b1860f1d0e2da0fc1755a8ed3f6d351da84103220a8fb560e862375b8ad03485299b42ed4448e6f661bb61650480815f20267ffa3d999c2910bc27b80900ae SHA512 3bf37bc419acd7820c7e33d7b44e6cba7f3b556ca8880fee2f65b1648596f069e0bc590a3a7acc10c60a0328f83787a172650d9c26cf21aa14782dcd9a97ec3a
26 +DIST rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz 116136352 BLAKE2B 5d5686f285be767a902553d725b59ebe9cf5f8001ea31bc19bee60e65c05d24246dd3f044f07113e37112dd8388e1ee58738aee7af7afbee94c9383c0592aee3 SHA512 b077c54bf38935a55a36fec39d1822562da760489ca924d48978e87b9ac5dc4b5107a7eb08dea0412a5a44c255428c649e31f07a5a67567c715de8644581018d
27 +DIST rust-1.32.0-arm-unknown-linux-gnueabi.tar.xz 117487960 BLAKE2B 29a92158b6c6fbb0c577e4093c4bfedda1467f0367976676f64e4366d937bd6ebdb7ecfa7ae3a55c4dca0b9f577aea7e1c9905f97f1e167d6b2af5f8b2196b3e SHA512 45d39548e74a22ac862197084e1ca7c4815fefbb49527356d4c7985ef320d2f8d1b0051a4db79503c967ad44df15d0f9ef673b44035f1d90d0383abfca8ef9d4
28 +DIST rust-1.32.0-arm-unknown-linux-gnueabihf.tar.xz 117758664 BLAKE2B 0ed842e03b8d29c1e5d0856f2498786298f02d4a82ce972e51e51711a5cfff8906ea5e607134edbe2997dc10db655d6cf5dc8ca27d8071c44e0fcbb2f97f6519 SHA512 7f6f1810aa29123d4fc13f4c15220db1cb3911c45c107d7cc5d63e2e04fab3a4b4202f94f2aa3d7f67f4301b77f9e231e6b73983c11b9dce3023918438e9e646
29 +DIST rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz 119183916 BLAKE2B 47e766398ee35ae578a96390757b7e53500b94b1bcab5e17fc4718185e24936797c3b161f06a06aa8eb876726d3916aa3b6a51356fde2a719ff84c6b5996e6f0 SHA512 abadddae0a8de3ee326d1145e3bbe571d9ec0d80261569b6350dbc0fa38b9d31590933c318785f92b75c7add35d7b45e7713a3f1ef7dfd3de085b7255a855b2a
30 +DIST rust-1.32.0-i686-unknown-linux-gnu.tar.xz 146763596 BLAKE2B 47a8ade700db65eed2e0051a2094d730c22f650599d542951b63de58b6af7d2477d8be4b7a62836d85a4829b5f18bf41e33f50bdd169432583da87545c4c262a SHA512 bec62be3e9f5e37197c10357a386a7083941f44151eab28e7a1c8892c0e8e65d168e1220d5e807bb55b9c86ef046bad5cb23fad89def9cb51d22ff69fb436172
31 +DIST rust-1.32.0-mips-unknown-linux-gnu.tar.xz 110583680 BLAKE2B b8e95a09b752455b17eca4b7dcb98df60526cb9882b42436b92ba5f0b2478148faceebd88367b42dd98d3c62f7757e850361d1cf507e1008e5dbf5c25752d253 SHA512 6b0fd688535b8679a06384c321b87dc2c6990c799f5b6c14cf89806f46b517633a8a4c79133f4d7f528770fb2a7ba4623308a8c590d8525bd1cbdbdc3defbfad
32 +DIST rust-1.32.0-mips64-unknown-linux-gnuabi64.tar.xz 118818484 BLAKE2B 8b4adb0a87ca07f9f1e51f84f65a28e2eb98340efe06a70cca312e85b80a2dcf4a1098c981a880f35fdc27a854f41ba8f0de413668756cd6c47a7cad82ff473d SHA512 e8737ff2cb6421af437335c75a48df0d094e6749bb32ae0dc8d614548a2efd682dedb448790f72987332750378259e45cde59c1555a20cb9b78991c422d42b34
33 +DIST rust-1.32.0-mipsel-unknown-linux-gnu.tar.xz 112802132 BLAKE2B 8d44aa6e19cb2ac5e0e43fb40ab0b879c611481fd3b23750d3dec1c8ab646b8b3f948eccba0f20b583d411de5cc43317d433c49ca3b341cab08225d3688be668 SHA512 c32fa5cbf779c629d423f498f885cb528f2d5b3165f80c6415fc98e7b7fc4802ad893b7aa2c2dad810fbaa968687053b52b32fabe775ba4a1bb72ceabdaf733f
34 +DIST rust-1.32.0-powerpc-unknown-linux-gnu.tar.xz 111816220 BLAKE2B 7398c98d37589c307953d11a21866bf23a34806cbcb2316926a321f5407481e292645ba3425d9b7deeaad20da65096189b477deff6769fca856547343dde8146 SHA512 4155d662b3f7cfce376896792767132a4e9e1ecf4d4c1232a0f4c0a3765b5e736ee8b4e6f368b874146d94c809d61bd26680c4d7a3dd8ad0bcea819c5756feb2
35 +DIST rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz 120518816 BLAKE2B 9666c809b89d0c564b019fc4b7f6102dcb98fc53e88dfd553fe0274b8758c1ceec5c9c6df9e5e3886fb3cb6ea82322ec8d6e38663189336fdccc50ee10e033e6 SHA512 e4c70ab500feccb2ed67435857f584381be051ba7b2d70cea55b0c94b846e61ba10930a20ceceb67ec981daa5baa166fc6dea7c14ac9ac28270c30841d9c16a1
36 +DIST rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz 124278796 BLAKE2B cee79918a210c34918cf183c918099cd2c246d881576f80e960492c7d5ae1920a43f2d4424700543a7cf50cc5f18618b6d4abfac1e856c9e8711fb73429571b7 SHA512 058c1ebe58bb22e8ff791a74edb058e7494e2673dd1d91ffad646ec71cfdc240e934b44fbae6e58639143b33161d314224e7d1c7b2cc35677bf9eab901e130eb
37 +DIST rust-1.32.0-s390x-unknown-linux-gnu.tar.xz 128857448 BLAKE2B ab0ce58315d116a0aaed007d03df7be4ecfeee01fd6e368173e8aa023b2ae1d922824e92b103aaf205ed2adf1f9da78abd229fff313c24e32ea3fad68f8bdda3 SHA512 4f32934472356d9b7e15abb0fa07be9eddccc7b9e0a1834bbee5ff279c6ece9174d942e2feed611f9b697613ee3b76f8a8ab68559b6d075e740aeab117223325
38 +DIST rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz 147868652 BLAKE2B 616e69d80dd0e7de2ac86f2090825c8a991ad1b88155d21d0eef89b7aea418ba8bb0140eeb497c417c77afc770f51498020ee86cfd059533500c0cb88f0130b6 SHA512 5c5def0c415b0f34e1e7476841a0bd3f91fe4bde8321c7b06b1cd2a3d10a3d676ed16a26561929ce39c3c2cbcf7a16960c5decca9e385afe8295da32b4fb7a17
39
40 diff --git a/dev-lang/rust-bin/rust-bin-1.32.0.ebuild b/dev-lang/rust-bin/rust-bin-1.32.0.ebuild
41 new file mode 100644
42 index 00000000000..a2af32c2885
43 --- /dev/null
44 +++ b/dev-lang/rust-bin/rust-bin-1.32.0.ebuild
45 @@ -0,0 +1,144 @@
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-0.3_pre20150425
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/*/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="${D}/opt/${P}" \
104 + --mandir="${D}/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 rustlldb=rust-lldb-bin-${PV}
112 +
113 + mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
114 + mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
115 + mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
116 + mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die
117 +
118 + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
119 + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
120 + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
121 + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}"
122 +
123 + local cargo=cargo-bin-${PV}
124 + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
125 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
126 + if use clippy; then
127 + local clippy_driver=clippy-driver-bin-${PV}
128 + local cargo_clippy=cargo-clippy-bin-${PV}
129 + mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
130 + mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
131 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
132 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
133 + fi
134 + if use rustfmt; then
135 + local rustfmt=rustfmt-bin-${PV}
136 + local cargo_fmt=cargo-fmt-bin-${PV}
137 + mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
138 + mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
139 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
140 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
141 + fi
142 +
143 + cat <<-EOF > "${T}"/50${P}
144 + LDPATH="/opt/${P}/lib"
145 + MANPATH="/usr/share/${P}/man"
146 + EOF
147 + doenvd "${T}"/50${P}
148 +
149 + cat <<-EOF > "${T}/provider-${P}"
150 + /usr/bin/rustdoc
151 + /usr/bin/rust-gdb
152 + /usr/bin/rust-lldb
153 + EOF
154 + echo /usr/bin/cargo >> "${T}/provider-${P}"
155 + if use clippy; then
156 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
157 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
158 + fi
159 + if use rustfmt; then
160 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
161 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
162 + fi
163 + dodir /etc/env.d/rust
164 + insinto /etc/env.d/rust
165 + doins "${T}/provider-${P}"
166 +}
167 +
168 +pkg_postinst() {
169 + eselect rust update --if-unset
170 +
171 + elog "Rust installs a helper script for calling GDB now,"
172 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
173 +
174 + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
175 + elog "install app-emacs/rust-mode to get emacs support for rust."
176 + fi
177 +
178 + if has_version app-editors/gvim || has_version app-editors/vim; then
179 + elog "install app-vim/rust-vim to get vim support for rust."
180 + fi
181 +
182 + if has_version 'app-shells/zsh'; then
183 + elog "install app-shells/rust-zshcomp to get zsh completion for rust."
184 + fi
185 +}
186 +
187 +pkg_postrm() {
188 + eselect rust unset --if-invalid
189 +}