void-packages/srcpkgs/firefox-esr/patches/rust-has-i128.patch
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

21 lines
676 B
Diff

The configure check fails for cross builds.
i128 is supported since rust-1.26, so it is safe for us to assume it is always present
--- a/third_party/rust/num-traits/build.rs 2020-02-14 23:57:25.985355610 +0100
+++ b/third_party/rust/num-traits/build.rs 2020-02-14 23:58:36.255710188 +0100
@@ -1,14 +1,5 @@
-extern crate autocfg;
-
-use std::env;
-
fn main() {
- let ac = autocfg::new();
- if ac.probe_type("i128") {
- println!("cargo:rustc-cfg=has_i128");
- } else if env::var_os("CARGO_FEATURE_I128").is_some() {
- panic!("i128 support was not detected!");
- }
+ println!("cargo:rustc-cfg=has_i128");
autocfg::rerun_path("build.rs");
}