void-packages/srcpkgs/firefox-esr/patches/fix-cross.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

16 lines
603 B
Diff

terrible hack to fix cross builds
overwrite HOST_* flags to get rid of -MF
note: this patch was used from firefox-77 until 80, dropped with the update to 81
--- a/third_party/rust/glslopt/build.rs
+++ b/third_party/rust/glslopt/build.rs
@@ -28,6 +28,8 @@
env::remove_var(format!("CXXFLAGS_{}", &target));
env::remove_var(format!("CFLAGS_{}", target.replace("-", "_")));
env::remove_var(format!("CXXFLAGS_{}", target.replace("-", "_")));
+ env::set_var("HOST_CFLAGS", "-O2");
+ env::set_var("HOST_CXXFLAGS", "-O2");
configure(&mut cc::Build::new())
.warnings(false)