View | Details | Raw Unified | Return to bug 222464
Collapse All | Expand All

(-)b/Mk/Uses/gecko.mk (-3 / +3 lines)
Lines 51-58 _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g Link Here
51
51
52
.elif ${gecko_ARGS:Mseamonkey}
52
.elif ${gecko_ARGS:Mseamonkey}
53
53
54
_GECKO_DEFAULT_VERSION=	48
54
_GECKO_DEFAULT_VERSION=	49
55
_GECKO_VERSIONS=		48
55
_GECKO_VERSIONS=		49
56
_GECKO_TYPE=	seamonkey
56
_GECKO_TYPE=	seamonkey
57
57
58
.if exists(${LOCALBASE}/bin/seamonkey)
58
.if exists(${LOCALBASE}/bin/seamonkey)
Lines 61-67 _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9]*:C/[0-9].([0-9][0-9]).*/\1/ Link Here
61
.endif
61
.endif
62
62
63
# Dependence lines for different Seamonkey versions
63
# Dependence lines for different Seamonkey versions
64
48_DEPENDS=		${LOCALBASE}/lib/seamonkey/seamonkey:www/seamonkey
64
49_DEPENDS=		${LOCALBASE}/lib/seamonkey/seamonkey:www/seamonkey
65
65
66
.elif ${gecko_ARGS:Mthunderbird}
66
.elif ${gecko_ARGS:Mthunderbird}
67
67
(-)b/www/seamonkey/Makefile (-6 / +5 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	seamonkey
4
PORTNAME=	seamonkey
5
DISTVERSION=	2.48
5
DISTVERSION=	2.49.1
6
MOZILLA_VER=	51 # above + 3
6
MOZILLA_VER=	52 # above + 3
7
PORTREVISION=	1
8
CATEGORIES?=	www mail news editors irc ipv6
7
CATEGORIES?=	www mail news editors irc ipv6
9
MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
8
MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
10
		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
9
		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
Lines 15-28 MAINTAINER= gecko@FreeBSD.org Link Here
15
COMMENT=	The open source, standards compliant web browser
14
COMMENT=	The open source, standards compliant web browser
16
15
17
BUILD_DEPENDS=	nspr>=4.13.1:devel/nspr \
16
BUILD_DEPENDS=	nspr>=4.13.1:devel/nspr \
18
		nss>=3.28.1:security/nss \
17
		nss>=3.28.5:security/nss \
19
		libevent>=2.0.21_2:devel/libevent \
18
		libevent>=2.0.21_2:devel/libevent \
20
		harfbuzz>=1.3.0:print/harfbuzz \
19
		harfbuzz>=1.4.1:print/harfbuzz \
21
		graphite2>=1.3.8:graphics/graphite2 \
20
		graphite2>=1.3.8:graphics/graphite2 \
22
		png>=1.6.25:graphics/png \
21
		png>=1.6.25:graphics/png \
23
		libvorbis>=1.3.5,3:audio/libvorbis \
22
		libvorbis>=1.3.5,3:audio/libvorbis \
24
		libvpx>=1.5.0:multimedia/libvpx \
23
		libvpx>=1.5.0:multimedia/libvpx \
25
		sqlite3>=3.14.1:databases/sqlite3 \
24
		sqlite3>=3.17.0:databases/sqlite3 \
26
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
25
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
27
		v4l_compat>0:multimedia/v4l_compat \
26
		v4l_compat>0:multimedia/v4l_compat \
28
		autoconf-2.13:devel/autoconf213 \
27
		autoconf-2.13:devel/autoconf213 \
(-)b/www/seamonkey/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1499406030
1
TIMESTAMP = 1505804275
2
SHA256 (seamonkey-2.48.source.tar.xz) = 6f9a07c86ba6474b44e5083f9d1315d01778c097937f7da4c5701debffab2631
2
SHA256 (seamonkey-2.49.1.source.tar.xz) = 307e128b2a61c91127a872d893ddcdc2fd88ad7cfe1c6504b501a8ea335fbd2c
3
SIZE (seamonkey-2.48.source.tar.xz) = 220412744
3
SIZE (seamonkey-2.49.1.source.tar.xz) = 229675460
(-)a/www/seamonkey/files/patch-bug1142056 (-64 lines)
Removed Link Here
1
commit ef0d953d9e2d
2
Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
3
Date:   Tue Aug 23 16:54:06 2016 +0900
4
5
    Bug 1142056 - Add aarch64 configuration on Skia's moz.build. r=gw280
6
    
7
    MozReview-Commit-ID: 60iAZjFg6W6
8
    
9
    --HG--
10
    extra : histedit_source : b3bb5a3e556393ba49f43dc4ab8bdaa9be40fb0c
11
---
12
 gfx/skia/generate_mozbuild.py |  6 ++++--
13
 gfx/skia/moz.build            | 12 ++++++++++--
14
 2 files changed, 14 insertions(+), 4 deletions(-)
15
16
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
17
index 2088b729d476..1eb04c1d7f57 100755
18
--- mozilla/gfx/skia/generate_mozbuild.py
19
+++ mozilla/gfx/skia/generate_mozbuild.py
20
@@ -429,10 +429,12 @@ def write_mozbuild(sources):
21
   f.write("if CONFIG['INTEL_ARCHITECTURE']:\n")
22
   write_sources(f, sources['intel'], 4)
23
 
24
-  f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n")
25
+  f.write("elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']:\n")
26
   write_sources(f, sources['arm'], 4)
27
 
28
-  f.write("    if CONFIG['BUILD_ARM_NEON']:\n")
29
+  f.write("    if CONFIG['CPU_ARCH'] == 'aarch64':\n")
30
+  write_sources(f, sources['neon'], 8)
31
+  f.write("    elif CONFIG['BUILD_ARM_NEON']:\n")
32
   write_list(f, 'SOURCES', sources['neon'], 8)
33
   write_cflags(f, sources['neon'], 'neon', "CONFIG['NEON_FLAGS']", 8)
34
 
35
diff --git gfx/skia/moz.build gfx/skia/moz.build
36
index b33f1cdbee54..9dba87978dd3 100644
37
--- mozilla/gfx/skia/moz.build
38
+++ mozilla/gfx/skia/moz.build
39
@@ -519,7 +519,7 @@ if CONFIG['INTEL_ARCHITECTURE']:
40
         'skia/src/opts/SkOpts_sse41.cpp',
41
         'skia/src/opts/SkOpts_ssse3.cpp',
42
     ]
43
-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
44
+elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']:
45
     UNIFIED_SOURCES += [
46
         'skia/src/core/SkUtilsArm.cpp',
47
         'skia/src/opts/SkBitmapProcState_opts_arm.cpp',
48
@@ -528,7 +528,15 @@ elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
49
     SOURCES += [
50
         'skia/src/opts/SkBlitRow_opts_arm.cpp',
51
     ]
52
-    if CONFIG['BUILD_ARM_NEON']:
53
+    if CONFIG['CPU_ARCH'] == 'aarch64':
54
+        SOURCES += [
55
+            'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
56
+            'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
57
+            'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
58
+            'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
59
+            'skia/src/opts/SkOpts_neon.cpp',
60
+        ]
61
+    elif CONFIG['BUILD_ARM_NEON']:
62
         SOURCES += [
63
             'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
64
             'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
(-)a/www/seamonkey/files/patch-bug1315986 (-49 lines)
Removed Link Here
1
commit c0d2685148b5
2
Author: Jonathan Kew <jkew@mozilla.com>
3
Date:   Wed Nov 9 15:07:54 2016 +0000
4
5
    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
6
---
7
 intl/lwbrk/nsJISx4051LineBreaker.cpp | 12 ++++++++++--
8
 1 file changed, 10 insertions(+), 2 deletions(-)
9
10
diff --git intl/lwbrk/nsJISx4051LineBreaker.cpp intl/lwbrk/nsJISx4051LineBreaker.cpp
11
index 0d89e91..1b262fa 100644
12
--- mozilla/intl/lwbrk/nsJISx4051LineBreaker.cpp
13
+++ mozilla/intl/lwbrk/nsJISx4051LineBreaker.cpp
14
@@ -12,6 +12,10 @@
15
 #include "nsTArray.h"
16
 #include "nsUnicodeProperties.h"
17
 
18
+#if ENABLE_INTL_API
19
+#include "unicode/uchar.h"  // for U_LB_COUNT until bug 1305700
20
+#endif
21
+
22
 /* 
23
 
24
    Simplification of Pair Table in JIS X 4051
25
@@ -547,10 +551,22 @@ GetClass(uint32_t u)
26
     /* CLOSE_PARENTHESIS = 36,            [CP] */ CLASS_CLOSE_LIKE_CHARACTER,
27
     /* CONDITIONAL_JAPANESE_STARTER = 37, [CJ] */ CLASS_CLOSE,
28
     /* HEBREW_LETTER = 38,                [HL] */ CLASS_CHARACTER,
29
-    /* REGIONAL_INDICATOR = 39,           [RI] */ CLASS_CHARACTER
30
+    /* REGIONAL_INDICATOR = 39,           [RI] */ CLASS_CHARACTER,
31
+#if U_ICU_VERSION_MAJOR_NUM > 57
32
+    /* E_BASE = 40,                       [EB] */ CLASS_BREAKABLE,
33
+    /* E_MODIFIER = 41,                   [EM] */ CLASS_CHARACTER,
34
+    /* ZWJ = 42,                          [ZWJ]*/ CLASS_CHARACTER,
35
+#endif
36
   };
37
 
38
-  return sUnicodeLineBreakToClass[mozilla::unicode::GetLineBreakClass(u)];
39
+#if ENABLE_INTL_API
40
+  static_assert(U_LB_COUNT == mozilla::ArrayLength(sUnicodeLineBreakToClass),
41
+                "Gecko vs ICU LineBreak class mismatch");
42
+#endif
43
+
44
+  auto cls = mozilla::unicode::GetLineBreakClass(u);
45
+  MOZ_ASSERT(cls < mozilla::ArrayLength(sUnicodeLineBreakToClass));
46
+  return sUnicodeLineBreakToClass[cls];
47
 }
48
 
49
 static bool
(-)a/www/seamonkey/files/patch-bug1316879 (-13 lines)
Removed Link Here
1
Don't use CPP/CXXCPP from environment after bug 1299919. r=glandium, a=jcristau
2
3
diff --git build/buildconfig.py build/buildconfig.py
4
index bb12114b2f4a..e73903a1a981 100644
5
--- mozilla/build/buildconfig.py
6
+++ mozilla/build/buildconfig.py
7
@@ -16,5 +16,5 @@ for var in ('topsrcdir', 'topobjdir', 'defines', 'non_global_defines',
8
 substs = dict(substs)
9
 
10
 for var in os.environ:
11
-    if var != 'SHELL' and var in substs:
12
+    if var not in ('CPP', 'CXXCPP', 'SHELL') and var in substs:
13
         substs[var] = os.environ[var]
(-)a/www/seamonkey/files/patch-bug1318914 (-34 lines)
Removed Link Here
1
commit 6dbb1148210e
2
Author: Mike Hommey <mh+mozilla@glandium.org>
3
Date:   Sun Nov 20 17:51:17 2016 +0900
4
5
    Bug 1318914 - Fix --with-system-libevent build against libevent 2.1. r=billm
6
    
7
    --HG--
8
    extra : rebase_source : da25767f6045507447f90ab03291c60a4f2c6b3d
9
---
10
 ipc/chromium/src/base/message_pump_libevent.cc | 8 ++++++++
11
 1 file changed, 8 insertions(+)
12
13
diff --git ipc/chromium/src/base/message_pump_libevent.cc ipc/chromium/src/base/message_pump_libevent.cc
14
index 2db827e5bade..3cca238c1e7c 100644
15
--- mozilla/ipc/chromium/src/base/message_pump_libevent.cc
16
+++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc
17
@@ -22,9 +22,17 @@
18
 
19
 // This macro checks that the _EVENT_SIZEOF_* constants defined in
20
 // ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct.
21
+#if defined(_EVENT_SIZEOF_SHORT)
22
 #define CHECK_EVENT_SIZEOF(TYPE, type) \
23
     static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
24
     "bad _EVENT_SIZEOF_"#TYPE);
25
+#elif defined(EVENT__SIZEOF_SHORT)
26
+#define CHECK_EVENT_SIZEOF(TYPE, type) \
27
+    static_assert(EVENT__SIZEOF_##TYPE == sizeof(type), \
28
+    "bad EVENT__SIZEOF_"#TYPE);
29
+#else
30
+#error Cannot find libevent type sizes
31
+#endif
32
 
33
 CHECK_EVENT_SIZEOF(LONG,      long);
34
 CHECK_EVENT_SIZEOF(LONG_LONG, long long);
(-)a/www/seamonkey/files/patch-bug1320991 (-55 lines)
Removed Link Here
1
commit 454e2dbe1b4f
2
Author: Mike Shal <mshal@mozilla.com>
3
Date:   Tue Dec 20 16:37:18 2016 -0500
4
5
    Bug 1320991 - Support --with-system-{nss,nspr} in modules/libmar; r?glandium
6
    
7
    The problem with the modules/libmar/tests/moz.build file when building
8
    --with-system-nspr and --with-system-nss is that the nss libraries don't
9
    exist in the tree, so they fail when trying to copy into the test
10
    directory.
11
    
12
    However, it turns out that the libraries copied into the test directory
13
    aren't even used when building with an in-tree copy, because the
14
    xpcshell launcher sets LD_LIBRARY_PATH to point to dist/bin. Since we
15
    use the dist/bin copies anyway for an in-tree build, we can stop copying
16
    them into the test directory and simultaneously fix the --with-system
17
    build.
18
    
19
    The DEFINES can also go away since this directory doesn't actually build
20
    anything.
21
    
22
    MozReview-Commit-ID: Bk2f28wc9ZJ
23
---
24
 modules/libmar/tests/moz.build | 17 -----------------
25
 1 file changed, 17 deletions(-)
26
27
diff --git modules/libmar/tests/moz.build modules/libmar/tests/moz.build
28
index ee72571b0c6b..9642553e8aa2 100644
29
--- mozilla/modules/libmar/tests/moz.build
30
+++ mozilla/modules/libmar/tests/moz.build
31
@@ -6,24 +6,7 @@
32
 
33
 XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
34
 
35
-DEFINES['BIN_SUFFIX'] = CONFIG['BIN_SUFFIX']
36
-
37
 if CONFIG['OS_TARGET'] != 'Android':
38
-    nss_files = ['nss3']
39
-    if not CONFIG['MOZ_FOLD_LIBS']:
40
-        nss_files.extend([
41
-            'nssutil3',
42
-            'plc4',
43
-            'nspr4',
44
-            'plds4',
45
-        ])
46
-    TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += sorted(
47
-        ['!/dist/bin/%s%s%s' % (
48
-            CONFIG['DLL_PREFIX'],
49
-            name,
50
-            CONFIG['DLL_SUFFIX'],
51
-        ) for name in nss_files]
52
-    )
53
     TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [
54
         '!../tool/signmar%s' % CONFIG['BIN_SUFFIX'],
55
     ]
(-)a/www/seamonkey/files/patch-bug1322112 (-23 lines)
Removed Link Here
1
--- mozilla/image/decoders/nsIconDecoder.cpp
2
+++ mozilla/image/decoders/nsIconDecoder.cpp
3
@@ -89,17 +89,18 @@ nsIconDecoder::ReadRowOfPixels(const cha
4
 {
5
   MOZ_ASSERT(aLength % 4 == 0, "Rows should contain a multiple of four bytes");
6
 
7
   auto result = mPipe.WritePixels<uint32_t>([&]() -> NextPixel<uint32_t> {
8
     if (aLength == 0) {
9
       return AsVariant(WriteState::NEED_MORE_DATA);  // Done with this row.
10
     }
11
 
12
-    uint32_t pixel = *reinterpret_cast<const uint32_t*>(aData);
13
+    uint32_t pixel;
14
+    memcpy(&pixel, aData, 4);
15
     aData += 4;
16
     aLength -= 4;
17
 
18
     return AsVariant(pixel);
19
   });
20
 
21
   MOZ_ASSERT(result != WriteState::FAILURE);
22
 
23
(-)a/www/seamonkey/files/patch-bug1322660 (-80 lines)
Removed Link Here
1
--- mozilla/modules/woff2/src/store_bytes.h
2
+++ mozilla/modules/woff2/src/store_bytes.h
3
@@ -29,41 +29,44 @@ inline size_t StoreU32(uint8_t* dst, size_t offset, uint32_t x) {
4
   dst[offset + 1] = x >> 16;
5
   dst[offset + 2] = x >> 8;
6
   dst[offset + 3] = x;
7
   return offset + 4;
8
 }
9
 
10
 inline size_t Store16(uint8_t* dst, size_t offset, int x) {
11
 #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
12
-  *reinterpret_cast<uint16_t*>(dst + offset) =
13
-      ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
14
+  uint16_t v = ((x & 0xFF) << 8) | ((x & 0xFF00) >> 8);
15
+  memcpy(dst + offset, &v, 2);
16
 #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
17
-  *reinterpret_cast<uint16_t*>(dst + offset) = static_cast<uint16_t>(x);
18
+  uint16_t v = static_cast<uint16_t>(x);
19
+  memcpy(dst + offset, &v, 2);
20
 #else
21
   dst[offset] = x >> 8;
22
   dst[offset + 1] = x;
23
 #endif
24
   return offset + 2;
25
 }
26
 
27
 inline void StoreU32(uint32_t val, size_t* offset, uint8_t* dst) {
28
   dst[(*offset)++] = val >> 24;
29
   dst[(*offset)++] = val >> 16;
30
   dst[(*offset)++] = val >> 8;
31
   dst[(*offset)++] = val;
32
 }
33
 
34
 inline void Store16(int val, size_t* offset, uint8_t* dst) {
35
 #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
36
-  *reinterpret_cast<uint16_t*>(dst + *offset) =
37
+  uint16_t v = ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
38
+  memcpy(dst + *offset, &v, 2);
39
       ((val & 0xFF) << 8) | ((val & 0xFF00) >> 8);
40
   *offset += 2;
41
 #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
42
-  *reinterpret_cast<uint16_t*>(dst + *offset) = static_cast<uint16_t>(val);
43
+  uint16_t v = static_cast<uint16_t>(val);
44
+  memcpy(dst + *offset, &v, 2);
45
   *offset += 2;
46
 #else
47
   dst[(*offset)++] = val >> 8;
48
   dst[(*offset)++] = val;
49
 #endif
50
 }
51
 
52
 inline void StoreBytes(const uint8_t* data, size_t len,
53
--- mozilla/modules/woff2/src/woff2_common.cc
54
+++ mozilla/modules/woff2/src/woff2_common.cc
55
@@ -20,22 +20,23 @@
56
 
57
 namespace woff2 {
58
 
59
 
60
 uint32_t ComputeULongSum(const uint8_t* buf, size_t size) {
61
   uint32_t checksum = 0;
62
   size_t aligned_size = size & ~3;
63
   for (size_t i = 0; i < aligned_size; i += 4) {
64
+    uint32_t v;
65
+    memcpy(&v, buf + i, 4);
66
 #if (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
67
-    uint32_t v = *reinterpret_cast<const uint32_t*>(buf + i);
68
     checksum += (((v & 0xFF) << 24) | ((v & 0xFF00) << 8) |
69
       ((v & 0xFF0000) >> 8) | ((v & 0xFF000000) >> 24));
70
 #elif (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
71
-    checksum += *reinterpret_cast<const uint32_t*>(buf + i);
72
+    checksum += v;
73
 #else
74
     checksum += (buf[i] << 24) | (buf[i + 1] << 16) |
75
       (buf[i + 2] << 8) | buf[i + 3];
76
 #endif
77
   }
78
 
79
   // treat size not aligned on 4 as if it were padded to 4 with 0's
80
   if (size != aligned_size) {
(-)a/www/seamonkey/files/patch-bug1329520 (-154 lines)
Removed Link Here
1
commit 8b0557b033b9
2
Author: Dimitry Andric <dimitry>
3
Date:   Fri Jan 27 13:55:00 2017 +0100
4
5
    Bug 1329520 - Fix "memory/mozalloc/throw_gcc.h:35:1: note: declaration missing '[[noreturn]]' (libc++ 4.0)" r=nfroyd
6
---
7
 memory/mozalloc/throw_gcc.h | 47 ++++++++++++++++++++++++++++++---------------
8
 1 file changed, 31 insertions(+), 16 deletions(-)
9
10
diff --git memory/mozalloc/throw_gcc.h memory/mozalloc/throw_gcc.h
11
index 18027e04a4a3..4264df63d493 100644
12
--- mozilla/memory/mozalloc/throw_gcc.h
13
+++ mozilla/memory/mozalloc/throw_gcc.h
14
@@ -19,104 +19,117 @@
15
 
16
 #include "mozilla/mozalloc_abort.h"
17
 
18
+// libc++ 4.0.0 and higher use C++11 [[noreturn]] attributes for the functions
19
+// below, and since clang does not allow mixing __attribute__((noreturn)) and
20
+// [[noreturn]], we have to explicitly use the latter here.  See bug 1329520.
21
+#if defined(__clang__)
22
+#  if __has_feature(cxx_attributes) && \
23
+      defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 4000
24
+#    define MOZ_THROW_NORETURN [[noreturn]]
25
+#  endif
26
+#endif
27
+#ifndef MOZ_THROW_NORETURN
28
+#  define MOZ_THROW_NORETURN MOZ_NORETURN
29
+#endif
30
+
31
 namespace std {
32
 
33
 // NB: user code is not supposed to touch the std:: namespace.  We're
34
 // doing this after careful review because we want to define our own
35
 // exception throwing semantics.  Don't try this at home!
36
 
37
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
38
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
39
 __throw_bad_exception(void)
40
 {
41
     mozalloc_abort("fatal: STL threw bad_exception");
42
 }
43
 
44
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
45
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
46
 __throw_bad_alloc(void)
47
 {
48
     mozalloc_abort("fatal: STL threw bad_alloc");
49
 }
50
 
51
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
52
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
53
 __throw_bad_cast(void)
54
 {
55
     mozalloc_abort("fatal: STL threw bad_cast");
56
 }
57
 
58
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
59
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
60
 __throw_bad_typeid(void)
61
 {
62
     mozalloc_abort("fatal: STL threw bad_typeid");
63
 }
64
 
65
 // used by <functional>
66
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
67
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
68
 __throw_bad_function_call(void)
69
 {
70
     mozalloc_abort("fatal: STL threw bad_function_call");
71
 }
72
 
73
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
74
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
75
 __throw_logic_error(const char* msg)
76
 {
77
     mozalloc_abort(msg);
78
 }
79
 
80
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
81
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
82
 __throw_domain_error(const char* msg)
83
 {
84
     mozalloc_abort(msg);
85
 }
86
 
87
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
88
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
89
 __throw_invalid_argument(const char* msg)
90
 {
91
     mozalloc_abort(msg);
92
 }
93
 
94
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
95
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
96
 __throw_length_error(const char* msg)
97
 {
98
     mozalloc_abort(msg);
99
 }
100
 
101
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
102
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
103
 __throw_out_of_range(const char* msg)
104
 {
105
     mozalloc_abort(msg);
106
 }
107
 
108
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
109
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
110
 __throw_runtime_error(const char* msg)
111
 {
112
     mozalloc_abort(msg);
113
 }
114
 
115
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
116
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
117
 __throw_range_error(const char* msg)
118
 {
119
     mozalloc_abort(msg);
120
 }
121
 
122
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
123
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
124
 __throw_overflow_error(const char* msg)
125
 {
126
     mozalloc_abort(msg);
127
 }
128
 
129
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
130
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
131
 __throw_underflow_error(const char* msg)
132
 {
133
     mozalloc_abort(msg);
134
 }
135
 
136
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
137
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
138
 __throw_ios_failure(const char* msg)
139
 {
140
     mozalloc_abort(msg);
141
 }
142
 
143
-MOZ_EXPORT MOZ_NORETURN MOZ_ALWAYS_INLINE void
144
+MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void
145
 __throw_system_error(int err)
146
 {
147
     char error[128];
148
@@ -127,4 +140,6 @@ __throw_system_error(int err)
149
 
150
 } // namespace std
151
 
152
+#undef MOZ_THROW_NORETURN
153
+
154
 #endif  // mozilla_throw_gcc_h
(-)a/www/seamonkey/files/patch-bug1330119 (-13 lines)
Removed Link Here
1
diff --git xpcom/reflect/xptcall/md/unix/moz.build xpcom/reflect/xptcall/md/unix/moz.build
2
index 019487bd69a2..a54026e70412 100644
3
--- mozilla/xpcom/reflect/xptcall/md/unix/moz.build
4
+++ mozilla/xpcom/reflect/xptcall/md/unix/moz.build
5
@@ -151,7 +151,7 @@ if CONFIG['OS_ARCH'] == 'NetBSD':
6
             'xptcstubs_netbsd_m68k.cpp'
7
         ]
8
 
9
-if CONFIG['OS_ARCH'] == 'Linux':
10
+if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD'):
11
     if CONFIG['OS_TEST'] == 'aarch64':
12
         SOURCES += [
13
             'xptcinvoke_aarch64.cpp',
(-)a/www/seamonkey/files/patch-bug1336791 (-21 lines)
Removed Link Here
1
# Allow readelf to print types without parentheses
2
3
--- mozilla/toolkit/library/dependentlibs.py
4
+++ mozilla/toolkit/library/dependentlibs.py
5
@@ -57,11 +57,15 @@ def dependentlibs_readelf(lib):
6
     for line in proc.stdout:
7
         # Each line has the following format:
8
         #  tag (TYPE)          value
9
+        # or with BSD readelf:
10
+        #  tag TYPE            value
11
         # Looking for NEEDED type entries
12
         tmp = line.split(' ', 3)
13
-        if len(tmp) > 3 and tmp[2] == '(NEEDED)':
14
+        if len(tmp) > 3 and 'NEEDED' in tmp[2]:
15
             # NEEDED lines look like:
16
             # 0x00000001 (NEEDED)             Shared library: [libname]
17
+            # or with BSD readelf:
18
+            # 0x00000001 NEEDED               Shared library: [libname]
19
             match = re.search('\[(.*)\]', tmp[3])
20
             if match:
21
                 deps.append(match.group(1))
(-)b/www/seamonkey/files/patch-bug1338655 (-6 / +6 lines)
Lines 35-55 diff --git media/libstagefright/binding/mp4parse-cargo.patch media/libstagefrigh Link Here
35
index 1dd13d20472a..bfa0ab74b424 100644
35
index 1dd13d20472a..bfa0ab74b424 100644
36
--- mozilla/media/libstagefright/binding/mp4parse-cargo.patch
36
--- mozilla/media/libstagefright/binding/mp4parse-cargo.patch
37
+++ mozilla/media/libstagefright/binding/mp4parse-cargo.patch
37
+++ mozilla/media/libstagefright/binding/mp4parse-cargo.patch
38
@@ -2,12 +2,13 @@ diff --git a/media/libstagefright/binding/mp4parse_cap
38
@@ -25,12 +25,13 @@ diff --git a/media/libstagefright/binding/mp4parse_cap
39
 index 5092cd7..ecbc8c0 100644
39
 index aeeebc65..5c0836a 100644
40
 --- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
40
 --- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
41
 +++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
41
 +++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
42
-@@ -17,15 +17,7 @@ exclude = [
42
-@@ -18,17 +18,9 @@ exclude = [
43
+@@ -17,4 +17,4 @@ exclude = [
43
+@@ -18,17 +18,11 @@ exclude = [
44
    "*.mp4",
44
    "*.mp4",
45
  ]
45
  ]
46
  
46
  
47
 -build = "build.rs"
47
 -build = "build.rs"
48
--
48
--
49
++build = false
49
++build = false
50
+
50
+ 
51
  [dependencies]
51
  [dependencies]
52
  "mp4parse" = {version = "0.5.1", path = "../mp4parse"}
52
  "mp4parse" = {version = "0.6.0", path = "../mp4parse"}
53
  
53
  
54
diff --git media/libstagefright/binding/mp4parse_capi/Cargo.toml media/libstagefright/binding/mp4parse_capi/Cargo.toml
54
diff --git media/libstagefright/binding/mp4parse_capi/Cargo.toml media/libstagefright/binding/mp4parse_capi/Cargo.toml
55
index aee7ee947151..d7e3f55119d3 100644
55
index aee7ee947151..d7e3f55119d3 100644
(-)a/www/seamonkey/files/patch-bug1359142 (-57 lines)
Removed Link Here
1
Define EPC_sig and RFP_sig for JS_CODEGEN_(ARM64|MIPS) on BSDs
2
3
diff --git js/src/wasm/WasmSignalHandlers.cpp js/src/wasm/WasmSignalHandlers.cpp
4
index 1ab76eeb4bd9..bcdff0487837 100644
5
--- mozilla/js/src/asmjs/WasmSignalHandlers.cpp
6
+++ mozilla/js/src/asmjs/WasmSignalHandlers.cpp
7
@@ -108,7 +108,19 @@ class AutoSetHandlingSegFault
8
 # define R12_sig(p) ((p)->sc_r12)
9
 # define R13_sig(p) ((p)->sc_r13)
10
 # define R14_sig(p) ((p)->sc_r14)
11
-# define R15_sig(p) ((p)->sc_r15)
12
+# if defined(__arm__)
13
+#  define R15_sig(p) ((p)->sc_pc)
14
+# else
15
+#  define R15_sig(p) ((p)->sc_r15)
16
+# endif
17
+# if defined(__aarch64__)
18
+#  define EPC_sig(p) ((p)->sc_elr)
19
+#  define RFP_sig(p) ((p)->sc_x[29])
20
+# endif
21
+# if defined(__mips__)
22
+#  define EPC_sig(p) ((p)->sc_pc)
23
+#  define RFP_sig(p) ((p)->sc_regs[30])
24
+# endif
25
 #elif defined(__linux__) || defined(SOLARIS)
26
 # if defined(__linux__)
27
 #  define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i])
28
@@ -171,6 +183,14 @@ class AutoSetHandlingSegFault
29
 # define R13_sig(p) ((p)->uc_mcontext.__gregs[_REG_R13])
30
 # define R14_sig(p) ((p)->uc_mcontext.__gregs[_REG_R14])
31
 # define R15_sig(p) ((p)->uc_mcontext.__gregs[_REG_R15])
32
+# if defined(__aarch64__)
33
+#  define EPC_sig(p) ((p)->uc_mcontext.__gregs[_REG_PC])
34
+#  define RFP_sig(p) ((p)->uc_mcontext.__gregs[_REG_X29])
35
+# endif
36
+# if defined(__mips__)
37
+#  define EPC_sig(p) ((p)->uc_mcontext.__gregs[_REG_EPC])
38
+#  define RFP_sig(p) ((p)->uc_mcontext.__gregs[_REG_S8])
39
+# endif
40
 #elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
41
 # if defined(__DragonFly__)
42
 #  define XMM_sig(p,i) (((union savefpu*)(p)->uc_mcontext.mc_fpregs)->sv_xmm.sv_xmm[i])
43
@@ -200,6 +220,14 @@ class AutoSetHandlingSegFault
44
 # else
45
 #  define R15_sig(p) ((p)->uc_mcontext.mc_r15)
46
 # endif
47
+# if defined(__FreeBSD__) && defined(__aarch64__)
48
+#  define EPC_sig(p) ((p)->uc_mcontext.mc_gpregs.gp_elr)
49
+#  define RFP_sig(p) ((p)->uc_mcontext.mc_gpregs.gp_x[29])
50
+# endif
51
+# if defined(__FreeBSD__) && defined(__mips__)
52
+#  define EPC_sig(p) ((p)->uc_mcontext.mc_pc)
53
+#  define RFP_sig(p) ((p)->uc_mcontext.mc_regs[30])
54
+# endif
55
 #elif defined(XP_DARWIN)
56
 # define EIP_sig(p) ((p)->uc_mcontext->__ss.__eip)
57
 # define EBP_sig(p) ((p)->uc_mcontext->__ss.__ebp)
(-)a/www/seamonkey/files/patch-bug757366 (-58 lines)
Removed Link Here
1
commit 2a3be4b384b9
2
Author: Jonathan Kew <jkew@mozilla.com>
3
Date:   Mon Sep 26 18:05:14 2016 +0100
4
5
    Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
6
---
7
 gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
8
 1 file changed, 14 insertions(+), 12 deletions(-)
9
10
diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
11
index 526e17d..cb505e8 100644
12
--- mozilla/gfx/thebes/gfxFontUtils.cpp
13
+++ mozilla/gfx/thebes/gfxFontUtils.cpp
14
@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
15
            version == TRUETYPE_TAG('t','r','u','e');
16
 }
17
 
18
-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
19
+// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
20
+// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
21
+// accessing them directly as uint16_t* values.
22
+// aLen is count of UTF-16 values, so the byte buffers are twice that.
23
 static void
24
-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
25
+CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
26
 {
27
-    const uint16_t *end = aInBuf + aLen;
28
+    const char* end = aInBuf + aLen * 2;
29
     while (aInBuf < end) {
30
-        uint16_t value = *aInBuf;
31
-        *aOutBuf = (value >> 8) | (value & 0xff) << 8;
32
-        aOutBuf++;
33
-        aInBuf++;
34
+        uint8_t b0 = *aInBuf++;
35
+        *aOutBuf++ = *aInBuf++;
36
+        *aOutBuf++ = b0;
37
     }
38
 }
39
 
40
@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
41
     if (csName[0] == 0) {
42
         // empty charset name: data is utf16be, no need to instantiate a converter
43
         uint32_t strLen = aByteLen / 2;
44
-#ifdef IS_LITTLE_ENDIAN
45
         aName.SetLength(strLen);
46
-        CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
47
-                      reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
48
+#ifdef IS_LITTLE_ENDIAN
49
+        CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
50
+                      strLen);
51
 #else
52
-        aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
53
-#endif    
54
+        memcpy(aName.BeginWriting(), aNameData, strLen * 2);
55
+#endif
56
         return true;
57
     }
58
 
(-)b/www/seamonkey/files/patch-bug826985 (-3 / +7 lines)
Lines 67-73 diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_lin Link Here
67
index 239a292..bab496c 100644
67
index 239a292..bab496c 100644
68
--- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
68
--- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
69
+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
69
+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
70
@@ -25,10 +25,21 @@
70
@@ -25,6 +25,9 @@
71
 #else
71
 #else
72
 #include <linux/videodev2.h>
72
 #include <linux/videodev2.h>
73
 #endif
73
 #endif
Lines 77-82 index 239a292..bab496c 100644 Link Here
77
 
77
 
78
 #include "webrtc/system_wrappers/interface/ref_count.h"
78
 #include "webrtc/system_wrappers/interface/ref_count.h"
79
 #include "webrtc/system_wrappers/interface/trace.h"
79
 #include "webrtc/system_wrappers/interface/trace.h"
80
@@ -34,6 +37,15 @@
81
 #define BUF_LEN     ( 1024 * ( EVENT_SIZE + 16 ) )
82
 #endif
80
 
83
 
81
+#ifdef HAVE_LIBV4L2
84
+#ifdef HAVE_LIBV4L2
82
+#define open	v4l2_open
85
+#define open	v4l2_open
Lines 86-95 index 239a292..bab496c 100644 Link Here
86
+#define mmap	v4l2_mmap
89
+#define mmap	v4l2_mmap
87
+#define munmap	v4l2_munmap
90
+#define munmap	v4l2_munmap
88
+#endif
91
+#endif
89
 
92
+
90
 namespace webrtc
93
 namespace webrtc
91
 {
94
 {
92
@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
95
 namespace videocapturemodule
96
@@ -274,6 +286,11 @@ int32_t DeviceInfoLinux::GetDeviceName(
93
     memset(deviceNameUTF8, 0, deviceNameLength);
97
     memset(deviceNameUTF8, 0, deviceNameLength);
94
     memcpy(cameraName, cap.card, sizeof(cap.card));
98
     memcpy(cameraName, cap.card, sizeof(cap.card));
95
 
99
 
(-)b/www/seamonkey/files/patch-bug847568 (-76 / +75 lines)
Lines 1-26 Link Here
1
# Allow building against system-wide graphite2/harfbuzz.
1
# Allow building against system-wide graphite2/harfbuzz.
2
2
3
diff --git config/Makefile.in config/Makefile.in
3
diff --git config/Makefile.in config/Makefile.in
4
index 10807cf..f4b8587 100644
4
index e2e11dc0e27e..a6206bb0ff30 100644
5
--- mozilla/config/Makefile.in
5
--- mozilla/config/Makefile.in
6
+++ mozilla/config/Makefile.in
6
+++ mozilla/config/Makefile.in
7
@@ -49,6 +49,8 @@ export:: $(export-preqs)
7
@@ -41,6 +41,8 @@ export:: $(export-preqs)
8
 		-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
8
 	$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
9
 		-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
9
 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
10
 		-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
10
 		-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
11
+		-DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
11
+		-DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
12
+		-DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
12
+		-DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
13
 		$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
13
 		-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
14
 	$(INSTALL) system_wrappers $(DIST)
14
 		-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
15
 
15
 		-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
16
diff --git config/system-headers config/system-headers
16
diff --git config/system-headers config/system-headers
17
index 48afa0f..61612f6 100644
17
index a0c53c651a3e..5ee7f71f9634 100644
18
--- mozilla/config/system-headers
18
--- mozilla/config/system-headers
19
+++ mozilla/config/system-headers
19
+++ mozilla/config/system-headers
20
@@ -1331,3 +1331,12 @@ unicode/utypes.h
20
@@ -1269,6 +1269,15 @@ libsn/sn-launcher.h
21
 libsn/sn-monitor.h
22
 libsn/sn-util.h
21
 #endif
23
 #endif
22
 libutil.h
23
 unwind.h
24
+#if MOZ_SYSTEM_GRAPHITE2==1
24
+#if MOZ_SYSTEM_GRAPHITE2==1
25
+graphite2/Font.h
25
+graphite2/Font.h
26
+graphite2/Segment.h
26
+graphite2/Segment.h
Lines 30-40 index 48afa0f..61612f6 100644 Link Here
30
+harfbuzz/hb-ot.h
30
+harfbuzz/hb-ot.h
31
+harfbuzz/hb.h
31
+harfbuzz/hb.h
32
+#endif
32
+#endif
33
 #if MOZ_SYSTEM_HUNSPELL==1
34
 hunspell.hxx
35
 #endif
33
diff --git dom/base/moz.build dom/base/moz.build
36
diff --git dom/base/moz.build dom/base/moz.build
34
index 6e0d4f5..0770717 100644
37
index 8e19020315ae..2fcdbb6f7b42 100644
35
--- mozilla/dom/base/moz.build
38
--- mozilla/dom/base/moz.build
36
+++ mozilla/dom/base/moz.build
39
+++ mozilla/dom/base/moz.build
37
@@ -457,6 +457,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
40
@@ -464,6 +464,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
38
 if CONFIG['MOZ_X11']:
41
 if CONFIG['MOZ_X11']:
39
     CXXFLAGS += CONFIG['TK_CFLAGS']
42
     CXXFLAGS += CONFIG['TK_CFLAGS']
40
 
43
 
Lines 45-51 index 6e0d4f5..0770717 100644 Link Here
45
     'PropertyUseCounterMap.inc',
48
     'PropertyUseCounterMap.inc',
46
     'UseCounterList.h',
49
     'UseCounterList.h',
47
diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
50
diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
48
index faaab1b..04eff5f 100644
51
index faaab1b17971..04eff5f09882 100644
49
--- mozilla/gfx/graphite2/moz-gr-update.sh
52
--- mozilla/gfx/graphite2/moz-gr-update.sh
50
+++ mozilla/gfx/graphite2/moz-gr-update.sh
53
+++ mozilla/gfx/graphite2/moz-gr-update.sh
51
@@ -1,6 +1,7 @@
54
@@ -1,6 +1,7 @@
Lines 75-97 index faaab1b..04eff5f 100644 Link Here
75
 echo
78
 echo
76
 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
79
 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
77
diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
80
diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
78
index 24e6cbb..0b7a5df 100644
81
index 22c76a7df020..a01490bd49ee 100644
79
--- mozilla/gfx/harfbuzz/README-mozilla
82
--- mozilla/gfx/harfbuzz/README-mozilla
80
+++ mozilla/gfx/harfbuzz/README-mozilla
83
+++ mozilla/gfx/harfbuzz/README-mozilla
81
@@ -20,3 +20,8 @@ the mozilla tree.
84
@@ -19,3 +19,8 @@ the mozilla tree.
82
 
85
 
83
 If the collection of source files changes, manual updates to moz.build may be
86
 If the collection of source files changes, manual updates to moz.build may be
84
 needed, as we don't use the upstream makefiles.
87
 needed, as we don't use the upstream makefiles.
85
+
88
+
86
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
89
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
87
+Make sure to keep pkg-config version check within old-configure.in in sync
90
+Make sure to keep pkg-config version check within toolkit/moz.configure in sync
88
+with checkout version or increment latest tag by one if it's not based
91
+with checkout version or increment latest tag by one if it's not based
89
+on upstream release.
92
+on upstream release.
90
diff --git gfx/moz.build gfx/moz.build
93
diff --git gfx/moz.build gfx/moz.build
91
index 2509198..5cc4663 100644
94
index 771f652e837a..3b358d84e384 100644
92
--- mozilla/gfx/moz.build
95
--- mozilla/gfx/moz.build
93
+++ mozilla/gfx/moz.build
96
+++ mozilla/gfx/moz.build
94
@@ -7,6 +7,12 @@
97
@@ -10,6 +10,12 @@ with Files('**'):
95
 if CONFIG['MOZ_TREE_CAIRO']:
98
 if CONFIG['MOZ_TREE_CAIRO']:
96
     DIRS += ['cairo']
99
     DIRS += ['cairo']
97
 
100
 
Lines 104-110 index 2509198..5cc4663 100644 Link Here
104
 DIRS += [
107
 DIRS += [
105
     '2d',
108
     '2d',
106
     'ycbcr',
109
     'ycbcr',
107
@@ -15,8 +21,6 @@ DIRS += [
110
@@ -18,8 +24,6 @@ DIRS += [
108
     'qcms',
111
     'qcms',
109
     'gl',
112
     'gl',
110
     'layers',
113
     'layers',
Lines 114-170 index 2509198..5cc4663 100644 Link Here
114
     'thebes',
117
     'thebes',
115
     'ipc',
118
     'ipc',
116
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
119
diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
117
index ab1365f..8897c27 100755
120
index e06ae3457a47..93faa61594a3 100755
118
--- mozilla/gfx/skia/generate_mozbuild.py
121
--- mozilla/gfx/skia/generate_mozbuild.py
119
+++ mozilla/gfx/skia/generate_mozbuild.py
122
+++ mozilla/gfx/skia/generate_mozbuild.py
120
@@ -140,6 +140,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
123
@@ -143,6 +143,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
121
         '-Wno-unused-private-field',
124
         '-Wno-unused-private-field',
122
     ]
125
     ]
123
 
126
 
124
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
127
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
125
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
128
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
126
+
129
+
127
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'):
130
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
128
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
131
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
129
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
132
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
130
diff --git gfx/skia/moz.build gfx/skia/moz.build
133
diff --git gfx/skia/moz.build gfx/skia/moz.build
131
index a2f914b..d3759b0 100644
134
index 2118677ca3a8..e4978b413784 100644
132
--- mozilla/gfx/skia/moz.build
135
--- mozilla/gfx/skia/moz.build
133
+++ mozilla/gfx/skia/moz.build
136
+++ mozilla/gfx/skia/moz.build
134
@@ -664,6 +664,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
137
@@ -753,6 +753,9 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
135
         '-Wno-unused-private-field',
138
         '-Wno-unused-private-field',
136
     ]
139
     ]
137
 
140
 
138
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
141
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
139
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
142
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
140
+
143
+
141
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk'):
144
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android'):
142
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
145
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
143
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
146
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
144
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
147
diff --git gfx/thebes/moz.build gfx/thebes/moz.build
145
index bbbce6fd..db0ceb1 100644
148
index dee9b7bfa2cb..bd801f3a468e 100644
146
--- mozilla/gfx/thebes/moz.build
149
--- mozilla/gfx/thebes/moz.build
147
+++ mozilla/gfx/thebes/moz.build
150
+++ mozilla/gfx/thebes/moz.build
148
@@ -289,7 +289,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
151
@@ -273,7 +273,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
149
 
152
 
150
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
153
 LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
151
 
154
 
152
-DEFINES['GRAPHITE2_STATIC'] = True
155
-DEFINES['GRAPHITE2_STATIC'] = True
153
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
154
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
155
+
156
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
156
+if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
157
+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
157
+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
158
+else:
158
+else:
159
+    DEFINES['GRAPHITE2_STATIC'] = True
159
+    DEFINES['GRAPHITE2_STATIC'] = True
160
+
161
+if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
162
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
160
 
163
 
161
 if CONFIG['CLANG_CXX']:
164
 if CONFIG['CLANG_CXX']:
162
     # Suppress warnings from Skia header files.
165
     # Suppress warnings from Skia header files.
163
diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
166
diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
164
index 9754753..768cc7d 100644
167
index cb1233c56d7e..06fb1f9f174b 100644
165
--- mozilla/intl/unicharutil/util/moz.build
168
--- mozilla/intl/unicharutil/util/moz.build
166
+++ mozilla/intl/unicharutil/util/moz.build
169
+++ mozilla/intl/unicharutil/util/moz.build
167
@@ -42,4 +42,7 @@ if CONFIG['_MSC_VER']:
170
@@ -40,4 +40,7 @@ if CONFIG['_MSC_VER']:
168
 if CONFIG['ENABLE_INTL_API']:
171
 if CONFIG['ENABLE_INTL_API']:
169
     USE_LIBS += ['icu']
172
     USE_LIBS += ['icu']
170
 
173
 
Lines 172-217 index 9754753..768cc7d 100644 Link Here
172
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
175
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
173
+
176
+
174
 DIST_INSTALL = True
177
 DIST_INSTALL = True
175
diff --git moz.configure moz.configure
176
index e762576..196dafd 100644
177
--- mozilla/moz.configure
178
+++ mozilla/moz.configure
179
@@ -216,6 +216,30 @@ check_prog('GENISOIMAGE', delayed_getattr(extra_programs, 'GENISOIMAGE'),
180
 check_prog('RPMBUILD', delayed_getattr(extra_programs, 'RPMBUILD'),
181
            allow_missing=True)
182
 
183
+option('--with-system-graphite2',
184
+       help="Use system graphite2 (located with pkgconfig)")
185
+
186
+@depends('--with-system-graphite2', compile_environment)
187
+def check_for_graphite2(value, compile_env):
188
+    return value and compile_env
189
+
190
+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
191
+                                    check_for_graphite2)
192
+
193
+set_config('MOZ_SYSTEM_GRAPHITE2', system_graphite2)
194
+
195
+option('--with-system-harfbuzz',
196
+       help="Use system harfbuzz (located with pkgconfig)")
197
+
198
+@depends('--with-system-harfbuzz', compile_environment)
199
+def check_for_harfbuzz(value, compile_env):
200
+    return value and compile_env
201
+
202
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.3.0',
203
+                                    check_for_harfbuzz)
204
+
205
+set_config('MOZ_SYSTEM_HARFBUZZ', system_harfbuzz)
206
+
207
 option('--enable-system-hunspell',
208
        help="Use system hunspell (located with pkgconfig)")
209
 
210
diff --git netwerk/dns/moz.build netwerk/dns/moz.build
178
diff --git netwerk/dns/moz.build netwerk/dns/moz.build
211
index f788d9a..5662301 100644
179
index 79c26e3e7001..c4d93bc5f7dc 100644
212
--- mozilla/netwerk/dns/moz.build
180
--- mozilla/netwerk/dns/moz.build
213
+++ mozilla/netwerk/dns/moz.build
181
+++ mozilla/netwerk/dns/moz.build
214
@@ -66,6 +66,9 @@ LOCAL_INCLUDES += [
182
@@ -69,6 +69,9 @@ LOCAL_INCLUDES += [
215
     '/netwerk/base',
183
     '/netwerk/base',
216
 ]
184
 ]
217
 
185
 
Lines 222-232 index f788d9a..5662301 100644 Link Here
222
     DEFINES['IDNA2008'] = True
190
     DEFINES['IDNA2008'] = True
223
     USE_LIBS += ['icu']
191
     USE_LIBS += ['icu']
224
diff --git old-configure.in old-configure.in
192
diff --git old-configure.in old-configure.in
225
index 0070d48..9d1129f 100644
193
index 95a58b634593..b614eef85c89 100644
226
--- mozilla/old-configure.in
194
--- mozilla/old-configure.in
227
+++ mozilla/old-configure.in
195
+++ mozilla/old-configure.in
228
@@ -5764,6 +5764,27 @@ if test "$USE_FC_FREETYPE"; then
196
@@ -4888,6 +4888,27 @@ dnl ========================================================
229
 fi
197
 AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
230
 
198
 
231
 dnl ========================================================
199
 dnl ========================================================
232
+dnl Check for graphite2
200
+dnl Check for graphite2
Lines 254-263 index 0070d48..9d1129f 100644 Link Here
254
 dnl ========================================================
222
 dnl ========================================================
255
 
223
 
256
diff --git toolkit/library/moz.build toolkit/library/moz.build
224
diff --git toolkit/library/moz.build toolkit/library/moz.build
257
index a3d5450..2c684a7e 100644
225
index 24f940e1ed7e..079a575adec3 100644
258
--- mozilla/toolkit/library/moz.build
226
--- mozilla/toolkit/library/moz.build
259
+++ mozilla/toolkit/library/moz.build
227
+++ mozilla/toolkit/library/moz.build
260
@@ -217,6 +217,12 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
228
@@ -228,6 +228,12 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
261
 if CONFIG['MOZ_SYSTEM_PNG']:
229
 if CONFIG['MOZ_SYSTEM_PNG']:
262
     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
230
     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
263
 
231
 
Lines 270-272 index a3d5450..2c684a7e 100644 Link Here
270
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
238
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
271
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
239
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
272
 
240
 
241
diff --git toolkit/moz.configure toolkit/moz.configure
242
index 9297e4d6f501..d8e273887e4b 100644
243
--- mozilla/toolkit/moz.configure
244
+++ mozilla/toolkit/moz.configure
245
@@ -343,6 +343,26 @@ add_old_configure_assignment('FT2_LIBS',
246
 add_old_configure_assignment('FT2_CFLAGS',
247
                              delayed_getattr(ft2_info, 'cflags'))
248
 
249
+# Graphite2
250
+# ==============================================================
251
+option('--with-system-graphite2',
252
+       help="Use system graphite2 (located with pkgconfig)")
253
+
254
+system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
255
+                                     when='--with-system-graphite2')
256
+
257
+set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
258
+
259
+# HarfBuzz
260
+# ==============================================================
261
+option('--with-system-harfbuzz',
262
+       help="Use system harfbuzz (located with pkgconfig)")
263
+
264
+system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 1.4.1',
265
+                                    when='--with-system-harfbuzz')
266
+
267
+set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
268
+
269
 # Apple platform decoder support
270
 # ==============================================================
271
 @depends(toolkit)
(-)b/www/seamonkey/files/patch-bug981348 (-6 / +26 lines)
Lines 1-8 Link Here
1
diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
1
diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
2
index 4b21361..cb3be32 100644
2
index 88bba9baa401..99f240952dfe 100644
3
--- mozilla/dom/system/OSFileConstants.cpp
3
--- mozilla/dom/system/OSFileConstants.cpp
4
+++ mozilla/dom/system/OSFileConstants.cpp
4
+++ mozilla/dom/system/OSFileConstants.cpp
5
@@ -662,7 +662,7 @@
5
@@ -16,14 +16,17 @@
6
 #include "dirent.h"
7
 #include "poll.h"
8
 #include "sys/stat.h"
9
-#if defined(ANDROID)
10
+#if defined(XP_LINUX)
11
 #include <sys/vfs.h>
12
 #define statvfs statfs
13
+#define f_frsize f_bsize
14
 #else
15
 #include "sys/statvfs.h"
16
+#endif // defined(XP_LINUX)
17
+#if !defined(ANDROID)
18
 #include "sys/wait.h"
19
 #include <spawn.h>
20
-#endif // defined(ANDROID)
21
+#endif // !defined(ANDROID)
22
 #endif // defined(XP_UNIX)
23
 
24
 #if defined(XP_LINUX)
25
@@ -699,7 +702,7 @@ static const dom::ConstantSpec gLibcProperties[] =
6
 
26
 
7
   { "OSFILE_SIZEOF_STATVFS", JS::Int32Value(sizeof (struct statvfs)) },
27
   { "OSFILE_SIZEOF_STATVFS", JS::Int32Value(sizeof (struct statvfs)) },
8
 
28
 
Lines 12-18 index 4b21361..cb3be32 100644 Link Here
12
 
32
 
13
 #endif // defined(XP_UNIX)
33
 #endif // defined(XP_UNIX)
14
diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
34
diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
15
index b59fca4..0cf220b 100644
35
index a028dda7d5ec..f5c632e3d7e5 100644
16
--- mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
36
--- mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
17
+++ mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
37
+++ mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
18
@@ -228,8 +228,8 @@
38
@@ -228,8 +228,8 @@
Lines 27-37 index b59fca4..0cf220b 100644 Link Here
27
                         "f_bavail", Type.fsblkcnt_t.implementation);
47
                         "f_bavail", Type.fsblkcnt_t.implementation);
28
 
48
 
29
diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
49
diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
30
index 99e5e9b..de642c5 100644
50
index bd60d4d8419c..a8cd6b546b0e 100644
31
--- mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
51
--- mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
32
+++ mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
52
+++ mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
33
@@ -373,7 +373,7 @@
53
@@ -399,7 +399,7 @@
34
        throw_on_negative("statvfs",  UnixFile.statvfs(sourcePath, fileSystemInfoPtr));
54
        throw_on_negative("statvfs",  (UnixFile.statvfs || UnixFile.statfs)(sourcePath, fileSystemInfoPtr));
35
 
55
 
36
        let bytes = new Type.uint64_t.implementation(
56
        let bytes = new Type.uint64_t.implementation(
37
-                        fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
57
-                        fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
(-)b/www/seamonkey/files/patch-env-api-keys (-4 / +4 lines)
Lines 10-19 Link Here
10
     def keyfile(value):
10
     def keyfile(value):
11
         if value:
11
         if value:
12
             try:
12
             try:
13
@@ -29,7 +30,7 @@ def keyfile(desc, help=None, callback=lambda x: x):
13
@@ -28,7 +29,7 @@ def keyfile(desc, help=None, callback=lambda x: x):
14
                 raise
14
                     raise FatalCheckError("'%s' is empty." % value[0])
15
             except IOError:
15
             except IOError as e:
16
                 pass
16
                 raise FatalCheckError("'%s': %s." % (value[0], e.strerror))
17
-        return no_key
17
-        return no_key
18
+        return environ.get('MOZ_%s_KEY' % desc.upper().replace(' ', '_')) or no_key
18
+        return environ.get('MOZ_%s_KEY' % desc.upper().replace(' ', '_')) or no_key
19
 
19
 
(-)b/www/seamonkey/files/patch-z-bug517422 (-170 / +209 lines)
Lines 1-10 Link Here
1
# Allow more config/external/ libs built against system-wide version.
1
# Allow more config/external/ libs built against system-wide version.
2
2
3
diff --git build/moz.configure/old.configure build/moz.configure/old.configure
3
diff --git build/moz.configure/old.configure build/moz.configure/old.configure
4
index 42ab554..c91df3d 100644
4
index d0fe7accffe6..c46bdd023225 100644
5
--- mozilla/build/moz.configure/old.configure
5
--- mozilla/build/moz.configure/old.configure
6
+++ mozilla/build/moz.configure/old.configure
6
+++ mozilla/build/moz.configure/old.configure
7
@@ -320,7 +320,12 @@ def old_configure_options(*options):
7
@@ -288,7 +288,12 @@ def old_configure_options(*options):
8
     '--with-system-libvpx',
8
     '--with-system-libvpx',
9
     '--with-system-nspr',
9
     '--with-system-nspr',
10
     '--with-system-nss',
10
     '--with-system-nss',
Lines 18-30 index 42ab554..c91df3d 100644 Link Here
18
     '--with-thumb',
18
     '--with-thumb',
19
     '--with-thumb-interwork',
19
     '--with-thumb-interwork',
20
diff --git config/Makefile.in config/Makefile.in
20
diff --git config/Makefile.in config/Makefile.in
21
index 5383399..0410004 100644
21
index a6206bb0ff30..f20987c61754 100644
22
--- mozilla/config/Makefile.in
22
--- mozilla/config/Makefile.in
23
+++ mozilla/config/Makefile.in
23
+++ mozilla/config/Makefile.in
24
@@ -51,6 +51,11 @@ export:: $(export-preqs)
24
@@ -51,6 +51,11 @@ export:: $(export-preqs)
25
 		-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
26
 		-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
25
 		-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
27
 		-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
26
 		-DMOZ_SYSTEM_GRAPHITE2=$(MOZ_SYSTEM_GRAPHITE2) \
27
 		-DMOZ_SYSTEM_HARFBUZZ=$(MOZ_SYSTEM_HARFBUZZ) \
28
+		-DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \
28
+		-DMOZ_SYSTEM_OGG=$(MOZ_SYSTEM_OGG) \
29
+		-DMOZ_SYSTEM_THEORA=$(MOZ_SYSTEM_THEORA) \
29
+		-DMOZ_SYSTEM_THEORA=$(MOZ_SYSTEM_THEORA) \
30
+		-DMOZ_SYSTEM_VORBIS=$(MOZ_SYSTEM_VORBIS) \
30
+		-DMOZ_SYSTEM_VORBIS=$(MOZ_SYSTEM_VORBIS) \
Lines 34-45 index 5383399..0410004 100644 Link Here
34
 	$(INSTALL) system_wrappers $(DIST)
34
 	$(INSTALL) system_wrappers $(DIST)
35
 
35
 
36
diff --git config/external/moz.build config/external/moz.build
36
diff --git config/external/moz.build config/external/moz.build
37
index f67c5c7..eb909ce 100644
37
index 029ff8504795..2c3a40caa1ba 100644
38
--- mozilla/config/external/moz.build
38
--- mozilla/config/external/moz.build
39
+++ mozilla/config/external/moz.build
39
+++ mozilla/config/external/moz.build
40
@@ -20,12 +20,21 @@ if CONFIG['MOZ_UPDATER']:
40
@@ -21,12 +21,21 @@ if CONFIG['MOZ_UPDATER']:
41
 # There's no "native brotli" yet, but probably in the future...
42
 external_dirs += ['modules/brotli']
41
 external_dirs += ['modules/brotli']
42
 external_dirs += ['modules/woff2']
43
 
43
 
44
-if CONFIG['MOZ_VORBIS']:
44
-if CONFIG['MOZ_VORBIS']:
45
+if not CONFIG['MOZ_SYSTEM_OGG']:
45
+if not CONFIG['MOZ_SYSTEM_OGG']:
Lines 61-67 index f67c5c7..eb909ce 100644 Link Here
61
 if CONFIG['MOZ_WEBM_ENCODER']:
61
 if CONFIG['MOZ_WEBM_ENCODER']:
62
     external_dirs += ['media/libmkv']
62
     external_dirs += ['media/libmkv']
63
 
63
 
64
@@ -51,12 +60,9 @@ external_dirs += [
64
@@ -52,12 +61,9 @@ external_dirs += [
65
     'media/kiss_fft',
65
     'media/kiss_fft',
66
     'media/libcubeb',
66
     'media/libcubeb',
67
     'media/libnestegg',
67
     'media/libnestegg',
Lines 71-87 index f67c5c7..eb909ce 100644 Link Here
71
     'media/libspeex_resampler',
71
     'media/libspeex_resampler',
72
     'media/libstagefright',
72
     'media/libstagefright',
73
-    'media/libsoundtouch',
73
-    'media/libsoundtouch',
74
     'media/psshparser'
74
 ]
75
 ]
75
 
76
 
76
 DIRS += ['../../' + i for i in external_dirs]
77
diff --git config/system-headers config/system-headers
77
diff --git config/system-headers config/system-headers
78
index bef567c..9807c29 100644
78
index 5ee7f71f9634..13178ac3b3ab 100644
79
--- mozilla/config/system-headers
79
--- mozilla/config/system-headers
80
+++ mozilla/config/system-headers
80
+++ mozilla/config/system-headers
81
@@ -1364,3 +1363,17 @@ graphite2/Segment.h
81
@@ -1348,3 +1348,17 @@ unicode/utypes.h
82
 harfbuzz/hb-ot.h
82
 libutil.h
83
 harfbuzz/hb.h
83
 unwind.h
84
 #endif
84
 fenv.h
85
+#if MOZ_SYSTEM_OGG==1
85
+#if MOZ_SYSTEM_OGG==1
86
+ogg/ogg.h
86
+ogg/ogg.h
87
+ogg/os_types.h
87
+ogg/os_types.h
Lines 96-223 index bef567c..9807c29 100644 Link Here
96
+#if MOZ_SYSTEM_TREMOR==1
96
+#if MOZ_SYSTEM_TREMOR==1
97
+tremor/ivorbiscodec.h
97
+tremor/ivorbiscodec.h
98
+#endif
98
+#endif
99
diff --git old-configure.in configure.in
100
index 87db361..7947626 100644
101
--- mozilla/old-configure.in
102
+++ mozilla/old-configure.in
103
@@ -5401,6 +5401,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then
104
     fi
105
 fi
106
 
107
+dnl ========================================================
108
+dnl Check for libogg
109
+dnl ========================================================
110
+
111
+MOZ_ARG_WITH_BOOL(system-ogg,
112
+[  --with-system-ogg       Use system libogg (located with pkgconfig)],
113
+MOZ_SYSTEM_OGG=1,
114
+MOZ_SYSTEM_OGG=)
115
+
116
+if test -n "$MOZ_SYSTEM_OGG"; then
117
+    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1)
118
+
119
+    _SAVE_LIBS=$LIBS
120
+    LIBS="$LIBS $MOZ_OGG_LIBS"
121
+    AC_CHECK_FUNC(ogg_set_mem_functions, [],
122
+      [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
123
+    LIBS=$_SAVE_LIBS
124
+fi
125
+
126
+AC_SUBST(MOZ_SYSTEM_OGG)
127
+
128
+dnl ========================================================
129
+dnl Check for libvorbis
130
+dnl ========================================================
131
+
132
+MOZ_ARG_WITH_BOOL(system-vorbis,
133
+[  --with-system-vorbis    Use system libvorbis (located with pkgconfig)],
134
+MOZ_SYSTEM_VORBIS=1,
135
+MOZ_SYSTEM_VORBIS=)
136
+
137
+if test -n "$MOZ_SYSTEM_VORBIS"; then
138
+    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
139
+fi
140
+
141
+AC_SUBST(MOZ_SYSTEM_VORBIS)
142
+
143
+dnl ========================================================
144
+dnl Check for integer-only libvorbis aka tremor
145
+dnl ========================================================
146
+
147
+MOZ_ARG_WITH_BOOL(system-tremor,
148
+[  --with-system-tremor    Use system libtremor (located with pkgconfig)],
149
+MOZ_SYSTEM_TREMOR=1,
150
+MOZ_SYSTEM_TREMOR=)
151
+
152
+if test -n "$MOZ_SYSTEM_TREMOR"; then
153
+    PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
154
+fi
155
+
156
+AC_SUBST(MOZ_SYSTEM_TREMOR)
157
+
158
+dnl ========================================================
159
+dnl Check for libtheora
160
+dnl ========================================================
161
+
162
+MOZ_ARG_WITH_BOOL(system-theora,
163
+[  --with-system-theora    Use system libtheora (located with pkgconfig)],
164
+MOZ_SYSTEM_THEORA=1,
165
+MOZ_SYSTEM_THEORA=)
166
+
167
+if test -n "$MOZ_SYSTEM_THEORA"; then
168
+    PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
169
+fi
170
+
171
+AC_SUBST(MOZ_SYSTEM_THEORA)
172
+
173
+dnl ========================================================
174
+dnl Check for libSoundTouch
175
+dnl ========================================================
176
+
177
+MOZ_ARG_WITH_BOOL(system-soundtouch,
178
+[  --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)],
179
+MOZ_SYSTEM_SOUNDTOUCH=1,
180
+MOZ_SYSTEM_SOUNDTOUCH=)
181
+
182
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
183
+    PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0)
184
+
185
+    AC_LANG_SAVE
186
+    AC_LANG_CPLUSPLUS
187
+    _SAVE_CXXFLAGS=$CXXFLAGS
188
+    CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
189
+    AC_CACHE_CHECK(for soundtouch sample type,
190
+                   ac_cv_soundtouch_sample_type,
191
+                   [AC_TRY_COMPILE([#include <SoundTouch.h>
192
+                                    #ifndef SOUNDTOUCH_INTEGER_SAMPLES
193
+                                    #error soundtouch expects float samples
194
+                                    #endif],
195
+                                   [],
196
+                                   [ac_cv_soundtouch_sample_type=short],
197
+                                   [ac_cv_soundtouch_sample_type=float])])
198
+    CXXFLAGS=$_SAVE_CXXFLAGS
199
+    AC_LANG_RESTORE
200
+
201
+    if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
202
+         -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
203
+        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.])
204
+    fi
205
+fi
206
+
207
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
208
+    AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH)
209
+fi
210
+AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH)
211
+
212
 dnl system libvpx Support
213
 dnl ========================================================
214
 MOZ_ARG_WITH_BOOL(system-libvpx,
215
diff --git dom/media/AudioStream.cpp dom/media/AudioStream.cpp
99
diff --git dom/media/AudioStream.cpp dom/media/AudioStream.cpp
216
index 2127256..1ec09fe 100644
100
index 93ecda4319af..ff674c64ea07 100644
217
--- mozilla/dom/media/AudioStream.cpp
101
--- mozilla/dom/media/AudioStream.cpp
218
+++ mozilla/dom/media/AudioStream.cpp
102
+++ mozilla/dom/media/AudioStream.cpp
219
@@ -125,7 +125,9 @@ AudioStream::AudioStream(DataSource& aSo
103
@@ -115,7 +115,9 @@ AudioStream::AudioStream(DataSource& aSource)
220
   , mOutRate(0)
104
   : mMonitor("AudioStream")
221
   , mChannels(0)
105
   , mChannels(0)
222
   , mOutChannels(0)
106
   , mOutChannels(0)
223
+#ifndef MOZ_SYSTEM_SOUNDTOUCH
107
+#ifndef MOZ_SYSTEM_SOUNDTOUCH
Lines 226-232 index 2127256..1ec09fe 100644 Link Here
226
   , mDumpFile(nullptr)
110
   , mDumpFile(nullptr)
227
   , mState(INITIALIZED)
111
   , mState(INITIALIZED)
228
   , mDataSource(aSource)
112
   , mDataSource(aSource)
229
@@ -152,9 +154,11 @@ AudioStream::~AudioStream()
113
@@ -130,9 +132,11 @@ AudioStream::~AudioStream()
230
   if (mDumpFile) {
114
   if (mDumpFile) {
231
     fclose(mDumpFile);
115
     fclose(mDumpFile);
232
   }
116
   }
Lines 238-244 index 2127256..1ec09fe 100644 Link Here
238
 }
122
 }
239
 
123
 
240
 size_t
124
 size_t
241
@@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretche
125
@@ -151,7 +155,11 @@ nsresult AudioStream::EnsureTimeStretcherInitializedUnlocked()
242
 {
126
 {
243
   mMonitor.AssertCurrentThreadOwns();
127
   mMonitor.AssertCurrentThreadOwns();
244
   if (!mTimeStretcher) {
128
   if (!mTimeStretcher) {
Lines 251-261 index 2127256..1ec09fe 100644 Link Here
251
     mTimeStretcher->setChannels(mOutChannels);
135
     mTimeStretcher->setChannels(mOutChannels);
252
     mTimeStretcher->setPitch(1.0);
136
     mTimeStretcher->setPitch(1.0);
253
diff --git dom/media/AudioStream.h dom/media/AudioStream.h
137
diff --git dom/media/AudioStream.h dom/media/AudioStream.h
254
index a552e3e..02b80b1 100644
138
index 7dc1f60f95cc..67d402a4117f 100644
255
--- mozilla/dom/media/AudioStream.h
139
--- mozilla/dom/media/AudioStream.h
256
+++ mozilla/dom/media/AudioStream.h
140
+++ mozilla/dom/media/AudioStream.h
257
@@ -15,7 +15,11 @@
141
@@ -16,7 +16,11 @@
258
 #include "mozilla/RefPtr.h"
142
 #include "mozilla/TimeStamp.h"
259
 #include "mozilla/UniquePtr.h"
143
 #include "mozilla/UniquePtr.h"
260
 #include "CubebUtils.h"
144
 #include "CubebUtils.h"
261
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
145
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
Lines 266-274 index a552e3e..02b80b1 100644 Link Here
266
 
150
 
267
 namespace mozilla {
151
 namespace mozilla {
268
 
152
 
269
@@ -277,7 +277,11 @@ private:
153
@@ -287,7 +291,11 @@ private:
270
   // Number of frames written to the buffers.
154
   uint32_t mChannels;
271
   int64_t mWritten;
155
   uint32_t mOutChannels;
272
   AudioClock mAudioClock;
156
   AudioClock mAudioClock;
273
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
157
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
274
+  nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher;
158
+  nsAutoPtr<soundtouch::SoundTouch> mTimeStretcher;
Lines 276-288 index a552e3e..02b80b1 100644 Link Here
276
   soundtouch::SoundTouch* mTimeStretcher;
160
   soundtouch::SoundTouch* mTimeStretcher;
277
+#endif
161
+#endif
278
 
162
 
279
   // Stream start time for stream open delay telemetry.
163
   // Output file for dumping audio
280
   TimeStamp mStartTime;
164
   FILE* mDumpFile;
281
diff --git dom/media/moz.build dom/media/moz.build
165
diff --git dom/media/moz.build dom/media/moz.build
282
index 7526cff..e0a0ca0 100644
166
index 86b051c58d33..fb6186dce78b 100644
283
--- mozilla/dom/media/moz.build
167
--- mozilla/dom/media/moz.build
284
+++ mozilla/dom/media/moz.build
168
+++ mozilla/dom/media/moz.build
285
@@ -300,6 +300,21 @@ if CONFIG['MOZ_WEBRTC']:
169
@@ -308,6 +308,21 @@ if CONFIG['MOZ_WEBRTC']:
286
 
170
 
287
 DEFINES['MOZILLA_INTERNAL_API'] = True
171
 DEFINES['MOZILLA_INTERNAL_API'] = True
288
 
172
 
Lines 304-314 index 7526cff..e0a0ca0 100644 Link Here
304
 if CONFIG['OS_TARGET'] == 'WINNT':
188
 if CONFIG['OS_TARGET'] == 'WINNT':
305
     DEFINES['WEBRTC_WIN'] = True
189
     DEFINES['WEBRTC_WIN'] = True
306
 else:
190
 else:
191
diff --git dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
192
index 078f6ea5ef60..c600db067539 100644
193
--- mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
194
+++ mozilla/dom/media/platforms/ffmpeg/ffvpx/FFVPXRuntimeLinker.cpp
195
@@ -11,9 +11,13 @@
196
 #include "prmem.h"
197
 #include "prlink.h"
198
 
199
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
200
+#include "nsXPCOMPrivate.h" // for XUL_DLL
201
+#else
202
 // We use a known symbol located in lgpllibs to determine its location.
203
 // soundtouch happens to be always included in lgpllibs
204
 #include "soundtouch/SoundTouch.h"
205
+#endif
206
 
207
 namespace mozilla {
208
 
209
@@ -50,6 +54,12 @@ FFVPXRuntimeLinker::Init()
210
 
211
   sLinkStatus = LinkStatus_FAILED;
212
 
213
+#ifdef MOZ_SYSTEM_SOUNDTOUCH
214
+  // We retrieve the path of the XUL library as this is where mozavcodec and
215
+  // mozavutil libs are located.
216
+  char* path =
217
+    PR_GetLibraryFilePathname(XUL_DLL, (PRFuncPtr)&FFVPXRuntimeLinker::Init);
218
+#else
219
   // We retrieve the path of the lgpllibs library as this is where mozavcodec
220
   // and mozavutil libs are located.
221
   char* lgpllibsname = PR_GetLibraryName(nullptr, "lgpllibs");
222
@@ -60,6 +70,7 @@ FFVPXRuntimeLinker::Init()
223
     PR_GetLibraryFilePathname(lgpllibsname,
224
                               (PRFuncPtr)&soundtouch::SoundTouch::getVersionId);
225
   PR_FreeLibraryName(lgpllibsname);
226
+#endif
227
   if (!path) {
228
     return false;
229
   }
307
diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
230
diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
308
index 0833e4d..7ece97b 100644
231
index 6213fdc7770c..ada799916a17 100644
309
--- mozilla/media/libogg/README_MOZILLA
232
--- mozilla/media/libogg/README_MOZILLA
310
+++ mozilla/media/libogg/README_MOZILLA
233
+++ mozilla/media/libogg/README_MOZILLA
311
@@ -6,3 +6,6 @@ The svn revision number used was r17287.
234
@@ -6,3 +6,6 @@ package downloaded from xiph.org and copied using the update.sh script.
312
 The int-types.patch address a bug that config_types.h generated from
235
 The int-types.patch address a bug that config_types.h generated from
313
 Linux platform can't be used on OpenSolaris directly see Mozilla bug
236
 Linux platform can't be used on OpenSolaris directly see Mozilla bug
314
 449754
237
 449754
Lines 316-322 index 0833e4d..7ece97b 100644 Link Here
316
+The in-tree copy may be omitted during build by --with-system-ogg.
239
+The in-tree copy may be omitted during build by --with-system-ogg.
317
+Keep version in old-configure.in in sync on updates.
240
+Keep version in old-configure.in in sync on updates.
318
diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA
241
diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA
319
index bfd4b1a..15b158d 100644
242
index dc0dbe8f6886..ea73b55e3e39 100644
320
--- mozilla/media/libsoundtouch/README_MOZILLA
243
--- mozilla/media/libsoundtouch/README_MOZILLA
321
+++ mozilla/media/libsoundtouch/README_MOZILLA
244
+++ mozilla/media/libsoundtouch/README_MOZILLA
322
@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree,
245
@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree,
Lines 326-332 index bfd4b1a..15b158d 100644 Link Here
326
+The in-tree copy may be omitted during build by --with-system-soundtouch.
249
+The in-tree copy may be omitted during build by --with-system-soundtouch.
327
+Keep version in old-configure.in in sync on updates.
250
+Keep version in old-configure.in in sync on updates.
328
diff --git media/libsoundtouch/src/soundtouch_perms.h media/libsoundtouch/src/soundtouch_perms.h
251
diff --git media/libsoundtouch/src/soundtouch_perms.h media/libsoundtouch/src/soundtouch_perms.h
329
index 0af2fe6..d80c145 100644
252
index 0af2fe618311..10973564e7a4 100644
330
--- mozilla/media/libsoundtouch/src/soundtouch_perms.h
253
--- mozilla/media/libsoundtouch/src/soundtouch_perms.h
331
+++ mozilla/media/libsoundtouch/src/soundtouch_perms.h
254
+++ mozilla/media/libsoundtouch/src/soundtouch_perms.h
332
@@ -12,7 +12,9 @@
255
@@ -12,7 +12,9 @@
Lines 340-346 index 0af2fe6..d80c145 100644 Link Here
340
 
263
 
341
 #endif // MOZILLA_SOUNDTOUCH_PERMS_H
264
 #endif // MOZILLA_SOUNDTOUCH_PERMS_H
342
diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA
265
diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA
343
index d48dbfa..f08a2ed 100644
266
index d48dbfa6f63d..6f30f250220e 100644
344
--- mozilla/media/libtheora/README_MOZILLA
267
--- mozilla/media/libtheora/README_MOZILLA
345
+++ mozilla/media/libtheora/README_MOZILLA
268
+++ mozilla/media/libtheora/README_MOZILLA
346
@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh,
269
@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh,
Lines 351-360 index d48dbfa..f08a2ed 100644 Link Here
351
+The in-tree copy may be omitted during build by --with-system-theora.
274
+The in-tree copy may be omitted during build by --with-system-theora.
352
+Keep version in old-configure.in in sync on updates.
275
+Keep version in old-configure.in in sync on updates.
353
diff --git media/libtheora/moz.build media/libtheora/moz.build
276
diff --git media/libtheora/moz.build media/libtheora/moz.build
354
index 14265b1..3069e99 100644
277
index c7f85eebff95..aae7b814adb5 100644
355
--- mozilla/media/libtheora/moz.build
278
--- mozilla/media/libtheora/moz.build
356
+++ mozilla/media/libtheora/moz.build
279
+++ mozilla/media/libtheora/moz.build
357
@@ -21,6 +21,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
280
@@ -21,6 +21,9 @@ FINAL_LIBRARY = 'gkmedias'
358
 # The encoder is currently not included.
281
 # The encoder is currently not included.
359
 DEFINES['THEORA_DISABLE_ENCODE'] = True
282
 DEFINES['THEORA_DISABLE_ENCODE'] = True
360
 
283
 
Lines 362-371 index 14265b1..3069e99 100644 Link Here
362
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
285
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
363
+
286
+
364
 # Suppress warnings in third-party code.
287
 # Suppress warnings in third-party code.
365
 if CONFIG['GNU_CC']:
288
 if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
366
     CFLAGS += ['-Wno-type-limits']
289
     CFLAGS += ['-Wno-type-limits']
367
diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA
290
diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA
368
index ee67b53..3f34a09 100644
291
index ee67b53a05c5..81c971773d55 100644
369
--- mozilla/media/libtremor/README_MOZILLA
292
--- mozilla/media/libtremor/README_MOZILLA
370
+++ mozilla/media/libtremor/README_MOZILLA
293
+++ mozilla/media/libtremor/README_MOZILLA
371
@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system.
294
@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system.
Lines 376-395 index ee67b53..3f34a09 100644 Link Here
376
+The in-tree copy may be omitted during build by --with-system-tremor.
299
+The in-tree copy may be omitted during build by --with-system-tremor.
377
+Keep version in old-configure.in in sync on updates.
300
+Keep version in old-configure.in in sync on updates.
378
diff --git media/libtremor/moz.build media/libtremor/moz.build
301
diff --git media/libtremor/moz.build media/libtremor/moz.build
379
index 31831ba..a03d576 100644
302
index 83afc8e37c64..71ef159da3d7 100644
380
--- mozilla/media/libtremor/moz.build
303
--- mozilla/media/libtremor/moz.build
381
+++ mozilla/media/libtremor/moz.build
304
+++ mozilla/media/libtremor/moz.build
382
@@ -6,3 +6,5 @@
305
@@ -9,3 +9,5 @@ with Files('*'):
383
 
306
 
384
 DIRS += ['include/tremor', 'lib']
307
 DIRS += ['include/tremor', 'lib']
385
 
308
 
386
+if CONFIG['MOZ_SYSTEM_OGG']:
309
+if CONFIG['MOZ_SYSTEM_OGG']:
387
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
310
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
388
diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA
311
diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA
389
index 7c7454c..55baedd 100644
312
index 1211ac074b33..eb31084aed25 100644
390
--- mozilla/media/libvorbis/README_MOZILLA
313
--- mozilla/media/libvorbis/README_MOZILLA
391
+++ mozilla/media/libvorbis/README_MOZILLA
314
+++ mozilla/media/libvorbis/README_MOZILLA
392
@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059
315
@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.5@19464
393
 
316
 
394
 Some files are renamed during the copy to prevent clashes with object
317
 Some files are renamed during the copy to prevent clashes with object
395
 file names with other Mozilla libraries.
318
 file names with other Mozilla libraries.
Lines 397-417 index 7c7454c..55baedd 100644 Link Here
397
+The in-tree copy may be omitted during build by --with-system-vorbis.
320
+The in-tree copy may be omitted during build by --with-system-vorbis.
398
+Keep version in old-configure.in in sync on updates.
321
+Keep version in old-configure.in in sync on updates.
399
diff --git media/libvorbis/moz.build media/libvorbis/moz.build
322
diff --git media/libvorbis/moz.build media/libvorbis/moz.build
400
index 919b99e..cc776f7 100644
323
index adf393782cc9..923b76231107 100644
401
--- mozilla/media/libvorbis/moz.build
324
--- mozilla/media/libvorbis/moz.build
402
+++ mozilla/media/libvorbis/moz.build
325
+++ mozilla/media/libvorbis/moz.build
403
@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias'
326
@@ -56,3 +56,6 @@ FINAL_LIBRARY = 'gkmedias'
404
 # Suppress warnings in third-party code.
327
 # Suppress warnings in third-party code.
405
 if CONFIG['GNU_CC']:
328
 if CONFIG['GNU_CC']:
406
     CFLAGS += ['-Wno-uninitialized']
329
     CFLAGS += ['-Wno-uninitialized']
407
+
330
+
408
+if CONFIG['MOZ_SYSTEM_OGG']:
331
+if CONFIG['MOZ_SYSTEM_OGG']:
409
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
332
+    CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
333
diff --git old-configure.in old-configure.in
334
index b614eef85c89..85f9099dba4d 100644
335
--- mozilla/old-configure.in
336
+++ mozilla/old-configure.in
337
@@ -2941,6 +2941,111 @@ if test -n "$MOZ_OMX_PLUGIN"; then
338
     fi
339
 fi
340
 
341
+dnl ========================================================
342
+dnl Check for libogg
343
+dnl ========================================================
344
+
345
+MOZ_ARG_WITH_BOOL(system-ogg,
346
+[  --with-system-ogg       Use system libogg (located with pkgconfig)],
347
+MOZ_SYSTEM_OGG=1,
348
+MOZ_SYSTEM_OGG=)
349
+
350
+if test -n "$MOZ_SYSTEM_OGG"; then
351
+    PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.3.0)
352
+
353
+    _SAVE_LIBS=$LIBS
354
+    LIBS="$LIBS $MOZ_OGG_LIBS"
355
+    AC_CHECK_FUNC(ogg_set_mem_functions, [],
356
+      [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
357
+    LIBS=$_SAVE_LIBS
358
+fi
359
+
360
+AC_SUBST(MOZ_SYSTEM_OGG)
361
+
362
+dnl ========================================================
363
+dnl Check for libvorbis
364
+dnl ========================================================
365
+
366
+MOZ_ARG_WITH_BOOL(system-vorbis,
367
+[  --with-system-vorbis    Use system libvorbis (located with pkgconfig)],
368
+MOZ_SYSTEM_VORBIS=1,
369
+MOZ_SYSTEM_VORBIS=)
370
+
371
+if test -n "$MOZ_SYSTEM_VORBIS"; then
372
+    PKG_CHECK_MODULES(MOZ_VORBIS, vorbis vorbisenc >= 1.3.5)
373
+fi
374
+
375
+AC_SUBST(MOZ_SYSTEM_VORBIS)
376
+
377
+dnl ========================================================
378
+dnl Check for integer-only libvorbis aka tremor
379
+dnl ========================================================
380
+
381
+MOZ_ARG_WITH_BOOL(system-tremor,
382
+[  --with-system-tremor    Use system libtremor (located with pkgconfig)],
383
+MOZ_SYSTEM_TREMOR=1,
384
+MOZ_SYSTEM_TREMOR=)
385
+
386
+if test -n "$MOZ_SYSTEM_TREMOR"; then
387
+    PKG_CHECK_MODULES(MOZ_TREMOR, vorbisidec >= 1.2.1)
388
+fi
389
+
390
+AC_SUBST(MOZ_SYSTEM_TREMOR)
391
+
392
+dnl ========================================================
393
+dnl Check for libtheora
394
+dnl ========================================================
395
+
396
+MOZ_ARG_WITH_BOOL(system-theora,
397
+[  --with-system-theora    Use system libtheora (located with pkgconfig)],
398
+MOZ_SYSTEM_THEORA=1,
399
+MOZ_SYSTEM_THEORA=)
400
+
401
+if test -n "$MOZ_SYSTEM_THEORA"; then
402
+    PKG_CHECK_MODULES(MOZ_THEORA, theora >= 1.2)
403
+fi
404
+
405
+AC_SUBST(MOZ_SYSTEM_THEORA)
406
+
407
+dnl ========================================================
408
+dnl Check for libSoundTouch
409
+dnl ========================================================
410
+
411
+MOZ_ARG_WITH_BOOL(system-soundtouch,
412
+[  --with-system-soundtouch Use system libSoundTouch (located with pkgconfig)],
413
+MOZ_SYSTEM_SOUNDTOUCH=1,
414
+MOZ_SYSTEM_SOUNDTOUCH=)
415
+
416
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
417
+    PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.9.0)
418
+
419
+    AC_LANG_SAVE
420
+    AC_LANG_CPLUSPLUS
421
+    _SAVE_CXXFLAGS=$CXXFLAGS
422
+    CXXFLAGS="$CXXFLAGS $MOZ_SOUNDTOUCH_CFLAGS"
423
+    AC_CACHE_CHECK(for soundtouch sample type,
424
+                   ac_cv_soundtouch_sample_type,
425
+                   [AC_TRY_COMPILE([#include <SoundTouch.h>
426
+                                    #ifndef SOUNDTOUCH_INTEGER_SAMPLES
427
+                                    #error soundtouch expects float samples
428
+                                    #endif],
429
+                                   [],
430
+                                   [ac_cv_soundtouch_sample_type=short],
431
+                                   [ac_cv_soundtouch_sample_type=float])])
432
+    CXXFLAGS=$_SAVE_CXXFLAGS
433
+    AC_LANG_RESTORE
434
+
435
+    if test \( -n "$MOZ_SAMPLE_TYPE_S16" -a "$ac_cv_soundtouch_sample_type" != short \) \
436
+         -o \( -n "$MOZ_SAMPLE_TYPE_FLOAT32" -a "$ac_cv_soundtouch_sample_type" != float \) ; then
437
+        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.])
438
+    fi
439
+fi
440
+
441
+if test -n "$MOZ_SYSTEM_SOUNDTOUCH"; then
442
+    AC_DEFINE(MOZ_SYSTEM_SOUNDTOUCH)
443
+fi
444
+AC_SUBST(MOZ_SYSTEM_SOUNDTOUCH)
445
+
446
 dnl system libvpx Support
447
 dnl ========================================================
448
 MOZ_ARG_WITH_BOOL(system-libvpx,
410
diff --git toolkit/library/moz.build toolkit/library/moz.build
449
diff --git toolkit/library/moz.build toolkit/library/moz.build
411
index d42137a..695e75a8 100644
450
index 079a575adec3..514d901195de 100644
412
--- mozilla/toolkit/library/moz.build
451
--- mozilla/toolkit/library/moz.build
413
+++ mozilla/toolkit/library/moz.build
452
+++ mozilla/toolkit/library/moz.build
414
@@ -178,6 +178,21 @@ if CONFIG['MOZ_SYSTEM_PNG']:
453
@@ -237,6 +237,21 @@ if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
415
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
454
 if CONFIG['MOZ_SYSTEM_HUNSPELL']:
416
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
455
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
417
 
456
 
Lines 434-453 index d42137a..695e75a8 100644 Link Here
434
     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
473
     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
435
 
474
 
436
diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp
475
diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp
437
index 2cf281e..6d7af0e 100644
476
index c083ab4bc4f3..62b917043a2c 100644
438
--- mozilla/xpcom/build/XPCOMInit.cpp
477
--- mozilla/xpcom/build/XPCOMInit.cpp
439
+++ mozilla/xpcom/build/XPCOMInit.cpp
478
+++ mozilla/xpcom/build/XPCOMInit.cpp
440
@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
479
@@ -154,7 +154,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
441
 #include "mozilla/VisualEventTracer.h"
480
 
442
 #endif
481
 #include "mozilla/ipc/GeckoChildProcessHost.h"
443
 
482
 
444
+#ifndef MOZ_OGG_NO_MEM_REPORTING
483
+#ifndef MOZ_OGG_NO_MEM_REPORTING
445
 #include "ogg/ogg.h"
484
 #include "ogg/ogg.h"
446
+#endif
485
+#endif
447
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
486
 #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
448
 #include "vpx_mem/vpx_mem.h"
487
 #if defined(HAVE_STDINT_H)
449
 #endif
488
 // mozilla-config.h defines HAVE_STDINT_H, and then it's defined *again* in
450
@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
489
@@ -664,11 +666,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
451
   // this oddness.
490
   // this oddness.
452
   mozilla::SetICUMemoryFunctions();
491
   mozilla::SetICUMemoryFunctions();
453
 
492
 

Return to bug 222464