diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-02-28 12:32:28 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-02-28 12:32:28 +0800 |
commit | 7a6cd50db4b6c0d29ae57fa63778797de0533ae0 (patch) | |
tree | 609ef5a97fb0ae2966c62b228dd41191cb69dda8 /www/firefox | |
parent | 53d7944a40b4c269c2834150df53bce1e427c764 (diff) | |
download | freebsd-ports-gnome-7a6cd50db4b6c0d29ae57fa63778797de0533ae0.tar.gz freebsd-ports-gnome-7a6cd50db4b6c0d29ae57fa63778797de0533ae0.tar.zst freebsd-ports-gnome-7a6cd50db4b6c0d29ae57fa63778797de0533ae0.zip |
www/firefox: update to 52.0 (rc1)
More candidates are likely to come before the official announcement (aka
the rush hour) scheduled on 2017-03-07. This one intended to pick up upstream
security fixes earlier while looking for downstream regressions.
Changes: https://www.mozilla.org/firefox/52.0/releasenotes/
Security: 96eca031-1313-4daf-9be2-9d6e1c4f1eb5
MFH: 2017Q1 (piling up, requires r431637 + r434531)
Diffstat (limited to 'www/firefox')
-rw-r--r-- | www/firefox/Makefile | 11 | ||||
-rw-r--r-- | www/firefox/distinfo | 6 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1142056 | 64 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1303380 | 26 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1315986 | 49 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1316879 | 114 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1318914 | 34 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1320991 | 55 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1329520 | 154 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1329895 | 13 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1330119 | 13 | ||||
-rw-r--r-- | www/firefox/files/patch-bug757366 | 58 | ||||
-rw-r--r-- | www/firefox/files/patch-bug826985 | 10 | ||||
-rw-r--r-- | www/firefox/files/patch-bug847568 | 151 | ||||
-rw-r--r-- | www/firefox/files/patch-bug981348 | 32 | ||||
-rw-r--r-- | www/firefox/files/patch-z-bug517422 | 379 |
16 files changed, 336 insertions, 833 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 52042e2be8e7..15aa2aa0893d 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -2,26 +2,25 @@ # $FreeBSD$ PORTNAME= firefox -DISTVERSION= 51.0.1 +DISTVERSION= 52.0 DISTVERSIONSUFFIX=.source -PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.13.1:devel/nspr \ - nss>=3.28.1:security/nss \ + nss>=3.28.3:security/nss \ libevent>=2.0.21_2:devel/libevent \ - harfbuzz>=1.3.3:print/harfbuzz \ + harfbuzz>=1.4.1:print/harfbuzz \ graphite2>=1.3.8:graphics/graphite2 \ png>=1.6.25:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ - sqlite3>=3.14.1:databases/sqlite3 \ + sqlite3>=3.17.0:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ diff --git a/www/firefox/distinfo b/www/firefox/distinfo index f5671145ec17..77a6282533f3 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1485379956 -SHA256 (firefox-51.0.1.source.tar.xz) = 30ba00ba716ea1eeda526e2ccc8642f8d18a836793fde50e87a4fcb9d9fccca9 -SIZE (firefox-51.0.1.source.tar.xz) = 202142716 +TIMESTAMP = 1488235265 +SHA256 (firefox-52.0.source.tar.xz) = dcb492a7f843806119decfd92a42c7101acd9e79ef8fd190ff13f48c6ee0d536 +SIZE (firefox-52.0.source.tar.xz) = 212251428 diff --git a/www/firefox/files/patch-bug1142056 b/www/firefox/files/patch-bug1142056 deleted file mode 100644 index bf453501eda3..000000000000 --- a/www/firefox/files/patch-bug1142056 +++ /dev/null @@ -1,64 +0,0 @@ -commit ef0d953d9e2d -Author: Makoto Kato <m_kato@ga2.so-net.ne.jp> -Date: Tue Aug 23 16:54:06 2016 +0900 - - Bug 1142056 - Add aarch64 configuration on Skia's moz.build. r=gw280 - - MozReview-Commit-ID: 60iAZjFg6W6 - - --HG-- - extra : histedit_source : b3bb5a3e556393ba49f43dc4ab8bdaa9be40fb0c ---- - gfx/skia/generate_mozbuild.py | 6 ++++-- - gfx/skia/moz.build | 12 ++++++++++-- - 2 files changed, 14 insertions(+), 4 deletions(-) - -diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py -index 2088b729d476..1eb04c1d7f57 100755 ---- gfx/skia/generate_mozbuild.py -+++ gfx/skia/generate_mozbuild.py -@@ -429,10 +429,12 @@ def write_mozbuild(sources): - f.write("if CONFIG['INTEL_ARCHITECTURE']:\n") - write_sources(f, sources['intel'], 4) - -- f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n") -+ f.write("elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']:\n") - write_sources(f, sources['arm'], 4) - -- f.write(" if CONFIG['BUILD_ARM_NEON']:\n") -+ f.write(" if CONFIG['CPU_ARCH'] == 'aarch64':\n") -+ write_sources(f, sources['neon'], 8) -+ f.write(" elif CONFIG['BUILD_ARM_NEON']:\n") - write_list(f, 'SOURCES', sources['neon'], 8) - write_cflags(f, sources['neon'], 'neon', "CONFIG['NEON_FLAGS']", 8) - -diff --git gfx/skia/moz.build gfx/skia/moz.build -index b33f1cdbee54..9dba87978dd3 100644 ---- gfx/skia/moz.build -+++ gfx/skia/moz.build -@@ -519,7 +519,7 @@ if CONFIG['INTEL_ARCHITECTURE']: - 'skia/src/opts/SkOpts_sse41.cpp', - 'skia/src/opts/SkOpts_ssse3.cpp', - ] --elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: -+elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']: - UNIFIED_SOURCES += [ - 'skia/src/core/SkUtilsArm.cpp', - 'skia/src/opts/SkBitmapProcState_opts_arm.cpp', -@@ -528,7 +528,15 @@ elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: - SOURCES += [ - 'skia/src/opts/SkBlitRow_opts_arm.cpp', - ] -- if CONFIG['BUILD_ARM_NEON']: -+ if CONFIG['CPU_ARCH'] == 'aarch64': -+ SOURCES += [ -+ 'skia/src/opts/SkBitmapProcState_arm_neon.cpp', -+ 'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp', -+ 'skia/src/opts/SkBlitMask_opts_arm_neon.cpp', -+ 'skia/src/opts/SkBlitRow_opts_arm_neon.cpp', -+ 'skia/src/opts/SkOpts_neon.cpp', -+ ] -+ elif CONFIG['BUILD_ARM_NEON']: - SOURCES += [ - 'skia/src/opts/SkBitmapProcState_arm_neon.cpp', - 'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp', diff --git a/www/firefox/files/patch-bug1303380 b/www/firefox/files/patch-bug1303380 deleted file mode 100644 index 5753fc87030f..000000000000 --- a/www/firefox/files/patch-bug1303380 +++ /dev/null @@ -1,26 +0,0 @@ -commit c0fd0d3 -Author: Jared Wein <jwein@mozilla.com> -Date: Mon Sep 19 15:40:28 2016 -0400 - - Bug 1303380 - Wrap the telemetry code in _firstWindowLoaded with a try/catch to allow startup and migration code to run to completion if there is an exception writing to Telemetry. r=gijs - - MozReview-Commit-ID: DPfq6lZ4fM3 ---- - browser/components/nsBrowserGlue.js | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git browser/components/nsBrowserGlue.js browser/components/nsBrowserGlue.js -index eebbef2..20706fd 100644 ---- browser/components/nsBrowserGlue.js -+++ browser/components/nsBrowserGlue.js -@@ -931,7 +931,9 @@ BrowserGlue.prototype = { - } - if (SCALING_PROBE_NAME) { - let scaling = aWindow.devicePixelRatio * 100; -- Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling); -+ try { -+ Services.telemetry.getHistogramById(SCALING_PROBE_NAME).add(scaling); -+ } catch (ex) {} - } - }, - diff --git a/www/firefox/files/patch-bug1315986 b/www/firefox/files/patch-bug1315986 deleted file mode 100644 index 3d5e81bf2584..000000000000 --- a/www/firefox/files/patch-bug1315986 +++ /dev/null @@ -1,49 +0,0 @@ -commit c0d2685148b5 -Author: Jonathan Kew <jkew@mozilla.com> -Date: Wed Nov 9 15:07:54 2016 +0000 - - Bug 1315986 - Update line-break class mapping in nsJISx4051LineBreaker to handle new classes in ICU58/Unicode 9, and add assertions to detect any future additions that will require further updates. r=masayuki ---- - intl/lwbrk/nsJISx4051LineBreaker.cpp | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git intl/lwbrk/nsJISx4051LineBreaker.cpp intl/lwbrk/nsJISx4051LineBreaker.cpp -index 0d89e91..1b262fa 100644 ---- intl/lwbrk/nsJISx4051LineBreaker.cpp -+++ intl/lwbrk/nsJISx4051LineBreaker.cpp -@@ -12,6 +12,10 @@ - #include "nsTArray.h" - #include "nsUnicodeProperties.h" - -+#if ENABLE_INTL_API -+#include "unicode/uchar.h" // for U_LB_COUNT until bug 1305700 -+#endif -+ - /* - - Simplification of Pair Table in JIS X 4051 -@@ -547,10 +551,22 @@ GetClass(uint32_t u) - /* CLOSE_PARENTHESIS = 36, [CP] */ CLASS_CLOSE_LIKE_CHARACTER, - /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE, - /* HEBREW_LETTER = 38, [HL] */ CLASS_CHARACTER, -- /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER -+ /* REGIONAL_INDICATOR = 39, [RI] */ CLASS_CHARACTER, -+#if U_ICU_VERSION_MAJOR_NUM > 57 -+ /* E_BASE = 40, [EB] */ CLASS_BREAKABLE, -+ /* E_MODIFIER = 41, [EM] */ CLASS_CHARACTER, -+ /* ZWJ = 42, [ZWJ]*/ CLASS_CHARACTER, -+#endif - }; - -- return sUnicodeLineBreakToClass[mozilla::unicode::GetLineBreakClass(u)]; -+#if ENABLE_INTL_API -+ static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass), -+ "Gecko vs ICU LineBreak class mismatch"); -+#endif -+ -+ auto cls = mozilla::unicode::GetLineBreakClass(u); -+ MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass)); -+ return sUnicodeLineBreakToClass[cls]; - } - - static bool diff --git a/www/firefox/files/patch-bug1316879 b/www/firefox/files/patch-bug1316879 index e484c55d8860..7641984a8092 100644 --- a/www/firefox/files/patch-bug1316879 +++ b/www/firefox/files/patch-bug1316879 @@ -1,103 +1,11 @@ -Revert bug 1299919 due to a failure building with CPP in environemnt. - -diff --git build/autoconf/toolchain.m4 build/autoconf/toolchain.m4 -index 8353967a180c..c8503e5d63f5 100644 ---- build/autoconf/toolchain.m4 -+++ build/autoconf/toolchain.m4 -@@ -2,14 +2,6 @@ - dnl License, v. 2.0. If a copy of the MPL was not distributed with this - dnl file, You can obtain one at http://mozilla.org/MPL/2.0/. - --dnl Several autoconf functions AC_REQUIRE AC_PROG_CPP/AC_PROG_CXXCPP, --dnl meaning they are called even when we don't call them explicitly. --dnl However, theses checks are not necessary and python configure sets --dnl the corresponding variables already, so just skip those tests --dnl entirely. --define([AC_PROG_CPP],[]) --define([AC_PROG_CXXCPP],[]) -- - AC_DEFUN([MOZ_TOOL_VARIABLES], - [ - GNU_AS= -diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure -index c69b5d12daf4..bba62023c836 100644 ---- build/moz.configure/toolchain.configure -+++ build/moz.configure/toolchain.configure -@@ -754,23 +754,6 @@ - valid_compiler.try_compile(check_msg='%s works' % what, - onerror=compiler_error) - -- -- # Set CPP/CXXCPP for both the build system and old-configure. We don't -- # need to check this works for preprocessing, because we already relied -- # on $CC -E/$CXX -E doing preprocessing work to validate the compiler -- # in the first place. -- if host_or_target == target: -- pp_var = { -- 'C': 'CPP', -- 'C++': 'CXXCPP', -- }[language] -- -- preprocessor = depends_if(valid_compiler)( -- lambda x: list(x.wrapper) + [x.compiler, '-E'] + list(x.flags)) -- -- set_config(pp_var, preprocessor) -- add_old_configure_assignment(pp_var, preprocessor) -- - return valid_compiler - - -diff --git dom/bindings/GenerateCSS2PropertiesWebIDL.py dom/bindings/GenerateCSS2PropertiesWebIDL.py -index 73e1541c13b0..58ec60c29b10 100644 ---- dom/bindings/GenerateCSS2PropertiesWebIDL.py -+++ dom/bindings/GenerateCSS2PropertiesWebIDL.py -@@ -16,7 +16,7 @@ - return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs), - propName) - def generate(output, idlFilename, preprocessorHeader): -- cpp = list(buildconfig.substs['CPP']) -+ cpp = shellutil.split(buildconfig.substs['CPP']) - cpp += shellutil.split(buildconfig.substs['ACDEFINES']) - cpp.append(preprocessorHeader) - preprocessed = subprocess.check_output(cpp) -diff --git js/src/old-configure.in js/src/old-configure.in -index 79541bdeb986..1cb4204aeeb3 100644 ---- js/src/old-configure.in -+++ js/src/old-configure.in -@@ -140,6 +140,9 @@ - - MOZ_TOOL_VARIABLES - -+AC_PROG_CPP -+AC_PROG_CXXCPP -+ - dnl Special win32 checks - dnl ======================================================== - -diff --git layout/style/GenerateCSSPropsGenerated.py layout/style/GenerateCSSPropsGenerated.py -index 4dc2a253a811..5038e9afe726 100644 ---- layout/style/GenerateCSSPropsGenerated.py -+++ layout/style/GenerateCSSPropsGenerated.py -@@ -10,7 +10,7 @@ - from mozbuild import shellutil - - def get_properties(preprocessorHeader): -- cpp = list(buildconfig.substs['CPP']) -+ cpp = shellutil.split(buildconfig.substs['CPP']) - cpp += shellutil.split(buildconfig.substs['ACDEFINES']) - cpp.append(preprocessorHeader) - preprocessed = subprocess.check_output(cpp) -diff --git old-configure.in old-configure.in -index 863235e13176..545e82f83d56 100644 ---- old-configure.in -+++ old-configure.in -@@ -241,6 +241,9 @@ - - MOZ_TOOL_VARIABLES - -+AC_PROG_CPP -+AC_PROG_CXXCPP -+ - dnl ======================================================== - dnl Special win32 checks - dnl ======================================================== +diff --git build/buildconfig.py build/buildconfig.py +index bb12114b2f4a..e73903a1a981 100644 +--- build/buildconfig.py ++++ build/buildconfig.py +@@ -16,5 +16,5 @@ for var in ('topsrcdir', 'topobjdir', 'defines', 'non_global_defines', + substs = dict(substs) + + for var in os.environ: +- if var != 'SHELL' and var in substs: ++ if var not in ('CPP', 'CXXCPP', 'SHELL') and var in substs: + substs[var] = os.environ[var] diff --git a/www/firefox/files/patch-bug1318914 b/www/firefox/files/patch-bug1318914 deleted file mode 100644 index 6c2a7f661c68..000000000000 --- a/www/firefox/files/patch-bug1318914 +++ /dev/null @@ -1,34 +0,0 @@ -commit 6dbb1148210e -Author: Mike Hommey <mh+mozilla@glandium.org> -Date: Sun Nov 20 17:51:17 2016 +0900 - - Bug 1318914 - Fix --with-system-libevent build against libevent 2.1. r=billm - - --HG-- - extra : rebase_source : da25767f6045507447f90ab03291c60a4f2c6b3d ---- - ipc/chromium/src/base/message_pump_libevent.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git ipc/chromium/src/base/message_pump_libevent.cc ipc/chromium/src/base/message_pump_libevent.cc -index 2db827e5bade..3cca238c1e7c 100644 ---- ipc/chromium/src/base/message_pump_libevent.cc -+++ ipc/chromium/src/base/message_pump_libevent.cc -@@ -22,9 +22,17 @@ - - // This macro checks that the _EVENT_SIZEOF_* constants defined in - // ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct. -+#if defined(_EVENT_SIZEOF_SHORT) - #define CHECK_EVENT_SIZEOF(TYPE, type) \ - static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \ - "bad _EVENT_SIZEOF_"#TYPE); -+#elif defined(EVENT__SIZEOF_SHORT) -+#define CHECK_EVENT_SIZEOF(TYPE, type) \ -+ static_assert(EVENT__SIZEOF_##TYPE == sizeof(type), \ -+ "bad EVENT__SIZEOF_"#TYPE); -+#else -+#error Cannot find libevent type sizes -+#endif - - CHECK_EVENT_SIZEOF(LONG, long); - CHECK_EVENT_SIZEOF(LONG_LONG, long long); diff --git a/www/firefox/files/patch-bug1320991 b/www/firefox/files/patch-bug1320991 deleted file mode 100644 index 3c2daff9428f..000000000000 --- a/www/firefox/files/patch-bug1320991 +++ /dev/null @@ -1,55 +0,0 @@ -commit 454e2dbe1b4f -Author: Mike Shal <mshal@mozilla.com> -Date: Tue Dec 20 16:37:18 2016 -0500 - - Bug 1320991 - Support --with-system-{nss,nspr} in modules/libmar; r?glandium - - The problem with the modules/libmar/tests/moz.build file when building - --with-system-nspr and --with-system-nss is that the nss libraries don't - exist in the tree, so they fail when trying to copy into the test - directory. - - However, it turns out that the libraries copied into the test directory - aren't even used when building with an in-tree copy, because the - xpcshell launcher sets LD_LIBRARY_PATH to point to dist/bin. Since we - use the dist/bin copies anyway for an in-tree build, we can stop copying - them into the test directory and simultaneously fix the --with-system - build. - - The DEFINES can also go away since this directory doesn't actually build - anything. - - MozReview-Commit-ID: Bk2f28wc9ZJ ---- - modules/libmar/tests/moz.build | 17 ----------------- - 1 file changed, 17 deletions(-) - -diff --git modules/libmar/tests/moz.build modules/libmar/tests/moz.build -index ee72571b0c6b..9642553e8aa2 100644 ---- modules/libmar/tests/moz.build -+++ modules/libmar/tests/moz.build -@@ -6,24 +6,7 @@ - - XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini'] - --DEFINES['BIN_SUFFIX'] = CONFIG['BIN_SUFFIX'] -- - if CONFIG['OS_TARGET'] != 'Android': -- nss_files = ['nss3'] -- if not CONFIG['MOZ_FOLD_LIBS']: -- nss_files.extend([ -- 'nssutil3', -- 'plc4', -- 'nspr4', -- 'plds4', -- ]) -- TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += sorted( -- ['!/dist/bin/%s%s%s' % ( -- CONFIG['DLL_PREFIX'], -- name, -- CONFIG['DLL_SUFFIX'], -- ) for name in nss_files] -- ) - TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [ - '!../tool/signmar%s' % CONFIG['BIN_SUFFIX'], - ] diff --git a/www/firefox/files/patch-bug1329520 b/www/firefox/files/patch-bug1329520 deleted file mode 100644 index 892a338dc8c3..000000000000 --- a/www/firefox/files/patch-bug1329520 +++ /dev/null @@ -1,154 +0,0 @@ -commit 8b0557b033b9 -Author: Dimitry Andric <dimitry> -Date: Fri Jan 27 13:55:00 2017 +0100 - - Bug 1329520 - Fix "memory/mozalloc/throw_gcc.h:35:1: note: declaration missing '[[noreturn]]' (libc++ 4.0)" r=nfroyd ---- - memory/mozalloc/throw_gcc.h | 47 ++++++++++++++++++++++++++++++--------------- - 1 file changed, 31 insertions(+), 16 deletions(-) - -diff --git memory/mozalloc/throw_gcc.h memory/mozalloc/throw_gcc.h -index 18027e04a4a3..4264df63d493 100644 ---- memory/mozalloc/throw_gcc.h -+++ memory/mozalloc/throw_gcc.h -@@ -19,104 +19,117 @@ - - #include "mozilla/mozalloc_abort.h" - -+// libc++ 4.0.0 and higher use C++11 [[noreturn]] attributes for the functions -+// below, and since clang does not allow mixing __attribute__((noreturn)) and -+// [[noreturn]], we have to explicitly use the latter here. See bug 1329520. -+#if defined(__clang__) -+# if __has_feature(cxx_attributes) && \ -+ defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 4000 -+# define MOZ_THROW_NORETURN [[noreturn]] -+# endif -+#endif -+#ifndef MOZ_THROW_NORETURN -+# define MOZ_THROW_NORETURN MOZ_NORETURN -+#endif -+ - namespace std { - - // NB: user code is not supposed to touch the std:: namespace. We're - // doing this after careful review because we want to define our own - // exception throwing semantics. Don't try this at home! - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_bad_exception(void) - { - mozalloc_abort("fatal: STL threw bad_exception"); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_bad_alloc(void) - { - mozalloc_abort("fatal: STL threw bad_alloc"); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_bad_cast(void) - { - mozalloc_abort("fatal: STL threw bad_cast"); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_bad_typeid(void) - { - mozalloc_abort("fatal: STL threw bad_typeid"); - } - - // used by <functional> --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_bad_function_call(void) - { - mozalloc_abort("fatal: STL threw bad_function_call"); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_logic_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_domain_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_invalid_argument(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_length_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_out_of_range(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_runtime_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_range_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_overflow_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_underflow_error(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_ios_failure(const char* msg) - { - mozalloc_abort(msg); - } - --MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void -+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void - __throw_system_error(int err) - { - char error[128]; -@@ -127,4 +140,6 @@ __throw_system_error(int err) - - } // namespace std - -+#undef MOZ_THROW_NORETURN -+ - #endif // mozilla_throw_gcc_h diff --git a/www/firefox/files/patch-bug1329895 b/www/firefox/files/patch-bug1329895 deleted file mode 100644 index 4467cd9c759f..000000000000 --- a/www/firefox/files/patch-bug1329895 +++ /dev/null @@ -1,13 +0,0 @@ -Apply Linux fieldtext opacity for all GTK platforms. r=dao - ---- browser/themes/shared/icon-colors.inc.svg -+++ browser/themes/shared/icon-colors.inc.svg -@@ -2,7 +2,7 @@ - - .fieldtext { - fill: -moz-fieldtext; --#ifdef XP_LINUX -+#ifdef MOZ_WIDGET_GTK - /* The fill-opacity needs to be sufficient for high-contrast settings, and - pathological Gtk themes where -moz-fieldtext provides low contrast by - default. */ diff --git a/www/firefox/files/patch-bug1330119 b/www/firefox/files/patch-bug1330119 deleted file mode 100644 index 012282795220..000000000000 --- a/www/firefox/files/patch-bug1330119 +++ /dev/null @@ -1,13 +0,0 @@ -diff --git xpcom/reflect/xptcall/md/unix/moz.build xpcom/reflect/xptcall/md/unix/moz.build -index 019487bd69a2..a54026e70412 100644 ---- xpcom/reflect/xptcall/md/unix/moz.build -+++ xpcom/reflect/xptcall/md/unix/moz.build -@@ -151,7 +151,7 @@ if CONFIG['OS_ARCH'] == 'NetBSD': - 'xptcstubs_netbsd_m68k.cpp' - ] - --if CONFIG['OS_ARCH'] == 'Linux': -+if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD'): - if CONFIG['OS_TEST'] == 'aarch64': - SOURCES += [ - 'xptcinvoke_aarch64.cpp', diff --git a/www/firefox/files/patch-bug757366 b/www/firefox/files/patch-bug757366 deleted file mode 100644 index 20be9013276d..000000000000 --- a/www/firefox/files/patch-bug757366 +++ /dev/null @@ -1,58 +0,0 @@ -commit 2a3be4b384b9 -Author: Jonathan Kew <jkew@mozilla.com> -Date: Mon Sep 26 18:05:14 2016 +0100 - - Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel ---- - gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------ - 1 file changed, 14 insertions(+), 12 deletions(-) - -diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp -index 526e17d..cb505e8 100644 ---- gfx/thebes/gfxFontUtils.cpp -+++ gfx/thebes/gfxFontUtils.cpp -@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version) - version == TRUETYPE_TAG('t','r','u','e'); - } - --// copy and swap UTF-16 values, assume no surrogate pairs, can be in place -+// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place. -+// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid -+// accessing them directly as uint16_t* values. -+// aLen is count of UTF-16 values, so the byte buffers are twice that. - static void --CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen) -+CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen) - { -- const uint16_t *end = aInBuf + aLen; -+ const char* end = aInBuf + aLen * 2; - while (aInBuf < end) { -- uint16_t value = *aInBuf; -- *aOutBuf = (value >> 8) | (value & 0xff) << 8; -- aOutBuf++; -- aInBuf++; -+ uint8_t b0 = *aInBuf++; -+ *aOutBuf++ = *aInBuf++; -+ *aOutBuf++ = b0; - } - } - -@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen, - if (csName[0] == 0) { - // empty charset name: data is utf16be, no need to instantiate a converter - uint32_t strLen = aByteLen / 2; --#ifdef IS_LITTLE_ENDIAN - aName.SetLength(strLen); -- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData), -- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen); -+#ifdef IS_LITTLE_ENDIAN -+ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()), -+ strLen); - #else -- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen); --#endif -+ memcpy(aName.BeginWriting(), aNameData, strLen * 2); -+#endif - return true; - } - diff --git a/www/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985 index 42514af9226f..1ba4dece14d1 100644 --- a/www/firefox/files/patch-bug826985 +++ b/www/firefox/files/patch-bug826985 @@ -67,7 +67,7 @@ diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_lin index 239a292..bab496c 100644 --- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc +++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc -@@ -25,10 +25,21 @@ +@@ -25,6 +25,9 @@ #else #include <linux/videodev2.h> #endif @@ -77,6 +77,9 @@ index 239a292..bab496c 100644 #include "webrtc/system_wrappers/interface/ref_count.h" #include "webrtc/system_wrappers/interface/trace.h" +@@ -34,6 +37,15 @@ + #define BUF_LEN ( 1024 * ( EVENT_SIZE + 16 ) ) + #endif +#ifdef HAVE_LIBV4L2 +#define open v4l2_open @@ -86,10 +89,11 @@ index 239a292..bab496c 100644 +#define mmap v4l2_mmap +#define munmap v4l2_munmap +#endif - ++ namespace webrtc { -@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName( + namespace videocapturemodule +@@ -274,6 +286,11 @@ int32_t DeviceInfoLinux::GetDeviceName( memset(deviceNameUTF8, 0, deviceNameLength); memcpy(cameraName, cap.card, sizeof(cap.card)); diff --git a/www/firefox/files/patch-bug847568 b/www/firefox/files/patch-bug847568 index 493eb3910155..9588ce5df654 100644 --- a/www/firefox/files/patch-bug847568 +++ b/www/firefox/files/patch-bug847568 @@ -1,26 +1,26 @@ # Allow building against system-wide graphite2/harfbuzz. diff --git config/Makefile.in config/Makefile.in -index 10807cf..f4b8587 100644 +index e2e11dc0e27e..a6206bb0ff30 100644 --- config/Makefile.in +++ config/Makefile.in -@@ -49,6 +49,8 @@ export:: $(export-preqs) - -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \ - -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \ - -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \ +@@ -41,6 +41,8 @@ export:: $(export-preqs) + $(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \ + -DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \ + -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \ + -DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \ + -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \ - $(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers - $(INSTALL) system_wrappers $(DIST) - + -DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \ + -DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \ + -DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \ diff --git config/system-headers config/system-headers -index 48afa0f..61612f6 100644 +index a0c53c651a3e..5ee7f71f9634 100644 --- config/system-headers +++ config/system-headers -@@ -1331,3 +1331,12 @@ unicode/utypes.h +@@ -1269,6 +1269,15 @@ libsn/sn-launcher.h + libsn/sn-monitor.h + libsn/sn-util.h #endif - libutil.h - unwind.h +#if MOZ_SYSTEM_GRAPHITE2==1 +graphite2/Font.h +graphite2/Segment.h @@ -30,11 +30,14 @@ index 48afa0f..61612f6 100644 +harfbuzz/hb-ot.h +harfbuzz/hb.h +#endif + #if MOZ_SYSTEM_HUNSPELL==1 + hunspell.hxx + #endif diff --git dom/base/moz.build dom/base/moz.build -index 6e0d4f5..0770717 100644 +index 8e19020315ae..2fcdbb6f7b42 100644 --- dom/base/moz.build +++ dom/base/moz.build -@@ -457,6 +457,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']: +@@ -464,6 +464,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']: if CONFIG['MOZ_X11']: CXXFLAGS += CONFIG['TK_CFLAGS'] @@ -45,7 +48,7 @@ index 6e0d4f5..0770717 100644 'PropertyUseCounterMap.inc', 'UseCounterList.h', diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh -index faaab1b..04eff5f 100644 +index faaab1b17971..04eff5f09882 100644 --- gfx/graphite2/moz-gr-update.sh +++ gfx/graphite2/moz-gr-update.sh @@ -1,6 +1,7 @@ @@ -75,23 +78,23 @@ index faaab1b..04eff5f 100644 echo echo If gfx/graphite2/src/files.mk has changed, please make corresponding diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla -index 24e6cbb..0b7a5df 100644 +index 22c76a7df020..a01490bd49ee 100644 --- gfx/harfbuzz/README-mozilla +++ gfx/harfbuzz/README-mozilla -@@ -20,3 +20,8 @@ the mozilla tree. +@@ -19,3 +19,8 @@ the mozilla tree. If the collection of source files changes, manual updates to moz.build may be needed, as we don't use the upstream makefiles. + +The in-tree copy may be omitted during build by --with-system-harfbuzz. -+Make sure to keep pkg-config version check within old-configure.in in sync ++Make sure to keep pkg-config version check within toolkit/moz.configure in sync +with checkout version or increment latest tag by one if it's not based +on upstream release. diff --git gfx/moz.build gfx/moz.build -index 2509198..5cc4663 100644 +index 771f652e837a..3b358d84e384 100644 --- gfx/moz.build +++ gfx/moz.build -@@ -7,6 +7,12 @@ +@@ -10,6 +10,12 @@ with Files('**'): if CONFIG['MOZ_TREE_CAIRO']: DIRS += ['cairo'] @@ -104,7 +107,7 @@ index 2509198..5cc4663 100644 DIRS += [ '2d', 'ycbcr', -@@ -15,8 +21,6 @@ DIRS += [ +@@ -18,8 +24,6 @@ DIRS += [ 'qcms', 'gl', 'layers', @@ -114,57 +117,57 @@ index 2509198..5cc4663 100644 'thebes', 'ipc', diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py -index ab1365f..8897c27 100755 +index e06ae3457a47..93faa61594a3 100755 --- gfx/skia/generate_mozbuild.py +++ gfx/skia/generate_mozbuild.py -@@ -140,6 +140,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: +@@ -143,6 +143,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + - if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'): + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] diff --git gfx/skia/moz.build gfx/skia/moz.build -index a2f914b..d3759b0 100644 +index 2118677ca3a8..e4978b413784 100644 --- gfx/skia/moz.build +++ gfx/skia/moz.build -@@ -664,6 +664,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: +@@ -753,6 +753,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: '-Wno-unused-private-field', ] +if CONFIG['MOZ_SYSTEM_HARFBUZZ']: + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + - if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'): + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'): CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] diff --git gfx/thebes/moz.build gfx/thebes/moz.build -index bbbce6fd..db0ceb1 100644 +index dee9b7bfa2cb..bd801f3a468e 100644 --- gfx/thebes/moz.build +++ gfx/thebes/moz.build -@@ -289,7 +289,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): +@@ -273,7 +273,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] -DEFINES['GRAPHITE2_STATIC'] = True -+if CONFIG['MOZ_SYSTEM_HARFBUZZ']: -+ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] -+ +if CONFIG['MOZ_SYSTEM_GRAPHITE2']: + CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] +else: + DEFINES['GRAPHITE2_STATIC'] = True ++ ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] if CONFIG['CLANG_CXX']: # Suppress warnings from Skia header files. diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build -index 9754753..768cc7d 100644 +index cb1233c56d7e..06fb1f9f174b 100644 --- intl/unicharutil/util/moz.build +++ intl/unicharutil/util/moz.build -@@ -42,4 +42,7 @@ if CONFIG['_MSC_VER']: +@@ -40,4 +40,7 @@ if CONFIG['_MSC_VER']: if CONFIG['ENABLE_INTL_API']: USE_LIBS += ['icu'] @@ -172,46 +175,11 @@ index 9754753..768cc7d 100644 + CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] + DIST_INSTALL = True -diff --git moz.configure moz.configure -index e762576..196dafd 100644 ---- moz.configure -+++ moz.configure -@@ -216,6 +216,30 @@ check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'), - check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'), - allow_missing=True) - -+option('--with-system-graphite2', -+ help="Use system graphite2 (located with pkgconfig)") -+ -+@depends('--with-system-graphite2', compile_environment) -+def check_for_graphite2(value, compile_env): -+ return value and compile_env -+ -+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', -+ check_for_graphite2) -+ -+set_config('MOZ_SYSTEM_GRAPHITE2', system_graphite2) -+ -+option('--with-system-harfbuzz', -+ help="Use system harfbuzz (located with pkgconfig)") -+ -+@depends('--with-system-harfbuzz', compile_environment) -+def check_for_harfbuzz(value, compile_env): -+ return value and compile_env -+ -+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.3.3', -+ check_for_harfbuzz) -+ -+set_config('MOZ_SYSTEM_HARFBUZZ', system_harfbuzz) -+ - option('--enable-system-hunspell', - help="Use system hunspell (located with pkgconfig)") - diff --git netwerk/dns/moz.build netwerk/dns/moz.build -index f788d9a..5662301 100644 +index 79c26e3e7001..c4d93bc5f7dc 100644 --- netwerk/dns/moz.build +++ netwerk/dns/moz.build -@@ -66,6 +66,9 @@ LOCAL_INCLUDES += [ +@@ -69,6 +69,9 @@ LOCAL_INCLUDES += [ '/netwerk/base', ] @@ -222,11 +190,11 @@ index f788d9a..5662301 100644 DEFINES['IDNA2008'] = True USE_LIBS += ['icu'] diff --git old-configure.in old-configure.in -index 0070d48..9d1129f 100644 +index 95a58b634593..b614eef85c89 100644 --- old-configure.in +++ old-configure.in -@@ -5764,6 +5764,27 @@ if test "$USE_FC_FREETYPE"; then - fi +@@ -4888,6 +4888,27 @@ dnl ======================================================== + AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR) dnl ======================================================== +dnl Check for graphite2 @@ -254,10 +222,10 @@ index 0070d48..9d1129f 100644 dnl ======================================================== diff --git toolkit/library/moz.build toolkit/library/moz.build -index a3d5450..2c684a7e 100644 +index 24f940e1ed7e..079a575adec3 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build -@@ -217,6 +217,12 @@ if CONFIG['MOZ_SYSTEM_JPEG']: +@@ -228,6 +228,12 @@ if CONFIG['MOZ_SYSTEM_JPEG']: if CONFIG['MOZ_SYSTEM_PNG']: OS_LIBS += CONFIG['MOZ_PNG_LIBS'] @@ -270,3 +238,34 @@ index a3d5450..2c684a7e 100644 if CONFIG['MOZ_SYSTEM_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] +diff --git toolkit/moz.configure toolkit/moz.configure +index 9297e4d6f501..d8e273887e4b 100644 +--- toolkit/moz.configure ++++ toolkit/moz.configure +@@ -343,6 +343,26 @@ add_old_configure_assignment('FT2_LIBS', + add_old_configure_assignment('FT2_CFLAGS', + delayed_getattr(ft2_info, 'cflags')) + ++# Graphite2 ++# ============================================================== ++option('--with-system-graphite2', ++ help="Use system graphite2 (located with pkgconfig)") ++ ++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2', ++ when='--with-system-graphite2') ++ ++set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True)) ++ ++# HarfBuzz ++# ============================================================== ++option('--with-system-harfbuzz', ++ help="Use system harfbuzz (located with pkgconfig)") ++ ++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.1', ++ when='--with-system-harfbuzz') ++ ++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True)) ++ + # Apple platform decoder support + # ============================================================== + @depends(toolkit) diff --git a/www/firefox/files/patch-bug981348 b/www/firefox/files/patch-bug981348 index e4b7edfd9b03..0c2ffea1ef7b 100644 --- a/www/firefox/files/patch-bug981348 +++ b/www/firefox/files/patch-bug981348 @@ -1,8 +1,28 @@ diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp -index 4b21361..cb3be32 100644 +index 88bba9baa401..99f240952dfe 100644 --- dom/system/OSFileConstants.cpp +++ dom/system/OSFileConstants.cpp -@@ -662,7 +662,7 @@ +@@ -16,14 +16,17 @@ + #include "dirent.h" + #include "poll.h" + #include "sys/stat.h" +-#if defined(ANDROID) ++#if defined(XP_LINUX) + #include <sys/vfs.h> + #define statvfs statfs ++#define f_frsize f_bsize + #else + #include "sys/statvfs.h" ++#endif // defined(XP_LINUX) ++#if !defined(ANDROID) + #include "sys/wait.h" + #include <spawn.h> +-#endif // defined(ANDROID) ++#endif // !defined(ANDROID) + #endif // defined(XP_UNIX) + + #if defined(XP_LINUX) +@@ -699,7 +702,7 @@ static const dom::ConstantSpec gLibcProperties[] = { "OSFILE_SIZEOF_STATVFS", JS::Int32Value(sizeof (struct statvfs)) }, @@ -12,7 +32,7 @@ index 4b21361..cb3be32 100644 #endif // defined(XP_UNIX) diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm -index b59fca4..0cf220b 100644 +index a028dda7d5ec..f5c632e3d7e5 100644 --- toolkit/components/osfile/modules/osfile_unix_back.jsm +++ toolkit/components/osfile/modules/osfile_unix_back.jsm @@ -228,8 +228,8 @@ @@ -27,11 +47,11 @@ index b59fca4..0cf220b 100644 "f_bavail", Type.fsblkcnt_t.implementation); diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm -index 99e5e9b..de642c5 100644 +index bd60d4d8419c..a8cd6b546b0e 100644 --- toolkit/components/osfile/modules/osfile_unix_front.jsm +++ toolkit/components/osfile/modules/osfile_unix_front.jsm -@@ -373,7 +373,7 @@ - throw_on_negative("statvfs", UnixFile.statvfs(sourcePath, fileSystemInfoPtr)); +@@ -399,7 +399,7 @@ + throw_on_negative("statvfs", (UnixFile.statvfs || UnixFile.statfs)(sourcePath, fileSystemInfoPtr)); let bytes = new Type.uint64_t.implementation( - fileSystemInfo.f_bsize * fileSystemInfo.f_bavail); diff --git a/www/firefox/files/patch-z-bug517422 b/www/firefox/files/patch-z-bug517422 index 482d6eba07d8..e3c4c41fbc6f 100644 --- a/www/firefox/files/patch-z-bug517422 +++ b/www/firefox/files/patch-z-bug517422 @@ -1,10 +1,10 @@ # Allow more config/external/ libs built against system-wide version. diff --git build/moz.configure/old.configure build/moz.configure/old.configure -index 42ab554..c91df3d 100644 +index d0fe7accffe6..c46bdd023225 100644 --- build/moz.configure/old.configure +++ build/moz.configure/old.configure -@@ -320,7 +320,12 @@ def old_configure_options(*options): +@@ -288,7 +288,12 @@ def old_configure_options(*options): '--with-system-libvpx', '--with-system-nspr', '--with-system-nss', @@ -18,13 +18,13 @@ index 42ab554..c91df3d 100644 '--with-thumb', '--with-thumb-interwork', diff --git config/Makefile.in config/Makefile.in -index 5383399..0410004 100644 +index a6206bb0ff30..f20987c61754 100644 --- config/Makefile.in +++ config/Makefile.in @@ -51,6 +51,11 @@ export:: $(export-preqs) + -DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \ + -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \ -DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \ - -DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \ - -DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \ + -DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \ + -DMOZ_SYSTEM_THEORA=$(MOZ_SYSTEM_THEORA) \ + -DMOZ_SYSTEM_VORBIS=$(MOZ_SYSTEM_VORBIS) \ @@ -34,12 +34,12 @@ index 5383399..0410004 100644 $(INSTALL) system_wrappers $(DIST) diff --git config/external/moz.build config/external/moz.build -index f67c5c7..eb909ce 100644 +index 029ff8504795..2c3a40caa1ba 100644 --- config/external/moz.build +++ config/external/moz.build -@@ -20,12 +20,21 @@ if CONFIG['MOZ_UPDATER']: - # There's no "native brotli" yet, but probably in the future... +@@ -21,12 +21,21 @@ if CONFIG['MOZ_UPDATER']: external_dirs += ['modules/brotli'] + external_dirs += ['modules/woff2'] -if CONFIG['MOZ_VORBIS']: +if not CONFIG['MOZ_SYSTEM_OGG']: @@ -61,7 +61,7 @@ index f67c5c7..eb909ce 100644 if CONFIG['MOZ_WEBM_ENCODER']: external_dirs += ['media/libmkv'] -@@ -51,12 +60,9 @@ external_dirs += [ +@@ -52,12 +61,9 @@ external_dirs += [ 'media/kiss_fft', 'media/libcubeb', 'media/libnestegg', @@ -71,17 +71,17 @@ index f67c5c7..eb909ce 100644 'media/libspeex_resampler', 'media/libstagefright', - 'media/libsoundtouch', + 'media/psshparser' ] - DIRS += ['../../' + i for i in external_dirs] diff --git config/system-headers config/system-headers -index bef567c..9807c29 100644 +index 5ee7f71f9634..13178ac3b3ab 100644 --- config/system-headers +++ config/system-headers -@@ -1364,3 +1363,17 @@ graphite2/Segment.h - harfbuzz/hb-ot.h - harfbuzz/hb.h - #endif +@@ -1348,3 +1348,17 @@ unicode/utypes.h + libutil.h + unwind.h + fenv.h +#if MOZ_SYSTEM_OGG==1 +ogg/ogg.h +ogg/os_types.h @@ -96,128 +96,12 @@ index bef567c..9807c29 100644 +#if MOZ_SYSTEM_TREMOR==1 +tremor/ivorbiscodec.h +#endif -diff --git old-configure.in configure.in -index 87db361..7947626 100644 ---- old-configure.in -+++ old-configure.in -@@ -5401,6 +5401,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then - fi - fi - -+dnl ======================================================== -+dnl Check for libogg -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-ogg, -+[ --with-system-ogg Use system libogg (located with pkgconfig)], -+MOZ_SYSTEM_OGG=1, -+MOZ_SYSTEM_OGG=) -+ -+if test -n "$MOZ_SYSTEM_OGG"; then -+ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1) -+ -+ _SAVE_LIBS=$LIBS -+ LIBS="$LIBS $MOZ_OGG_LIBS" -+ AC_CHECK_FUNC(ogg_set_mem_functions, [], -+ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) -+ LIBS=$_SAVE_LIBS -+fi -+ -+AC_SUBST(MOZ_SYSTEM_OGG) -+ -+dnl ======================================================== -+dnl Check for libvorbis -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-vorbis, -+[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], -+MOZ_SYSTEM_VORBIS=1, -+MOZ_SYSTEM_VORBIS=) -+ -+if test -n "$MOZ_SYSTEM_VORBIS"; then -+ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_VORBIS) -+ -+dnl ======================================================== -+dnl Check for integer-only libvorbis aka tremor -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-tremor, -+[ --with-system-tremor Use system libtremor (located with pkgconfig)], -+MOZ_SYSTEM_TREMOR=1, -+MOZ_SYSTEM_TREMOR=) -+ -+if test -n "$MOZ_SYSTEM_TREMOR"; then -+ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_TREMOR) -+ -+dnl ======================================================== -+dnl Check for libtheora -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-theora, -+[ --with-system-theora Use system libtheora (located with pkgconfig)], -+MOZ_SYSTEM_THEORA=1, -+MOZ_SYSTEM_THEORA=) -+ -+if test -n "$MOZ_SYSTEM_THEORA"; then -+ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2) -+fi -+ -+AC_SUBST(MOZ_SYSTEM_THEORA) -+ -+dnl ======================================================== -+dnl Check for libSoundTouch -+dnl ======================================================== -+ -+MOZ_ARG_WITH_BOOL(system-soundtouch, -+[ --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)], -+MOZ_SYSTEM_SOUNDTOUCH=1, -+MOZ_SYSTEM_SOUNDTOUCH=) -+ -+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then -+ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0) -+ -+ AC_LANG_SAVE -+ AC_LANG_CPLUSPLUS -+ _SAVE_CXXFLAGS=$CXXFLAGS -+ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS" -+ AC_CACHE_CHECK(for soundtouch sample type, -+ ac_cv_soundtouch_sample_type, -+ [AC_TRY_COMPILE([#include <SoundTouch.h> -+ #ifndef SOUNDTOUCH_INTEGER_SAMPLES -+ #error soundtouch expects float samples -+ #endif], -+ [], -+ [ac_cv_soundtouch_sample_type=short], -+ [ac_cv_soundtouch_sample_type=float])]) -+ CXXFLAGS=$_SAVE_CXXFLAGS -+ AC_LANG_RESTORE -+ -+ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \ -+ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then -+ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.]) -+ fi -+fi -+ -+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then -+ AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH) -+fi -+AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) -+ - dnl system libvpx Support - dnl ======================================================== - MOZ_ARG_WITH_BOOL(system-libvpx, diff --git dom/media/AudioStream.cpp dom/media/AudioStream.cpp -index 2127256..1ec09fe 100644 +index 93ecda4319af..ff674c64ea07 100644 --- dom/media/AudioStream.cpp +++ dom/media/AudioStream.cpp -@@ -125,7 +125,9 @@ AudioStream::AudioStream(DataSource& aSo - , mOutRate(0) +@@ -115,7 +115,9 @@ AudioStream::AudioStream(DataSource& aSource) + : mMonitor("AudioStream") , mChannels(0) , mOutChannels(0) +#ifndef MOZ_SYSTEM_SOUNDTOUCH @@ -226,7 +110,7 @@ index 2127256..1ec09fe 100644 , mDumpFile(nullptr) , mState(INITIALIZED) , mDataSource(aSource) -@@ -152,9 +154,11 @@ AudioStream::~AudioStream() +@@ -130,9 +132,11 @@ AudioStream::~AudioStream() if (mDumpFile) { fclose(mDumpFile); } @@ -238,7 +122,7 @@ index 2127256..1ec09fe 100644 } size_t -@@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretche +@@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked() { mMonitor.AssertCurrentThreadOwns(); if (!mTimeStretcher) { @@ -251,11 +135,11 @@ index 2127256..1ec09fe 100644 mTimeStretcher->setChannels(mOutChannels); mTimeStretcher->setPitch(1.0); diff --git dom/media/AudioStream.h dom/media/AudioStream.h -index a552e3e..02b80b1 100644 +index 7dc1f60f95cc..67d402a4117f 100644 --- dom/media/AudioStream.h +++ dom/media/AudioStream.h -@@ -15,7 +15,11 @@ - #include "mozilla/RefPtr.h" +@@ -16,7 +16,11 @@ + #include "mozilla/TimeStamp.h" #include "mozilla/UniquePtr.h" #include "CubebUtils.h" +#ifdef MOZ_SYSTEM_SOUNDTOUCH @@ -266,9 +150,9 @@ index a552e3e..02b80b1 100644 namespace mozilla { -@@ -277,7 +277,11 @@ private: - // Number of frames written to the buffers. - int64_t mWritten; +@@ -287,7 +291,11 @@ private: + uint32_t mChannels; + uint32_t mOutChannels; AudioClock mAudioClock; +#ifdef MOZ_SYSTEM_SOUNDTOUCH + nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher; @@ -276,13 +160,13 @@ index a552e3e..02b80b1 100644 soundtouch::SoundTouch* mTimeStretcher; +#endif - // Stream start time for stream open delay telemetry. - TimeStamp mStartTime; + // Output file for dumping audio + FILE* mDumpFile; diff --git dom/media/moz.build dom/media/moz.build -index 7526cff..e0a0ca0 100644 +index 86b051c58d33..fb6186dce78b 100644 --- dom/media/moz.build +++ dom/media/moz.build -@@ -300,6 +300,21 @@ if CONFIG['MOZ_WEBRTC']: +@@ -308,6 +308,21 @@ if CONFIG['MOZ_WEBRTC']: DEFINES['MOZILLA_INTERNAL_API'] = True @@ -304,11 +188,50 @@ index 7526cff..e0a0ca0 100644 if CONFIG['OS_TARGET'] == 'WINNT': DEFINES['WEBRTC_WIN'] = True else: +diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp +index 078f6ea5ef60..c600db067539 100644 +--- dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp ++++ dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp +@@ -11,9 +11,13 @@ + #include "prmem.h" + #include "prlink.h" + ++#ifdef MOZ_SYSTEM_SOUNDTOUCH ++#include "nsXPCOMPrivate.h" // for XUL_DLL ++#else + // We use a known symbol located in lgpllibs to determine its location. + // soundtouch happens to be always included in lgpllibs + #include "soundtouch/SoundTouch.h" ++#endif + + namespace mozilla { + +@@ -50,6 +54,12 @@ FFVPXRuntimeLinker::Init() + + sLinkStatus = LinkStatus_FAILED; + ++#ifdef MOZ_SYSTEM_SOUNDTOUCH ++ // We retrieve the path of the XUL library as this is where mozavcodec and ++ // mozavutil libs are located. ++ char* path = ++ PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init); ++#else + // We retrieve the path of the lgpllibs library as this is where mozavcodec + // and mozavutil libs are located. + char* lgpllibsname = PR_GetLibraryName(nullptr, "lgpllibs"); +@@ -60,6 +70,7 @@ FFVPXRuntimeLinker::Init() + PR_GetLibraryFilePathname(lgpllibsname, + (PRFuncPtr)&soundtouch::SoundTouch::getVersionId); + PR_FreeLibraryName(lgpllibsname); ++#endif + if (!path) { + return false; + } diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA -index 0833e4d..7ece97b 100644 +index 6213fdc7770c..ada799916a17 100644 --- media/libogg/README_MOZILLA +++ media/libogg/README_MOZILLA -@@ -6,3 +6,6 @@ The svn revision number used was r17287. +@@ -6,3 +6,6 @@ package downloaded from xiph.org and copied using the update.sh script. The int-types.patch address a bug that config_types.h generated from Linux platform can't be used on OpenSolaris directly see Mozilla bug 449754 @@ -316,7 +239,7 @@ index 0833e4d..7ece97b 100644 +The in-tree copy may be omitted during build by --with-system-ogg. +Keep version in old-configure.in in sync on updates. diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA -index bfd4b1a..15b158d 100644 +index dc0dbe8f6886..ea73b55e3e39 100644 --- media/libsoundtouch/README_MOZILLA +++ media/libsoundtouch/README_MOZILLA @@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree, @@ -326,7 +249,7 @@ index bfd4b1a..15b158d 100644 +The in-tree copy may be omitted during build by --with-system-soundtouch. +Keep version in old-configure.in in sync on updates. diff --git media/libsoundtouch/src/soundtouch_perms.h media/libsoundtouch/src/soundtouch_perms.h -index 0af2fe6..d80c145 100644 +index 0af2fe618311..10973564e7a4 100644 --- media/libsoundtouch/src/soundtouch_perms.h +++ media/libsoundtouch/src/soundtouch_perms.h @@ -12,7 +12,9 @@ @@ -340,7 +263,7 @@ index 0af2fe6..d80c145 100644 #endif // MOZILLA_SOUNDTOUCH_PERMS_H diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA -index d48dbfa..f08a2ed 100644 +index d48dbfa6f63d..6f30f250220e 100644 --- media/libtheora/README_MOZILLA +++ media/libtheora/README_MOZILLA @@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh, @@ -351,10 +274,10 @@ index d48dbfa..f08a2ed 100644 +The in-tree copy may be omitted during build by --with-system-theora. +Keep version in old-configure.in in sync on updates. diff --git media/libtheora/moz.build media/libtheora/moz.build -index 14265b1..3069e99 100644 +index c7f85eebff95..aae7b814adb5 100644 --- media/libtheora/moz.build +++ media/libtheora/moz.build -@@ -21,6 +21,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']: +@@ -21,6 +21,9 @@ FINAL_LIBRARY = 'gkmedias' # The encoder is currently not included. DEFINES['THEORA_DISABLE_ENCODE'] = True @@ -362,10 +285,10 @@ index 14265b1..3069e99 100644 + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] + # Suppress warnings in third-party code. - if CONFIG['GNU_CC']: + if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']: CFLAGS += ['-Wno-type-limits'] diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA -index ee67b53..3f34a09 100644 +index ee67b53a05c5..81c971773d55 100644 --- media/libtremor/README_MOZILLA +++ media/libtremor/README_MOZILLA @@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system. @@ -376,20 +299,20 @@ index ee67b53..3f34a09 100644 +The in-tree copy may be omitted during build by --with-system-tremor. +Keep version in old-configure.in in sync on updates. diff --git media/libtremor/moz.build media/libtremor/moz.build -index 31831ba..a03d576 100644 +index 83afc8e37c64..71ef159da3d7 100644 --- media/libtremor/moz.build +++ media/libtremor/moz.build -@@ -6,3 +6,5 @@ +@@ -9,3 +9,5 @@ with Files('*'): DIRS += ['include/tremor', 'lib'] +if CONFIG['MOZ_SYSTEM_OGG']: + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA -index 7c7454c..55baedd 100644 +index 1211ac074b33..eb31084aed25 100644 --- media/libvorbis/README_MOZILLA +++ media/libvorbis/README_MOZILLA -@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059 +@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.5@19464 Some files are renamed during the copy to prevent clashes with object file names with other Mozilla libraries. @@ -397,21 +320,137 @@ index 7c7454c..55baedd 100644 +The in-tree copy may be omitted during build by --with-system-vorbis. +Keep version in old-configure.in in sync on updates. diff --git media/libvorbis/moz.build media/libvorbis/moz.build -index 919b99e..cc776f7 100644 +index adf393782cc9..923b76231107 100644 --- media/libvorbis/moz.build +++ media/libvorbis/moz.build -@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias' +@@ -56,3 +56,6 @@ FINAL_LIBRARY = 'gkmedias' # Suppress warnings in third-party code. if CONFIG['GNU_CC']: CFLAGS += ['-Wno-uninitialized'] + +if CONFIG['MOZ_SYSTEM_OGG']: + CFLAGS += CONFIG['MOZ_OGG_CFLAGS'] +diff --git old-configure.in old-configure.in +index b614eef85c89..85f9099dba4d 100644 +--- old-configure.in ++++ old-configure.in +@@ -2941,6 +2941,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then + fi + fi + ++dnl ======================================================== ++dnl Check for libogg ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-ogg, ++[ --with-system-ogg Use system libogg (located with pkgconfig)], ++MOZ_SYSTEM_OGG=1, ++MOZ_SYSTEM_OGG=) ++ ++if test -n "$MOZ_SYSTEM_OGG"; then ++ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.0) ++ ++ _SAVE_LIBS=$LIBS ++ LIBS="$LIBS $MOZ_OGG_LIBS" ++ AC_CHECK_FUNC(ogg_set_mem_functions, [], ++ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)]) ++ LIBS=$_SAVE_LIBS ++fi ++ ++AC_SUBST(MOZ_SYSTEM_OGG) ++ ++dnl ======================================================== ++dnl Check for libvorbis ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-vorbis, ++[ --with-system-vorbis Use system libvorbis (located with pkgconfig)], ++MOZ_SYSTEM_VORBIS=1, ++MOZ_SYSTEM_VORBIS=) ++ ++if test -n "$MOZ_SYSTEM_VORBIS"; then ++ PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5) ++fi ++ ++AC_SUBST(MOZ_SYSTEM_VORBIS) ++ ++dnl ======================================================== ++dnl Check for integer-only libvorbis aka tremor ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-tremor, ++[ --with-system-tremor Use system libtremor (located with pkgconfig)], ++MOZ_SYSTEM_TREMOR=1, ++MOZ_SYSTEM_TREMOR=) ++ ++if test -n "$MOZ_SYSTEM_TREMOR"; then ++ PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1) ++fi ++ ++AC_SUBST(MOZ_SYSTEM_TREMOR) ++ ++dnl ======================================================== ++dnl Check for libtheora ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-theora, ++[ --with-system-theora Use system libtheora (located with pkgconfig)], ++MOZ_SYSTEM_THEORA=1, ++MOZ_SYSTEM_THEORA=) ++ ++if test -n "$MOZ_SYSTEM_THEORA"; then ++ PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2) ++fi ++ ++AC_SUBST(MOZ_SYSTEM_THEORA) ++ ++dnl ======================================================== ++dnl Check for libSoundTouch ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-soundtouch, ++[ --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)], ++MOZ_SYSTEM_SOUNDTOUCH=1, ++MOZ_SYSTEM_SOUNDTOUCH=) ++ ++if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then ++ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0) ++ ++ AC_LANG_SAVE ++ AC_LANG_CPLUSPLUS ++ _SAVE_CXXFLAGS=$CXXFLAGS ++ CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS" ++ AC_CACHE_CHECK(for soundtouch sample type, ++ ac_cv_soundtouch_sample_type, ++ [AC_TRY_COMPILE([#include <SoundTouch.h> ++ #ifndef SOUNDTOUCH_INTEGER_SAMPLES ++ #error soundtouch expects float samples ++ #endif], ++ [], ++ [ac_cv_soundtouch_sample_type=short], ++ [ac_cv_soundtouch_sample_type=float])]) ++ CXXFLAGS=$_SAVE_CXXFLAGS ++ AC_LANG_RESTORE ++ ++ if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \ ++ -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then ++ AC_MSG_ERROR([SoundTouch library is built with incompatible sample type. Either rebuild the library with/without --enable-integer-samples, chase default Mozilla sample type or remove --with-system-soundtouch.]) ++ fi ++fi ++ ++if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then ++ AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH) ++fi ++AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH) ++ + dnl system libvpx Support + dnl ======================================================== + MOZ_ARG_WITH_BOOL(system-libvpx, diff --git toolkit/library/moz.build toolkit/library/moz.build -index d42137a..695e75a8 100644 +index 079a575adec3..514d901195de 100644 --- toolkit/library/moz.build +++ toolkit/library/moz.build -@@ -178,6 +178,21 @@ if CONFIG['MOZ_SYSTEM_PNG']: +@@ -237,6 +237,21 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']: if CONFIG['MOZ_SYSTEM_HUNSPELL']: OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS'] @@ -434,20 +473,20 @@ index d42137a..695e75a8 100644 OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS'] diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp -index 2cf281e..6d7af0e 100644 +index c083ab4bc4f3..62b917043a2c 100644 --- xpcom/build/XPCOMInit.cpp +++ xpcom/build/XPCOMInit.cpp -@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**); - #include "mozilla/VisualEventTracer.h" - #endif +@@ -154,7 +154,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**); + + #include "mozilla/ipc/GeckoChildProcessHost.h" +#ifndef MOZ_OGG_NO_MEM_REPORTING #include "ogg/ogg.h" +#endif #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING) - #include "vpx_mem/vpx_mem.h" - #endif -@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, + #if defined(HAVE_STDINT_H) + // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in +@@ -664,11 +666,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult, // this oddness. mozilla::SetICUMemoryFunctions(); |