1 |
commit: cbf4ec339aaf9496c6dfb41aad0ba05c2afb09e8 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 11 02:41:44 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 11 04:37:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbf4ec33 |
7 |
|
8 |
sys-devel/rust-std: bump to 1.47.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
12 |
|
13 |
sys-devel/rust-std/Manifest | 1 + |
14 |
sys-devel/rust-std/rust-std-1.47.0.ebuild | 154 ++++++++++++++++++++++++++++++ |
15 |
2 files changed, 155 insertions(+) |
16 |
|
17 |
diff --git a/sys-devel/rust-std/Manifest b/sys-devel/rust-std/Manifest |
18 |
index 4a83cef970c..5c548978160 100644 |
19 |
--- a/sys-devel/rust-std/Manifest |
20 |
+++ b/sys-devel/rust-std/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST rustc-1.46.0-src.tar.xz 101868452 BLAKE2B da9798596b124a10d79c236a871228f05e5f571d22c2259328e7026c91e088c85f5de9c0536a16531e0cb10477bfcd16d3ac11467979f5561cb6199442b877ef SHA512 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 |
23 |
+DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 |
24 |
|
25 |
diff --git a/sys-devel/rust-std/rust-std-1.47.0.ebuild b/sys-devel/rust-std/rust-std-1.47.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..8138b790c50 |
28 |
--- /dev/null |
29 |
+++ b/sys-devel/rust-std/rust-std-1.47.0.ebuild |
30 |
@@ -0,0 +1,154 @@ |
31 |
+# Copyright 2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
37 |
+ |
38 |
+inherit flag-o-matic multiprocessing python-any-r1 rust-toolchain toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="Rust standard library, standalone (for crossdev)" |
41 |
+HOMEPAGE="https://www.rust-lang.org" |
42 |
+SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz" |
43 |
+ |
44 |
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" |
45 |
+SLOT="stable/$(ver_cut 1-2)" |
46 |
+# please do not keyword |
47 |
+#KEYWORDS="" #nowarn |
48 |
+IUSE="debug" |
49 |
+ |
50 |
+BDEPEND=" |
51 |
+ ${PYTHON_DEPS} |
52 |
+ ~dev-lang/rust-${PV}:= |
53 |
+" |
54 |
+ |
55 |
+DEPEND="|| |
56 |
+ ( |
57 |
+ >="${CATEGORY}"/gcc-4.7:* |
58 |
+ >="${CATEGORY}"/clang-3.5:* |
59 |
+ ) |
60 |
+" |
61 |
+ |
62 |
+RDEPEND="${DEPEND}" |
63 |
+ |
64 |
+# need full compiler to run tests |
65 |
+RESTRICT="test" |
66 |
+ |
67 |
+QA_FLAGS_IGNORED="usr/lib/rust/${PV}/rustlib/.*/lib/lib.*.so" |
68 |
+ |
69 |
+S="${WORKDIR}/${P/-std/c}-src" |
70 |
+ |
71 |
+# |
72 |
+# The cross magic |
73 |
+# |
74 |
+export CTARGET=${CTARGET:-${CHOST}} |
75 |
+if [[ ${CTARGET} == ${CHOST} ]] ; then |
76 |
+ if [[ ${CATEGORY} == cross-* ]] ; then |
77 |
+ export CTARGET=${CATEGORY#cross-} |
78 |
+ fi |
79 |
+fi |
80 |
+ |
81 |
+is_cross() { |
82 |
+ [[ ${CHOST} != ${CTARGET} ]] |
83 |
+} |
84 |
+ |
85 |
+toml_usex() { |
86 |
+ usex "$1" true false |
87 |
+} |
88 |
+ |
89 |
+pkg_pretend() { |
90 |
+ is_cross || die "${PN} should only be used for cross" |
91 |
+} |
92 |
+ |
93 |
+pkg_setup() { |
94 |
+ python-any-r1_pkg_setup |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ default |
99 |
+} |
100 |
+ |
101 |
+src_configure() { |
102 |
+ # do the great cleanup |
103 |
+ strip-flags |
104 |
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' '-m32' '-m64' |
105 |
+ strip-unsupported-flags |
106 |
+ |
107 |
+ local rust_root x |
108 |
+ rust_root="$(rustc --print sysroot)" |
109 |
+ rtarget="$(rust_abi ${CTARGET})" |
110 |
+ rtarget="${ERUST_STD_RTARGET:-${rtarget}}" # some targets need to be custom. |
111 |
+ rbuild="$(rust_abi ${CBUILD})" |
112 |
+ rhost="$(rust_abi ${CHOST})" |
113 |
+ |
114 |
+ echo |
115 |
+ for x in CATEGORY rust_root rbuild rhost rtarget RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS; do |
116 |
+ einfo "$(printf '%10s' ${x^^}:) ${!x}" |
117 |
+ done |
118 |
+ |
119 |
+ cat <<- EOF > "${S}"/config.toml |
120 |
+ [build] |
121 |
+ build = "${rbuild}" |
122 |
+ host = ["${rhost}"] |
123 |
+ target = ["${rtarget}"] |
124 |
+ cargo = "${rust_root}/bin/cargo" |
125 |
+ rustc = "${rust_root}/bin/rustc" |
126 |
+ submodules = false |
127 |
+ python = "${EPYTHON}" |
128 |
+ locked-deps = true |
129 |
+ vendor = true |
130 |
+ extended = true |
131 |
+ verbose = 2 |
132 |
+ cargo-native-static = false |
133 |
+ [install] |
134 |
+ prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" |
135 |
+ sysconfdir = "etc" |
136 |
+ docdir = "share/doc/rust" |
137 |
+ bindir = "bin" |
138 |
+ libdir = "lib" |
139 |
+ mandir = "share/man" |
140 |
+ [rust] |
141 |
+ # https://github.com/rust-lang/rust/issues/54872 |
142 |
+ codegen-units-std = 1 |
143 |
+ optimize = true |
144 |
+ debug = $(toml_usex debug) |
145 |
+ debug-assertions = $(toml_usex debug) |
146 |
+ debuginfo-level-rustc = 0 |
147 |
+ backtrace = true |
148 |
+ incremental = false |
149 |
+ default-linker = "$(tc-getCC)" |
150 |
+ rpath = false |
151 |
+ dist-src = false |
152 |
+ remap-debuginfo = true |
153 |
+ jemalloc = false |
154 |
+ [dist] |
155 |
+ src-tarball = false |
156 |
+ [target.${rtarget}] |
157 |
+ cc = "$(tc-getCC ${CTARGET})" |
158 |
+ cxx = "$(tc-getCXX ${CTARGET})" |
159 |
+ linker = "$(tc-getCC ${CTARGET})" |
160 |
+ ar = "$(tc-getAR ${CTARGET})" |
161 |
+ $(usex elibc_musl 'crt-static = false' '') |
162 |
+ EOF |
163 |
+ |
164 |
+ einfo "${PN^} configured with the following settings:" |
165 |
+ cat "${S}"/config.toml || die |
166 |
+} |
167 |
+ |
168 |
+src_compile() { |
169 |
+ env RUST_BACKTRACE=1 \ |
170 |
+ "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ |
171 |
+ src/libstd --stage 0 || die |
172 |
+} |
173 |
+ |
174 |
+src_test() { |
175 |
+ ewarn "${PN} can't run tests" |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ local rustlib="lib/rust/${PV}/rustlib" |
180 |
+ dodir "/usr/${rustlib}" |
181 |
+ pushd "build/${rhost}/stage0-sysroot/${rustlib}" > /dev/null || die |
182 |
+ cp -pPRv "${rtarget}" "${ED}/usr/${rustlib}" || die |
183 |
+ popd > /dev/null || die |
184 |
+} |