commit:     7c8c8537773d7a63d54a253dcd21455dbbe48d43
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 13 01:00:15 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Dec 13 01:16:06 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c8c8537

www-client/firefox: fix building with newer cbindgen

Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...2358-fix-older-builds-with-newer-cbindgen.patch | 50 ++++++++++++++++++++++
 www-client/firefox/firefox-71.0.ebuild             |  1 +
 2 files changed, 51 insertions(+)

diff --git 
a/www-client/firefox/files/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch
 
b/www-client/firefox/files/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch
new file mode 100644
index 00000000000..117b98caf33
--- /dev/null
+++ 
b/www-client/firefox/files/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch
@@ -0,0 +1,50 @@
+From 2683aaa789cfeb8c31a2d94ed972642421768a4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emi...@crisal.io>
+Date: Thu, 1 Jan 1970 00:00:00 +0000
+Subject: [PATCH] Bug 1602358 - Fix older builds with newer cbindgen. r=jwatt,
+ a=jcristau
+
+This should be fine to uplift so that downstream doesn't need multiple cbindgen
+versions.
+
+Differential Revision: https://phabricator.services.mozilla.com/D56346
+---
+ layout/generic/WritingModes.h      |  3 ++-
+ servo/ports/geckolib/cbindgen.toml | 10 ----------
+ 2 files changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/layout/generic/WritingModes.h b/layout/generic/WritingModes.h
+index 1a8d08b191b..0671388902f 100644
+--- a/layout/generic/WritingModes.h
++++ b/layout/generic/WritingModes.h
+@@ -518,7 +518,8 @@ class WritingMode {
+    */
+   void SetDirectionFromBidiLevel(uint8_t level) {
+     if (IS_LEVEL_RTL(level) == IsBidiLTR()) {
+-      mWritingMode ^= StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED;
++      mWritingMode.bits ^= static_cast<uint8_t>(
++          (StyleWritingMode_RTL | StyleWritingMode_INLINE_REVERSED).bits);
+     }
+   }
+ 
+diff --git a/servo/ports/geckolib/cbindgen.toml 
b/servo/ports/geckolib/cbindgen.toml
+index bed86498ea1..8a7a9cd7998 100644
+--- a/servo/ports/geckolib/cbindgen.toml
++++ b/servo/ports/geckolib/cbindgen.toml
+@@ -616,13 +616,3 @@ renaming_overrides_prefixing = true
+   // Get the layout rect, replacing auto right / bottom values for aAutoSize.
+   inline nsRect ToLayoutRect(nscoord aAutoSize = NS_MAXSIZE) const;
+ """
+-
+-"WritingMode" = """
+-  StyleWritingMode operator^(const StyleWritingMode& other) const {
+-    return {static_cast<decltype(bits)>(this->bits ^ other.bits)};
+-  }
+-  StyleWritingMode& operator^=(const StyleWritingMode& other) {
+-    *this = (*this ^ other);
+-    return *this;
+-  }
+-"""
+-- 
+2.20.1
+

diff --git a/www-client/firefox/firefox-71.0.ebuild 
b/www-client/firefox/firefox-71.0.ebuild
index f7cf2eae91b..6a3b5b71637 100644
--- a/www-client/firefox/firefox-71.0.ebuild
+++ b/www-client/firefox/firefox-71.0.ebuild
@@ -267,6 +267,7 @@ src_prepare() {
        eapply "${WORKDIR}/firefox"
        eapply "${FILESDIR}/${PN}-69.0-lto-gcc-fix.patch"
        eapply "${FILESDIR}/mozilla-bug1601707-gcc-fixup.patch"
+       eapply 
"${FILESDIR}/${PN}-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch"
 
        # Allow user to apply any additional patches without modifing ebuild
        eapply_user

Reply via email to