From ae12c9c0f6c60c89fdf25e32712c311b7639d99b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= <ark@switnet.org>
Date: Sat, 15 Jul 2023 22:42:46 +0000
Subject: [PATCH] firefox: lower llvm version to build ppc64el

---
 .../workaround_115_ppc64el_build.patch          | 17 +++++++++++++++++
 helpers/make-firefox                            | 12 +++++++-----
 2 files changed, 24 insertions(+), 5 deletions(-)
 create mode 100644 helpers/DATA/firefox/patch_changes/workaround_115_ppc64el_build.patch

diff --git a/helpers/DATA/firefox/patch_changes/workaround_115_ppc64el_build.patch b/helpers/DATA/firefox/patch_changes/workaround_115_ppc64el_build.patch
new file mode 100644
index 00000000..fb01d10c
--- /dev/null
+++ b/helpers/DATA/firefox/patch_changes/workaround_115_ppc64el_build.patch
@@ -0,0 +1,17 @@
+diff --git a/debian/control.in b/debian/control.in
+index 1955e51..c431192 100644
+--- a/debian/control.in
++++ b/debian/control.in
+@@ -38,9 +38,9 @@ Build-Depends: cdbs,
+ 	xvfb,
+ 	python3 (>= 3.7),
+ 	libffi-dev (>= 3.0.9) [powerpc ppc64el s390x],
+-	clang-15 | clang-14 | clang-13 | clang-12 | clang-10,
+-	libclang-15-dev | libclang-14-dev | libclang-13-dev | libclang-12-dev | libclang-10-dev,
+-	llvm-15-dev | llvm-14-dev | llvm-13-dev | llvm-12-dev | llvm-10-dev,
++	clang-15 [!ppc64el] | clang-14 | clang-13 | clang-12 | clang-10,
++	libclang-15-dev [!ppc64el] | libclang-14-dev | libclang-13-dev | libclang-12-dev | libclang-10-dev,
++	llvm-15-dev [!ppc64el] | llvm-14-dev | llvm-13-dev | llvm-12-dev | llvm-10-dev,
+ 	cargo (>= 0.67),
+ 	rustc (>= 1.66.0),
+ 	nodejs (>= 12.22.12)
diff --git a/helpers/make-firefox b/helpers/make-firefox
index a8591d1a..ed32d23f 100644
--- a/helpers/make-firefox
+++ b/helpers/make-firefox
@@ -19,7 +19,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-VERSION=103
+VERSION=104
 EXTERNAL='deb-src http://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu $UPSTREAM main'
 REPOKEY=9BDB3D89CE49EC21
 
@@ -439,10 +439,12 @@ find browser/branding/ -name about-logo-private@2x.png | xargs -n1 cp $DATA/debu
 find browser/branding/ -name PrivateBrowsing_70.png | xargs -n1 cp $DATA/debug_brand/PrivateBrowsing_70.png
 find browser/branding/ -name PrivateBrowsing_150.png | xargs -n1 cp $DATA/debug_brand/PrivateBrowsing_150.png
 
-#Fixes by patch on source.
-##Firefox v100, based on parabola 9004-FSDG-misc.patch
-patch --no-backup-if-mismatch -p1 < $DATA/patch_changes/Remove_moreFromMozilla_Focus_and_Klar.patch
-patch --no-backup-if-mismatch -p1 < $DATA/patch_changes/Remove_Andoir_and_iOS_promotion.patch
+#Fixes by patch on source, see DATA/firefox/patches for more info.
+for patch in $(ls -v ${DATA}/patch_changes/*.patch)
+do
+    echo "Applying $patch"
+    patch --no-backup-if-mismatch -Np1 < $patch
+done
 
 # Postinst script to manage profile migration and system links
 echo '
-- 
GitLab