From 5e0222bbda7ea2baebde27886eeb8cbf7eddddec647dda6c60912a2b4a6db03b Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Tue, 3 Apr 2018 07:38:15 +0000 Subject: [PATCH 1/2] Accepting request 593016 from home:badshah400:branches:mozilla:Factory - Add back mozilla-enable-csd.patch: New rebased version from Fedora for version 59.0.x. OBS-URL: https://build.opensuse.org/request/show/593016 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=646 --- MozillaFirefox.changes | 6 +++ MozillaFirefox.spec | 2 + mozilla-enable-csd.patch | 96 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 mozilla-enable-csd.patch diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index d70218e..f845256 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 2 00:55:45 UTC 2018 - badshah400@gmail.com + +- Add back mozilla-enable-csd.patch: New rebased version from + Fedora for version 59.0.x. + ------------------------------------------------------------------- Tue Mar 27 14:07:11 UTC 2018 - schwab@suse.de diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 172e38c..5a99d1c 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -153,6 +153,7 @@ Patch8: mozilla-bmo256180.patch Patch9: mozilla-bmo1005535.patch Patch10: mozilla-i586-DecoderDoctorLogger.patch Patch11: mozilla-i586-domPrefs.patch +Patch12: mozilla-enable-csd.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -268,6 +269,7 @@ cd $RPM_BUILD_DIR/mozilla %patch10 -p1 %patch11 -p1 %endif +%patch12 -p1 # Firefox %patch101 -p1 %patch102 -p1 diff --git a/mozilla-enable-csd.patch b/mozilla-enable-csd.patch new file mode 100644 index 0000000..9220628 --- /dev/null +++ b/mozilla-enable-csd.patch @@ -0,0 +1,96 @@ +Index: mozilla/browser/base/moz.build +=================================================================== +--- mozilla.orig/browser/base/moz.build ++++ mozilla/browser/base/moz.build +@@ -60,7 +60,7 @@ DEFINES['APP_LICENSE_BLOCK'] = '%s/conte + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3', 'cocoa'): + DEFINES['CONTEXT_COPY_IMAGE_CONTENTS'] = 1 + +-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'): ++if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'): + DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1 + + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'): +Index: mozilla/toolkit/modules/moz.build +=================================================================== +--- mozilla.orig/toolkit/modules/moz.build ++++ mozilla/toolkit/modules/moz.build +@@ -265,7 +265,7 @@ EXTRA_JS_MODULES.sessionstore += [ + 'sessionstore/Utils.jsm', + ] + +-if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'): ++if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa', 'gtk3'): + DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1 + + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk3'): +Index: mozilla/widget/gtk/nsWindow.cpp +=================================================================== +--- mozilla.orig/widget/gtk/nsWindow.cpp ++++ mozilla/widget/gtk/nsWindow.cpp +@@ -6857,9 +6857,62 @@ nsWindow::GetCSDSupportLevel() { + if (sCSDSupportLevel != CSD_SUPPORT_UNKNOWN) { + return sCSDSupportLevel; + } +- +- // Disabled due to Bug 1440461 +- sCSDSupportLevel = CSD_SUPPORT_NONE; ++ ++ const char* currentDesktop = getenv("XDG_CURRENT_DESKTOP"); ++ if (currentDesktop) { ++ if (strstr(currentDesktop, "GNOME") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FULL; ++ } else if (strstr(currentDesktop, "XFCE") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "X-Cinnamon") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FULL; ++ } else if (strstr(currentDesktop, "KDE") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "LXDE") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "openbox") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "i3") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_NONE; ++ } else if (strstr(currentDesktop, "MATE") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "Unity") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strstr(currentDesktop, "Pantheon") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FULL; ++ } else if (strstr(currentDesktop, "LXQt") != nullptr) { ++ sCSDSupportLevel = CSD_SUPPORT_FULL; ++ } else { ++// Release or beta builds are not supposed to be broken ++// so disable titlebar rendering on untested/unknown systems. ++#if defined(RELEASE_OR_BETA) ++ sCSDSupportLevel = CSD_SUPPORT_NONE; ++#else ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++#endif ++ } ++ } else { ++ sCSDSupportLevel = CSD_SUPPORT_NONE; ++ } ++ ++ // We don't support CSD_SUPPORT_FULL on Wayland ++ if (!GDK_IS_X11_DISPLAY(gdk_display_get_default()) && ++ sCSDSupportLevel == CSD_SUPPORT_FULL) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } ++ ++ // Allow MOZ_GTK_TITLEBAR_DECORATION to override our heuristics ++ const char* decorationOverride = getenv("MOZ_GTK_TITLEBAR_DECORATION"); ++ if (decorationOverride) { ++ if (strcmp(decorationOverride, "none") == 0) { ++ sCSDSupportLevel = CSD_SUPPORT_NONE; ++ } else if (strcmp(decorationOverride, "client") == 0) { ++ sCSDSupportLevel = CSD_SUPPORT_FLAT; ++ } else if (strcmp(decorationOverride, "system") == 0) { ++ sCSDSupportLevel = CSD_SUPPORT_FULL; ++ } ++ } ++ + return sCSDSupportLevel; + } + From b9c534ef0dae3f62f904acf0d8405721a20fb7ca0fa3fd37b650e13b75bde813 Mon Sep 17 00:00:00 2001 From: Wolfgang Rosenauer Date: Wed, 25 Apr 2018 20:14:59 +0000 Subject: [PATCH 2/2] Accepting request 599877 from home:marxin:branches:mozilla:Factory - Add 0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch in order to fix boo#1090362. OBS-URL: https://build.opensuse.org/request/show/599877 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=647 --- ...TC-fails-to-build-with-GCC-8-r-dmino.patch | 47 +++++++++++++++++++ MozillaFirefox.changes | 6 +++ MozillaFirefox.spec | 2 + 3 files changed, 55 insertions(+) create mode 100644 0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch diff --git a/0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch b/0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch new file mode 100644 index 0000000..f38eba0 --- /dev/null +++ b/0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch @@ -0,0 +1,47 @@ +From 38a3ee1f792f586aef412ebc04980a93825612c9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Mon, 5 Feb 2018 09:46:44 -0500 +Subject: [PATCH] Bug 1435695 - WebRTC fails to build with GCC 8; r=dminor + +--HG-- +extra : rebase_source : d26e183b2082fa4f88ce3b837e2db5fc8acbff5b +--- + media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c | 5 +++-- + .../webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c | 5 +++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c b/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c +index 0340165eb505..d09314720ddd 100644 +--- a/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c ++++ b/media/webrtc/trunk/webrtc/common_audio/vad/vad_core.c +@@ -115,8 +115,9 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset, + // undefined behavior, so not a good idea; this just makes UBSan ignore the + // violation, so that our old code can continue to do what it's always been + // doing.) +-static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) +- RTC_NO_SANITIZE("signed-integer-overflow") { ++static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow") ++OverflowingMulS16ByS32ToS32(int16_t a, int32_t b) ++{ + return a * b; + } + +diff --git a/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c b/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +index 2b92acb64a3d..c10014f6a108 100644 +--- a/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c ++++ b/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/isac/fix/source/lattice.c +@@ -209,8 +209,9 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef, + // Left shift of an int32_t that's allowed to overflow. (It's still undefined + // behavior, so not a good idea; this just makes UBSan ignore the violation, so + // that our old code can continue to do what it's always been doing.) +-static inline int32_t OverflowingLShiftS32(int32_t x, int shift) +- RTC_NO_SANITIZE("shift") { ++static inline int32_t RTC_NO_SANITIZE("shift") ++OverflowingLShiftS32(int32_t x, int shift) ++{ + return x << shift; + } + +-- +2.16.3 + diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes index f845256..d6c02fd 100644 --- a/MozillaFirefox.changes +++ b/MozillaFirefox.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 20 12:31:52 UTC 2018 - mliska@suse.cz + +- Add 0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch + in order to fix boo#1090362. + ------------------------------------------------------------------- Mon Apr 2 00:55:45 UTC 2018 - badshah400@gmail.com diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec index 5a99d1c..1531529 100644 --- a/MozillaFirefox.spec +++ b/MozillaFirefox.spec @@ -154,6 +154,7 @@ Patch9: mozilla-bmo1005535.patch Patch10: mozilla-i586-DecoderDoctorLogger.patch Patch11: mozilla-i586-domPrefs.patch Patch12: mozilla-enable-csd.patch +Patch13: 0001-Bug-1435695-WebRTC-fails-to-build-with-GCC-8-r-dmino.patch # Firefox/browser Patch101: firefox-kde.patch Patch102: firefox-branded-icons.patch @@ -270,6 +271,7 @@ cd $RPM_BUILD_DIR/mozilla %patch11 -p1 %endif %patch12 -p1 +%patch13 -p1 # Firefox %patch101 -p1 %patch102 -p1