From 1aec0749962cc215dfcfd104c8e969170ff93dae Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 2 Sep 2021 16:42:20 +0300 Subject: [PATCH] firefox [beta]: pull in changes from extra/firefox --- testing/firefox/build | 38 ++++----------- testing/firefox/checksums | 4 ++ testing/firefox/patches/fix-clang-as.patch | 48 +++++++++++++++++++ .../firefox/patches/fix-linux-header.patch | 12 +++++ testing/firefox/patches/no-fribidi.patch | 12 +++++ testing/firefox/sources | 4 ++ 6 files changed, 88 insertions(+), 30 deletions(-) create mode 100644 testing/firefox/patches/fix-clang-as.patch create mode 100644 testing/firefox/patches/fix-linux-header.patch create mode 100644 testing/firefox/patches/no-fribidi.patch diff --git a/testing/firefox/build b/testing/firefox/build index d50d4a36..c77c4cc6 100755 --- a/testing/firefox/build +++ b/testing/firefox/build @@ -1,31 +1,12 @@ #!/bin/sh -e -patch -p1 < no-x11.patch +for p in *.patch; do + patch -p1 < "$p" +done # X11-less webrtc patch from bugzilla. Very large so a URL is used. patch -p1 < attachment.cgi\?id=9202429 -# Remove fribidi dependency. -sed '/fribidi/d' config/system-headers.mozbuild > _ -mv -f _ config/system-headers.mozbuild - -# Fix issue with Firefox mixing userspace and kernel headers. -# See: https://github.com/kisslinux/repo/issues/207 -_f=dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c -sed '/if defined(LINUX)/a#include ' "$_f" > _ -mv -f _ "$_f" - -# The most recent version of Clang is able to build NSS with its integrated -# assembler. -for f in \ - security/nss/lib/freebl/Makefile \ - security/nss/lib/freebl/freebl.gyp \ - security/nss/lib/freebl/freebl_base.gypi -do - sed '/-no-integrated-as/d' "$f" > _ - mv -f _ "$f" -done - # Build autoconf 2.13 for Firefox's sole use. # See: https://bugzilla.mozilla.org/show_bug.cgi?id=104642 ( @@ -39,8 +20,7 @@ done make install ) -# Build yasm for Firefox's sole use. -# Firefox is the only package which needs it +# Build yasm for Firefox's sole use. Firefox is the only package which needs it # and upstream is kinda dead. ( cd yasm @@ -52,11 +32,9 @@ done make DESTDIR="$PWD/../junk" install ) -# Build zip for Firefox's sole use. -# Zip is an awful format that we should use -# as little as possible. -( - cd zip +# Build zip/unzip for Firefox's sole use. +for f in zip unzip; do ( + cd "$f" make \ CC="$CC $CFLAGS $CXXFLAGS" \ @@ -65,7 +43,7 @@ done make \ prefix="$PWD/../junk" \ -f unix/Makefile install -) +) done export PATH="$PWD/junk/bin:$PATH" diff --git a/testing/firefox/checksums b/testing/firefox/checksums index daa89b96..a51a8271 100644 --- a/testing/firefox/checksums +++ b/testing/firefox/checksums @@ -2,5 +2,9 @@ f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 +036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 +42b3c7a29e61905be0e7425b8786870eb1d1c9e0f74c3f0909521b2ac52ac702 +2b5732c15e7eade2a01ad9794de372f25fbb75e4e2f53bce089548bcbbba20d1 +4b06181475f667ae2851540552ade56d5257a03cd21da588e2eb1e538bbc8176 3b5a3536fb44c00c48eba586752e614e5a904e55d1bb568f4e46fcda3ba2baa8 47d30d0b73d3174f8ebbb6d686892fa5435beb3355ddacded70194ef0249ba51 diff --git a/testing/firefox/patches/fix-clang-as.patch b/testing/firefox/patches/fix-clang-as.patch new file mode 100644 index 00000000..bb7c2557 --- /dev/null +++ b/testing/firefox/patches/fix-clang-as.patch @@ -0,0 +1,48 @@ +diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile +index 0b8c6f4..e9668e1 100644 +--- a/security/nss/lib/freebl/Makefile ++++ b/security/nss/lib/freebl/Makefile +@@ -753,7 +753,6 @@ $(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(OBJ_SUFFIX): CFLAGS += -mssse3 + # .set Htbl, %rdi + # So we can't use Clang's integrated assembler with intel-gcm.s. + ifdef CC_IS_CLANG +-$(OBJDIR)/$(PROG_PREFIX)intel-gcm$(OBJ_SUFFIX): CFLAGS += -no-integrated-as + endif + endif + +diff --git a/security/nss/lib/freebl/freebl.gyp b/security/nss/lib/freebl/freebl.gyp +index e7703ba..3ee3435 100644 +--- a/security/nss/lib/freebl/freebl.gyp ++++ b/security/nss/lib/freebl/freebl.gyp +@@ -19,13 +19,10 @@ + 'conditions': [ + [ 'cc_is_clang==1', { + 'cflags': [ +- '-no-integrated-as', + ], + 'cflags_mozilla': [ +- '-no-integrated-as', + ], + 'asflags_mozilla': [ +- '-no-integrated-as', + ], + }], + ], +diff --git a/security/nss/lib/freebl/freebl_base.gypi b/security/nss/lib/freebl/freebl_base.gypi +index afbffac..795bbd8 100644 +--- a/security/nss/lib/freebl/freebl_base.gypi ++++ b/security/nss/lib/freebl/freebl_base.gypi +@@ -74,13 +74,10 @@ + 'conditions': [ + [ 'cc_is_clang==1 and fuzz!=1 and coverage!=1', { + 'cflags': [ +- '-no-integrated-as', + ], + 'cflags_mozilla': [ +- '-no-integrated-as', + ], + 'asflags_mozilla': [ +- '-no-integrated-as', + ], + }], + ], diff --git a/testing/firefox/patches/fix-linux-header.patch b/testing/firefox/patches/fix-linux-header.patch new file mode 100644 index 00000000..02fc5022 --- /dev/null +++ b/testing/firefox/patches/fix-linux-header.patch @@ -0,0 +1,12 @@ +diff --git a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c +index 73e85c6..9eca548 100644 +--- a/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c ++++ b/dom/media/webrtc/transport/third_party/nICEr/src/stun/addrs-netlink.c +@@ -31,6 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + #if defined(LINUX) ++#include + #include "addrs-netlink.h" + #include + #include diff --git a/testing/firefox/patches/no-fribidi.patch b/testing/firefox/patches/no-fribidi.patch new file mode 100644 index 00000000..e8d1fc44 --- /dev/null +++ b/testing/firefox/patches/no-fribidi.patch @@ -0,0 +1,12 @@ +diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild +index 6e017df..7659b8e 100644 +--- a/config/system-headers.mozbuild ++++ b/config/system-headers.mozbuild +@@ -267,7 +267,6 @@ system_headers = [ + 'freetype/t1tables.h', + 'freetype/ttnameid.h', + 'freetype/tttables.h', +- 'fribidi/fribidi.h', + 'FSp_fopen.h', + 'fstream', + 'fstream.h', diff --git a/testing/firefox/sources b/testing/firefox/sources index 9bb2ec0e..e5fdfb31 100644 --- a/testing/firefox/sources +++ b/testing/firefox/sources @@ -2,5 +2,9 @@ https://ftp.mozilla.org/pub/firefox/releases/VERSION/source/firefox-VERSION.sour https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/ https://github.com/yasm/yasm/releases/download/v1.3.0/yasm-1.3.0.tar.gz yasm https://fossies.org/linux/misc/zip30.tar.gz zip +https://fossies.org/linux/misc/unzip60.tar.gz unzip +patches/fix-clang-as.patch +patches/fix-linux-header.patch +patches/no-fribidi.patch patches/no-x11.patch https://bugzilla.mozilla.org/attachment.cgi?id=9202429