commit: 6cc6b342e1ea418297bf922e6810ad8fe302e6e0 Author: stefson <herrtimson <AT> yahoo <DOT> de> AuthorDate: Thu Oct 31 08:10:20 2019 +0000 Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org> CommitDate: Thu Oct 31 09:44:23 2019 +0000 URL: https://gitweb.gentoo.org/repo/proj/rust.git/commit/?id=6cc6b342
dev-lang/rust: update patch from pr65932 Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com> Closes: https://github.com/gentoo/gentoo-rust/pull/460 Signed-off-by: Mikhail Pukhlikov <cynede <AT> gentoo.org> dev-lang/rust/files/pr65932.patch | 62 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/dev-lang/rust/files/pr65932.patch b/dev-lang/rust/files/pr65932.patch index 8d8497a..b383e34 100644 --- a/dev-lang/rust/files/pr65932.patch +++ b/dev-lang/rust/files/pr65932.patch @@ -1,7 +1,7 @@ From f59c3fdc0906d2af60b52e9d5782f2e3cf39ad03 Mon Sep 17 00:00:00 2001 From: Guanqun Lu <guanqun...@gmail.com> Date: Tue, 29 Oct 2019 16:48:05 +0800 -Subject: [PATCH] download .tar.xz if python3 is used +Subject: [PATCH 1/3] download .tar.xz if python3 is used --- src/bootstrap/bootstrap.py | 21 ++++++++++++--------- @@ -77,3 +77,63 @@ index 4caf36a6f2a5..efde8bd6ce10 100644 @staticmethod def fix_executable(fname): + +From afd1a575fc561c60dc640ebc4b4bbb0ffe2f127e Mon Sep 17 00:00:00 2001 +From: Guanqun Lu <guanqun...@gmail.com> +Date: Wed, 30 Oct 2019 23:01:46 +0800 +Subject: [PATCH 2/3] python3 only has lzma support after 3.3 + +--- + src/bootstrap/bootstrap.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index efde8bd6ce10..06c439082c76 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -329,7 +329,7 @@ def __init__(self): + self.rust_root = '' + self.use_locked_deps = '' + self.use_vendored_sources = '' +- self.tarball_suffix = '.tar.gz' if sys.version_info[0] == 2 else '.tar.xz' ++ self.tarball_suffix = '.tar.xz' if sys.version_info[0:2] >= (3, 3) else '.tar.gz' + self.verbose = False + + def download_stage0(self): + +From bbb5ac2ff22de6d8021aa200270af2cdc92e4d0d Mon Sep 17 00:00:00 2001 +From: Guanqun Lu <guanqun...@gmail.com> +Date: Thu, 31 Oct 2019 12:13:51 +0800 +Subject: [PATCH 3/3] try import lzma to detect if xz is supported + +--- + src/bootstrap/bootstrap.py | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py +index 06c439082c76..a192e3a1cc00 100644 +--- a/src/bootstrap/bootstrap.py ++++ b/src/bootstrap/bootstrap.py +@@ -314,6 +314,12 @@ def output(filepath): + shutil.copy2(tmp, filepath) + os.remove(tmp) + ++def supports_lzma(): ++ try: ++ import lzma ++ return True ++ except ImportError: ++ return False + + class RustBuild(object): + """Provide all the methods required to build Rust""" +@@ -329,7 +335,7 @@ def __init__(self): + self.rust_root = '' + self.use_locked_deps = '' + self.use_vendored_sources = '' +- self.tarball_suffix = '.tar.xz' if sys.version_info[0:2] >= (3, 3) else '.tar.gz' ++ self.tarball_suffix = '.tar.xz' if supports_lzma() else '.tar.gz' + self.verbose = False + + def download_stage0(self): +