diff options
Diffstat (limited to 'www/firefox/patches/patch-build_moz.configure_rust.configure')
-rw-r--r-- | www/firefox/patches/patch-build_moz.configure_rust.configure | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/www/firefox/patches/patch-build_moz.configure_rust.configure b/www/firefox/patches/patch-build_moz.configure_rust.configure new file mode 100644 index 00000000000..ece538c4096 --- /dev/null +++ b/www/firefox/patches/patch-build_moz.configure_rust.configure @@ -0,0 +1,44 @@ +$NetBSD: patch-build_moz.configure_rust.configure,v 1.1 2017/06/14 11:28:44 ryoon Exp $ + +--- build/moz.configure/rust.configure.orig 2017-06-05 20:45:15.000000000 +0000 ++++ build/moz.configure/rust.configure +@@ -4,10 +4,20 @@ + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + +-# Rust is required by `rust_compiler` below. We allow_missing here +-# to propagate failures to the better error message there. +-rustc = check_prog('RUSTC', ['rustc'], allow_missing=True) +-cargo = check_prog('CARGO', ['cargo'], allow_missing=True) ++option('--disable-rust', help='Don\'t include Rust language sources') ++ ++@depends('--enable-rust') ++def rust_compiler_names(value): ++ if value: ++ return ['rustc'] ++ ++@depends('--enable-rust') ++def cargo_binary_names(value): ++ if value: ++ return ['cargo'] ++ ++rustc = check_prog('RUSTC', rust_compiler_names, allow_missing=True) ++cargo = check_prog('CARGO', cargo_binary_names, allow_missing=True) + + @depends_if(rustc) + @checking('rustc version', lambda info: info.version) +@@ -43,9 +53,12 @@ def cargo_info(cargo): + version=Version(version), + ) + +-@depends(rustc_info, cargo_info) ++@depends('--enable-rust', rustc_info, cargo_info) + @imports(_from='textwrap', _import='dedent') +-def rust_compiler(rustc_info, cargo_info): ++def rust_compiler(value, rustc_info, cargo_info): ++ if not value: ++ return None ++ + if not rustc_info: + die(dedent('''\ + Rust compiler not found. |