sync SLE specifics
authorWolfgang Rosenauer <wr@rosenauer.org>
Fri, 19 Jun 2020 10:01:49 +0200
changeset 1136 d068eb84b4d3
parent 1135 082b9d2dfd7d
child 1137 909f866430ee
sync SLE specifics
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/mozilla-bmo1602730.patch
MozillaFirefox/mozilla-bmo1626236.patch
MozillaFirefox/mozilla-bmo998749.patch
MozillaFirefox/mozilla-s390x-skia-gradient.patch
mozilla-bmo1602730.patch
mozilla-bmo1626236.patch
mozilla-bmo998749.patch
mozilla-s390x-skia-gradient.patch
series
--- a/MozillaFirefox/MozillaFirefox.changes	Wed Jun 17 09:51:57 2020 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Fri Jun 19 10:01:49 2020 +0200
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------
-Wed Jun 17 07:51:25 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
+Fri Jun 19 07:59:08 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
 
 - Mozilla Firefox 78.0b8
   * startup notifications now using Gtk instead of libnotify
@@ -13,6 +13,12 @@
   WebRTC with pipewire support to enable screen sharing under
   Wayland; also add BuildRequires: pkgconfig(libpipewire-0.3)
   appropriately (boo#1172903).
+- adding SLE12 compatibility
+- add patches for s390x
+  * mozilla-bmo1602730.patch (bmo#1602730)
+  * mozilla-bmo1626236.patch (bmo#1626236)
+  * mozilla-bmo998749.patch (bmo#998749)
+  * mozilla-s390x-skia-gradient.patch
 
 -------------------------------------------------------------------
 Wed Jun 10 07:17:15 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
--- a/MozillaFirefox/MozillaFirefox.spec	Wed Jun 17 09:51:57 2020 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Fri Jun 19 10:01:49 2020 +0200
@@ -18,6 +18,13 @@
 
 
 # changed with every update
+# orig_version vs. mainver: To have beta-builds
+# FF70beta3 would be released as FF69.99
+# orig_version would be the upstream tar ball
+# orig_version 70.0
+# orig_suffix b3
+# major 69
+# mainver %major.99
 %define major          77
 %define mainver        %major.99
 %define orig_version   78.0
@@ -61,11 +68,11 @@
 %else
 %define crashreporter 0
 %endif
-# pipewire is too old on Leap 15.1
-%if 0%{?suse_version} == 1500 && 0%{?sle_version} <= 150100
-%bcond_with pipewire3
+%if 0%{?sle_version} > 150100
+# pipewire is too old on Leap <15.1
+%define with_pipewire0_3 1
 %else
-%bcond_without pipewire3
+%define with_pipewire0_3 0
 %endif
 
 Name:           %{pkgname}
@@ -77,7 +84,7 @@
 BuildRequires:  fdupes
 BuildRequires:  memory-constraints
 %if 0%{?suse_version} <= 1320
-BuildRequires:  gcc7-c++
+BuildRequires:  gcc9-c++
 %else
 BuildRequires:  gcc-c++
 %endif
@@ -89,12 +96,17 @@
 BuildRequires:  libproxy-devel
 BuildRequires:  makeinfo
 BuildRequires:  mozilla-nspr-devel >= 4.25
-BuildRequires:  mozilla-nss-devel >= 3.53
+BuildRequires:  mozilla-nss-devel >= 3.53.1
 BuildRequires:  nasm >= 2.14
 BuildRequires:  nodejs10 >= 10.21.0
 BuildRequires:  python-devel
+%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
+BuildRequires:  python-libxml2
+BuildRequires:  python36
+%else
 BuildRequires:  python2-xml
 BuildRequires:  python3 >= 3.5
+%endif
 BuildRequires:  rust >= 1.41
 BuildRequires:  rust-cbindgen >= 0.14.1
 BuildRequires:  unzip
@@ -108,7 +120,11 @@
 %if 0%{?suse_version} < 1550
 BuildRequires:  pkgconfig(gconf-2.0) >= 1.2.1
 %endif
+%if (0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000)
+BuildRequires:  clang6-devel
+%else
 BuildRequires:  clang-devel >= 5
+%endif
 BuildRequires:  pkgconfig(gdk-x11-2.0)
 BuildRequires:  pkgconfig(glib-2.0) >= 2.22
 BuildRequires:  pkgconfig(gobject-2.0)
@@ -118,7 +134,7 @@
 BuildRequires:  pkgconfig(gtk+-unix-print-3.0)
 BuildRequires:  pkgconfig(libffi)
 BuildRequires:  pkgconfig(libpulse)
-%if %{with pipewire3}
+%if %{with_pipewire0_3}
 BuildRequires:  pkgconfig(libpipewire-0.3)
 %endif
 # libavcodec is required for H.264 support but the
@@ -155,7 +171,7 @@
 Source11:       firefox.1
 Source12:       mozilla-get-app-id
 Source13:       spellcheck.js
-Source14:       https://github.com/openSUSE/firefox-scripts/raw/8a54002/create-tar.sh
+Source14:       https://github.com/openSUSE/firefox-scripts/raw/5e54f4a/create-tar.sh
 Source15:       firefox-appdata.xml
 Source16:       %{name}.changes
 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys
@@ -188,6 +204,10 @@
 Patch21:        mozilla-bmo1504834-part4.patch
 Patch22:        mozilla-bmo849632.patch
 Patch23:        mozilla-pipewire-0-3.patch
+Patch24:        mozilla-bmo1602730.patch
+Patch25:        mozilla-bmo998749.patch
+Patch26:        mozilla-bmo1626236.patch
+Patch27:        mozilla-s390x-skia-gradient.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-branded-icons.patch
@@ -234,6 +254,8 @@
 Summary:        Common translations for %{appname}
 Group:          System/Localization
 Provides:       locale(%{name}:ar;ca;cs;da;de;el;en_GB;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW)
+# This is there for updates from Firefox before the translations-package was split up into 2 packages
+Provides:       %{name}-translations
 Requires:       %{name} = %{version}
 Obsoletes:      %{name}-translations < %{version}-%{release}
 
@@ -320,9 +342,13 @@
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
-%if %{with pipewire3}
+%if %{with_pipewire0_3}
 %patch23 -p1
 %endif
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
@@ -335,6 +361,14 @@
 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
 TIME="\"$(date -d "${modified}" "+%%R")\""
 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} +
+
+# SLE-12 provides python36, but that package does not provide a python3 binary
+%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
+sed -i "s/python3/python36/g" configure.in
+sed -i "s/python3/python36/g" mach
+export PYTHON3=/usr/bin/python36
+%endif
+
 #
 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
 if test "$kdehelperversion" != %{kde_helper_version}; then
@@ -354,7 +388,7 @@
 export BUILD_OFFICIAL=1
 export MOZ_TELEMETRY_REPORTING=1
 %if 0%{?suse_version} <= 1320
-export CC=gcc-7
+export CC=gcc-9
 %else
 %if 0%{?clang_build} == 0
 export CC=gcc
@@ -400,7 +434,11 @@
 ac_add_options --libdir=%{_libdir}
 ac_add_options --includedir=%{_includedir}
 ac_add_options --enable-release
+%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
+ac_add_options --enable-default-toolkit=cairo-gtk3
+%else
 ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
+%endif
 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32
 %ifarch %ix86 %arm
 ac_add_options --disable-debug-symbols
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-bmo1602730.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,1 @@
+../mozilla-bmo1602730.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-bmo1626236.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,1 @@
+../mozilla-bmo1626236.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-bmo998749.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,1 @@
+../mozilla-bmo998749.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-s390x-skia-gradient.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,1 @@
+../mozilla-s390x-skia-gradient.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-bmo1602730.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,25 @@
+# HG changeset patch
+# User msirringhaus@suse.de
+# Date 1582805890 -3600
+#      Thu Feb 27 13:18:10 2020 +0100
+# Node ID 457cbe5705f2a3759d3da36a05c0ed66ec61ea12
+# Parent  7440f4b6bab85068ca2f84e9c48e0706d04330e8
+imported patch mozilla-bmo1602730-FF73.patch
+
+diff -r 7440f4b6bab8 gfx/layers/composite/CompositableHost.cpp
+--- a/gfx/layers/composite/CompositableHost.cpp	Thu Feb 27 13:17:56 2020 +0100
++++ b/gfx/layers/composite/CompositableHost.cpp	Wed Jun 17 15:33:32 2020 +0200
+@@ -92,9 +92,13 @@
+   }
+   MOZ_ASSERT(source);
+ 
++  // Setting an alpha-mask here breaks the URL-bar on big endian (s390x)
++  // if the typed URL is too long for the textbox (automatic scrolling needed)
++#if MOZ_LITTLE_ENDIAN()
+   RefPtr<EffectMask> effect =
+       new EffectMask(source, source->GetSize(), aTransform);
+   aEffects.mSecondaryEffects[EffectTypes::MASK] = effect;
++#endif
+   return true;
+ }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-bmo1626236.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,85 @@
+# HG changeset patch
+# User msirringhaus@suse.de
+# Date 1582805876 -3600
+#      Thu Feb 27 13:17:56 2020 +0100
+# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
+# Parent  9cd90914846f667f18babc491a74c164ae5d6e9f
+imported patch decoder_workaround.patch
+
+diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
+--- a/image/decoders/nsGIFDecoder2.cpp	Thu Feb 27 12:57:14 2020 +0100
++++ b/image/decoders/nsGIFDecoder2.cpp	Fri Mar 27 13:06:18 2020 +0100
+@@ -422,6 +422,9 @@
+   MOZ_ASSERT(mSwizzleFn);
+   uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
+   mSwizzleFn(data, data, aColors);
++#if MOZ_BIG_ENDIAN()
++  SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
++#endif
+ }
+ 
+ LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
+diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
+--- a/image/decoders/nsJPEGDecoder.cpp	Thu Feb 27 12:57:14 2020 +0100
++++ b/image/decoders/nsJPEGDecoder.cpp	Fri Mar 27 13:06:18 2020 +0100
+@@ -263,6 +263,9 @@
+         case JCS_YCbCr:
+           // By default, we will output directly to BGRA. If we need to apply
+           // special color transforms, this may change.
++#if MOZ_BIG_ENDIAN()
++          mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
++#else
+           switch (SurfaceFormat::OS_RGBX) {
+             case SurfaceFormat::B8G8R8X8:
+               mInfo.out_color_space = JCS_EXT_BGRX;
+@@ -277,6 +280,7 @@
+               mState = JPEG_ERROR;
+               return Transition::TerminateFailure();
+           }
++#endif
+           break;
+         case JCS_CMYK:
+         case JCS_YCCK:
+diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
+--- a/image/decoders/nsPNGDecoder.cpp	Thu Feb 27 12:57:14 2020 +0100
++++ b/image/decoders/nsPNGDecoder.cpp	Fri Mar 27 13:06:18 2020 +0100
+@@ -361,7 +361,7 @@
+                                    IResumable* aOnResume) {
+   MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
+ 
+-  return mLexer.Lex(aIterator, aOnResume,
++  LexerResult res = mLexer.Lex(aIterator, aOnResume,
+                     [=](State aState, const char* aData, size_t aLength) {
+                       switch (aState) {
+                         case State::PNG_DATA:
+@@ -371,6 +371,14 @@
+                       }
+                       MOZ_CRASH("Unknown State");
+                     });
++
++#if MOZ_BIG_ENDIAN()
++  if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
++      NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
++  }
++#endif
++
++  return res;
+ }
+ 
+ LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
+diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
+--- a/image/decoders/nsWebPDecoder.cpp	Thu Feb 27 12:57:14 2020 +0100
++++ b/image/decoders/nsWebPDecoder.cpp	Fri Mar 27 13:06:18 2020 +0100
+@@ -237,7 +237,12 @@
+   // WebP doesn't guarantee that the alpha generated matches the hint in the
+   // header, so we always need to claim the input is BGRA. If the output is
+   // BGRX, swizzling will mask off the alpha channel.
++#if MOZ_BIG_ENDIAN()
++  mBuffer.colorspace = MODE_ARGB;
++  SurfaceFormat inFormat = mFormat;
++#else
+   SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
++#endif
+ 
+   SurfacePipeFlags pipeFlags = SurfacePipeFlags();
+   if (mFormat == SurfaceFormat::OS_RGBA &&
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-bmo998749.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User msirringhaus@suse.de
+# Date 1583738770 -3600
+#      Mon Mar 09 08:26:10 2020 +0100
+# Node ID 34676feac1a542e409e22acf5b98735f8313b1ce
+# Parent  506857dace0a08d1c9685e3ac264646590b3e27f
+[mq]: mozilla-bmo998749.patch
+
+diff -r 506857dace0a -r 34676feac1a5 gfx/2d/FilterProcessing.h
+--- a/gfx/2d/FilterProcessing.h	Fri Feb 28 12:31:51 2020 +0100
++++ b/gfx/2d/FilterProcessing.h	Mon Mar 09 08:26:10 2020 +0100
+@@ -13,10 +13,17 @@
+ namespace mozilla {
+ namespace gfx {
+ 
++#if MOZ_BIG_ENDIAN()
++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 3;
++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 2;
++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 1;
++const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 0;
++#else
+ const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_B = 0;
+ const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_G = 1;
+ const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_R = 2;
+ const ptrdiff_t B8G8R8A8_COMPONENT_BYTEOFFSET_A = 3;
++#endif
+ 
+ class FilterProcessing {
+  public:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-s390x-skia-gradient.patch	Fri Jun 19 10:01:49 2020 +0200
@@ -0,0 +1,51 @@
+# HG changeset patch
+# Parent  acf59ea86dd1d878b43920832093f082dcfc61c0
+
+diff -r acf59ea86dd1 gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp
+--- a/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp	Mon Mar 09 08:26:10 2020 +0100
++++ b/gfx/skia/skia/src/shaders/gradients/Sk4fLinearGradient.cpp	Fri Mar 27 13:30:28 2020 +0100
+@@ -7,7 +7,7 @@
+ 
+ #include "include/core/SkPaint.h"
+ #include "src/shaders/gradients/Sk4fLinearGradient.h"
+-
++#include "src/core/SkEndian.h"
+ #include <cmath>
+ #include <utility>
+ 
+@@ -28,6 +28,9 @@
+ 
+     while (n >= 4) {
+         DstTraits<premul>::store4x(c0, c1, c2, c3, dst, bias0, bias1);
++#ifdef SK_CPU_BENDIAN
++        SkEndianSwap32s(dst, 4);
++#endif
+         dst += 4;
+ 
+         c0 = c0 + dc4;
+@@ -37,12 +40,23 @@
+         n -= 4;
+     }
+     if (n & 2) {
+-        DstTraits<premul>::store(c0, dst++, bias0);
+-        DstTraits<premul>::store(c1, dst++, bias1);
++        DstTraits<premul>::store(c0, dst, bias0);
++#ifdef SK_CPU_BENDIAN
++        *dst = SkEndianSwap32(*dst);
++#endif
++        ++dst;
++        DstTraits<premul>::store(c1, dst, bias1);
++#ifdef SK_CPU_BENDIAN
++        *dst = SkEndianSwap32(*dst);
++#endif
++        ++dst;
+         c0 = c0 + dc2;
+     }
+     if (n & 1) {
+         DstTraits<premul>::store(c0, dst, bias0);
++#ifdef SK_CPU_BENDIAN
++        *dst = SkEndianSwap32(*dst);
++#endif
+     }
+ }
+ 
--- a/series	Wed Jun 17 09:51:57 2020 +0200
+++ b/series	Fri Jun 19 10:01:49 2020 +0200
@@ -21,6 +21,10 @@
 mozilla-bmo1504834-part4.patch
 mozilla-bmo849632.patch
 mozilla-pipewire-0-3.patch
+mozilla-bmo1602730.patch
+mozilla-bmo998749.patch
+mozilla-bmo1626236.patch
+mozilla-s390x-skia-gradient.patch
 
 # Firefox patches
 firefox-kde.patch