diff --git a/firefox/.signature b/firefox/.signature index e3a0d739e..c27b2cf50 100644 --- a/firefox/.signature +++ b/firefox/.signature @@ -1,6 +1,8 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3xREGB2IpcUgIuEKaig1qbFzAVzqCrpgNQ4kHivx6+3AayW15MwFk0JXHlr20o78/c1HsrhYOzyrLKsUoHDIhAs= -SHA256 (Pkgfile) = 1814867fcaeab8cacd501776ebe61208f7d94d694c4e8bf6927ff9715dcf2e82 +RWSagIOpLGJF396R9g9H4epuRcRUKmhsZHOlccvkQgWJs/zjfpmmwrEYSx0YzM62iGHjHLb0YEX7+K1qByKPC2yuhxpsFLm2Xg4= +SHA256 (Pkgfile) = 79915e9b9821c9f32313fcec627d6ef656011c8d9502e002298a615f90788dec SHA256 (.footprint) = ba83ace6604f2c04a4e10eb00060ef7d98360e643f3674b29314fe9cec899189 SHA256 (firefox-71.0.source.tar.xz) = 78304cd58229e7103b56b34718aad051c9a4db30c266512a64f501ba58da7fbe SHA256 (firefox.desktop) = 8ba3439f3dfc5cab883641969c93d8d15f8f20d7188d9568346b2edad52d6f91 +SHA256 (mozilla-bug1601707-gcc-fixup.patch) = 7291f4f08b72834a3580573263d96e094f93731563131b35c346c04a734f45a4 +SHA256 (firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch) = 422a5dbe5cc45f8682fa71bc3b13594a7495cff19b069b52a81743fa442ef9d6 diff --git a/firefox/Pkgfile b/firefox/Pkgfile index 2d654152b..41e95c523 100644 --- a/firefox/Pkgfile +++ b/firefox/Pkgfile @@ -6,14 +6,26 @@ name=firefox version=71.0 -release=1 +release=2 source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz - firefox.desktop) + firefox.desktop + mozilla-bug1601707-gcc-fixup.patch + firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch) build() { cd firefox-$version + if [ -e '/usr/bin/ccache' ]; then + export OS_CCACHE_COMPILERCHECK="$(/usr/bin/clang -dumpversion | sed -z 's/\n/ /g'; crux | cut -d' ' -f3)" + export CCACHE_COMPILERCHECK="string:$OS_CCACHE_COMPILERCHECK" + fi + + patch -p1 -i $SRC/mozilla-bug1601707-gcc-fixup.patch + patch -p1 -i $SRC/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch + prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache + mkdir "$PKGMK_SOURCE_DIR/rust" || true + export CARGO_HOME="$PKGMK_SOURCE_DIR/rust" cat <<- EOF > .mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared @@ -46,14 +58,11 @@ cat <<- EOF > .mozconfig ac_add_options --disable-gconf EOF - sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h +# sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib export MOZ_MAKE_FLAGS="-j ${JOBS-1}" export MOZBUILD_STATE_PATH="$PKGMK_SOURCE_DIR/.mozbuild" - mkdir "$PKGMK_SOURCE_DIR/rust" || true - export CARGO_HOME="$PKGMK_SOURCE_DIR/rust" - ./mach build #./mach build toolkit/library/rust DESTDIR=$PKG ./mach install diff --git a/firefox/README b/firefox/README index 49f9d6b30..7598b38fb 100644 --- a/firefox/README +++ b/firefox/README @@ -1,3 +1,11 @@ For h.264 support you will need to install the additional port: -contrib/ffmpeg3 +contrib/ffmpeg + +For hardware video playback: + +about:config + +media.glvideo.enabled=true + +https://github.com/servo/servo/pull/23483 -> Media player rendering with GL textures by ceyusa diff --git a/firefox/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch b/firefox/firefox-71.0-bug1602358-fix-older-builds-with-newer-cbindgen.patch new file mode 100644 index 000000000..117b98caf --- /dev/null +++ b/firefox/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?= +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( ++ (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(this->bits ^ other.bits)}; +- } +- StyleWritingMode& operator^=(const StyleWritingMode& other) { +- *this = (*this ^ other); +- return *this; +- } +-""" +-- +2.20.1 + diff --git a/firefox/mozilla-bug1601707-gcc-fixup.patch b/firefox/mozilla-bug1601707-gcc-fixup.patch new file mode 100644 index 000000000..7002c6d70 --- /dev/null +++ b/firefox/mozilla-bug1601707-gcc-fixup.patch @@ -0,0 +1,114 @@ +diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0/dom/indexedDB/ActorsParent.cpp +--- firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround 2019-12-02 13:22:58.000000000 +0100 ++++ firefox-71.0/dom/indexedDB/ActorsParent.cpp 2019-12-08 21:52:54.449199120 +0100 +@@ -24311,11 +24311,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D + // if we allow overwrite or not. By not allowing overwrite we raise + // detectable errors rather than corrupting data. + DatabaseConnection::CachedStatement stmt; +- const auto& optReplaceDirective = (!mOverwrite || keyUnset) +- ? NS_LITERAL_CSTRING("") +- : NS_LITERAL_CSTRING("OR REPLACE "); + rv = aConnection->GetCachedStatement( +- NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective + ++ NS_LITERAL_CSTRING("INSERT ") + ++ ((!mOverwrite || keyUnset) ++ ? NS_LITERAL_CSTRING("") ++ : NS_LITERAL_CSTRING("OR REPLACE ")) + + NS_LITERAL_CSTRING("INTO object_data " + "(object_store_id, key, file_ids, data) " + "VALUES (:") + +@@ -25869,11 +25869,8 @@ void Cursor::OpenOp::PrepareIndexKeyCond + } + } + +- const auto& comparisonChar = +- isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<"); +- + mCursor->mContinueToQuery = +- aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + comparisonChar + ++ aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + + NS_LITERAL_CSTRING("= :") + kStmtParamNameCurrentKey; + + switch (mCursor->mDirection) { +@@ -25881,11 +25878,11 @@ void Cursor::OpenOp::PrepareIndexKeyCond + case IDBCursor::PREV: + mCursor->mContinueQuery = + aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + +- comparisonChar + NS_LITERAL_CSTRING("= :") + ++ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") + + kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ( sort_column ") + +- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey + ++ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey + + NS_LITERAL_CSTRING(" OR ") + aObjectDataKeyPrefix + +- NS_LITERAL_CSTRING("object_data_key ") + comparisonChar + ++ NS_LITERAL_CSTRING("object_data_key ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + + NS_LITERAL_CSTRING(" :") + kStmtParamNameObjectStorePosition + + NS_LITERAL_CSTRING(" ) "); + +@@ -25896,12 +25893,12 @@ void Cursor::OpenOp::PrepareIndexKeyCond + "(sort_column == :") + + kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ") + + aObjectDataKeyPrefix + NS_LITERAL_CSTRING("object_data_key ") + +- comparisonChar + NS_LITERAL_CSTRING("= :") + ++ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") + + kStmtParamNameObjectStorePosition + + NS_LITERAL_CSTRING( + ") OR " + "sort_column ") + +- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey + ++ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey + + NS_LITERAL_CSTRING(")"); + break; + +@@ -25909,7 +25906,7 @@ void Cursor::OpenOp::PrepareIndexKeyCond + case IDBCursor::PREV_UNIQUE: + mCursor->mContinueQuery = + aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + +- comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey; ++ (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey; + break; + + default: +@@ -26076,9 +26073,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase + + const bool usingKeyRange = mOptionalKeyRange.isSome(); + +- const auto& indexTable = mCursor->mUniqueIndex +- ? NS_LITERAL_CSTRING("unique_index_data") +- : NS_LITERAL_CSTRING("index_data"); + + NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); + +@@ -26099,7 +26093,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase + "object_data.file_ids, " + "object_data.data " + "FROM ") + +- indexTable + ++ (mCursor->mUniqueIndex ++ ? NS_LITERAL_CSTRING("unique_index_data") ++ : NS_LITERAL_CSTRING("index_data")) + + NS_LITERAL_CSTRING( + " AS index_table " + "JOIN object_data " +@@ -26198,9 +26194,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab + + const bool usingKeyRange = mOptionalKeyRange.isSome(); + +- const auto& table = mCursor->mUniqueIndex +- ? NS_LITERAL_CSTRING("unique_index_data") +- : NS_LITERAL_CSTRING("index_data"); + + NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column"); + +@@ -26218,7 +26211,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab + NS_LITERAL_CSTRING( + "object_data_key " + " FROM ") + +- table + NS_LITERAL_CSTRING(" WHERE index_id = :") + ++ (mCursor->mUniqueIndex ++ ? NS_LITERAL_CSTRING("unique_index_data") ++ : NS_LITERAL_CSTRING("index_data")) + ++ NS_LITERAL_CSTRING(" WHERE index_id = :") + + kStmtParamNameId; + + const auto keyRangeClause =