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/
Date: Fri, 18 Jan 2019 01:19:50
Message-Id: 1547774372.bb907f48c01b8dd5f63b31aaa1dd668feaf5bf91.chutzpah@gentoo
1 commit: bb907f48c01b8dd5f63b31aaa1dd668feaf5bf91
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Fri Jan 18 01:18:07 2019 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 18 01:19:32 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb907f48
7
8 dev-lang/rust: 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/Manifest | 14 ++
15 dev-lang/rust/rust-1.32.0.ebuild | 295 +++++++++++++++++++++++++++++++++++++++
16 2 files changed, 309 insertions(+)
17
18 diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
19 index e82f2820162..06d59be0f30 100644
20 --- a/dev-lang/rust/Manifest
21 +++ b/dev-lang/rust/Manifest
22 @@ -37,7 +37,21 @@ DIST rust-1.30.1-powerpc64-unknown-linux-gnu.tar.xz 118698168 BLAKE2B 58905ab6c6
23 DIST rust-1.30.1-powerpc64le-unknown-linux-gnu.tar.xz 121569444 BLAKE2B d4d390ea24298cd88d224efe3c1a1dc3a802b678d977bc0aa26197e291547a6ca823a0fe5e35491204a649cb6a5419343a825ef32408aa2638d057b209b1c15c SHA512 b4595f031a006335ac778ec6a07c398fd6cce78ed3c0ed5730a5c06fa3a390dbab1afda0468756330783baa86dafb2f0c7ca7c75b735eb532c268027e22975e6
24 DIST rust-1.30.1-s390x-unknown-linux-gnu.tar.xz 124025168 BLAKE2B b4a8df333b093ae111136a6b9005aca7f424f209d629041c4fce1efc7e19b176f6e6325bf3552e8de93faa311ebf065ad4b9f104de3ee412b2a3fda70156c2b0 SHA512 592764d3d5b4d8a2a7628f4969ba5204da4ea63ca92efc17d4f9339274fce00aecc4d1ebb1f4d0499da8559375ad205054b26e12775af622a7112b20b8c8d4fb
25 DIST rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz 145148116 BLAKE2B e70d667d880656209c036b72f619b1bd29679878ff4b8865f0453c064c4a8a53a96e73994509637312032e1260eeb0e53f7372ca1526760b1631846ed6a4c571 SHA512 05238b65b5184e3df81dbcf1cc1035a03054ef09a8563fe60877e4f078d0d2cad71aec73c1451196171f39f8e729059e91c7eed7b1402e03801c0b7e81815885
26 +DIST rust-1.31.1-aarch64-unknown-linux-gnu.tar.xz 117785172 BLAKE2B 91d8c525993b3d480a6575f5e9e5e84cd50acd74abb07dc2c1ed030113586189cfdd1e8e820c7449127b203cd67e943eca9564367c40d4ceff5013442cda7661 SHA512 c45aebda96a2df0e24efc7dc75cb913f6f92f6214582863367f3556a335d9a5ddf5bb487cb33dee7a48ab1d4dc986bd1fcf32f85b75d07558b1d18d89b26fd30
27 +DIST rust-1.31.1-arm-unknown-linux-gnueabi.tar.xz 124598180 BLAKE2B 0fd99225ef2148732a9ef1de928239608898f63ad1eb56c54e5cad23d5b2c257122dea26f560a0246b2b4c194a75aa67b9423097b1ab0d5f38a5dc05a31cbbf6 SHA512 3698ae14179ecd595a0afc2ac516da385ecee069eebccbd28935b380b4c3fd3970e56cd6f3da90c9ef2f10cf58c744f0bb711c4aaf7980e3ce15f4422a06155e
28 +DIST rust-1.31.1-arm-unknown-linux-gnueabihf.tar.xz 124897320 BLAKE2B 83a5674bedb463847bcdc8c0a23e233abaed16f8c0036629673f4d0468c4c58388e766d97c09eaa816cc65c387c143146728466ea23e0781d8b69cdc3704250f SHA512 6c5f34d4878e2154193da145216ca5b92ba4b7eac7f0c6ff30d0e9275a8d0399d5d508f0868dd78d7a8686298cd391ccec32f4586647abdb915c889220570977
29 +DIST rust-1.31.1-armv7-unknown-linux-gnueabihf.tar.xz 126152056 BLAKE2B 0ee424eeabdd5312ee81bee04cc53cbd6e3549024d8098cfec028d39d8948f1bc8661e519b65abd70b3349ee945514c2cf021bef8592d0dd40778bbb58891ed9 SHA512 78b1681f44274c9a0bf62c7646c5a2c85164c5f4dd4349a757b512dd82d435a4f2779c4b6653c8c3f66986512438d1b23e4af15defbbe9f489c0119141ef1942
30 +DIST rust-1.31.1-i686-unknown-linux-gnu.tar.xz 147063596 BLAKE2B 308d53c592bda4795cca0003c0ee6775a28d58f9644db1b517fe395b2380ae07dae33efb6aef8df40a75ef7a73e026c4bcd4f64a18333d975a75277a77726f2b SHA512 ee2c2bb2c1bb0f6e7f8eaeb4b2f0a8de7f53e8da675ec05cb56cab9bc4faa18b7075f5843226d7f9459e1208cc3fb1b90c65063b4a5a3828b04f8ff3c93ebe39
31 +DIST rust-1.31.1-mips-unknown-linux-gnu.tar.xz 115663720 BLAKE2B ea9864e1a950a1e86bc9677fa50b4652c2e196926e00396fedc83673336ae3bcd995d6e192c83a963096338812575f6297bed0f1fff0c664c04dfff34e540545 SHA512 b65b98b5af8466c572c623d01898be1a570c23d31f29b74f04d96d279e3788d3562f182aba376d93ce242557ad9fd6678dfe02ee744727da4dc04e0a1284ad64
32 +DIST rust-1.31.1-mips64-unknown-linux-gnuabi64.tar.xz 120650332 BLAKE2B 2ff61ca5ac7485fb0c6af54baab44462ed5f516986d59711a9d4d0d0e2831a2a008f8b0a97dd2eb2f93b62c18dd2acb312a09df3d11d2556e5bde2b088f1636a SHA512 bcb22d7fe48f847d56b02d43e59fbec7b3d52577d294e3e51b4b675a2c31a7384de2fd3e3d0147744b1d6f43eafe47c78a511d50e3af8d4d982c85b079383486
33 +DIST rust-1.31.1-mipsel-unknown-linux-gnu.tar.xz 117636088 BLAKE2B 0994ffca63e7c87f210ee14c9bf21db802a8365ff707dc670507acf6f8dc428eaef6b87fc3f7ddc347fc7f830e484f698bc8bf90720463b29b72bad69d63a5ee SHA512 2e301a35ba5443e6cd7db0a985a88bb4145a5b60acda0ce0feced9b4d87f32f4b23fa7b0db9dc5b420bf13db688409abdb1e192684684addab94c9662ad0eda7
34 +DIST rust-1.31.1-powerpc-unknown-linux-gnu.tar.xz 113293336 BLAKE2B c38dd3f1329533ccfac224e23fcca05866e5fbaa025840be6adfe9a36fbcd86330f073ec7f7bfabecf80ed4e812e8e67a6af5d6a936cb130dad6a14621917d05 SHA512 2900ed20006bdad0078c2e6751b769cc48984d36b43151c1510b6a6a46e50492c23c495777b0f160b338d96311b646f15a6175f5dcdc572fa96be87ea22f86ec
35 +DIST rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz 122297864 BLAKE2B 3cc4e867e3a16f182dbb6a35f1c69bda2e8e56763a5b32fdc96ef7a00654f1426d8f9efd658d804e9d8fa8d8cd60dd8db8894e0c2ea40753a973b4a2279d2ce8 SHA512 9a4427735e345d5e8f860ceab497c0ea3efd001c04322f5d2ecf0d5ac76e27feb1a247bb42662446ae39bf52eca75455b01a4c27341d6241406aa6feab1d1d4b
36 +DIST rust-1.31.1-powerpc64le-unknown-linux-gnu.tar.xz 125272712 BLAKE2B 5a1cb8226ac6209c451841b2ae40ecf452d14fefb7ce8f5f0e681a2f08954d643628b28ceae03e7a164f5fd5415a408843bb2ddcd86b9e3486b7ddbbd3b6bb99 SHA512 e64f586b632b85d07e18c61e5ce18a69404d89e302ecd8b4495e09e2b2f62bd3f32455b3d0d81cfa2d0031c003f23797421587cf6f314ce5b18b12157e1e9a3b
37 +DIST rust-1.31.1-s390x-unknown-linux-gnu.tar.xz 127867704 BLAKE2B be4b097506561db4f84db4e8b6224dbcd104f15bb95f7ec56b5c0410b85cc8de8f8b559760d7c01d274b7d031354349eed7b49a816fe404ea319d238af64b932 SHA512 ce6999f7d27468143a9a288fd1bda9f3ec42475f8b8473518be41358a2144317abf8076ed9527a10db94b5b89cf920f04217ce7a78ec214aa3e073a8419675bc
38 +DIST rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz 148394364 BLAKE2B 92b1860f1d0e2da0fc1755a8ed3f6d351da84103220a8fb560e862375b8ad03485299b42ed4448e6f661bb61650480815f20267ffa3d999c2910bc27b80900ae SHA512 3bf37bc419acd7820c7e33d7b44e6cba7f3b556ca8880fee2f65b1648596f069e0bc590a3a7acc10c60a0328f83787a172650d9c26cf21aa14782dcd9a97ec3a
39 DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7
40 DIST rustc-1.29.2-src.tar.xz 61888912 BLAKE2B f59b0bf45caa6f6136f92ffbaa612bbc6a340c8694ec69d75aadace9180c36753f985641915524388b52cc108f8f5b71840ee3a6c0b1fcff6decb61d2d8a161e SHA512 d8fa9501764348ace8f60f2069bcd016925abe56c8bbc2b87fb52ff796e4bc7284c1fccbb1671416437bb82fde7d9240eeae875d6099914e27e75cfe050e2d38
41 DIST rustc-1.30.1-src.tar.xz 96086232 BLAKE2B 170767b64efe670086e7c4e73838b489a155a72c703148f83cad29d401a825a94a1def3aa462ba527e1bd08181c7a9be0e404c25f012906541c3d739eb57e9e5 SHA512 e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
42 DIST rustc-1.31.1-src.tar.xz 96915864 BLAKE2B bedfe1d56e2f99bb43b4b652d540aedf0a86c47b8493f28fb29e5af3135ff469ed40775bc2ee25ac5bd28a264ecba0094d7c9b6aae25ea365ed3e6f354ffa40b SHA512 d6688711452295c41468af214f036499074d82fbeedc3f03560275219c2fae910e623e38e3210176d86f78ba5533ea098da5ff21532c8ad1a5aac132bb74ee02
43 +DIST rustc-1.32.0-src.tar.xz 99602696 BLAKE2B ab26247e3ecb75dbe373254c1c49f46c00a5a4db2b9cedffccb30122ea3b7de2761d6995b5423d0105caf85cc9542b4c21d487385faa34c835398c3320ccbd3b SHA512 487c405fed6430f62d2d0c38b65f6223b1c5074c7a0d3734dc8b3bb72fca255f5727e49541749569713a0c3e9a67eff574ba5698e8dceca6f0ef20b50f99aa42
44
45 diff --git a/dev-lang/rust/rust-1.32.0.ebuild b/dev-lang/rust/rust-1.32.0.ebuild
46 new file mode 100644
47 index 00000000000..8b125eb86e3
48 --- /dev/null
49 +++ b/dev-lang/rust/rust-1.32.0.ebuild
50 @@ -0,0 +1,295 @@
51 +# Copyright 1999-2019 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=6
55 +
56 +PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
57 +
58 +inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs
59 +
60 +if [[ ${PV} = *beta* ]]; then
61 + betaver=${PV//*beta}
62 + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
63 + MY_P="rustc-beta"
64 + SLOT="beta/${PV}"
65 + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz"
66 +else
67 + ABI_VER="$(ver_cut 1-2)"
68 + SLOT="stable/${ABI_VER}"
69 + MY_P="rustc-${PV}"
70 + SRC="${MY_P}-src.tar.xz"
71 + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
72 +fi
73 +
74 +RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
75 +
76 +DESCRIPTION="Systems programming language from Mozilla"
77 +HOMEPAGE="https://www.rust-lang.org/"
78 +
79 +SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
80 + $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION})"
81 +
82 +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
83 + NVPTX PowerPC Sparc SystemZ X86 XCore )
84 +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
85 +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
86 +
87 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
88 +
89 +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}"
90 +
91 +COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
92 + sys-libs/zlib
93 + !libressl? ( dev-libs/openssl:0= )
94 + libressl? ( dev-libs/libressl:0= )
95 + net-libs/libssh2
96 + net-libs/http-parser:=
97 + net-misc/curl[ssl]
98 + system-llvm? ( >=sys-devel/llvm-6:= )"
99 +DEPEND="${COMMON_DEPEND}
100 + ${PYTHON_DEPS}
101 + || (
102 + >=sys-devel/gcc-4.7
103 + >=sys-devel/clang-3.5
104 + )
105 + dev-util/cmake"
106 +RDEPEND="${COMMON_DEPEND}
107 + !dev-util/cargo
108 + rustfmt? ( !dev-util/rustfmt )"
109 +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
110 + x86? ( cpu_flags_x86_sse2 )"
111 +
112 +S="${WORKDIR}/${MY_P}-src"
113 +
114 +PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch )
115 +
116 +toml_usex() {
117 + usex "$1" true false
118 +}
119 +
120 +pre_build_checks() {
121 + CHECKREQS_DISK_BUILD="7G"
122 + CHECKREQS_MEMORY="4G"
123 + eshopts_push -s extglob
124 + if is-flagq '-g?(gdb)?([1-9])'; then
125 + CHECKREQS_DISK_BUILD="10G"
126 + CHECKREQS_MEMORY="16G"
127 + fi
128 + eshopts_pop
129 + check-reqs_pkg_setup
130 +}
131 +
132 +pkg_pretend() {
133 + pre_build_checks
134 +}
135 +
136 +pkg_setup() {
137 + pre_build_checks
138 + python-any-r1_pkg_setup
139 + if use system-llvm; then
140 + llvm_pkg_setup
141 + fi
142 +}
143 +
144 +src_prepare() {
145 + local rust_stage0_root="${WORKDIR}"/rust-stage0
146 +
147 + local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
148 +
149 + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
150 +
151 + default
152 +}
153 +
154 +src_configure() {
155 + local rust_target="" rust_targets="" arch_cflags
156 +
157 + # Collect rust target names to compile standard libs for all ABIs.
158 + for v in $(multilib_get_enabled_abi_pairs); do
159 + rust_targets="${rust_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\""
160 + done
161 + if use wasm; then
162 + rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
163 + fi
164 + rust_targets="${rust_targets#,}"
165 +
166 + local extended="true" tools="\"cargo\","
167 + if use clippy; then
168 + tools="\"clippy\",$tools"
169 + fi
170 + if use rls; then
171 + tools="\"rls\",\"analysis\",\"src\",$tools"
172 + fi
173 + if use rustfmt; then
174 + tools="\"rustfmt\",$tools"
175 + fi
176 +
177 + local rust_stage0_root="${WORKDIR}"/rust-stage0
178 +
179 + rust_target="$(rust_abi)"
180 +
181 + cat <<- EOF > "${S}"/config.toml
182 + [llvm]
183 + optimize = $(toml_usex !debug)
184 + release-debuginfo = $(toml_usex debug)
185 + assertions = $(toml_usex debug)
186 + targets = "${LLVM_TARGETS// /;}"
187 + link-shared = $(toml_usex system-llvm)
188 + [build]
189 + build = "${rust_target}"
190 + host = ["${rust_target}"]
191 + target = [${rust_targets}]
192 + cargo = "${rust_stage0_root}/bin/cargo"
193 + rustc = "${rust_stage0_root}/bin/rustc"
194 + docs = $(toml_usex doc)
195 + submodules = false
196 + python = "${EPYTHON}"
197 + locked-deps = true
198 + vendor = true
199 + extended = ${extended}
200 + tools = [${tools}]
201 + [install]
202 + prefix = "${EPREFIX}/usr"
203 + libdir = "$(get_libdir)/${P}"
204 + docdir = "share/doc/${P}"
205 + mandir = "share/${P}/man"
206 + [rust]
207 + optimize = $(toml_usex !debug)
208 + debuginfo = $(toml_usex debug)
209 + debug-assertions = $(toml_usex debug)
210 + default-linker = "$(tc-getCC)"
211 + channel = "stable"
212 + rpath = false
213 + lld = $(toml_usex wasm)
214 + EOF
215 +
216 + for v in $(multilib_get_enabled_abi_pairs); do
217 + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
218 + arch_cflags="$(get_abi_CFLAGS ${v##*.})"
219 +
220 + cat <<- EOF >> "${S}"/config.env
221 + CFLAGS_${rust_target}=${arch_cflags}
222 + EOF
223 +
224 + cat <<- EOF >> "${S}"/config.toml
225 + [target.${rust_target}]
226 + cc = "$(tc-getBUILD_CC)"
227 + cxx = "$(tc-getBUILD_CXX)"
228 + linker = "$(tc-getCC)"
229 + ar = "$(tc-getAR)"
230 + EOF
231 + if use system-llvm; then
232 + cat <<- EOF >> "${S}"/config.toml
233 + llvm-config = "$(get_llvm_prefix)/bin/llvm-config"
234 + EOF
235 + fi
236 + done
237 +
238 + if use wasm; then
239 + cat <<- EOF >> "${S}"/config.toml
240 + [target.wasm32-unknown-unknown]
241 + linker = "rust-lld"
242 + EOF
243 + fi
244 +}
245 +
246 +src_compile() {
247 + env $(cat "${S}"/config.env)\
248 + "${EPYTHON}" ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
249 + --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
250 +}
251 +
252 +src_install() {
253 + local rust_target abi_libdir
254 +
255 + env DESTDIR="${D}" "${EPYTHON}" ./x.py install || die
256 +
257 + mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
258 + mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
259 + mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
260 + mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
261 + mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
262 + if use clippy; then
263 + mv "${D}/usr/bin/clippy-driver" "${D}/usr/bin/clippy-driver-${PV}" || die
264 + mv "${D}/usr/bin/cargo-clippy" "${D}/usr/bin/cargo-clippy-${PV}" || die
265 + fi
266 + if use rls; then
267 + mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
268 + fi
269 + if use rustfmt; then
270 + mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
271 + mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
272 + fi
273 +
274 + # Copy shared library versions of standard libraries for all targets
275 + # into the system's abi-dependent lib directories because the rust
276 + # installer only does so for the native ABI.
277 + for v in $(multilib_get_enabled_abi_pairs); do
278 + if [ ${v##*.} = ${DEFAULT_ABI} ]; then
279 + continue
280 + fi
281 + abi_libdir=$(get_abi_LIBDIR ${v##*.})
282 + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
283 + mkdir -p "${D}/usr/${abi_libdir}"
284 + cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \
285 + "${D}/usr/${abi_libdir}" || die
286 + done
287 +
288 + dodoc COPYRIGHT
289 +
290 + # FIXME:
291 + # Really not sure if that env is needed, specailly LDPATH
292 + cat <<-EOF > "${T}"/50${P}
293 + LDPATH="/usr/$(get_libdir)/${P}"
294 + MANPATH="/usr/share/${P}/man"
295 + EOF
296 + doenvd "${T}"/50${P}
297 +
298 + cat <<-EOF > "${T}/provider-${P}"
299 + /usr/bin/rustdoc
300 + /usr/bin/rust-gdb
301 + /usr/bin/rust-lldb
302 + EOF
303 + echo /usr/bin/cargo >> "${T}/provider-${P}"
304 + if use clippy; then
305 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
306 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
307 + fi
308 + if use rls; then
309 + echo /usr/bin/rls >> "${T}/provider-${P}"
310 + fi
311 + if use rustfmt; then
312 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
313 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
314 + fi
315 + dodir /etc/env.d/rust
316 + insinto /etc/env.d/rust
317 + doins "${T}/provider-${P}"
318 +}
319 +
320 +pkg_postinst() {
321 + eselect rust update --if-unset
322 +
323 + elog "Rust installs a helper script for calling GDB and LLDB,"
324 + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
325 +
326 + ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo."
327 + ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some"
328 + ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'."
329 +
330 + if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
331 + elog "install app-emacs/rust-mode to get emacs support for rust."
332 + fi
333 +
334 + if has_version app-editors/gvim || has_version app-editors/vim; then
335 + elog "install app-vim/rust-vim to get vim support for rust."
336 + fi
337 +
338 + if has_version 'app-shells/zsh'; then
339 + elog "install app-shells/rust-zshcomp to get zsh completion for rust."
340 + fi
341 +}
342 +
343 +pkg_postrm() {
344 + eselect rust unset --if-invalid
345 +}