Gentoo Archives: gentoo-commits

From: Dirkjan Ochtman <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust-bin/
Date: Sat, 29 Sep 2018 19:15:42
Message-Id: 1538248527.39b0b3bb7d5a512821846628f4cf89c44e3e41d4.djc@gentoo
1 commit: 39b0b3bb7d5a512821846628f4cf89c44e3e41d4
2 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 29 19:11:48 2018 +0000
4 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 29 19:15:27 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39b0b3bb
7
8 dev-lang/rust-bin: remove old versions
9
10 Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org>
11 Package-Manager: Portage-2.3.49, Repoman-2.3.10
12
13 dev-lang/rust-bin/Manifest | 10 --
14 dev-lang/rust-bin/rust-bin-1.26.2.ebuild | 125 ------------------------
15 dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild | 142 ----------------------------
16 dev-lang/rust-bin/rust-bin-1.28.0.ebuild | 142 ----------------------------
17 4 files changed, 419 deletions(-)
18
19 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
20 index 559e4a78b2e..206dde34d3c 100644
21 --- a/dev-lang/rust-bin/Manifest
22 +++ b/dev-lang/rust-bin/Manifest
23 @@ -3,16 +3,6 @@ DIST rust-1.25.0-arm-unknown-linux-gnueabihf.tar.gz 152774994 BLAKE2B 438fc55edc
24 DIST rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.gz 150376603 BLAKE2B 44aadf00b74d3d35039486289b319db5b1820dfb3b0fdbc03714ae2a8df78e09ee09fa41d9d8ec1377b91fb4a8f67cd7f4cdc99ceb39da4b48ba464ee1b73600 SHA512 a45312bec4c06b04d3c148d87a64aa55e14cc160eaaa6b712ce738590063137c8f9dd1030656071c1ac9a22cb852f34efdb98c435527c7371da381b802fb9104
25 DIST rust-1.25.0-i686-unknown-linux-gnu.tar.gz 169267482 BLAKE2B 8fb18c95adf7edd74cd305683ab2ee33d59cce1a0f515e9ba63dfd105ffaf9150444e281502747856fa5164f24707b4bbbe110a2b1b7a1cf65c96b883a6f2ede SHA512 76bcd978b9b23b0fc6315f91bed153e59616aa62f520aae8e8d3587b5f5fae74fef15f8b0a749b02a69be56fad4df9a413019438135481917bca1fb1a7704de7
26 DIST rust-1.25.0-x86_64-unknown-linux-gnu.tar.gz 178696930 BLAKE2B 0f82e837494d394c86462583f3d65f1ad839a97eda00fbc00476d06255831088cb7e554cc14edbf9dd23fbebf75078dc78204bdbec4795781f7fae0cbb6de63d SHA512 544e85bb69359d8ff6059d0f470b5995822f73e6d361be43f69f87d394b7252a11686f835336930bc257ba4347c0498abf5b1fbd751180d96bd9ca872b76d65c
27 -DIST rust-1.26.2-arm-unknown-linux-gnueabi.tar.xz 98267104 BLAKE2B ae44fcead124e5e3993240be0c8a46e545df5d045d39184cfada86d9a820fa30a771396a2ced86c2454aef224951e85cf0b6965c13ed98a3024e07d4ca1ec6a9 SHA512 a96295ef2d0eca5a682e3b3bcfe3b3ffeb5bbe45bc949f467cfd1e7ac7252d74e86d2d8f25e5722e75e7f537afeb3b0ae9054bd3908916ea461623f8c13ba5bf
28 -DIST rust-1.26.2-arm-unknown-linux-gnueabihf.tar.xz 98502692 BLAKE2B 124040a31e93923f66319244dbeba2be5836fb05ea3c1b8d833bdfac796ab1818139651a798ff398c7448958835ea238e9a111899493b992cc25c026a096ae89 SHA512 e23aa8e1167990a61413cdc0c0f336eafee02c90763120a08fdd7fcd7fbf04bbdbe38c59017cfa43ef622cac1b03f0850d5ace15046d384311a9f8af3cbe8b40
29 -DIST rust-1.26.2-armv7-unknown-linux-gnueabihf.tar.xz 98828932 BLAKE2B 2f60e65128bd32d97422d82d99f5c5447d1c1e77582028089d52208e3ede4af5e72c278a3fb5001348c864087f3e85af05604a0b6078891c5ed812d745840d93 SHA512 7b8e3f39a62b7b5fdaa6d53e5638de26968799d97b5d53e09bf49456b02f968495cff4757f25d38bc3393ca33dc1b9da353ec290ba9416770e082548aa5079ac
30 -DIST rust-1.26.2-i686-unknown-linux-gnu.tar.xz 143090096 BLAKE2B 7871fa4e4d0f320ff949cd31cefa116bc7b741927626958e1d10197f05fc9a662b8d6c21ddd4d2910700e6f7273e4fc18738e6ff58cd85b9af4ed25eceea31d9 SHA512 859b5b72c78cca8cd473012599ca12539ef9a5ee38d1aaaad024019fd84220e344e1cd0efd2b027ef333555b158b23529f35ceb5d59d76c35e7946b5fe4a8a52
31 -DIST rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz 138609432 BLAKE2B 54507a8ce3ab2676e6e66852b6d3f1a47ca07ad4b56383f6247149309a0f60f67fbf0a6ba27d968c24340c07d7d5074942c6eaccbc1207c5e75fd9a6f47b2481 SHA512 29e474b0eab4dd2ffa0b964d83f52ffce530e75c4193e307410ef6d20ef9ad2b300a4f467bdf06b3311157340e9295cb9b1efdcf08dafee66979b076c2afba7e
32 -DIST rust-1.27.1-arm-unknown-linux-gnueabi.tar.xz 101083416 BLAKE2B 2fd3a4b0c8a6cc1e7f7bc11300081183144639c4d02b8bb989154fbad92ad1e30ac8171993d8296ce8f0486dd018df46360693d912b50ca0c299c4c059f79d17 SHA512 7fa376f077abad6e24b81aa98ab7d953b8257388212a509c7a061ebe022cefd5bd042f24fc4444287bc4fb4cb9a6cbb651ae0d8146b5d4fe73d395ebb7192367
33 -DIST rust-1.27.1-arm-unknown-linux-gnueabihf.tar.xz 101382108 BLAKE2B 8743930b86b8ac1032afc5ced83f57b0606e9143a9d8e30a8b2ede70abb415fc2f1a904cb4b92adde7f71d54e83384509f02220cea9a9ab189a79815a58bd434 SHA512 be49a245163bef0345cd138fdc8d13a8403bf6b523505666650119eba87921f6a1abb04267bc698da30e5e688d8592fc20d8d3d63aff7ac1fa7397950531d329
34 -DIST rust-1.27.1-armv7-unknown-linux-gnueabihf.tar.xz 98288932 BLAKE2B 4794e8c54c8f733de6129829bab9e02644651fd6350db76bdb8c69f32fcff0a61e4992241431fea2b871e04a6f28607810918c5161a5a8a0b3fe756a37b619e3 SHA512 405bd579e69ec73de384487c4cd77eefcbc6c537ca3421f38ce2d35b8cd911def82fb9006b788a8aa6cdef69f620a5b1f2a2f7364bf7ddd0452d80b33315fa43
35 -DIST rust-1.27.1-i686-unknown-linux-gnu.tar.xz 144852524 BLAKE2B f087ad3ee7f942482c6aa02f9dcdc4adf6ede64e698024f7dcca6dccedcc5f9e9805050015d8328c5b672c94cb7f1008551a95a69b1ce8e754e048c5604dd11e SHA512 e0c7d5f64db768321bbdf229529b12f93e36507db03329b0b26094fd81cdf013804f929105ac4545903eb4494770120407c40616086b431ea66413be7e1163d3
36 -DIST rust-1.27.1-x86_64-unknown-linux-gnu.tar.xz 144328984 BLAKE2B 45551c2f4258c821e9b56ac09d673c46032b5f480da5fc51c0e0e33f66be7f0619aa4ad878336dbffae32e6eb43f2adfbba927ad5cfbb919b9e4395169d5c3bd SHA512 b419c19f75082a63a669ebeeefbce907ca7e7ac50a1c1355d1b10b3a4c1f8e28a76c4fd677efd8cb966a6e70a76059813e39b8dfe93de1401c7419d57ddca52a
37 DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c
38 DIST rust-1.28.0-arm-unknown-linux-gnueabi.tar.xz 104676648 BLAKE2B b26b23c3605e6584c51e0e914dbb3be60996e079e52ff2d4850ed43c1f1f7cd5ac575b40dbe852f927d36654f5ab7e384548f3a92b3466bfbb1cda7f9f069bcb SHA512 a1eaf1d7826ebfe222d233cabd8b88073ca2c8dd42a0b870e324dfc63e7290308418222c56802bc421c9bda119dc7c5f3e225ff33cacad5776b79cbcc1a877b2
39 DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.xz 104992084 BLAKE2B df97766d7abf73f668a2936834bc0f35739289eeeb5395276a2fdfd5b6c0baee3ba1eee1099f19d4f4f1cbd1a33cf62ad888dd3d1856b613ac853c6a17650741 SHA512 3b58b83f38bf8d8e841ae6614d72bb6e6faf75fb7c19abc5451548b0e6de0ef3b64dfbc70481a1e40f74074bfad701aa7a58296b4a0d07957a418bd3cd769917
40
41 diff --git a/dev-lang/rust-bin/rust-bin-1.26.2.ebuild b/dev-lang/rust-bin/rust-bin-1.26.2.ebuild
42 deleted file mode 100644
43 index 0eea0a7d10c..00000000000
44 --- a/dev-lang/rust-bin/rust-bin-1.26.2.ebuild
45 +++ /dev/null
46 @@ -1,125 +0,0 @@
47 -# Copyright 1999-2018 Gentoo Foundation
48 -# Distributed under the terms of the GNU General Public License v2
49 -
50 -EAPI=6
51 -
52 -inherit eutils bash-completion-r1 versionator toolchain-funcs
53 -
54 -MY_P="rust-${PV}"
55 -
56 -DESCRIPTION="Systems programming language from Mozilla"
57 -HOMEPAGE="https://www.rust-lang.org/"
58 -SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
59 - arm? (
60 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
61 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
62 - https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
63 - )
64 - x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
65 -
66 -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
67 -SLOT="stable"
68 -KEYWORDS="~amd64 ~x86"
69 -IUSE="doc"
70 -
71 -CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
72 -
73 -DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
74 - !dev-lang/rust:0
75 -"
76 -RDEPEND="${DEPEND}"
77 -PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
78 -
79 -QA_PREBUILT="
80 - opt/${P}/bin/rustc-bin-${PV}
81 - opt/${P}/bin/rustdoc-bin-${PV}
82 - opt/${P}/lib/*.so
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 -
96 - local postfix
97 - use amd64 && postfix=x86_64-unknown-linux-gnu
98 -
99 - if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
100 - postfix=arm-unknown-linux-gnueabi
101 - elif use arm && [[ ${CHOST} == armv6*h* ]]; then
102 - postfix=arm-unknown-linux-gnueabihf
103 - elif use arm && [[ ${CHOST} == armv7*h* ]]; then
104 - postfix=armv7-unknown-linux-gnueabihf
105 - fi
106 -
107 - use x86 && postfix=i686-unknown-linux-gnu
108 - mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
109 -}
110 -
111 -src_install() {
112 - local std=$(grep 'std' ./components)
113 - local components="rustc,${std}"
114 - use doc && components="${components},rust-docs"
115 - ./install.sh \
116 - --components="${components}" \
117 - --disable-verify \
118 - --prefix="${D}/opt/${P}" \
119 - --mandir="${D}/usr/share/${P}/man" \
120 - --disable-ldconfig \
121 - || die
122 -
123 - local rustc=rustc-bin-${PV}
124 - local rustdoc=rustdoc-bin-${PV}
125 - local rustgdb=rust-gdb-bin-${PV}
126 -
127 - mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
128 - mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
129 - mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
130 -
131 - dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
132 - dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
133 - dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
134 -
135 - cat <<-EOF > "${T}"/50${P}
136 - LDPATH="/opt/${P}/lib"
137 - MANPATH="/usr/share/${P}/man"
138 - EOF
139 - doenvd "${T}"/50${P}
140 -
141 - cat <<-EOF > "${T}/provider-${P}"
142 - /usr/bin/rustdoc
143 - /usr/bin/rust-gdb
144 - EOF
145 - dodir /etc/env.d/rust
146 - insinto /etc/env.d/rust
147 - doins "${T}/provider-${P}"
148 -}
149 -
150 -pkg_postinst() {
151 - eselect rust update --if-unset
152 -
153 - elog "Rust installs a helper script for calling GDB now,"
154 - elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
155 -
156 - if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
157 - elog "install app-emacs/rust-mode to get emacs support for rust."
158 - fi
159 -
160 - if has_version app-editors/gvim || has_version app-editors/vim; then
161 - elog "install app-vim/rust-vim to get vim support for rust."
162 - fi
163 -
164 - if has_version 'app-shells/zsh'; then
165 - elog "install app-shells/rust-zshcomp to get zsh completion for rust."
166 - fi
167 -}
168 -
169 -pkg_postrm() {
170 - eselect rust unset --if-invalid
171 -}
172
173 diff --git a/dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild b/dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild
174 deleted file mode 100644
175 index 53d2d4e87eb..00000000000
176 --- a/dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild
177 +++ /dev/null
178 @@ -1,142 +0,0 @@
179 -# Copyright 1999-2018 Gentoo Foundation
180 -# Distributed under the terms of the GNU General Public License v2
181 -
182 -EAPI=6
183 -
184 -inherit eutils bash-completion-r1 versionator toolchain-funcs
185 -
186 -MY_P="rust-${PV}"
187 -
188 -DESCRIPTION="Systems programming language from Mozilla"
189 -HOMEPAGE="https://www.rust-lang.org/"
190 -SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
191 - arm? (
192 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
193 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
194 - https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
195 - )
196 - x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
197 -
198 -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
199 -SLOT="stable"
200 -KEYWORDS="~amd64 ~x86"
201 -IUSE="cargo doc rustfmt"
202 -
203 -CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
204 -
205 -DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
206 - !dev-lang/rust:0
207 - cargo? ( !dev-util/cargo )
208 - rustfmt? ( !dev-util/rustfmt )
209 -"
210 -RDEPEND="${DEPEND}"
211 -PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
212 -
213 -QA_PREBUILT="
214 - opt/${P}/bin/*-${PV}
215 - opt/${P}/lib/*.so
216 - opt/${P}/lib/rustlib/*/lib/*.so
217 - opt/${P}/lib/rustlib/*/lib/*.rlib*
218 -"
219 -
220 -pkg_pretend () {
221 - if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
222 - die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
223 - fi
224 -}
225 -
226 -src_unpack() {
227 - default
228 -
229 - local postfix
230 - use amd64 && postfix=x86_64-unknown-linux-gnu
231 -
232 - if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
233 - postfix=arm-unknown-linux-gnueabi
234 - elif use arm && [[ ${CHOST} == armv6*h* ]]; then
235 - postfix=arm-unknown-linux-gnueabihf
236 - elif use arm && [[ ${CHOST} == armv7*h* ]]; then
237 - postfix=armv7-unknown-linux-gnueabihf
238 - fi
239 -
240 - use x86 && postfix=i686-unknown-linux-gnu
241 - mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
242 -}
243 -
244 -src_install() {
245 - local std=$(grep 'std' ./components)
246 - local components="rustc,${std}"
247 - use doc && components="${components},rust-docs"
248 - use cargo && components="${components},cargo"
249 - use rustfmt && components="${components},rustfmt-preview"
250 - ./install.sh \
251 - --components="${components}" \
252 - --disable-verify \
253 - --prefix="${D}/opt/${P}" \
254 - --mandir="${D}/usr/share/${P}/man" \
255 - --disable-ldconfig \
256 - || die
257 -
258 - local rustc=rustc-bin-${PV}
259 - local rustdoc=rustdoc-bin-${PV}
260 - local rustgdb=rust-gdb-bin-${PV}
261 -
262 - mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
263 - mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
264 - mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
265 -
266 - dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
267 - dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
268 - dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
269 -
270 - if use cargo; then
271 - local cargo=cargo-${PV}
272 - mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
273 - dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
274 - fi
275 - if use rustfmt; then
276 - local rustfmt=rustfmt-${PV}
277 - local cargo_fmt=cargo-fmt-${PV}
278 - mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
279 - mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
280 - dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
281 - dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
282 - fi
283 -
284 - cat <<-EOF > "${T}"/50${P}
285 - LDPATH="/opt/${P}/lib"
286 - MANPATH="/usr/share/${P}/man"
287 - EOF
288 - doenvd "${T}"/50${P}
289 -
290 - cat <<-EOF > "${T}/provider-${P}"
291 - /usr/bin/rustdoc
292 - /usr/bin/rust-gdb
293 - EOF
294 - dodir /etc/env.d/rust
295 - insinto /etc/env.d/rust
296 - doins "${T}/provider-${P}"
297 -}
298 -
299 -pkg_postinst() {
300 - eselect rust update --if-unset
301 -
302 - elog "Rust installs a helper script for calling GDB now,"
303 - elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
304 -
305 - if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
306 - elog "install app-emacs/rust-mode to get emacs support for rust."
307 - fi
308 -
309 - if has_version app-editors/gvim || has_version app-editors/vim; then
310 - elog "install app-vim/rust-vim to get vim support for rust."
311 - fi
312 -
313 - if has_version 'app-shells/zsh'; then
314 - elog "install app-shells/rust-zshcomp to get zsh completion for rust."
315 - fi
316 -}
317 -
318 -pkg_postrm() {
319 - eselect rust unset --if-invalid
320 -}
321
322 diff --git a/dev-lang/rust-bin/rust-bin-1.28.0.ebuild b/dev-lang/rust-bin/rust-bin-1.28.0.ebuild
323 deleted file mode 100644
324 index 53d2d4e87eb..00000000000
325 --- a/dev-lang/rust-bin/rust-bin-1.28.0.ebuild
326 +++ /dev/null
327 @@ -1,142 +0,0 @@
328 -# Copyright 1999-2018 Gentoo Foundation
329 -# Distributed under the terms of the GNU General Public License v2
330 -
331 -EAPI=6
332 -
333 -inherit eutils bash-completion-r1 versionator toolchain-funcs
334 -
335 -MY_P="rust-${PV}"
336 -
337 -DESCRIPTION="Systems programming language from Mozilla"
338 -HOMEPAGE="https://www.rust-lang.org/"
339 -SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
340 - arm? (
341 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
342 - https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
343 - https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
344 - )
345 - x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
346 -
347 -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
348 -SLOT="stable"
349 -KEYWORDS="~amd64 ~x86"
350 -IUSE="cargo doc rustfmt"
351 -
352 -CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
353 -
354 -DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
355 - !dev-lang/rust:0
356 - cargo? ( !dev-util/cargo )
357 - rustfmt? ( !dev-util/rustfmt )
358 -"
359 -RDEPEND="${DEPEND}"
360 -PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
361 -
362 -QA_PREBUILT="
363 - opt/${P}/bin/*-${PV}
364 - opt/${P}/lib/*.so
365 - opt/${P}/lib/rustlib/*/lib/*.so
366 - opt/${P}/lib/rustlib/*/lib/*.rlib*
367 -"
368 -
369 -pkg_pretend () {
370 - if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
371 - die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
372 - fi
373 -}
374 -
375 -src_unpack() {
376 - default
377 -
378 - local postfix
379 - use amd64 && postfix=x86_64-unknown-linux-gnu
380 -
381 - if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
382 - postfix=arm-unknown-linux-gnueabi
383 - elif use arm && [[ ${CHOST} == armv6*h* ]]; then
384 - postfix=arm-unknown-linux-gnueabihf
385 - elif use arm && [[ ${CHOST} == armv7*h* ]]; then
386 - postfix=armv7-unknown-linux-gnueabihf
387 - fi
388 -
389 - use x86 && postfix=i686-unknown-linux-gnu
390 - mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
391 -}
392 -
393 -src_install() {
394 - local std=$(grep 'std' ./components)
395 - local components="rustc,${std}"
396 - use doc && components="${components},rust-docs"
397 - use cargo && components="${components},cargo"
398 - use rustfmt && components="${components},rustfmt-preview"
399 - ./install.sh \
400 - --components="${components}" \
401 - --disable-verify \
402 - --prefix="${D}/opt/${P}" \
403 - --mandir="${D}/usr/share/${P}/man" \
404 - --disable-ldconfig \
405 - || die
406 -
407 - local rustc=rustc-bin-${PV}
408 - local rustdoc=rustdoc-bin-${PV}
409 - local rustgdb=rust-gdb-bin-${PV}
410 -
411 - mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
412 - mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
413 - mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
414 -
415 - dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
416 - dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
417 - dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
418 -
419 - if use cargo; then
420 - local cargo=cargo-${PV}
421 - mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
422 - dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
423 - fi
424 - if use rustfmt; then
425 - local rustfmt=rustfmt-${PV}
426 - local cargo_fmt=cargo-fmt-${PV}
427 - mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
428 - mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
429 - dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
430 - dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
431 - fi
432 -
433 - cat <<-EOF > "${T}"/50${P}
434 - LDPATH="/opt/${P}/lib"
435 - MANPATH="/usr/share/${P}/man"
436 - EOF
437 - doenvd "${T}"/50${P}
438 -
439 - cat <<-EOF > "${T}/provider-${P}"
440 - /usr/bin/rustdoc
441 - /usr/bin/rust-gdb
442 - EOF
443 - dodir /etc/env.d/rust
444 - insinto /etc/env.d/rust
445 - doins "${T}/provider-${P}"
446 -}
447 -
448 -pkg_postinst() {
449 - eselect rust update --if-unset
450 -
451 - elog "Rust installs a helper script for calling GDB now,"
452 - elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
453 -
454 - if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
455 - elog "install app-emacs/rust-mode to get emacs support for rust."
456 - fi
457 -
458 - if has_version app-editors/gvim || has_version app-editors/vim; then
459 - elog "install app-vim/rust-vim to get vim support for rust."
460 - fi
461 -
462 - if has_version 'app-shells/zsh'; then
463 - elog "install app-shells/rust-zshcomp to get zsh completion for rust."
464 - fi
465 -}
466 -
467 -pkg_postrm() {
468 - eselect rust unset --if-invalid
469 -}