1 |
commit: 6cc6b342e1ea418297bf922e6810ad8fe302e6e0 |
2 |
Author: stefson <herrtimson <AT> yahoo <DOT> de> |
3 |
AuthorDate: Thu Oct 31 08:10:20 2019 +0000 |
4 |
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 31 09:44:23 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=6cc6b342 |
7 |
|
8 |
dev-lang/rust: update patch from pr65932 |
9 |
|
10 |
Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com> |
11 |
Closes: https://github.com/gentoo/gentoo-rust/pull/460 |
12 |
Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org> |
13 |
|
14 |
dev-lang/rust/files/pr65932.patch | 62 ++++++++++++++++++++++++++++++++++++++- |
15 |
1 file changed, 61 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-lang/rust/files/pr65932.patch b/dev-lang/rust/files/pr65932.patch |
18 |
index 8d8497a..b383e34 100644 |
19 |
--- a/dev-lang/rust/files/pr65932.patch |
20 |
+++ b/dev-lang/rust/files/pr65932.patch |
21 |
@@ -1,7 +1,7 @@ |
22 |
From f59c3fdc0906d2af60b52e9d5782f2e3cf39ad03 Mon Sep 17 00:00:00 2001 |
23 |
From: Guanqun Lu <guanqun.lu@×××××.com> |
24 |
Date: Tue, 29 Oct 2019 16:48:05 +0800 |
25 |
-Subject: [PATCH] download .tar.xz if python3 is used |
26 |
+Subject: [PATCH 1/3] download .tar.xz if python3 is used |
27 |
|
28 |
--- |
29 |
src/bootstrap/bootstrap.py | 21 ++++++++++++--------- |
30 |
@@ -77,3 +77,63 @@ index 4caf36a6f2a5..efde8bd6ce10 100644 |
31 |
|
32 |
@staticmethod |
33 |
def fix_executable(fname): |
34 |
+ |
35 |
+From afd1a575fc561c60dc640ebc4b4bbb0ffe2f127e Mon Sep 17 00:00:00 2001 |
36 |
+From: Guanqun Lu <guanqun.lu@×××××.com> |
37 |
+Date: Wed, 30 Oct 2019 23:01:46 +0800 |
38 |
+Subject: [PATCH 2/3] python3 only has lzma support after 3.3 |
39 |
+ |
40 |
+--- |
41 |
+ src/bootstrap/bootstrap.py | 2 +- |
42 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
43 |
+ |
44 |
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py |
45 |
+index efde8bd6ce10..06c439082c76 100644 |
46 |
+--- a/src/bootstrap/bootstrap.py |
47 |
++++ b/src/bootstrap/bootstrap.py |
48 |
+@@ -329,7 +329,7 @@ def __init__(self): |
49 |
+ self.rust_root = '' |
50 |
+ self.use_locked_deps = '' |
51 |
+ self.use_vendored_sources = '' |
52 |
+- self.tarball_suffix = '.tar.gz' if sys.version_info[0] == 2 else '.tar.xz' |
53 |
++ self.tarball_suffix = '.tar.xz' if sys.version_info[0:2] >= (3, 3) else '.tar.gz' |
54 |
+ self.verbose = False |
55 |
+ |
56 |
+ def download_stage0(self): |
57 |
+ |
58 |
+From bbb5ac2ff22de6d8021aa200270af2cdc92e4d0d Mon Sep 17 00:00:00 2001 |
59 |
+From: Guanqun Lu <guanqun.lu@×××××.com> |
60 |
+Date: Thu, 31 Oct 2019 12:13:51 +0800 |
61 |
+Subject: [PATCH 3/3] try import lzma to detect if xz is supported |
62 |
+ |
63 |
+--- |
64 |
+ src/bootstrap/bootstrap.py | 8 +++++++- |
65 |
+ 1 file changed, 7 insertions(+), 1 deletion(-) |
66 |
+ |
67 |
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py |
68 |
+index 06c439082c76..a192e3a1cc00 100644 |
69 |
+--- a/src/bootstrap/bootstrap.py |
70 |
++++ b/src/bootstrap/bootstrap.py |
71 |
+@@ -314,6 +314,12 @@ def output(filepath): |
72 |
+ shutil.copy2(tmp, filepath) |
73 |
+ os.remove(tmp) |
74 |
+ |
75 |
++def supports_lzma(): |
76 |
++ try: |
77 |
++ import lzma |
78 |
++ return True |
79 |
++ except ImportError: |
80 |
++ return False |
81 |
+ |
82 |
+ class RustBuild(object): |
83 |
+ """Provide all the methods required to build Rust""" |
84 |
+@@ -329,7 +335,7 @@ def __init__(self): |
85 |
+ self.rust_root = '' |
86 |
+ self.use_locked_deps = '' |
87 |
+ self.use_vendored_sources = '' |
88 |
+- self.tarball_suffix = '.tar.xz' if sys.version_info[0:2] >= (3, 3) else '.tar.gz' |
89 |
++ self.tarball_suffix = '.tar.xz' if supports_lzma() else '.tar.gz' |
90 |
+ self.verbose = False |
91 |
+ |
92 |
+ def download_stage0(self): |
93 |
+ |