diff -Nru firefox-esr-91.5.0esr/debian/changelog firefox-esr-91.5.0esr/debian/changelog --- firefox-esr-91.5.0esr/debian/changelog 2022-01-11 21:58:53.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/changelog 2022-01-26 22:05:26.000000000 +0000 @@ -1,3 +1,27 @@ +firefox-esr (91.5.0esr-1+rpi1) bookworm-staging; urgency=medium + + [changes brought forward from 60.3.0esr-1+rpi1 by Peter Michael Green at Wed, 05 Dec 2018 06:56:52 +0000] + * Hack broken rust target selection so it produces the right target + on raspbian. + * Fix clean target. + + [changes introduce in 60.8.0esr-1+rpi1 by Peter Michael Green] + * Use a fake homedir for build (Closes: 933757). + + [changes introduced in 68.2.0esr-1+rpi1 by Peter Michael Green] + * Disable webrtc, it seems to fail to build on raspbian. + * Try to disable Neon + + [changes introduced in 78.3.0esr-2+rpi1 by Peter Michael Green] + * Clean up pycache directories. + * Disable neon in qcms. + + [changes brought over from thunderbird 1:91.3.2-1+rpi1 by Peter Michael Green] + * Use a #define instead of a typedef for double_t in fdlibm to prevent conflicting + definitions error. + + -- Raspbian forward porter Wed, 26 Jan 2022 22:05:26 +0000 + firefox-esr (91.5.0esr-1) unstable; urgency=medium * New upstream release. diff -Nru firefox-esr-91.5.0esr/debian/patches/disable-neon-in-qcms.patch firefox-esr-91.5.0esr/debian/patches/disable-neon-in-qcms.patch --- firefox-esr-91.5.0esr/debian/patches/disable-neon-in-qcms.patch 1970-01-01 00:00:00.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/disable-neon-in-qcms.patch 2022-01-26 22:05:26.000000000 +0000 @@ -0,0 +1,94 @@ +From: Peter Michael Green +Date: Wed, 7 Oct 2020 19:41:49 +0000 +X-Dgit-Generated: 78.3.0esr-2+rpi1 b1f30fd7ea0b729a7bbc7dc1e804e2a0cc0c573a +Subject: Disable neon in qcms. + + +--- + +diff --git a/gfx/qcms/qcmsint.h b/gfx/qcms/qcmsint.h +index b08fc9490b..3f5ad40145 100644 +--- a/gfx/qcms/qcmsint.h ++++ b/gfx/qcms/qcmsint.h +@@ -96,18 +96,18 @@ void qcms_transform_data_bgra_out_lut_altivec(const qcms_transform *transform, + unsigned char *dest, + size_t length); + +-void qcms_transform_data_rgb_out_lut_neon(const qcms_transform *transform, +- const unsigned char *src, +- unsigned char *dest, +- size_t length); +-void qcms_transform_data_rgba_out_lut_neon(const qcms_transform *transform, +- const unsigned char *src, +- unsigned char *dest, +- size_t length); +-void qcms_transform_data_bgra_out_lut_neon(const qcms_transform *transform, +- const unsigned char *src, +- unsigned char *dest, +- size_t length); ++//void qcms_transform_data_rgb_out_lut_neon(const qcms_transform *transform, ++// const unsigned char *src, ++// unsigned char *dest, ++// size_t length); ++//void qcms_transform_data_rgba_out_lut_neon(const qcms_transform *transform, ++// const unsigned char *src, ++// unsigned char *dest, ++// size_t length); ++//void qcms_transform_data_bgra_out_lut_neon(const qcms_transform *transform, ++// const unsigned char *src, ++// unsigned char *dest, ++// size_t length); + + extern bool qcms_supports_iccv4; + extern bool qcms_supports_neon; +diff --git a/gfx/qcms/src/lib.rs b/gfx/qcms/src/lib.rs +index 7987ae2f31..d432ab5e5a 100644 +--- a/gfx/qcms/src/lib.rs ++++ b/gfx/qcms/src/lib.rs +@@ -62,8 +62,8 @@ pub use transform::DataType; + pub use transform::Transform; + #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] + mod transform_avx; +-#[cfg(all(any(target_arch = "aarch64", target_arch = "arm"), feature = "neon"))] +-mod transform_neon; ++//#[cfg(all(any(target_arch = "aarch64", target_arch = "arm"), feature = "neon"))] ++//mod transform_neon; + #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] + mod transform_sse2; + mod transform_util; +diff --git a/gfx/qcms/src/transform.rs b/gfx/qcms/src/transform.rs +index f3d9e8b4c4..b5e5351837 100644 +--- a/gfx/qcms/src/transform.rs ++++ b/gfx/qcms/src/transform.rs +@@ -21,11 +21,11 @@ + // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-#[cfg(all(any(target_arch = "arm", target_arch = "aarch64"), feature = "neon"))] ++/*#[cfg(all(any(target_arch = "arm", target_arch = "aarch64"), feature = "neon"))] + use crate::transform_neon::{ + qcms_transform_data_bgra_out_lut_neon, qcms_transform_data_rgb_out_lut_neon, + qcms_transform_data_rgba_out_lut_neon, +-}; ++};*/ + use crate::{ + chain::chain_transform, + double_to_s15Fixed16Number, +@@ -1364,7 +1364,7 @@ pub fn transform_create( + } + } + +- #[cfg(all(target_arch = "arm", feature = "neon"))] ++ /*#[cfg(all(target_arch = "arm", feature = "neon"))] + let neon_supported = is_arm_feature_detected!("neon"); + #[cfg(all(target_arch = "aarch64", feature = "neon"))] + let neon_supported = is_aarch64_feature_detected!("neon"); +@@ -1378,7 +1378,7 @@ pub fn transform_create( + } else if in_type == BGRA8 { + transform.transform_fn = Some(qcms_transform_data_bgra_out_lut_neon) + } +- } ++ }*/ + + if transform.transform_fn.is_none() { + if in_type == RGB8 { diff -Nru firefox-esr-91.5.0esr/debian/patches/raspbian-rust-triplet-hack.patch firefox-esr-91.5.0esr/debian/patches/raspbian-rust-triplet-hack.patch --- firefox-esr-91.5.0esr/debian/patches/raspbian-rust-triplet-hack.patch 1970-01-01 00:00:00.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/raspbian-rust-triplet-hack.patch 2022-01-26 22:05:26.000000000 +0000 @@ -0,0 +1,21 @@ +Description: Hack broken rust target selection so it produces the right target on raspbian. +Author: Peter Michael Green +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +index 40f017da67..07308cb6cd 100644 +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -236,9 +236,14 @@ def rust_compiler(rustc_info, cargo_info): + + + @depends(rustc, when=rust_compiler) ++@imports("sys") ++@imports(_from="__builtin__", _import='repr') + @imports(_from="__builtin__", _import="ValueError") + def rust_supported_targets(rustc): ++ #HACK: if there are multiple matches the algorithm uses the last one ++ #put arm-unknown-linux-gnuebihf on the end of the list so it gets preffered + out = check_cmd_output(rustc, "--print", "target-list").splitlines() ++ out.append("arm-unknown-linux-gnueabihf") + data = {} + for t in out: + try: diff -Nru firefox-esr-91.5.0esr/debian/patches/series firefox-esr-91.5.0esr/debian/patches/series --- firefox-esr-91.5.0esr/debian/patches/series 2022-01-11 21:58:53.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/series 2022-01-26 22:05:26.000000000 +0000 @@ -21,3 +21,8 @@ debian-hacks/Allow-to-build-with-older-versions-of-nodejs-10.patch debian-hacks/Allow-to-build-with-cargo-in-Debian-unstable.patch debian-hacks/Fix-math_private.h-for-i386-FTBFS.patch +raspbian-rust-triplet-hack.patch +try-to-disable-neon.patch +try-harder-to-disable-neon.patch +disable-neon-in-qcms.patch +use-a-define-instead-of-a-typedef-for-do.patch diff -Nru firefox-esr-91.5.0esr/debian/patches/try-harder-to-disable-neon.patch firefox-esr-91.5.0esr/debian/patches/try-harder-to-disable-neon.patch --- firefox-esr-91.5.0esr/debian/patches/try-harder-to-disable-neon.patch 1970-01-01 00:00:00.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/try-harder-to-disable-neon.patch 2022-01-26 22:05:26.000000000 +0000 @@ -0,0 +1,21 @@ +From: Peter Michael Green +Date: Thu, 7 Nov 2019 11:23:19 +0000 +X-Dgit-Generated: 68.2.0esr-1+rpi1 a8a34a748cbe157a1fb6bfdb2c127ff6ec8416e9 +Subject: Try harder to disable neon. + + +--- + +--- firefox-esr-68.2.0esr.orig/build/moz.configure/arm.configure ++++ firefox-esr-68.2.0esr/build/moz.configure/arm.configure +@@ -229,8 +229,8 @@ def build_arm_neon(arm_arch): + return arm_arch >= 700 + + +-set_config("BUILD_ARM_NEON", build_arm_neon) +-set_define("BUILD_ARM_NEON", build_arm_neon) ++#set_config("BUILD_ARM_NEON", build_arm_neon) ++#set_define("BUILD_ARM_NEON", build_arm_neon) + + + set_config("ARM_ARCH", depends(arm_target.arm_arch)(lambda x: str(x))) diff -Nru firefox-esr-91.5.0esr/debian/patches/try-to-disable-neon.patch firefox-esr-91.5.0esr/debian/patches/try-to-disable-neon.patch --- firefox-esr-91.5.0esr/debian/patches/try-to-disable-neon.patch 1970-01-01 00:00:00.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/try-to-disable-neon.patch 2022-01-26 22:05:26.000000000 +0000 @@ -0,0 +1,15 @@ +From: Peter Michael Green +Date: Thu, 7 Nov 2019 08:48:48 +0000 +X-Dgit-Generated: 68.2.0esr-1+rpi1 be4da04b831a114d84fc719b35cbf9cd4014c464 +Subject: Try to disable neon. + + +--- + +--- firefox-esr-68.2.0esr.orig/build/moz.configure/arm.configure ++++ firefox-esr-68.2.0esr/build/moz.configure/arm.configure +@@ -228,3 +228,3 @@ + def build_arm_neon(arm_arch): +- return arm_arch >= 7 ++ return arm_arch >= 700 + diff -Nru firefox-esr-91.5.0esr/debian/patches/use-a-define-instead-of-a-typedef-for-do.patch firefox-esr-91.5.0esr/debian/patches/use-a-define-instead-of-a-typedef-for-do.patch --- firefox-esr-91.5.0esr/debian/patches/use-a-define-instead-of-a-typedef-for-do.patch 1970-01-01 00:00:00.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/patches/use-a-define-instead-of-a-typedef-for-do.patch 2022-01-26 22:05:26.000000000 +0000 @@ -0,0 +1,19 @@ +From: Peter Michael Green +Date: Tue, 21 Dec 2021 17:35:22 +0000 +X-Dgit-Generated: 91.4.0esr-1+rpi1 f2f0506a7eb9cf10f4fe44779c3d669707eb61e3 +Subject: Use a #define instead of a typedef for double_t in fdlibm to prevent conflicting definitions error. + + +--- + +--- firefox-esr-91.4.0esr.orig/modules/fdlibm/src/math_private.h ++++ firefox-esr-91.4.0esr/modules/fdlibm/src/math_private.h +@@ -35,7 +35,7 @@ typedef long double __double_t; + #else + typedef double __double_t; + #endif +-typedef __double_t double_t; ++#define double_t __double_t + + /* + * The original fdlibm code used statements like: diff -Nru firefox-esr-91.5.0esr/debian/rules firefox-esr-91.5.0esr/debian/rules --- firefox-esr-91.5.0esr/debian/rules 2022-01-11 21:58:53.000000000 +0000 +++ firefox-esr-91.5.0esr/debian/rules 2022-01-26 22:05:26.000000000 +0000 @@ -1,4 +1,6 @@ #!/usr/bin/make -f +export HOME=$(CURDIR)/fakehome + TESTDIR = $(shell dh_testdir || echo no) ifeq (,$(TESTDIR)) include debian/make.mk @@ -132,7 +134,7 @@ ifneq (,$(filter i386 amd64 armel armhf,$(DEB_HOST_ARCH))) CRASH_REPORTER = 1 endif -ifneq (,$(filter mips%,$(DEB_HOST_ARCH))) +ifneq (,$(filter armhf mips%,$(DEB_HOST_ARCH))) CONFIGURE_FLAGS += --disable-webrtc endif @@ -196,6 +198,7 @@ endif override_dh_auto_configure: + mkdir -p fakehome configure js/src/configure: cp -f $@.in $@ && chmod +x $@ @@ -276,12 +279,16 @@ rm -f $(filter-out debian/control,$(GENERATED_FILES)) rm -f $$(cat debian/extra-clean 2>/dev/null) debian/extra-clean old-configure js/src/old-configure rm -rf stamps l10n $(CARGO_HOME) + rm -f third_party/python/psutil/psutil/*.so + rm -rf third_party/python/psutil/build/temp* + rm -rf third_party/python/psutil/build/lib* debian/rules debian/control TESTDIR= dh_auto_clean --builddirectory=build-$(PRODUCT) dh_auto_clean --builddirectory=build-l10n find . -name "*.pyc" -o -name "*.pyo" | xargs --no-run-if-empty rm -f rm -rf obj-*/.mozbuild + find . -name __pycache__ -delete override_dh_clean: dh_clean -XCargo.toml.orig @@ -290,6 +297,8 @@ sed -i '2!b;/^exec "/ d' $$dir/$$file; \ done; \ done + rm -rf build-browser + rm -rf fakehome override_dh_auto_install-arch: stamps/install-$(PRODUCT) override_dh_auto_install-indep: @@ -344,3 +353,4 @@ @mkdir -p stamps $(if $(wildcard $@),,touch $@) endif +