1 |
commit: 5bbd64bd5a9b84a1a33a9bbcf7b725d26d947a50 |
2 |
Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 5 13:08:58 2018 +0000 |
4 |
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 5 13:10:58 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bbd64bd |
7 |
|
8 |
dev-lang/rust: remove old, vulnerable versions of rust |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=666976 |
11 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=662904 |
12 |
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
14 |
|
15 |
dev-lang/rust/Manifest | 8 -- |
16 |
dev-lang/rust/metadata.xml | 2 - |
17 |
dev-lang/rust/rust-1.25.0.ebuild | 172 ---------------------- |
18 |
dev-lang/rust/rust-1.28.0-r1.ebuild | 276 ------------------------------------ |
19 |
dev-lang/rust/rust-1.28.0.ebuild | 268 ---------------------------------- |
20 |
5 files changed, 726 deletions(-) |
21 |
|
22 |
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest |
23 |
index 9a79c051edc..2cb3a292859 100644 |
24 |
--- a/dev-lang/rust/Manifest |
25 |
+++ b/dev-lang/rust/Manifest |
26 |
@@ -1,12 +1,4 @@ |
27 |
-DIST rust-1.24.0-aarch64-unknown-linux-gnu.tar.gz 184157362 BLAKE2B 68b1b9471b6d26dbb2c3bf897d2bffc15d2fcd1fde774d4f23389e9ccb96fc60d8ec8c343b5f93651bced05bdf228d549c747f3f3d4de9c8232e99aa1b6bef6a SHA512 d15548a7b21ca4605ff24d098a59414548a315acd736ac4d8ac845399c9febdd810ba76fdf2dd9336325bd749866ee72f3d8c7c573b04a4d932d00cd7cac34c0 |
28 |
-DIST rust-1.24.0-i686-unknown-linux-gnu.tar.gz 193631843 BLAKE2B f19e9f717f5626b2267da4e661b53f45f7948a83a25156239af3cadb1184bf39669171364754f1787cdb78c3b62bd145bff1e3f4c3c7890f0dd52839bd8ae923 SHA512 3806bee5dccc080fae437bbc7f2e2062803244eb57c25e5e591e46279810c661bf016a4043e0af991b49b9e09a5d81ec275a852c3647a474507b03846d76aac0 |
29 |
-DIST rust-1.24.0-x86_64-unknown-linux-gnu.tar.gz 199663002 BLAKE2B 2373637eb4410c07328b3cbaecb56ca465956ec1a2f14786e00922d74c4e68760538383960080348be003bee656761f5bbd0aa871ea21e22d029b3f8ab5344a7 SHA512 63ecb84b31f586c85e25229fb673892567edc2f557ac2ca1958caf3e26aa4e6c9a55b410aeeeadf1a61a5ebd66a517106e942f923a2884ce69ee92aec622187b |
30 |
-DIST rust-1.27.2-aarch64-unknown-linux-gnu.tar.xz 94186748 BLAKE2B 7e8f46128a7638217ef63caf479e1a6d9ebde7a225b7dad55082eb06e0206f0b1a5efa65badb15127a456ddc39702482407bbb9171a11397a31bc7c85d2cbcfa SHA512 84022350f1e8fc34a353a09848333424a557ddea3b9445a1a5fc9d2f2abced942154e80888ab4091174d6d83c6766f583ef240ab2e2233de5d536633d2765040 |
31 |
-DIST rust-1.27.2-i686-unknown-linux-gnu.tar.xz 144776012 BLAKE2B 98883f45637adf0920543da8951f29bf5ab11d1f39e9f4154b77e882eadce26ec5e8ed3e9bdcf560f8009fbaab4b7255ba8eb8eeb8beadad39ec6fa74b6dde45 SHA512 e17960120bdd18a527c0783ce8ca8d76cdc9b436f36a73a82fd2ea709b253f33feeb88310fab7a86305bad403eb5dad7ea43d0e5bc5ad1e3847f29e85040303a |
32 |
-DIST rust-1.27.2-x86_64-unknown-linux-gnu.tar.xz 144218956 BLAKE2B 40834086f211dd64ec76be37eb477697ff44783f261f0b9bfc10b46cc340cf3c15adf80d39a9df642b4985ea1239ad7f1d1803a44f3bd3d53f073bdc38a1de0e SHA512 14861392dad81d2c040d0deb64d5dd34652d5cc2875e404609a0f13c8fb6bdc38f9bc7b1e309829365a00c42b610f2b7a73cffa232ecfdf0618b5508a8667198 |
33 |
DIST rust-1.28.0-aarch64-unknown-linux-gnu.tar.xz 98937652 BLAKE2B 836d3dd4e583fa50dd317c3bea56257e6ea19defdb38c16be6debb2854e147c8a92c4832263e4ac314136022a176526fe7d3774a3c5a84cd8d364cd2a1532860 SHA512 8d9acbc90ddaa1e0de0234a21798b19b5365ea371a12f9a143c6ebacbb48f57344da6e827e867513be502bce2801de27a0dbbacdf8618c653aeb58026b6c469c |
34 |
DIST rust-1.28.0-i686-unknown-linux-gnu.tar.xz 136925948 BLAKE2B 85d9239533920c3f16d7c61bada0caeabceceade29032b70bb4562bfd04fa0158cdd85b8a0a1119506416fa5916ade8a0466bf6c10da457299a6319aa25f9dd6 SHA512 ffdfab46db14f07354b553e02fdb9dc6602c2c52b78d8f17c499f4ddb1e257aa53479df836eb3f06a2548d34296b0277cdb6b4c6f3cec57265823df22752c135 |
35 |
DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f |
36 |
-DIST rustc-1.25.0-src.tar.gz 98639156 BLAKE2B 1408d5dd0611d4830de3b6b3d00e3fad4198a47599b639d0ac0bd05aaba401f743056a942e9df04a4d192c6b12e8cfe9a9cdf8cd26e48b72104ce9b423df049e SHA512 7d8886f4d5a621eb794e814deb60be681fa38cf086f87ffa14e5a3500c640b237c549a632de1331a0f1b71963de41f6d31a4df3866b7e597424002316fed81ce |
37 |
-DIST rustc-1.28.0-src.tar.xz 55838968 BLAKE2B 1ff1f54dbae8c6481a6467d35b7c7dc340eba5e8c34f08ecb7b2300239c98a70c8459dacb8c8932ab6d9b3e2770e5b3508e23db7b01ff6014b7dbc076cf1de94 SHA512 a4885cd42a1006738cca2f0d8c0d5e4fd4014fc4629cbf691935bd36ffb896c553717022e67532359b5f1bd8e5050fc38b9dffed7c45cc76f7089ec134dfb980 |
38 |
DIST rustc-1.29.1-src.tar.xz 61937676 BLAKE2B 6a60249538e1ec62471f4d0e3fc31c0a648433aa6f85ca7341657ea07772e338eb92a629941685808f4b80e84cb025d78aee9d0d6fa71c6635a1647c61bca9bc SHA512 1ded651b4c460e11e5e44c26de88a80fb13c2000097de2ee1e5af89638e12a7e8f43dd756689d4cc4fad45c52d4d43a3c70dd6a3ae550735b9dad5f8defea6a7 |
39 |
|
40 |
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml |
41 |
index 8b63f5a12fc..8da6b2e99de 100644 |
42 |
--- a/dev-lang/rust/metadata.xml |
43 |
+++ b/dev-lang/rust/metadata.xml |
44 |
@@ -6,8 +6,6 @@ |
45 |
<name>Rust Project</name> |
46 |
</maintainer> |
47 |
<use> |
48 |
- <flag name="extended">Build and install rls, rustfmt and cargo |
49 |
- alongside the compiler and stdlib</flag> |
50 |
<flag name="cargo">Install cargo component</flag> |
51 |
<flag name="clippy">Install clippy component</flag> |
52 |
<flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> as the |
53 |
|
54 |
diff --git a/dev-lang/rust/rust-1.25.0.ebuild b/dev-lang/rust/rust-1.25.0.ebuild |
55 |
deleted file mode 100644 |
56 |
index 37d8c394ea5..00000000000 |
57 |
--- a/dev-lang/rust/rust-1.25.0.ebuild |
58 |
+++ /dev/null |
59 |
@@ -1,172 +0,0 @@ |
60 |
-# Copyright 1999-2018 Gentoo Authors |
61 |
-# Distributed under the terms of the GNU General Public License v2 |
62 |
- |
63 |
-EAPI=6 |
64 |
- |
65 |
-PYTHON_COMPAT=( python2_7 ) |
66 |
- |
67 |
-inherit multiprocessing python-any-r1 versionator toolchain-funcs |
68 |
- |
69 |
-if [[ ${PV} = *beta* ]]; then |
70 |
- betaver=${PV//*beta} |
71 |
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" |
72 |
- MY_P="rustc-beta" |
73 |
- SLOT="beta/${PV}" |
74 |
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz" |
75 |
-else |
76 |
- ABI_VER="$(get_version_component_range 1-2)" |
77 |
- SLOT="stable/${ABI_VER}" |
78 |
- MY_P="rustc-${PV}" |
79 |
- SRC="${MY_P}-src.tar.gz" |
80 |
- KEYWORDS="amd64 ~arm64 x86" |
81 |
-fi |
82 |
- |
83 |
-CHOST_amd64=x86_64-unknown-linux-gnu |
84 |
-CHOST_x86=i686-unknown-linux-gnu |
85 |
-CHOST_arm64=aarch64-unknown-linux-gnu |
86 |
- |
87 |
-RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0" |
88 |
-RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}" |
89 |
-RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}" |
90 |
-RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}" |
91 |
- |
92 |
-CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" |
93 |
- |
94 |
-DESCRIPTION="Systems programming language from Mozilla" |
95 |
-HOMEPAGE="https://www.rust-lang.org/" |
96 |
- |
97 |
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz |
98 |
- amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz ) |
99 |
- x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz ) |
100 |
- arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.gz ) |
101 |
-" |
102 |
- |
103 |
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
104 |
- |
105 |
-IUSE="debug doc extended +jemalloc" |
106 |
- |
107 |
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 |
108 |
- jemalloc? ( dev-libs/jemalloc )" |
109 |
-DEPEND="${RDEPEND} |
110 |
- ${PYTHON_DEPS} |
111 |
- || ( |
112 |
- >=sys-devel/gcc-4.7 |
113 |
- >=sys-devel/clang-3.5 |
114 |
- ) |
115 |
- dev-util/cmake |
116 |
-" |
117 |
-PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )" |
118 |
- |
119 |
-S="${WORKDIR}/${MY_P}-src" |
120 |
- |
121 |
-toml_usex() { |
122 |
- usex "$1" true false |
123 |
-} |
124 |
- |
125 |
-src_prepare() { |
126 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
127 |
- |
128 |
- local rust_stage0_name="RUST_STAGE0_${ARCH}" |
129 |
- local rust_stage0="${!rust_stage0_name}" |
130 |
- |
131 |
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die |
132 |
- |
133 |
- default |
134 |
-} |
135 |
- |
136 |
-src_configure() { |
137 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
138 |
- |
139 |
- local rust_target_name="CHOST_${ARCH}" |
140 |
- local rust_target="${!rust_target_name}" |
141 |
- |
142 |
- cat <<- EOF > "${S}"/config.toml |
143 |
- [llvm] |
144 |
- optimize = $(toml_usex !debug) |
145 |
- release-debuginfo = $(toml_usex debug) |
146 |
- assertions = $(toml_usex debug) |
147 |
- [build] |
148 |
- build = "${rust_target}" |
149 |
- host = ["${rust_target}"] |
150 |
- target = ["${rust_target}"] |
151 |
- cargo = "${rust_stage0_root}/bin/cargo" |
152 |
- rustc = "${rust_stage0_root}/bin/rustc" |
153 |
- docs = $(toml_usex doc) |
154 |
- submodules = false |
155 |
- python = "${EPYTHON}" |
156 |
- locked-deps = true |
157 |
- vendor = true |
158 |
- verbose = 2 |
159 |
- extended = $(toml_usex extended) |
160 |
- [install] |
161 |
- prefix = "${EPREFIX}/usr" |
162 |
- libdir = "$(get_libdir)" |
163 |
- docdir = "share/doc/${P}" |
164 |
- mandir = "share/${P}/man" |
165 |
- [rust] |
166 |
- optimize = $(toml_usex !debug) |
167 |
- debuginfo = $(toml_usex debug) |
168 |
- debug-assertions = $(toml_usex debug) |
169 |
- use-jemalloc = $(toml_usex jemalloc) |
170 |
- default-linker = "$(tc-getCC)" |
171 |
- rpath = false |
172 |
- [target.${rust_target}] |
173 |
- cc = "$(tc-getBUILD_CC)" |
174 |
- cxx = "$(tc-getBUILD_CXX)" |
175 |
- linker = "$(tc-getCC)" |
176 |
- ar = "$(tc-getAR)" |
177 |
- EOF |
178 |
-} |
179 |
- |
180 |
-src_compile() { |
181 |
- ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die |
182 |
-} |
183 |
- |
184 |
-src_install() { |
185 |
- env DESTDIR="${D}" ./x.py install || die |
186 |
- |
187 |
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die |
188 |
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die |
189 |
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die |
190 |
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die |
191 |
- |
192 |
- dodoc COPYRIGHT |
193 |
- |
194 |
- cat <<-EOF > "${T}"/50${P} |
195 |
- LDPATH="/usr/$(get_libdir)/${P}" |
196 |
- MANPATH="/usr/share/${P}/man" |
197 |
- EOF |
198 |
- doenvd "${T}"/50${P} |
199 |
- |
200 |
- cat <<-EOF > "${T}/provider-${P}" |
201 |
- /usr/bin/rustdoc |
202 |
- /usr/bin/rust-gdb |
203 |
- /usr/bin/rust-lldb |
204 |
- EOF |
205 |
- dodir /etc/env.d/rust |
206 |
- insinto /etc/env.d/rust |
207 |
- doins "${T}/provider-${P}" |
208 |
-} |
209 |
- |
210 |
-pkg_postinst() { |
211 |
- eselect rust update --if-unset |
212 |
- |
213 |
- elog "Rust installs a helper script for calling GDB and LLDB," |
214 |
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." |
215 |
- |
216 |
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then |
217 |
- elog "install app-emacs/rust-mode to get emacs support for rust." |
218 |
- fi |
219 |
- |
220 |
- if has_version app-editors/gvim || has_version app-editors/vim; then |
221 |
- elog "install app-vim/rust-vim to get vim support for rust." |
222 |
- fi |
223 |
- |
224 |
- if has_version 'app-shells/zsh'; then |
225 |
- elog "install app-shells/rust-zshcomp to get zsh completion for rust." |
226 |
- fi |
227 |
-} |
228 |
- |
229 |
-pkg_postrm() { |
230 |
- eselect rust unset --if-invalid |
231 |
-} |
232 |
|
233 |
diff --git a/dev-lang/rust/rust-1.28.0-r1.ebuild b/dev-lang/rust/rust-1.28.0-r1.ebuild |
234 |
deleted file mode 100644 |
235 |
index 308474cfe15..00000000000 |
236 |
--- a/dev-lang/rust/rust-1.28.0-r1.ebuild |
237 |
+++ /dev/null |
238 |
@@ -1,276 +0,0 @@ |
239 |
-# Copyright 1999-2018 Gentoo Authors |
240 |
-# Distributed under the terms of the GNU General Public License v2 |
241 |
- |
242 |
-EAPI=6 |
243 |
- |
244 |
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy ) |
245 |
- |
246 |
-inherit multiprocessing multilib-build python-any-r1 toolchain-funcs versionator |
247 |
- |
248 |
-if [[ ${PV} = *beta* ]]; then |
249 |
- betaver=${PV//*beta} |
250 |
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" |
251 |
- MY_P="rustc-beta" |
252 |
- SLOT="beta/${PV}" |
253 |
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz" |
254 |
-else |
255 |
- ABI_VER="$(get_version_component_range 1-2)" |
256 |
- SLOT="stable/${ABI_VER}" |
257 |
- MY_P="rustc-${PV}" |
258 |
- SRC="${MY_P}-src.tar.xz" |
259 |
- KEYWORDS="amd64 ~arm64 ~x86" |
260 |
-fi |
261 |
- |
262 |
-CHOST_amd64=x86_64-unknown-linux-gnu |
263 |
-CHOST_x86=i686-unknown-linux-gnu |
264 |
-CHOST_arm64=aarch64-unknown-linux-gnu |
265 |
- |
266 |
-RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).2" |
267 |
-RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}" |
268 |
-RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}" |
269 |
-RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}" |
270 |
- |
271 |
-CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" |
272 |
- |
273 |
-DESCRIPTION="Systems programming language from Mozilla" |
274 |
-HOMEPAGE="https://www.rust-lang.org/" |
275 |
- |
276 |
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz |
277 |
- amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz ) |
278 |
- x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz ) |
279 |
- arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz ) |
280 |
-" |
281 |
- |
282 |
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
283 |
- NVPTX PowerPC Sparc SystemZ X86 XCore ) |
284 |
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
285 |
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
286 |
- |
287 |
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
288 |
- |
289 |
-IUSE="cargo debug doc +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}" |
290 |
- |
291 |
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 |
292 |
- jemalloc? ( dev-libs/jemalloc ) |
293 |
- cargo? ( |
294 |
- sys-libs/zlib |
295 |
- !libressl? ( dev-libs/openssl:0= ) |
296 |
- libressl? ( dev-libs/libressl:0= ) |
297 |
- net-libs/libssh2 |
298 |
- net-libs/http-parser |
299 |
- net-misc/curl[ssl] |
300 |
- )" |
301 |
-DEPEND="${RDEPEND} |
302 |
- ${PYTHON_DEPS} |
303 |
- || ( |
304 |
- >=sys-devel/gcc-4.7 |
305 |
- >=sys-devel/clang-3.5 |
306 |
- ) |
307 |
- cargo? ( !dev-util/cargo ) |
308 |
- rustfmt? ( !dev-util/rustfmt ) |
309 |
- dev-util/cmake |
310 |
-" |
311 |
-PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )" |
312 |
- |
313 |
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" |
314 |
- |
315 |
-S="${WORKDIR}/${MY_P}-src" |
316 |
- |
317 |
-toml_usex() { |
318 |
- usex "$1" true false |
319 |
-} |
320 |
- |
321 |
-src_prepare() { |
322 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
323 |
- |
324 |
- local rust_stage0_name="RUST_STAGE0_${ARCH}" |
325 |
- local rust_stage0="${!rust_stage0_name}" |
326 |
- |
327 |
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die |
328 |
- |
329 |
- default |
330 |
-} |
331 |
- |
332 |
-src_configure() { |
333 |
- local rust_target="" rust_targets="" rust_target_name arch_cflags |
334 |
- |
335 |
- # Collect rust target names to compile standard libs for all ABIs. |
336 |
- for v in $(multilib_get_enabled_abi_pairs); do |
337 |
- rust_target_name="CHOST_${v##*.}" |
338 |
- rust_targets="${rust_targets},\"${!rust_target_name}\"" |
339 |
- done |
340 |
- if use wasm; then |
341 |
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" |
342 |
- fi |
343 |
- rust_targets="${rust_targets#,}" |
344 |
- |
345 |
- local extended="false" tools="" |
346 |
- if use cargo; then |
347 |
- extended="true" |
348 |
- tools="\"cargo\"," |
349 |
- fi |
350 |
- if use rls; then |
351 |
- extended="true" |
352 |
- tools="\"rls\",$tools" |
353 |
- fi |
354 |
- if use rustfmt; then |
355 |
- extended="true" |
356 |
- tools="\"rustfmt\",$tools" |
357 |
- fi |
358 |
- |
359 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
360 |
- |
361 |
- rust_target_name="CHOST_${ARCH}" |
362 |
- rust_target="${!rust_target_name}" |
363 |
- |
364 |
- cat <<- EOF > "${S}"/config.toml |
365 |
- [llvm] |
366 |
- optimize = $(toml_usex !debug) |
367 |
- release-debuginfo = $(toml_usex debug) |
368 |
- assertions = $(toml_usex debug) |
369 |
- targets = "${LLVM_TARGETS// /;}" |
370 |
- [build] |
371 |
- build = "${rust_target}" |
372 |
- host = ["${rust_target}"] |
373 |
- target = [${rust_targets}] |
374 |
- cargo = "${rust_stage0_root}/bin/cargo" |
375 |
- rustc = "${rust_stage0_root}/bin/rustc" |
376 |
- docs = $(toml_usex doc) |
377 |
- submodules = false |
378 |
- python = "${EPYTHON}" |
379 |
- locked-deps = true |
380 |
- vendor = true |
381 |
- extended = ${extended} |
382 |
- tools = [${tools}] |
383 |
- [install] |
384 |
- prefix = "${EPREFIX}/usr" |
385 |
- libdir = "$(get_libdir)" |
386 |
- docdir = "share/doc/${P}" |
387 |
- mandir = "share/${P}/man" |
388 |
- [rust] |
389 |
- optimize = $(toml_usex !debug) |
390 |
- debuginfo = $(toml_usex debug) |
391 |
- debug-assertions = $(toml_usex debug) |
392 |
- use-jemalloc = $(toml_usex jemalloc) |
393 |
- default-linker = "$(tc-getCC)" |
394 |
- rpath = false |
395 |
- lld = $(toml_usex wasm) |
396 |
- EOF |
397 |
- |
398 |
- for v in $(multilib_get_enabled_abi_pairs); do |
399 |
- rust_target=$(get_abi_CHOST ${v##*.}) |
400 |
- arch_cflags="$(get_abi_CFLAGS ${v##*.})" |
401 |
- |
402 |
- cat <<- EOF >> "${S}"/config.env |
403 |
- CFLAGS_${rust_target}=${arch_cflags} |
404 |
- EOF |
405 |
- |
406 |
- cat <<- EOF >> "${S}"/config.toml |
407 |
- [target.${rust_target}] |
408 |
- cc = "$(tc-getBUILD_CC)" |
409 |
- cxx = "$(tc-getBUILD_CXX)" |
410 |
- linker = "$(tc-getCC)" |
411 |
- ar = "$(tc-getAR)" |
412 |
- EOF |
413 |
- done |
414 |
- |
415 |
- if use wasm; then |
416 |
- cat <<- EOF >> "${S}"/config.toml |
417 |
- [target.wasm32-unknown-unknown] |
418 |
- linker = "lld" |
419 |
- EOF |
420 |
- fi |
421 |
-} |
422 |
- |
423 |
-src_compile() { |
424 |
- env $(cat "${S}"/config.env)\ |
425 |
- ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \ |
426 |
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 |
427 |
-} |
428 |
- |
429 |
-src_install() { |
430 |
- local rust_target abi_libdir |
431 |
- |
432 |
- env DESTDIR="${D}" ./x.py install || die |
433 |
- |
434 |
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die |
435 |
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die |
436 |
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die |
437 |
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die |
438 |
- if use cargo; then |
439 |
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die |
440 |
- fi |
441 |
- if use rls; then |
442 |
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die |
443 |
- fi |
444 |
- if use rustfmt; then |
445 |
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die |
446 |
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die |
447 |
- fi |
448 |
- |
449 |
- # Copy shared library versions of standard libraries for all targets |
450 |
- # into the system's abi-dependent lib directories because the rust |
451 |
- # installer only does so for the native ABI. |
452 |
- for v in $(multilib_get_enabled_abi_pairs); do |
453 |
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then |
454 |
- continue |
455 |
- fi |
456 |
- abi_libdir=$(get_abi_LIBDIR ${v##*.}) |
457 |
- rust_target=$(get_abi_CHOST ${v##*.}) |
458 |
- mkdir -p "${D}/usr/${abi_libdir}" |
459 |
- cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \ |
460 |
- "${D}/usr/${abi_libdir}" || die |
461 |
- done |
462 |
- |
463 |
- dodoc COPYRIGHT |
464 |
- |
465 |
- # FIXME: |
466 |
- # Really not sure if that env is needed, specailly LDPATH |
467 |
- cat <<-EOF > "${T}"/50${P} |
468 |
- LDPATH="/usr/$(get_libdir)/${P}" |
469 |
- MANPATH="/usr/share/${P}/man" |
470 |
- EOF |
471 |
- doenvd "${T}"/50${P} |
472 |
- |
473 |
- cat <<-EOF > "${T}/provider-${P}" |
474 |
- /usr/bin/rustdoc |
475 |
- /usr/bin/rust-gdb |
476 |
- /usr/bin/rust-lldb |
477 |
- EOF |
478 |
- if use cargo; then |
479 |
- echo /usr/bin/cargo >> "${T}/provider-${P}" |
480 |
- fi |
481 |
- if use rls; then |
482 |
- echo /usr/bin/rls >> "${T}/provider-${P}" |
483 |
- fi |
484 |
- if use rustfmt; then |
485 |
- echo /usr/bin/rustfmt >> "${T}/provider-${P}" |
486 |
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |
487 |
- fi |
488 |
- dodir /etc/env.d/rust |
489 |
- insinto /etc/env.d/rust |
490 |
- doins "${T}/provider-${P}" |
491 |
-} |
492 |
- |
493 |
-pkg_postinst() { |
494 |
- eselect rust update --if-unset |
495 |
- |
496 |
- elog "Rust installs a helper script for calling GDB and LLDB," |
497 |
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." |
498 |
- |
499 |
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then |
500 |
- elog "install app-emacs/rust-mode to get emacs support for rust." |
501 |
- fi |
502 |
- |
503 |
- if has_version app-editors/gvim || has_version app-editors/vim; then |
504 |
- elog "install app-vim/rust-vim to get vim support for rust." |
505 |
- fi |
506 |
- |
507 |
- if has_version 'app-shells/zsh'; then |
508 |
- elog "install app-shells/rust-zshcomp to get zsh completion for rust." |
509 |
- fi |
510 |
-} |
511 |
- |
512 |
-pkg_postrm() { |
513 |
- eselect rust unset --if-invalid |
514 |
-} |
515 |
|
516 |
diff --git a/dev-lang/rust/rust-1.28.0.ebuild b/dev-lang/rust/rust-1.28.0.ebuild |
517 |
deleted file mode 100644 |
518 |
index a3139658c1b..00000000000 |
519 |
--- a/dev-lang/rust/rust-1.28.0.ebuild |
520 |
+++ /dev/null |
521 |
@@ -1,268 +0,0 @@ |
522 |
-# Copyright 1999-2018 Gentoo Authors |
523 |
-# Distributed under the terms of the GNU General Public License v2 |
524 |
- |
525 |
-EAPI=6 |
526 |
- |
527 |
-PYTHON_COMPAT=( python2_7 python3_{5,6} pypy ) |
528 |
- |
529 |
-inherit multiprocessing multilib-build python-any-r1 toolchain-funcs versionator |
530 |
- |
531 |
-if [[ ${PV} = *beta* ]]; then |
532 |
- betaver=${PV//*beta} |
533 |
- BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" |
534 |
- MY_P="rustc-beta" |
535 |
- SLOT="beta/${PV}" |
536 |
- SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz" |
537 |
-else |
538 |
- ABI_VER="$(get_version_component_range 1-2)" |
539 |
- SLOT="stable/${ABI_VER}" |
540 |
- MY_P="rustc-${PV}" |
541 |
- SRC="${MY_P}-src.tar.xz" |
542 |
- KEYWORDS="~amd64 ~arm64 ~x86" |
543 |
-fi |
544 |
- |
545 |
-CHOST_amd64=x86_64-unknown-linux-gnu |
546 |
-CHOST_x86=i686-unknown-linux-gnu |
547 |
-CHOST_arm64=aarch64-unknown-linux-gnu |
548 |
- |
549 |
-RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).2" |
550 |
-RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}" |
551 |
-RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}" |
552 |
-RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}" |
553 |
- |
554 |
-CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" |
555 |
- |
556 |
-DESCRIPTION="Systems programming language from Mozilla" |
557 |
-HOMEPAGE="https://www.rust-lang.org/" |
558 |
- |
559 |
-SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz |
560 |
- amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz ) |
561 |
- x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz ) |
562 |
- arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz ) |
563 |
-" |
564 |
- |
565 |
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 |
566 |
- NVPTX PowerPC Sparc SystemZ X86 XCore ) |
567 |
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) |
568 |
-LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} |
569 |
- |
570 |
-LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
571 |
- |
572 |
-IUSE="cargo debug doc +jemalloc rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}" |
573 |
- |
574 |
-RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 |
575 |
- jemalloc? ( dev-libs/jemalloc )" |
576 |
-DEPEND="${RDEPEND} |
577 |
- ${PYTHON_DEPS} |
578 |
- || ( |
579 |
- >=sys-devel/gcc-4.7 |
580 |
- >=sys-devel/clang-3.5 |
581 |
- ) |
582 |
- cargo? ( !dev-util/cargo ) |
583 |
- rustfmt? ( !dev-util/rustfmt ) |
584 |
- dev-util/cmake |
585 |
-" |
586 |
-PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )" |
587 |
- |
588 |
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )" |
589 |
- |
590 |
-S="${WORKDIR}/${MY_P}-src" |
591 |
- |
592 |
-toml_usex() { |
593 |
- usex "$1" true false |
594 |
-} |
595 |
- |
596 |
-src_prepare() { |
597 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
598 |
- |
599 |
- local rust_stage0_name="RUST_STAGE0_${ARCH}" |
600 |
- local rust_stage0="${!rust_stage0_name}" |
601 |
- |
602 |
- "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die |
603 |
- |
604 |
- default |
605 |
-} |
606 |
- |
607 |
-src_configure() { |
608 |
- local rust_target="" rust_targets="" rust_target_name arch_cflags |
609 |
- |
610 |
- # Collect rust target names to compile standard libs for all ABIs. |
611 |
- for v in $(multilib_get_enabled_abi_pairs); do |
612 |
- rust_target_name="CHOST_${v##*.}" |
613 |
- rust_targets="${rust_targets},\"${!rust_target_name}\"" |
614 |
- done |
615 |
- if use wasm; then |
616 |
- rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" |
617 |
- fi |
618 |
- rust_targets="${rust_targets#,}" |
619 |
- |
620 |
- local extended="false" tools="" |
621 |
- if use cargo; then |
622 |
- extended="true" |
623 |
- tools="\"cargo\"," |
624 |
- fi |
625 |
- if use rls; then |
626 |
- extended="true" |
627 |
- tools="\"rls\",$tools" |
628 |
- fi |
629 |
- if use rustfmt; then |
630 |
- extended="true" |
631 |
- tools="\"rustfmt\",$tools" |
632 |
- fi |
633 |
- |
634 |
- local rust_stage0_root="${WORKDIR}"/rust-stage0 |
635 |
- |
636 |
- rust_target_name="CHOST_${ARCH}" |
637 |
- rust_target="${!rust_target_name}" |
638 |
- |
639 |
- cat <<- EOF > "${S}"/config.toml |
640 |
- [llvm] |
641 |
- optimize = $(toml_usex !debug) |
642 |
- release-debuginfo = $(toml_usex debug) |
643 |
- assertions = $(toml_usex debug) |
644 |
- targets = "${LLVM_TARGETS// /;}" |
645 |
- [build] |
646 |
- build = "${rust_target}" |
647 |
- host = ["${rust_target}"] |
648 |
- target = [${rust_targets}] |
649 |
- cargo = "${rust_stage0_root}/bin/cargo" |
650 |
- rustc = "${rust_stage0_root}/bin/rustc" |
651 |
- docs = $(toml_usex doc) |
652 |
- submodules = false |
653 |
- python = "${EPYTHON}" |
654 |
- locked-deps = true |
655 |
- vendor = true |
656 |
- extended = ${extended} |
657 |
- tools = [${tools}] |
658 |
- [install] |
659 |
- prefix = "${EPREFIX}/usr" |
660 |
- libdir = "$(get_libdir)" |
661 |
- docdir = "share/doc/${P}" |
662 |
- mandir = "share/${P}/man" |
663 |
- [rust] |
664 |
- optimize = $(toml_usex !debug) |
665 |
- debuginfo = $(toml_usex debug) |
666 |
- debug-assertions = $(toml_usex debug) |
667 |
- use-jemalloc = $(toml_usex jemalloc) |
668 |
- default-linker = "$(tc-getCC)" |
669 |
- rpath = false |
670 |
- lld = $(toml_usex wasm) |
671 |
- EOF |
672 |
- |
673 |
- for v in $(multilib_get_enabled_abi_pairs); do |
674 |
- rust_target=$(get_abi_CHOST ${v##*.}) |
675 |
- arch_cflags="$(get_abi_CFLAGS ${v##*.})" |
676 |
- |
677 |
- cat <<- EOF >> "${S}"/config.env |
678 |
- CFLAGS_${rust_target}=${arch_cflags} |
679 |
- EOF |
680 |
- |
681 |
- cat <<- EOF >> "${S}"/config.toml |
682 |
- [target.${rust_target}] |
683 |
- cc = "$(tc-getBUILD_CC)" |
684 |
- cxx = "$(tc-getBUILD_CXX)" |
685 |
- linker = "$(tc-getCC)" |
686 |
- ar = "$(tc-getAR)" |
687 |
- EOF |
688 |
- done |
689 |
- |
690 |
- if use wasm; then |
691 |
- cat <<- EOF >> "${S}"/config.toml |
692 |
- [target.wasm32-unknown-unknown] |
693 |
- linker = "lld" |
694 |
- EOF |
695 |
- fi |
696 |
-} |
697 |
- |
698 |
-src_compile() { |
699 |
- env $(cat "${S}"/config.env)\ |
700 |
- ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \ |
701 |
- --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 |
702 |
-} |
703 |
- |
704 |
-src_install() { |
705 |
- local rust_target abi_libdir |
706 |
- |
707 |
- env DESTDIR="${D}" ./x.py install || die |
708 |
- |
709 |
- mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die |
710 |
- mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die |
711 |
- mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die |
712 |
- mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die |
713 |
- if use cargo; then |
714 |
- mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die |
715 |
- fi |
716 |
- if use rls; then |
717 |
- mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die |
718 |
- fi |
719 |
- if use rustfmt; then |
720 |
- mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die |
721 |
- mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die |
722 |
- fi |
723 |
- |
724 |
- # Copy shared library versions of standard libraries for all targets |
725 |
- # into the system's abi-dependent lib directories because the rust |
726 |
- # installer only does so for the native ABI. |
727 |
- for v in $(multilib_get_enabled_abi_pairs); do |
728 |
- if [ ${v##*.} = ${DEFAULT_ABI} ]; then |
729 |
- continue |
730 |
- fi |
731 |
- abi_libdir=$(get_abi_LIBDIR ${v##*.}) |
732 |
- rust_target=$(get_abi_CHOST ${v##*.}) |
733 |
- mkdir -p "${D}/usr/${abi_libdir}" |
734 |
- cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \ |
735 |
- "${D}/usr/${abi_libdir}" || die |
736 |
- done |
737 |
- |
738 |
- dodoc COPYRIGHT |
739 |
- |
740 |
- # FIXME: |
741 |
- # Really not sure if that env is needed, specailly LDPATH |
742 |
- cat <<-EOF > "${T}"/50${P} |
743 |
- LDPATH="/usr/$(get_libdir)/${P}" |
744 |
- MANPATH="/usr/share/${P}/man" |
745 |
- EOF |
746 |
- doenvd "${T}"/50${P} |
747 |
- |
748 |
- cat <<-EOF > "${T}/provider-${P}" |
749 |
- /usr/bin/rustdoc |
750 |
- /usr/bin/rust-gdb |
751 |
- /usr/bin/rust-lldb |
752 |
- EOF |
753 |
- if use cargo; then |
754 |
- echo /usr/bin/cargo >> "${T}/provider-${P}" |
755 |
- fi |
756 |
- if use rls; then |
757 |
- echo /usr/bin/rls >> "${T}/provider-${P}" |
758 |
- fi |
759 |
- if use rustfmt; then |
760 |
- echo /usr/bin/rustfmt >> "${T}/provider-${P}" |
761 |
- echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |
762 |
- fi |
763 |
- dodir /etc/env.d/rust |
764 |
- insinto /etc/env.d/rust |
765 |
- doins "${T}/provider-${P}" |
766 |
-} |
767 |
- |
768 |
-pkg_postinst() { |
769 |
- eselect rust update --if-unset |
770 |
- |
771 |
- elog "Rust installs a helper script for calling GDB and LLDB," |
772 |
- elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." |
773 |
- |
774 |
- if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then |
775 |
- elog "install app-emacs/rust-mode to get emacs support for rust." |
776 |
- fi |
777 |
- |
778 |
- if has_version app-editors/gvim || has_version app-editors/vim; then |
779 |
- elog "install app-vim/rust-vim to get vim support for rust." |
780 |
- fi |
781 |
- |
782 |
- if has_version 'app-shells/zsh'; then |
783 |
- elog "install app-shells/rust-zshcomp to get zsh completion for rust." |
784 |
- fi |
785 |
-} |
786 |
- |
787 |
-pkg_postrm() { |
788 |
- eselect rust unset --if-invalid |
789 |
-} |