diff --git a/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch b/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch index 4cf457b2ef..0c842a9705 100644 --- a/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch +++ b/mingw-w64-firefox/0005-Allow-mingw-w64-python.patch @@ -388,3 +388,27 @@ diff -urN firefox-39.0.orig/python/mozbuild/mozbuild/virtualenv.py firefox-39.0/ return os.path.join(self.virtualenv_root, 'Scripts') return os.path.join(self.virtualenv_root, 'bin') +diff -urN firefox-39.0.orig/build/autoconf/python-virtualenv.m4 firefox-39.0/build/autoconf/python-virtualenv.m4 +--- firefox-39.0.orig/build/autoconf/python-virtualenv.m4 2015-06-30 23:57:57.000000000 +0100 ++++ firefox-39.0/build/autoconf/python-virtualenv.m4 2015-07-17 15:30:15.659590600 +0100 +@@ -58,7 +58,7 @@ + + case "$host_os" in + mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe ++ PYTHON=$(cygpath -am $(find $MOZ_BUILD_ROOT -name python.exe)) + ;; + *) + PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python +diff -urN firefox-39.0.orig/configure firefox-39.0/configure +--- firefox-39.0.orig/configure 2015-07-15 15:31:44.566317100 +0100 ++++ firefox-39.0/configure 2015-07-15 19:22:03.026946400 +0100 +@@ -1476,7 +1476,7 @@ + + case "$host_os" in + mingw*) +- PYTHON=`cd $MOZ_BUILD_ROOT && pwd -W`/_virtualenv/Scripts/python.exe ++ PYTHON=$(cygpath -am $(find $MOZ_BUILD_ROOT -name python.exe)) + ;; + *) + PYTHON=$MOZ_BUILD_ROOT/_virtualenv/bin/python diff --git a/mingw-w64-firefox/0006-Fix-pointer-casting.patch b/mingw-w64-firefox/0006-Fix-pointer-casting.patch index 040820e2ee..44226b106d 100644 --- a/mingw-w64-firefox/0006-Fix-pointer-casting.patch +++ b/mingw-w64-firefox/0006-Fix-pointer-casting.patch @@ -5,7 +5,7 @@ inline WORD PEImage::ToOrdinal(LPCSTR name) { - return reinterpret_cast(name); -+ return static_cast(reinterpret_cast(name)); ++ return static_cast(reinterpret_cast(name)); } inline HMODULE PEImage::module() const { diff --git a/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch b/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch new file mode 100644 index 0000000000..c52e7c67ad --- /dev/null +++ b/mingw-w64-firefox/0007-Fix-duplicate-explicit-instantiation.patch @@ -0,0 +1,21 @@ +--- firefox-39.0/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/strings/utf_string_conversion_utils.cc 2015-07-19 20:25:24.348811900 +0100 +@@ -122,7 +122,9 @@ + + // Instantiate versions we know callers will need. + template void PrepareForUTF8Output(const wchar_t*, size_t, std::string*); ++#if !defined(WCHAR_T_IS_UTF16) + template void PrepareForUTF8Output(const char16*, size_t, std::string*); ++#endif + + template + void PrepareForUTF16Or32Output(const char* src, +@@ -143,6 +145,8 @@ + + // Instantiate versions we know callers will need. + template void PrepareForUTF16Or32Output(const char*, size_t, std::wstring*); ++#if !defined(WCHAR_T_IS_UTF16) + template void PrepareForUTF16Or32Output(const char*, size_t, string16*); ++#endif + + } // namespace base diff --git a/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch b/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch new file mode 100644 index 0000000000..37e7671215 --- /dev/null +++ b/mingw-w64-firefox/0008-Fix-stray-back-slash-in-program.patch @@ -0,0 +1,12 @@ +--- firefox-39.0/security/sandbox/chromium/base/win/scoped_handle.h.orig 2015-07-19 20:52:07.176488400 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/win/scoped_handle.h 2015-07-19 20:57:44.812800100 +0100 +@@ -18,8 +18,7 @@ + #include + #define BASE_WIN_GET_CALLER _ReturnAddress() + #elif defined(COMPILER_GCC) +-#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\ +- __builtin_return_address(0)) ++#define BASE_WIN_GET_CALLER __builtin_extract_return_addr(__builtin_return_address(0)) + #endif + + namespace base { diff --git a/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch b/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch new file mode 100644 index 0000000000..754b6626f0 --- /dev/null +++ b/mingw-w64-firefox/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch @@ -0,0 +1,15 @@ +--- firefox-39.0/security/sandbox/chromium/base/threading/platform_thread_win.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/threading/platform_thread_win.cc 2015-07-19 21:41:06.812626000 +0100 +@@ -13,6 +13,12 @@ + #include "base/win/scoped_handle.h" + #include "base/win/windows_version.h" + ++// LibSEH may be useful here: ++// http://www.programmingunlimited.net/siteexec/content.cgi?page=libseh ++#if defined(__GNUC__) ++#define __except(_x) ++#endif ++ + namespace base { + + namespace { diff --git a/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch b/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch new file mode 100644 index 0000000000..e4d8b3d944 --- /dev/null +++ b/mingw-w64-firefox/0010-Dont-use-I64-numeric-suffix.patch @@ -0,0 +1,11 @@ +--- firefox-39.0/security/sandbox/chromium/base/time/time_win.cc.orig 2015-06-30 23:57:54.000000000 +0100 ++++ firefox-39.0/security/sandbox/chromium/base/time/time_win.cc 2015-07-19 23:01:28.117321100 +0100 +@@ -334,7 +334,7 @@ + // we keep last_seen_now stay correctly in sync. + DWORD now = tick_function(); + if (now < last_seen_now) +- rollover_ms += 0x100000000I64; // ~49.7 days. ++ rollover_ms += 0x100000000ll; // ~49.7 days. + last_seen_now = now; + return TimeDelta::FromMilliseconds(now + rollover_ms); + } diff --git a/mingw-w64-firefox/PKGBUILD b/mingw-w64-firefox/PKGBUILD index 53b87a3c97..7a2d56e60c 100644 --- a/mingw-w64-firefox/PKGBUILD +++ b/mingw-w64-firefox/PKGBUILD @@ -95,6 +95,10 @@ source=("http://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/ "0004-Allow-MSYS2-python.patch" "0005-Allow-mingw-w64-python.patch" "0006-Fix-pointer-casting.patch" + "0007-Fix-duplicate-explicit-instantiation.patch" + "0008-Fix-stray-back-slash-in-program.patch" + "0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch" + "0010-Dont-use-I64-numeric-suffix.patch" "debugging.patch" "mozconfig.x86_64" "mozconfig.i686" @@ -109,7 +113,11 @@ sha1sums=('32785daee7ddb9da8d7509ef095258fc58fe838e' '2fd8904f036d2515e314b3d7510d8358add298d2' 'c06e3e351cb3d29148e0d477ad50b70973baf8be' '4883d29fefd5c25d4892091bf6a45572f3d7aca4' - '61de9dea3b9136303c7371b8980e5b293c4b46c8' + '82205584bd1b4ac4b5ac4352af3ccc15c5448a1c' + '3156a4001b6a5a62ac3a8c318f4115e8ff09e69d' + 'c17480500944d0863f51af46919133b2bd777e0c' + '17bc2719882a5bc0775f48522a45c9132aebdd04' + '12385ab4cb659f712f3a3a93248741d299048b9c' 'c2a0ed20a82d212bb4aa84cb2f294be3ba0bb859' 'f437cc5a819788b63d8d9202290f516a85e9f6a2' 'f6da0857f310788c4a23d158bf03a93ab11230b7' @@ -147,6 +155,10 @@ prepare() { fi patch -p1 -i "${srcdir}"/0005-Allow-mingw-w64-python.patch patch -p1 -i "${srcdir}"/0006-Fix-pointer-casting.patch + patch -p1 -i "${srcdir}"/0007-Fix-duplicate-explicit-instantiation.patch + patch -p1 -i "${srcdir}"/0008-Fix-stray-back-slash-in-program.patch + patch -p1 -i "${srcdir}"/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch + patch -p1 -i "${srcdir}"/0010-Dont-use-I64-numeric-suffix.patch patch -p1 -i "${srcdir}"/debugging.patch find . -name config.sub -exec cp "${srcdir}"/config.sub {} \; diff --git a/mingw-w64-firefox/debugging.patch b/mingw-w64-firefox/debugging.patch index 9ce7bd961f..03782a252e 100644 --- a/mingw-w64-firefox/debugging.patch +++ b/mingw-w64-firefox/debugging.patch @@ -1,6 +1,6 @@ -diff -urN a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py ---- a/python/mozbuild/mozbuild/frontend/emitter.py 2015-06-30 23:58:07.000000000 +0100 -+++ b/python/mozbuild/mozbuild/frontend/emitter.py 2015-07-13 21:43:47.955204200 +0100 +diff -urN firefox-38.0.5.orig/python/mozbuild/mozbuild/frontend/emitter.py firefox-38.0.5/python/mozbuild/mozbuild/frontend/emitter.py +--- firefox-38.0.5.orig/python/mozbuild/mozbuild/frontend/emitter.py 2015-05-25 22:28:56.000000000 +0100 ++++ firefox-38.0.5/python/mozbuild/mozbuild/frontend/emitter.py 2015-07-08 23:05:35.409977000 +0100 @@ -3,6 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -9,8 +9,8 @@ diff -urN a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbu import itertools import json -@@ -672,6 +673,8 @@ - def _process_sources(self, context, passthru): +@@ -392,6 +393,8 @@ + for symbol in ('SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'): for src in (context[symbol] or []): + print('sys.argv is %s' % sys.argv, file=sys.stderr) @@ -18,15 +18,3 @@ diff -urN a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbu if not os.path.exists(mozpath.join(context.srcdir, src)): raise SandboxValidationError('File listed in %s does not ' 'exist: \'%s\'' % (symbol, src), context) -diff -urN a/python/mozbuild/mozbuild/config_status.py b/python/mozbuild/mozbuild/config_status.py ---- a/python/mozbuild/mozbuild/config_status.py 2015-06-30 23:58:07.000000000 +0100 -+++ b/python/mozbuild/mozbuild/config_status.py 2015-07-14 20:21:48.954130100 +0100 -@@ -145,7 +145,7 @@ - log_manager.add_terminal_logging(level=log_level) - log_manager.enable_unstructured() - -- print('Reticulating splines...', file=sys.stderr) -+ print('Reticulating splines... sys.argv = %s' % sys.argv, file=sys.stderr) - summary = the_backend.consume(definitions) - - for line in summary.summaries():