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, 12 Apr 2019 04:08:07
Message-Id: 1555042057.69fa3135714aa78596aae8d13c719c340ca023f6.gyakovlev@gentoo
1 commit: 69fa3135714aa78596aae8d13c719c340ca023f6
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 11 19:20:54 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 12 04:07:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69fa3135
7
8 dev-lang/rust-bin: bump to 1.34.0
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
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.34.0.ebuild | 156 +++++++++++++++++++++++++++++++
15 2 files changed, 169 insertions(+)
16
17 diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
18 index 33b61721019..8c6ffbca2ba 100644
19 --- a/dev-lang/rust-bin/Manifest
20 +++ b/dev-lang/rust-bin/Manifest
21 @@ -69,3 +69,16 @@ DIST rust-1.33.0-powerpc64-unknown-linux-gnu.tar.xz 126030216 BLAKE2B b1d1b996b8
22 DIST rust-1.33.0-powerpc64le-unknown-linux-gnu.tar.xz 130922680 BLAKE2B db63d859631703e845efac57074e0f33f80a3b52b2e9dc8707b81892eee8fc922fa5a7d4b7b1f45fb5f19ea4d7f6fde9212f1c6e99e7e4c30dbc02aa87b0df7e SHA512 393c808e93792cf2b126d6111834932a55cbf18339942ac0d20fc4a3692b0ac08c21a3c8fd393795f7aafecac5a2c5d7c9415c18017a7453f759f746045f5144
23 DIST rust-1.33.0-s390x-unknown-linux-gnu.tar.xz 134441220 BLAKE2B e6f0a6e54e4e1fde10f54f66615d44442b7cb5eb5bda43d55ee791328c7ecd61505b3d84719df82b7c5c7ae473b7041512f2cf346281518d7d78d0e22112fa05 SHA512 755a0203e2c143386cb3729faada4d2c38b254dfa7e6eeb722ec9847d6319a1d3d289c7b77a2bc478d79dbbabfcd826d8b015acd29fbdf5acb591feae1876205
24 DIST rust-1.33.0-x86_64-unknown-linux-gnu.tar.xz 155298128 BLAKE2B af5bc628bc054bd354d5af78e53cd2ffbfbdf2c2d3a3e58eeb593f148c54024fa5905aa53a69c514d6d41e48688697e1ce8adb866817c77cdf541399f6e7956f SHA512 b7f3087f34e99517cd729f5ff1f8cce3f3254cb36c734d5b90d878293e4406934c2f597bf7e2941e9257046f62c9274eb4769a64dabfbc5f0bbf2a1703f7fef8
25 +DIST rust-1.34.0-aarch64-unknown-linux-gnu.tar.xz 120855004 BLAKE2B cdd8a4d4504577eab17aeefefba08253312061f2c6092026a98a3190f3003f5bccb741e9fbcdcea29dd38b494b9f0ea6412afb345ef2488c95ddbb6e58b60daa SHA512 de477af06ec3e7260d9071d9f18a84463125492f1f98df0b4422743fbd1db0dc0ee488bce93738ee394169af4eeb94be84dd19fab1c7fc6eda79431a26d2d24c
26 +DIST rust-1.34.0-arm-unknown-linux-gnueabi.tar.xz 122526516 BLAKE2B 396eb99c20fba62a15093a82e7d2df3d03d91cc97b9601294b0dc0866c2c8a251bd555ce86597db4d68de94055aaecf01efdf011cf4af2a1f35f00ffacb7c3ce SHA512 afd953d6109781f510532f7e2e8344842b07171e1fc2f56a3be50a77bba79820e0dc7bcde4419f1f218ee3f1628284b3c42e63b3dc8ee7fad86c751d419f623a
27 +DIST rust-1.34.0-arm-unknown-linux-gnueabihf.tar.xz 122918872 BLAKE2B 9cc2878f69e32c39af32928662a5351d4ff810fd4d6a9dde5e73737cbc4284e6f813687fee4c6ad9bb0e87b912b06b289e7b06eff4ba87f1b6bf802800effa14 SHA512 8ae0a5ba27f983b4fc33e1c928451c5dca0ee04b96448a1f18448605b91f5433da1ccd964c6650f19248b89ade5e92631a78550d609a169a370beaf6d01233a9
28 +DIST rust-1.34.0-armv7-unknown-linux-gnueabihf.tar.xz 124648648 BLAKE2B 409f4a991672bbd130913ba63920abf687cb7bde43f1458284e23b31531d4339d0cd935515edd5da1f2d49059860d3932ca2bd5f017b9df77f5075f742518575 SHA512 923b2e81c6e388ee293a5550c06181ec0ae91b61055716e226c445b7036e758c1b8e988c125baadf0501e17f7ede0eb46ad43ec55038d36a9443e92fc297dcb0
29 +DIST rust-1.34.0-i686-unknown-linux-gnu.tar.xz 169552532 BLAKE2B 15ac40601d2434da1f3f37a20417804678317a2f23f0494a2c0dacdd2a41fa7b2a385f0744a8cfcd730c4bf4ed77cdb6f5343f4ccdbd30da6a5d58a0328a0282 SHA512 b0a8c022e3ba2df82827a02c9647c18649c8aa0e6cf830957883bee1013cb11dc36e8e26cef4531068d3a14af0f854256cc273732033b36c8f696392b918fcb5
30 +DIST rust-1.34.0-mips-unknown-linux-gnu.tar.xz 113552848 BLAKE2B fc2eac31b4e2d106fbc5bd7528cc8d05452aa5e95943edea7e0802e2e05e4246d26a22c79ad3d55cbf940459f0e6c8cd98022ecf3fd964e7d027b0edfcd67122 SHA512 c9dc9043aba2882b426dcf330701ff9912a0417c7b80b5f4cafea2d1934f68eb15a1bf0aaf8cbaf728bc56ff32a8250ed47bd123b8f784184b5e59442160eb3c
31 +DIST rust-1.34.0-mips64-unknown-linux-gnuabi64.tar.xz 119139144 BLAKE2B 9da97e096105aa0c5d94b0357fd27af209484bb393333c77fc66501b39ae94dd96044828848cd1f1bb5b588f4bd8fa984389d3dccfc3cd077e0fa24245d66bd6 SHA512 f1dc0e81ea0387f8689d5b2168690c5e85a03b5a04a14ba6c7ff28d90c2a0b8d7698f7585754870940d547ea006c1ab18127197a36548e1fc4f8ff08f5529302
32 +DIST rust-1.34.0-mipsel-unknown-linux-gnu.tar.xz 115847776 BLAKE2B 79a2023ea85e6e8fdad4d1d6b4a48fe724850db0f1ee5c7ae1303242a59e3ef5c383f5ed9c4959b04766bacf9c56b4d8f1d4c87580558d44790a3c94dbdeddc5 SHA512 07e7da6467771b455ed94b83451a45cc582cb86cd57949dbdef4beb38eaa01f7e9f0799d49864c014891a5ace39fc09d909585058f6c46f0799bc1c6f9734f2f
33 +DIST rust-1.34.0-powerpc-unknown-linux-gnu.tar.xz 116836732 BLAKE2B ed6cb4c0974b9f40726d3331973fbc632427a9bfb35cabdffe5b81fff3ed71cc55f7fcbbfda9a579cfa646637242e40a7c9c38fd36cf69f5ec125b4df494c370 SHA512 d9f89a0f90eaf9898f6d46deb84327cdda15b3d92599e8c27c11708115bebc0914076576cced6628f69ae2035a50f78eb2a5e695e1028cec900cc7b0f26a29b4
34 +DIST rust-1.34.0-powerpc64-unknown-linux-gnu.tar.xz 125810152 BLAKE2B 6ae7fd1e78638dc807c6633b567f11372e7c6f8cf8f9fc381d39c39d8f43bf714609298566cd92fee1db6eb1d4da3ca607deed90d6509546cbdf4dbd12dd291a SHA512 f1c044a8be65075f40f9358e9d4258cee19a14c2de42b6c161b325f65529dd9bcedb0f3078de624c0b572b85f5bbd1be93dc2049eadf658815d60b8d6835a689
35 +DIST rust-1.34.0-powerpc64le-unknown-linux-gnu.tar.xz 129639888 BLAKE2B eeb3e27d677f5dd816ca8395e66bb063d3f0a82af9ed1a123f9bcb1124441e740a8e8511c848f10533398a0008b6b1668a1f4bbcecdacd1772eca02a89164456 SHA512 2bf9aa71af041c45e29ad8d10d96088e4fb04dac70bd278f9896b25b63c4c673bca954aaf3a139ef13100e252871d0a1fb4c69d5b88b1ac3fe8657642580e802
36 +DIST rust-1.34.0-s390x-unknown-linux-gnu.tar.xz 134441480 BLAKE2B 423071ec0799f0b0608b71b7d3e65e6797474f4769adb22756b467187dcbe95cb8f377f3574571d9d45a890372fac037e66b4ff23691ae28e545b8e451ec23f9 SHA512 14f46e08f0251ed302ad71c20b5797cd73063b0396fb6654b8d5ee9e27d59f9477a4819a1ae8e04ebd8b25006e92f43a0ef9b2fc53e5029b621746a256153f3c
37 +DIST rust-1.34.0-x86_64-unknown-linux-gnu.tar.xz 157382624 BLAKE2B 0e87efe48dfe5a9b588ea86378057a31c84b08f5f1bc0740c197962d8cae320b0418c42efdf7573dd22fbfd829f29f2a1d1a8c942d65051c14c2fe25cfe15071 SHA512 2ad2a9a2871be53498876db6146e6bff12c4f63a0cb3f71cfdc62602cf7be91ef3a9f6a2ba8f426d68e5ed31ae53c5d28fe4ca898e4774227bb98b770b0a36c4
38
39 diff --git a/dev-lang/rust-bin/rust-bin-1.34.0.ebuild b/dev-lang/rust-bin/rust-bin-1.34.0.ebuild
40 new file mode 100644
41 index 00000000000..a4fb5e4c309
42 --- /dev/null
43 +++ b/dev-lang/rust-bin/rust-bin-1.34.0.ebuild
44 @@ -0,0 +1,156 @@
45 +# Copyright 1999-2019 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=6
49 +
50 +inherit eutils 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="${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 + # ugly hack for https://bugs.gentoo.org/679806
125 + if use ppc64; then
126 + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die
127 + sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die
128 + cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}"
129 + #!/bin/sh
130 + OPENSSL_ppccap=0 $(realpath $0).bin "${@}"
131 + EOF
132 + fperms +x "/opt/${P}/bin/${cargo}"
133 + else
134 + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
135 + fi
136 + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
137 + if use clippy; then
138 + local clippy_driver=clippy-driver-bin-${PV}
139 + local cargo_clippy=cargo-clippy-bin-${PV}
140 + mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die
141 + mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die
142 + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}"
143 + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}"
144 + fi
145 + if use rustfmt; then
146 + local rustfmt=rustfmt-bin-${PV}
147 + local cargo_fmt=cargo-fmt-bin-${PV}
148 + mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
149 + mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
150 + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
151 + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
152 + fi
153 +
154 + cat <<-EOF > "${T}"/50${P}
155 + LDPATH="/opt/${P}/lib"
156 + MANPATH="/usr/share/${P}/man"
157 + EOF
158 + doenvd "${T}"/50${P}
159 +
160 + cat <<-EOF > "${T}/provider-${P}"
161 + /usr/bin/rustdoc
162 + /usr/bin/rust-gdb
163 + /usr/bin/rust-lldb
164 + EOF
165 + echo /usr/bin/cargo >> "${T}/provider-${P}"
166 + if use clippy; then
167 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
168 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
169 + fi
170 + if use rustfmt; then
171 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
172 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
173 + fi
174 + dodir /etc/env.d/rust
175 + insinto /etc/env.d/rust
176 + doins "${T}/provider-${P}"
177 +}
178 +
179 +pkg_postinst() {
180 + eselect rust update --if-unset
181 +
182 + elog "Rust installs a helper script for calling GDB now,"
183 + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
184 +
185 + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
186 + elog "install app-emacs/rust-mode to get emacs support for rust."
187 + fi
188 +
189 + if has_version app-editors/gvim || has_version app-editors/vim; then
190 + elog "install app-vim/rust-vim to get vim support for rust."
191 + fi
192 +
193 + if has_version 'app-shells/zsh'; then
194 + elog "install app-shells/rust-zshcomp to get zsh completion for rust."
195 + fi
196 +}
197 +
198 +pkg_postrm() {
199 + eselect rust unset --if-invalid
200 +}