diff options
author | stefson <herrtimson@yahoo.de> | 2019-10-31 09:10:20 +0100 |
---|---|---|
committer | Mikhail Pukhlikov <cynede@gentoo.org> | 2019-10-31 13:44:23 +0400 |
commit | 6cc6b342e1ea418297bf922e6810ad8fe302e6e0 (patch) | |
tree | 3e9c09392c9ea01af8e6b8ff21418db0a368f756 | |
parent | dev-lang/rust: add upstream fix from pr65932 (diff) | |
download | rust-6cc6b342e1ea418297bf922e6810ad8fe302e6e0.tar.gz rust-6cc6b342e1ea418297bf922e6810ad8fe302e6e0.tar.bz2 rust-6cc6b342e1ea418297bf922e6810ad8fe302e6e0.zip |
dev-lang/rust: update patch from pr65932
Signed-off-by: Steffen Kuhn <nielson2@yandex.com>
Closes: https://github.com/gentoo/gentoo-rust/pull/460
Signed-off-by: Mikhail Pukhlikov <cynede@gentoo.org>
-rw-r--r-- | dev-lang/rust/files/pr65932.patch | 62 |
1 files changed, 61 insertions, 1 deletions
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.lu@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.lu@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.lu@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): + |