1 |
commit: 2c45b2b04a2ab980615e660872c8cf9f371a6843 |
2 |
Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 29 13:09:33 2018 +0000 |
4 |
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 29 13:22:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c45b2b0 |
7 |
|
8 |
dev-lang/rust-bin: version bump to 1.29.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
Signed-off-by: Dirkjan Ochtman <djc <AT> gentoo.org> |
13 |
|
14 |
dev-lang/rust-bin/Manifest | 6 ++ |
15 |
dev-lang/rust-bin/metadata.xml | 1 + |
16 |
dev-lang/rust-bin/rust-bin-1.29.1.ebuild | 176 +++++++++++++++++++++++++++++++ |
17 |
3 files changed, 183 insertions(+) |
18 |
|
19 |
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest |
20 |
index 55be30adaab..559e4a78b2e 100644 |
21 |
--- a/dev-lang/rust-bin/Manifest |
22 |
+++ b/dev-lang/rust-bin/Manifest |
23 |
@@ -19,3 +19,9 @@ DIST rust-1.28.0-arm-unknown-linux-gnueabihf.tar.xz 104992084 BLAKE2B df97766d7a |
24 |
DIST rust-1.28.0-armv7-unknown-linux-gnueabihf.tar.xz 105144132 BLAKE2B d9e0791c7dc77ade26d383a5c57117a2b7b50c6a523b31fbf604c0b779c966c5055554f85c718353f2e581bfe8a228369671a8b731f808bc0133ad3fad61f853 SHA512 9142110e0c24657aca41468648d9364c2e6fce60b08ca7113c944a53701fc5a309481a8fdd5845b229bcc750ccad63af561d452c3a3a0727ab1ca7a461b06d3d |
25 |
DIST rust-1.28.0-i686-unknown-linux-gnu.tar.xz 136925948 BLAKE2B 85d9239533920c3f16d7c61bada0caeabceceade29032b70bb4562bfd04fa0158cdd85b8a0a1119506416fa5916ade8a0466bf6c10da457299a6319aa25f9dd6 SHA512 ffdfab46db14f07354b553e02fdb9dc6602c2c52b78d8f17c499f4ddb1e257aa53479df836eb3f06a2548d34296b0277cdb6b4c6f3cec57265823df22752c135 |
26 |
DIST rust-1.28.0-x86_64-unknown-linux-gnu.tar.xz 134120432 BLAKE2B 56fb79a98659d9c8e56b8eef87dea3302ee5901bc4507d1c204628370b20cf34b2875c9586faa0acc2bc2b1a5beedeb9b5ba199cfb85d52f268f084a02f04f27 SHA512 4f427c11a9cd22aedd01bd7ed5bee2ba5e00a27db25af4f596cf8627d88eff8e72625eb83729d2e6c6780aaffd44c0e7065a1c8fa22f4899349b72c726cf6a5f |
27 |
+DIST rust-1.29.1-aarch64-unknown-linux-gnu.tar.xz 100127240 BLAKE2B 32bebfcb3fe9c12bc0404d1a7980d09a3e96117d93eccc3f76601a4a06ff5ab9d4627bc50ce00b6c69723379a2ebf3e3f25b9724b1bd2dc00c001b28fd70b916 SHA512 fae658f99069b599e3ec17e5a6b80f3c726937dd4751e375a003583ac6feeeb5f68bdd9e55c8ab84a0974607a45e08eaaad9e373f5a9b4bc172d2c986664d671 |
28 |
+DIST rust-1.29.1-arm-unknown-linux-gnueabi.tar.xz 105764732 BLAKE2B 552c0df65a1ca1ff094d25ddbdaf6e50b4faa1123677b796eb6a5aec2f8cba7f9ede9611aa2e7ffd7c4e39d578f166e73e4c9916a8db7a7652b006364ea78601 SHA512 cd5ea55b3c4f67deeb9a2688fea6800ebac1bbabfa5ce8d37f6ca0c1628cde9770831a0ec894309ca86dfed9faa3949c479e5b546abfaebcc6431f7709f487b2 |
29 |
+DIST rust-1.29.1-arm-unknown-linux-gnueabihf.tar.xz 106051860 BLAKE2B 65d9a5f75540cdfedf89ebbe30f04fce964a3e1d27479a8393924c5b6a1cd77883c7d54b9e1634378febe6a2ec3ec04f6ba403e15afc43e6cc5b32902932ba57 SHA512 aea98cbe613abf8fbba45806356a26776bc369c4100658fc613bf730d7f7ed6aeb413cbfefa5eb77da80008dce95264b8bcbe420804b32ad577c5821203fe151 |
30 |
+DIST rust-1.29.1-armv7-unknown-linux-gnueabihf.tar.xz 106372416 BLAKE2B 25371071e52a585c3f0b99f5849cf674aedd6d024ce75f6bf7b0d88f485d715b42d6a0f5eb8871890240d1c2488d7ad75c8ac7b4b22dd88e3ce2d049d35ae8ee SHA512 0067476eb0972998cee33f27d8fd6ef51c497bd6edbbd8a289fcf768da525805646569ed029318d4be6ecb6aece6669e3554eb30a14e1d31f2a3e7d5896b14c3 |
31 |
+DIST rust-1.29.1-i686-unknown-linux-gnu.tar.xz 150811536 BLAKE2B 999997d268cbbb5485d8efde108462bb0086ed9428a9b7ba8136dac764cd871a39d9503f6b928ce5fd9f1cdbf20dd109877f4404cb4522ccb2d37bfd55b15664 SHA512 8dc2a3b7fb1eef4b009541c473b767d07ab1136b933495b22e3fa56925def80b141b4801ce362ce9986a559fda4299fea35dd4bd7209dc1b3425b44421605df8 |
32 |
+DIST rust-1.29.1-x86_64-unknown-linux-gnu.tar.xz 148184680 BLAKE2B be64a44619807be3151162e45cefe79242e965277606b7aac4f0456d34e4cb526b1779c327499c47c484a830c4c566ab1aeaef30cf17ae7d2bdc89ecbf1f5de5 SHA512 69809c2ae77be6a1f71a5f14cea74dee6ac59bb548bc8ed454819ce3db38146ad64b83a6bf2a6d5cea68c807bc8ecf6c7929c4f8365b419e40a23022074efa16 |
33 |
|
34 |
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml |
35 |
index 3407a1ae8de..5252c49ea5c 100644 |
36 |
--- a/dev-lang/rust-bin/metadata.xml |
37 |
+++ b/dev-lang/rust-bin/metadata.xml |
38 |
@@ -7,6 +7,7 @@ |
39 |
</maintainer> |
40 |
<use> |
41 |
<flag name="cargo">Install cargo component</flag> |
42 |
+ <flag name="clippy">Install clippy component</flag> |
43 |
<flag name="rustfmt">Install rustfmt component</flag> |
44 |
</use> |
45 |
</pkgmetadata> |
46 |
|
47 |
diff --git a/dev-lang/rust-bin/rust-bin-1.29.1.ebuild b/dev-lang/rust-bin/rust-bin-1.29.1.ebuild |
48 |
new file mode 100644 |
49 |
index 00000000000..857b9fca313 |
50 |
--- /dev/null |
51 |
+++ b/dev-lang/rust-bin/rust-bin-1.29.1.ebuild |
52 |
@@ -0,0 +1,176 @@ |
53 |
+# Copyright 1999-2018 Gentoo Foundation |
54 |
+# Distributed under the terms of the GNU General Public License v2 |
55 |
+ |
56 |
+EAPI=6 |
57 |
+ |
58 |
+inherit eutils bash-completion-r1 versionator toolchain-funcs |
59 |
+ |
60 |
+MY_P="rust-${PV}" |
61 |
+ |
62 |
+DESCRIPTION="Systems programming language from Mozilla" |
63 |
+HOMEPAGE="https://www.rust-lang.org/" |
64 |
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz ) |
65 |
+ arm? ( |
66 |
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz |
67 |
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz |
68 |
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz |
69 |
+ ) |
70 |
+ arm64? ( https://static.rust-lang.org/dist/${MY_P}-aarch64-unknown-linux-gnu.tar.xz ) |
71 |
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )" |
72 |
+ |
73 |
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
74 |
+SLOT="stable" |
75 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
76 |
+IUSE="cargo clippy doc libressl rustfmt" |
77 |
+ |
78 |
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" |
79 |
+ |
80 |
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 |
81 |
+ !dev-lang/rust:0 |
82 |
+ cargo? ( !dev-util/cargo ) |
83 |
+ rustfmt? ( !dev-util/rustfmt ) |
84 |
+" |
85 |
+RDEPEND="${DEPEND} |
86 |
+ cargo? ( |
87 |
+ sys-libs/zlib |
88 |
+ !libressl? ( dev-libs/openssl:0= ) |
89 |
+ libressl? ( dev-libs/libressl:0= ) |
90 |
+ net-libs/libssh2 |
91 |
+ net-libs/http-parser:= |
92 |
+ net-misc/curl[ssl] |
93 |
+ )" |
94 |
+PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )" |
95 |
+ |
96 |
+QA_PREBUILT=" |
97 |
+ opt/${P}/bin/*-${PV} |
98 |
+ opt/${P}/lib/*.so |
99 |
+ opt/${P}/lib/rustlib/*/lib/*.so |
100 |
+ opt/${P}/lib/rustlib/*/lib/*.rlib* |
101 |
+" |
102 |
+ |
103 |
+pkg_pretend () { |
104 |
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then |
105 |
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version." |
106 |
+ fi |
107 |
+} |
108 |
+ |
109 |
+src_unpack() { |
110 |
+ default |
111 |
+ |
112 |
+ local postfix |
113 |
+ use amd64 && postfix=x86_64-unknown-linux-gnu |
114 |
+ |
115 |
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then |
116 |
+ postfix=arm-unknown-linux-gnueabi |
117 |
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then |
118 |
+ postfix=arm-unknown-linux-gnueabihf |
119 |
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then |
120 |
+ postfix=armv7-unknown-linux-gnueabihf |
121 |
+ fi |
122 |
+ |
123 |
+ use arm64 && postfix=aarch64-unknown-linux-gnu |
124 |
+ use x86 && postfix=i686-unknown-linux-gnu |
125 |
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ local std=$(grep 'std' ./components) |
130 |
+ local components="rustc,${std}" |
131 |
+ use doc && components="${components},rust-docs" |
132 |
+ use cargo && components="${components},cargo" |
133 |
+ use clippy && components="${components},clippy-preview" |
134 |
+ use rustfmt && components="${components},rustfmt-preview" |
135 |
+ ./install.sh \ |
136 |
+ --components="${components}" \ |
137 |
+ --disable-verify \ |
138 |
+ --prefix="${D}/opt/${P}" \ |
139 |
+ --mandir="${D}/usr/share/${P}/man" \ |
140 |
+ --disable-ldconfig \ |
141 |
+ || die |
142 |
+ |
143 |
+ local rustc=rustc-bin-${PV} |
144 |
+ local rustdoc=rustdoc-bin-${PV} |
145 |
+ local rustgdb=rust-gdb-bin-${PV} |
146 |
+ local rustlldb=rust-lldb-bin-${PV} |
147 |
+ |
148 |
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die |
149 |
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die |
150 |
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die |
151 |
+ mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die |
152 |
+ |
153 |
+ dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}" |
154 |
+ dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}" |
155 |
+ dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}" |
156 |
+ dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}" |
157 |
+ |
158 |
+ if use cargo; then |
159 |
+ local cargo=cargo-bin-${PV} |
160 |
+ mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die |
161 |
+ dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}" |
162 |
+ fi |
163 |
+ if use clippy; then |
164 |
+ local clippy_driver=clippy-driver-bin-${PV} |
165 |
+ local cargo_clippy=cargo-clippy-bin-${PV} |
166 |
+ mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die |
167 |
+ mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die |
168 |
+ dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}" |
169 |
+ dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}" |
170 |
+ fi |
171 |
+ if use rustfmt; then |
172 |
+ local rustfmt=rustfmt-bin-${PV} |
173 |
+ local cargo_fmt=cargo-fmt-bin-${PV} |
174 |
+ mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die |
175 |
+ mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die |
176 |
+ dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}" |
177 |
+ dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}" |
178 |
+ fi |
179 |
+ |
180 |
+ cat <<-EOF > "${T}"/50${P} |
181 |
+ LDPATH="/opt/${P}/lib" |
182 |
+ MANPATH="/usr/share/${P}/man" |
183 |
+ EOF |
184 |
+ doenvd "${T}"/50${P} |
185 |
+ |
186 |
+ cat <<-EOF > "${T}/provider-${P}" |
187 |
+ /usr/bin/rustdoc |
188 |
+ /usr/bin/rust-gdb |
189 |
+ /usr/bin/rust-lldb |
190 |
+ EOF |
191 |
+ if use cargo; then |
192 |
+ echo /usr/bin/cargo >> "${T}/provider-${P}" |
193 |
+ fi |
194 |
+ if use clippy; then |
195 |
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}" |
196 |
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" |
197 |
+ fi |
198 |
+ if use rustfmt; then |
199 |
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}" |
200 |
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |
201 |
+ fi |
202 |
+ dodir /etc/env.d/rust |
203 |
+ insinto /etc/env.d/rust |
204 |
+ doins "${T}/provider-${P}" |
205 |
+} |
206 |
+ |
207 |
+pkg_postinst() { |
208 |
+ eselect rust update --if-unset |
209 |
+ |
210 |
+ elog "Rust installs a helper script for calling GDB now," |
211 |
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}," |
212 |
+ |
213 |
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then |
214 |
+ elog "install app-emacs/rust-mode to get emacs support for rust." |
215 |
+ fi |
216 |
+ |
217 |
+ if has_version app-editors/gvim || has_version app-editors/vim; then |
218 |
+ elog "install app-vim/rust-vim to get vim support for rust." |
219 |
+ fi |
220 |
+ |
221 |
+ if has_version 'app-shells/zsh'; then |
222 |
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust." |
223 |
+ fi |
224 |
+} |
225 |
+ |
226 |
+pkg_postrm() { |
227 |
+ eselect rust unset --if-invalid |
228 |
+} |