aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2013-04-03 20:27:48 +0000
committerFlorian Smeets <flo@FreeBSD.org>2013-04-03 20:27:48 +0000
commit513d21d8384e61cc02b820137587b3680ffbb51c (patch)
treefc7673f01258f369254c78eaa2111a667c2fd1f7
parent7f2a857b2964490ac2c8b80ef6a315366e9bf55a (diff)
downloadports-513d21d8384e61cc02b820137587b3680ffbb51c.tar.gz
ports-513d21d8384e61cc02b820137587b3680ffbb51c.zip
- update thunderbird, firefox-esr, linux-thunderbird and linux-firefox to
17.0.5 - update firefox to 20.0 - update seamonkey and linux-seamonkey to 2.17 - update nspr to 4.9.6 - remove mail/thunderbird-esr, Mozilla stopped providing 2 versions of thunderbird - prune support for old FreeBSD versions; users of 8.2, 7.4 or earlier are advised to upgrade - http://www.freebsd.org/security/ - add vuln.xml entry Security: 94976433-9c74-11e2-a9fc-d43d7e0c7c02 Approved by: portmgr (miwi) In collaboration with: Jan Beich <jbeich@tormail.org>
Notes
Notes: svn path=/head/; revision=315713
-rw-r--r--MOVED2
-rw-r--r--Mk/bsd.gecko.mk111
-rw-r--r--UPDATING16
-rw-r--r--devel/nspr/Makefile11
-rw-r--r--devel/nspr/distinfo4
-rw-r--r--devel/nspr/files/patch-..::configure8
-rw-r--r--devel/nspr/files/patch-.._pr_tests_Makefile11
-rw-r--r--mail/Makefile2
-rw-r--r--mail/linux-thunderbird/Makefile2
-rw-r--r--mail/linux-thunderbird/distinfo4
-rw-r--r--mail/thunderbird-esr-i18n/Makefile90
-rw-r--r--mail/thunderbird-esr-i18n/distinfo84
-rw-r--r--mail/thunderbird-esr-i18n/pkg-descr3
-rw-r--r--mail/thunderbird-esr/Makefile190
-rw-r--r--mail/thunderbird-esr/distinfo4
-rw-r--r--mail/thunderbird-esr/files/moz_pis_S50cleanhome34
-rw-r--r--mail/thunderbird-esr/files/patch-alsapulse119
-rw-r--r--mail/thunderbird-esr/files/patch-bug65355129
-rw-r--r--mail/thunderbird-esr/files/patch-bug68525817
-rw-r--r--mail/thunderbird-esr/files/patch-bug691898285
-rw-r--r--mail/thunderbird-esr/files/patch-bug71431273
-rw-r--r--mail/thunderbird-esr/files/patch-bug72565553
-rw-r--r--mail/thunderbird-esr/files/patch-bug72896850
-rw-r--r--mail/thunderbird-esr/files/patch-bug72915518
-rw-r--r--mail/thunderbird-esr/files/patch-bug74173790
-rw-r--r--mail/thunderbird-esr/files/patch-bug7530461202
-rw-r--r--mail/thunderbird-esr/files/patch-bug76107788
-rw-r--r--mail/thunderbird-esr/files/patch-bug77805621
-rw-r--r--mail/thunderbird-esr/files/patch-bug77807811
-rw-r--r--mail/thunderbird-esr/files/patch-bug77984728
-rw-r--r--mail/thunderbird-esr/files/patch-bug78145710
-rw-r--r--mail/thunderbird-esr/files/patch-bug78346320
-rw-r--r--mail/thunderbird-esr/files/patch-bug78477622
-rw-r--r--mail/thunderbird-esr/files/patch-bug78803959
-rw-r--r--mail/thunderbird-esr/files/patch-bug78810820
-rw-r--r--mail/thunderbird-esr/files/patch-bug78943627
-rw-r--r--mail/thunderbird-esr/files/patch-bug789693108
-rw-r--r--mail/thunderbird-esr/files/patch-bug791305107
-rw-r--r--mail/thunderbird-esr/files/patch-bug791366124
-rw-r--r--mail/thunderbird-esr/files/patch-bug799441116
-rw-r--r--mail/thunderbird-esr/files/patch-clang32-visibility-hack30
-rw-r--r--mail/thunderbird-esr/files/patch-config-autoconf.mk.in21
-rw-r--r--mail/thunderbird-esr/files/patch-dom-ipc-ContentChild.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libldap-Makefile.in13
-rw-r--r--mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libprldap-Makefile.in14
-rw-r--r--mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in12
-rw-r--r--mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp20
-rw-r--r--mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp29
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-config_autoconf.mk.in22
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-extensions-spellcheck-hunspell-src-mozHunspell.cpp15
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-qcmstypes.h11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in28
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc11
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in10
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp20
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c13
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-security-manager-ssl-src-nsNSSComponent.cpp10
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-Makefile.in8
-rw-r--r--mail/thunderbird-esr/files/patch-mozilla_toolkit_mozapps_installer_packager_mk13
-rw-r--r--mail/thunderbird-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp10
-rw-r--r--mail/thunderbird-esr/files/thunderbird.desktop.in11
-rw-r--r--mail/thunderbird-esr/pkg-descr6
-rw-r--r--mail/thunderbird-i18n/Makefile4
-rw-r--r--mail/thunderbird-i18n/distinfo168
-rw-r--r--mail/thunderbird/Makefile15
-rw-r--r--mail/thunderbird/distinfo4
-rw-r--r--mail/thunderbird/files/patch-bug7530468
-rw-r--r--mail/thunderbird/files/patch-bug81071695
-rw-r--r--mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp14
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-js-confdefs.h.in10
-rw-r--r--security/nss/Makefile13
-rw-r--r--security/nss/files/patch-..::coreconf::FreeBSD.mk8
-rw-r--r--security/nss/files/patch-bug856300 (renamed from security/nss/files/extra-bug835050)5
-rw-r--r--security/vuxml/vuln.xml86
-rw-r--r--www/firefox-esr-i18n/Makefile4
-rw-r--r--www/firefox-esr-i18n/distinfo328
-rw-r--r--www/firefox-esr/Makefile13
-rw-r--r--www/firefox-esr/distinfo4
-rw-r--r--www/firefox-esr/files/patch-bug7530468
-rw-r--r--www/firefox-esr/files/patch-bug81071668
-rw-r--r--www/firefox-esr/files/patch-content-media-nsAudioStream.cpp14
-rw-r--r--www/firefox-esr/files/patch-js-src-js-confdefs.h.in10
-rw-r--r--www/firefox-esr/pkg-message2
-rw-r--r--www/firefox-i18n/Makefile6
-rw-r--r--www/firefox-i18n/distinfo328
-rw-r--r--www/firefox/Makefile16
-rw-r--r--www/firefox/Makefile.options1
-rw-r--r--www/firefox/distinfo4
-rw-r--r--www/firefox/files/patch-alsapulse122
-rw-r--r--www/firefox/files/patch-browser-app-nsBrowserApp.cpp8
-rw-r--r--www/firefox/files/patch-bug78043217
-rw-r--r--www/firefox/files/patch-bug7878043557
-rw-r--r--www/firefox/files/patch-bug80348041
-rw-r--r--www/firefox/files/patch-bug807492273
-rw-r--r--www/firefox/files/patch-bug81071668
-rw-r--r--www/firefox/files/patch-bug81726736
-rw-r--r--www/firefox/files/patch-bug81748126
-rw-r--r--www/firefox/files/patch-bug82431714
-rw-r--r--www/firefox/files/patch-bug826985428
-rw-r--r--www/firefox/files/patch-bug827521147
-rw-r--r--www/firefox/files/patch-bug83682433
-rw-r--r--www/firefox/files/patch-bug844818126
-rw-r--r--www/firefox/files/patch-content-media-AudioStream.cpp11
-rw-r--r--www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h18
-rw-r--r--www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc16
-rw-r--r--www/firefox/files/patch-js-src-js-confdefs.h.in10
-rw-r--r--www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc37
-rw-r--r--www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp4
-rw-r--r--www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc16
-rw-r--r--www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c13
-rw-r--r--www/firefox/files/patch-z-bug81591627
-rw-r--r--www/firefox/pkg-message2
-rw-r--r--www/libxul/Makefile11
-rw-r--r--www/libxul/files/patch-bug7530468
-rw-r--r--www/libxul/files/patch-js-src-configure.in10
-rw-r--r--www/libxul19/Makefile11
-rw-r--r--www/libxul19/files/patch-bug77807810
-rw-r--r--www/linux-firefox/Makefile2
-rw-r--r--www/linux-firefox/distinfo4
-rw-r--r--www/linux-seamonkey/Makefile2
-rw-r--r--www/linux-seamonkey/distinfo4
-rw-r--r--www/linux-seamonkey/pkg-plist3
-rw-r--r--www/seamonkey-i18n/Makefile6
-rw-r--r--www/seamonkey-i18n/distinfo92
-rw-r--r--www/seamonkey/Makefile26
-rw-r--r--www/seamonkey/distinfo4
-rw-r--r--www/seamonkey/files/patch-alsapulse122
-rw-r--r--www/seamonkey/files/patch-bug78043217
-rw-r--r--www/seamonkey/files/patch-bug7878043557
-rw-r--r--www/seamonkey/files/patch-bug80348082
-rw-r--r--www/seamonkey/files/patch-bug807492273
-rw-r--r--www/seamonkey/files/patch-bug81071695
-rw-r--r--www/seamonkey/files/patch-bug81726736
-rw-r--r--www/seamonkey/files/patch-bug81748126
-rw-r--r--www/seamonkey/files/patch-bug82431714
-rw-r--r--www/seamonkey/files/patch-bug826985428
-rw-r--r--www/seamonkey/files/patch-bug827521147
-rw-r--r--www/seamonkey/files/patch-bug83682433
-rw-r--r--www/seamonkey/files/patch-bug844818126
-rw-r--r--www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp11
-rw-r--r--www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h18
-rw-r--r--www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc16
-rw-r--r--www/seamonkey/files/patch-mozilla-js-src-configure.in10
-rw-r--r--www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc37
-rw-r--r--www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc16
-rw-r--r--www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c13
-rw-r--r--www/seamonkey/files/patch-z-bug81591627
148 files changed, 2321 insertions, 12882 deletions
diff --git a/MOVED b/MOVED
index 7a462e804d44..f8c397756a09 100644
--- a/MOVED
+++ b/MOVED
@@ -4191,3 +4191,5 @@ print/kdeutils4-printer-applet|print/kde4-print-manager|2013-03-27|Superseded by
print/system-config-printer-kde|print/kde4-print-manager|2013-03-27|Superseded by print/kde4-print-manager
science/py-biolccc|science/pyteomics.biolccc|2013-03-28|Renamed upstream
math/hs-Agda-executable||2013-03-29|Removed: it has become part of math/hs-Agda
+mail/thunderbird-esr|mail/thunderbird|2013-04-03|Removed: Mozilla stopped providing 2 versions of thunderbird
+mail/thunderbird-esr-i18n|mail/thunderbird-i18n|2013-04-03|Removed: Mozilla stopped providing 2 versions of thunderbird
diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk
index b7380380d03b..76523453f823 100644
--- a/Mk/bsd.gecko.mk
+++ b/Mk/bsd.gecko.mk
@@ -179,7 +179,7 @@ Gecko_Pre_Include= bsd.gecko.mk
# is given by the maintainer via the port or by the
# user via defined variable try to find the highest
# stable installed version.
-# Available values: yes 17+ 19+ 17 19+
+# Available values: yes 17+ 20+ 17 20+
# NOTE:
# default value 17 is used in case of USE_FIREFOX=yes
#
@@ -190,9 +190,9 @@ Gecko_Pre_Include= bsd.gecko.mk
# version is given by the maintainer via the port
# or by the user via defined variable try to find
# the highest stable installed version.
-# Available values: yes 16+ 16
+# Available values: yes 17+ 17
# NOTE:
-# default value 16 is used in case of USE_SEAMONKEY=yes
+# default value 17 is used in case of USE_SEAMONKEY=yes
#
# USE_SEAMONKEY_BUILD Add buildtime dependency on SeaMonkey.
# Available values: see USE_SEAMONKEY
@@ -201,7 +201,7 @@ Gecko_Pre_Include= bsd.gecko.mk
# version is given by the maintainer via the port
# or by the user via defined variable try to find
# the highest stable installed version.
-# Available values: yes 10+ 17+ 10 17
+# Available values: yes 17+ 17
# NOTE:
# default value 17 is used in case of USE_THUNDERBIRD=yes
#
@@ -221,11 +221,11 @@ _FIREFOX_BUILD_DEPENDS= yes
.endif
_FIREFOX_DEFAULT_VERSION= 17
-_FIREFOX_VERSIONS= 17 19
-_FIREFOX_RANGE_VERSIONS= 17+ 19+
+_FIREFOX_VERSIONS= 17 20
+_FIREFOX_RANGE_VERSIONS= 17+ 20+
# For specifying [17, ..]+
-_FIREFOX_19P= 19 ${_FIREFOX_17P}
+_FIREFOX_20P= 20 ${_FIREFOX_17P}
_FIREFOX_17P= 17
# Set the default Firefox version and check if USE_FIREFOX=yes was given
@@ -272,7 +272,7 @@ IGNORE= cannot install: unknown Firefox version: firefox-${USE_FIREFOX:C/([0-9
# Dependence lines for different Firefox versions
17_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/firefox-esr
-19_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/firefox
+20_DEPENDS= ${LOCALBASE}/lib/firefox/firefox:${PORTSDIR}/www/firefox
# Add dependencies
.if defined(USE_FIREFOX)
@@ -294,12 +294,12 @@ USE_SEAMONKEY:= ${USE_SEAMONKEY_BUILD}
_SEAMONKEY_BUILD_DEPENDS= yes
.endif
-_SEAMONKEY_DEFAULT_VERSION= 16
-_SEAMONKEY_VERSIONS= 16
-_SEAMONKEY_RANGE_VERSIONS= 16+
+_SEAMONKEY_DEFAULT_VERSION= 17
+_SEAMONKEY_VERSIONS= 17
+_SEAMONKEY_RANGE_VERSIONS= 17+
-# For specifying [16, ..]+
-_SEAMONKEY_16P= 16
+# For specifying [17, ..]+
+_SEAMONKEY_17P= 17
# Set the default SeaMonkey version and check if USE_SEAMONKEY=yes was given
.if ${USE_SEAMONKEY} == "yes"
@@ -341,7 +341,7 @@ IGNORE= cannot install: unknown SeaMonkey version: seamonkey-2.${USE_SEAMONKEY
.endif
# Dependence lines for different SeaMonkey versions
-16_DEPENDS= ${LOCALBASE}/lib/seamonkey/seamonkey:${PORTSDIR}/www/seamonkey
+17_DEPENDS= ${LOCALBASE}/lib/seamonkey/seamonkey:${PORTSDIR}/www/seamonkey
# Add dependencies
.if defined(USE_SEAMONKEY)
@@ -363,13 +363,12 @@ USE_THUNDERBIRD:= ${USE_THUNDERBIRD_BUILD}
_THUNDERBIRD_BUILD_DEPENDS= yes
.endif
-_THUNDERBIRD_DEFAULT_VERSION= 10
-_THUNDERBIRD_VERSIONS= 10 17
-_THUNDERBIRD_RANGE_VERSIONS= 10+ 17+
+_THUNDERBIRD_DEFAULT_VERSION= 17
+_THUNDERBIRD_VERSIONS= 17
+_THUNDERBIRD_RANGE_VERSIONS= 17+
-# For specifying [10, ..]+
-_THUNDERBIRD_17P= 17 ${_THUNDERBIRD_10P}
-_THUNDERBIRD_10P= 10
+# For specifying [17, ..]+
+_THUNDERBIRD_17P= 17
# Set the default Thunderbird version and check if USE_THUNDERBIRD=yes was given
.if ${USE_THUNDERBIRD} == "yes"
@@ -413,7 +412,6 @@ IGNORE= cannot install: unknown Thunderbird version: thunderbird-${USE_THUNDER
.endif
# Dependence lines for different Thunderbird versions
-10_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird-esr
17_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird
# Add dependencies
@@ -543,27 +541,18 @@ MOZ_EXPORT+= ${CONFIGURE_ENV} \
MOZ_OPTIONS+= --prefix="${FAKEDIR}"
CPPFLAGS+= -isystem${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-
-.if ${OSVERSION} > 800072
-LDFLAGS+= -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN
-.else
-LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
-.endif
+LDFLAGS+= -L${LOCALBASE}/lib -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN
.if ${MOZILLA_VER:R:R} >= 19 || ${MOZILLA:Mseamonkey*}
-# prefer clang
-. if ${CC} == "cc" && (exists(/usr/bin/clang) && ${OSVERSION} >= 900014 || \
- exists(${LOCALBASE}/bin/clang))
-CC= clang
+# prefer base clang, for lang/clang{,-devel} see ports/177224
+. if ${CC} == "cc" && (exists(/usr/bin/clang) && ${OSVERSION} >= 900014)
+CC= /usr/bin/clang
. endif
-. if ${CXX} == "c++" && (exists(/usr/bin/clang++) && ${OSVERSION} >= 900014 || \
- exists(${LOCALBASE}/bin/clang++))
-CXX= clang++
+. if ${CXX} == "c++" && (exists(/usr/bin/clang++) && ${OSVERSION} >= 900014)
+CXX= /usr/bin/clang++
. endif
-. if ${CPP} == "cpp" && (exists(/usr/bin/clang-cpp) && ${OSVERSION} >= 900014 || \
- exists(${LOCALBASE}/bin/clang-cpp))
-CPP= clang-cpp
+. if ${CPP} == "cpp" && (exists(/usr/bin/clang-cpp) && ${OSVERSION} >= 900045)
+CPP= /usr/bin/clang-cpp
. endif
. if ${CC} != "cc" && ${CPP} == "cpp"
CPP= ${CC} -E
@@ -574,18 +563,17 @@ USE_GCC?= yes
. endif
.endif
-.if ${MOZILLA_VER:R:R} >= 16 || exists(${.CURDIR}/files/patch-bug788955)
+.if ${MOZILLA_VER:R:R} >= 19 || exists(${.CURDIR}/files/patch-bug788955)
.if ${OSVERSION} > 1000011
# use jemalloc 3.0.0 API in libc
MOZ_EXPORT+= MOZ_JEMALLOC=1 MOZ_JEMALLOC3=1
-.elif ${OSVERSION} > 701106
+.else
MOZ_OPTIONS+= --enable-jemalloc
MOZ_EXPORT+= MOZ_JEMALLOC=1 MOZ_JEMALLOC3=1
.endif
.endif
-.if (${OSVERSION} >= 900000 && ${OSVERSION} < 900045) \
- || ${OSVERSION} < 802513
+.if ${OSVERSION} >= 900000 && ${OSVERSION} < 900045
MOZ_EXPORT+= ac_cv_thread_keyword=no \
je_cv_tls_model=no
.endif
@@ -629,7 +617,7 @@ png_EXTRACT_AFTER_ARGS= --exclude mozilla*/media/libpng
sqlite_LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3
sqlite_MOZ_OPTIONS= --enable-system-sqlite
-.if ${MOZILLA_VER:R:R} >= 20 || exists(${.CURDIR}/files/patch-bug787804)
+.if ${MOZILLA_VER:R:R} >= 20 || ${MOZILLA:Mseamonkey*}
sqlite_EXTRACT_AFTER_ARGS= --exclude mozilla*/db/sqlite3
.endif
@@ -680,7 +668,6 @@ MOZ_OPTIONS+= --with-system-zlib \
--disable-gtktest \
--disable-freetypetest \
--disable-installer \
- --disable-necko-wifi \
--disable-updater \
--disable-pedantic
@@ -688,6 +675,10 @@ MOZ_OPTIONS+= --with-system-zlib \
LIBS+= -Wl,--as-needed,-lcxxrt,--no-as-needed
.endif
+.if !exists(${FILESDIR}/patch-bug803480) || ! ${PORT_OPTIONS:MDBUS}
+MOZ_OPTIONS+= --disable-necko-wifi
+.endif
+
.if ${MOZ_TOOLKIT:Mcairo-qt}
# don't use - transparent backgrounds (bug 521582),
USE_MOZILLA+= -cairo # ports/169343
@@ -717,7 +708,7 @@ MOZ_OPTIONS+= --disable-dbus --disable-libnotify
.endif
.if ${PORT_OPTIONS:MGSTREAMER}
-USE_GSTREAMER= yes
+USE_GSTREAMER?= good ffmpeg
MOZ_OPTIONS+= --enable-gstreamer
.else
MOZ_OPTIONS+= --disable-gstreamer
@@ -761,8 +752,14 @@ MOZ_OPTIONS+= --disable-libproxy
.if ${PORT_OPTIONS:MWEBRTC}
BUILD_DEPENDS+= v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat
LIB_DEPENDS+= v4l2:${PORTSDIR}/multimedia/libv4l
-. if ! ${PORT_OPTIONS:MALSA}
+. if ${MOZILLA_VER:R:R} >= 21
+. if ${PORT_OPTIONS:MOSS}
+IGNORE= WEBRTC works only with ALSA and PULSEAUDIO audio backends
+. endif
+. else
+. if ! ${PORT_OPTIONS:MALSA}
IGNORE= WEBRTC works only with ALSA audio backend
+. endif
. endif
.else
MOZ_OPTIONS+= --disable-webrtc
@@ -820,7 +817,16 @@ MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \
-e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g'
MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS}
-.if ${ARCH}=="sparc64"
+.if ${ARCH} == amd64
+CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
+.elif ${ARCH:Mpowerpc*}
+USE_GCC?= yes
+CFLAGS+= -D__STDC_CONSTANT_MACROS
+. if ${ARCH} == "powerpc64"
+MOZ_EXPORT+= UNAME_m="${ARCH}"
+CFLAGS+= -mminimal-toc
+. endif
+.elif ${ARCH} == "sparc64"
# Work around miscompilation/mislinkage of the sCanonicalVTable hacks.
MOZ_OPTIONS+= --disable-v1-string-abi
.endif
@@ -932,14 +938,12 @@ gecko-post-patch:
-e 's|mozilla/plugins|browser_plugins|g' \
${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \
${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp
-.if ${CXX} == "clang++" && ${OSVERSION} < 900506
+.if !empty(CXX:M*clang*) && ${OSVERSION} < 900506
@${GREP} -Flr -- '-mss' ${WRKSRC} | ${XARGS} \
${REINPLACE_CMD} -e 's/-mss/-mmmx &/'
.endif
-.if ${MOZILLA} != "kompozer"
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${MOZSRC}/extensions/spellcheck/hunspell/src/mozHunspell.cpp
-.endif
# handles mozilla pis scripts.
gecko-moz-pis-patch:
@@ -1032,13 +1036,6 @@ gecko-do-install:
${TAR} cf - -C${FAKEDIR}/${dir} -s'|${FAKEDIR}|${PREFIX}|s' . | \
${TAR} xof - -C${PREFIX}/${dir}
.endfor
-.if (${OSVERSION} < 800081 )
- # XXX: make sure bsdtar(1) corrected symlinks
- ${FIND} ${FAKEDIR} -type l -exec \
- ${ECHO_CMD} stat -f \'${LN} -hfs \"%Y\" \"%N\"\' {} + | \
- ${SED} s'|${FAKEDIR}|${PREFIX}|g' | ${SH} | \
- ${SED} -n s'|${FAKEDIR}|${PREFIX}|p' | ${SH} -x
-.endif
.for pcfile in ${MOZ_PKGCONFIG_FILES}
${INSTALL_DATA} ${FAKEDIR}/libdata/pkgconfig/${pcfile}.pc \
${PREFIX}/libdata/pkgconfig/${pcfile}.pc
diff --git a/UPDATING b/UPDATING
index 25575d602659..4f6673c6304a 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,22 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20130403:
+ AFFECTS: users of mail/thunderbird-esr*
+ AUTHOR: flo@FreeBSD.org
+
+ Mozilla stopped providing 2 versions of thunderbird. The only one lives
+ in mail/thunderbird if you are using thunderbird-esr please switch to
+ thunderbird by running on of the following commands.
+
+ # portupgrade -o mail/thunderbird mail/thunderbird-esr
+ # portupgrade -o mail/thunderbird-i18n \
+ mail/thunderbird-esr-i18n (if installed)
+ or
+ # portmaster -o mail/thunderbird mail/thunderbird-esr
+ # portmaster -o mail/thunderbird-i18n \
+ mail/thunderbird-esr-i18n (if installed)
+
20130331:
AFFECTS: users of */hs-*
AUTHOR: haskell@FreeBSD.org
diff --git a/devel/nspr/Makefile b/devel/nspr/Makefile
index 66de14202aac..5b8b4bccc4c2 100644
--- a/devel/nspr/Makefile
+++ b/devel/nspr/Makefile
@@ -6,7 +6,7 @@
# $MCom: ports-experimental/devel/nspr/Makefile,v 1.6 2008/03/12 13:06:56 ahze Exp $
PORTNAME= nspr
-DISTVERSION= 4.9.5
+DISTVERSION= 4.9.6
CATEGORIES= devel
MASTER_SITES= MOZILLA
MASTER_SITE_SUBDIR= nspr/releases/v${PORTVERSION}/src
@@ -21,9 +21,7 @@ USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
GNU_CONFIGURE= yes
CONFIGURE_SCRIPT=../configure
-CONFIGURE_ARGS= --srcdir=${WRKSRC:H} \
- --with-pthreads
-CONFIGURE_ENV= BSD_PTHREAD_LIBS=${PTHREAD_LIBS}
+CONFIGURE_ARGS= --srcdir=${WRKSRC:H}
MAKE_ENV= DIST=${WRKSRC}/dist
@@ -39,9 +37,6 @@ BROKEN= Does not compile on arm
CONFIGURE_ARGS+=--disable-debug
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's,-lpthread,${PTHREAD_LIBS},g ; s,echo aout,echo elf,g' ${WRKSRC}/${CONFIGURE_SCRIPT}
-
do-install:
${MKDIR} ${PREFIX}/include/nspr
${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \
@@ -64,7 +59,7 @@ do-install:
.endfor
prtests:
- ${SETENV} PTHREAD_LIBS="${PTHREAD_LIBS}" ${GMAKE} -C ${WRKSRC}/pr/tests
+ ${GMAKE} -C ${WRKSRC}/pr/tests
${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so
cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh
diff --git a/devel/nspr/distinfo b/devel/nspr/distinfo
index 44cd26314e2e..cbf8c014c8dc 100644
--- a/devel/nspr/distinfo
+++ b/devel/nspr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (nspr-4.9.5.tar.gz) = 616ab65c849155c9ed0e5f502530a241cc9108e278275aa448b417ae632c7604
-SIZE (nspr-4.9.5.tar.gz) = 1156396
+SHA256 (nspr-4.9.6.tar.gz) = 7693fddd3c5cc15d53a50df53ab5dcdaa2eb58f5003302690559471744d6c6f9
+SIZE (nspr-4.9.6.tar.gz) = 1163033
diff --git a/devel/nspr/files/patch-..::configure b/devel/nspr/files/patch-..::configure
index 8d5d0ffebde9..1de6f0641c1a 100644
--- a/devel/nspr/files/patch-..::configure
+++ b/devel/nspr/files/patch-..::configure
@@ -14,15 +14,15 @@
fi
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=-fPIC
-@@ -6271,11 +6271,6 @@
+@@ -6271,11 +6271,9 @@
#define _THREAD_SAFE 1
EOF
-- if test "$ac_cv_have_dash_pthread" = "yes"; then
-- _PTHREAD_LDFLAGS="-pthread"
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
+ _PTHREAD_LDFLAGS="-pthread"
- else
- _PTHREAD_LDFLAGS="-lc_r"
-- fi
+ fi
;;
*-netbsd*)
if test "$ac_cv_have_dash_pthread" = "yes"; then
diff --git a/devel/nspr/files/patch-.._pr_tests_Makefile b/devel/nspr/files/patch-.._pr_tests_Makefile
deleted file mode 100644
index af796164c9ea..000000000000
--- a/devel/nspr/files/patch-.._pr_tests_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- ../../nsprpub/pr/tests/Makefile.in.orig Mon Apr 26 00:01:02 2004
-+++ ../../nsprpub/pr/tests/Makefile.in Tue Nov 28 11:08:14 2006
-@@ -418,7 +418,7 @@
-
- ifeq ($(OS_ARCH),FreeBSD)
- ifeq ($(USE_PTHREADS),1)
--LDOPTS += -pthread
-+LDOPTS += ${PTHREAD_LIBS}
- endif
- LDOPTS += -Xlinker -R $(ABSOLUTE_LIB_DIR)
- endif
diff --git a/mail/Makefile b/mail/Makefile
index 25256071995d..ac849cd08d3e 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -715,8 +715,6 @@
SUBDIR += textmail
SUBDIR += thunderbird
SUBDIR += thunderbird-dictionaries
- SUBDIR += thunderbird-esr
- SUBDIR += thunderbird-esr-i18n
SUBDIR += thunderbird-i18n
SUBDIR += tkrat2
SUBDIR += tlb
diff --git a/mail/linux-thunderbird/Makefile b/mail/linux-thunderbird/Makefile
index a24990fbc72d..06ca8dedeb47 100644
--- a/mail/linux-thunderbird/Makefile
+++ b/mail/linux-thunderbird/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird
-PORTVERSION= 17.0.4
+PORTVERSION= 17.0.5
CATEGORIES= mail
MASTER_SITE_SUBDIR?= ${PORTNAME}/releases/${PORTVERSION}esr/linux-i686/en-US
DISTNAME= ${PORTNAME}-${DISTVERSION}esr
diff --git a/mail/linux-thunderbird/distinfo b/mail/linux-thunderbird/distinfo
index 65351a5d5f17..05c6f830aef7 100644
--- a/mail/linux-thunderbird/distinfo
+++ b/mail/linux-thunderbird/distinfo
@@ -1,2 +1,2 @@
-SHA256 (thunderbird-17.0.4esr.tar.bz2) = 200a9f609455b852a48634932e9bb92e53610c8aac95a7d67107945d083bd83f
-SIZE (thunderbird-17.0.4esr.tar.bz2) = 21483231
+SHA256 (thunderbird-17.0.5esr.tar.bz2) = e1a0282baff12d00c5fe58e7e7f4058eecacd99911d79c5d473b2814042d8f3e
+SIZE (thunderbird-17.0.5esr.tar.bz2) = 21480241
diff --git a/mail/thunderbird-esr-i18n/Makefile b/mail/thunderbird-esr-i18n/Makefile
deleted file mode 100644
index 55cba34ed11e..000000000000
--- a/mail/thunderbird-esr-i18n/Makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= thunderbird-i18n
-PORTVERSION= 10.0.12
-CATEGORIES= mail
-MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}esr/linux-i686/xpi
-PKGNAMEPREFIX=
-DISTFILES= ${THUNDERBIRD_I18N_:S/$/.xpi/}
-DIST_SUBDIR= xpi/${DISTNAME}
-
-MAINTAINER= gecko@FreeBSD.org
-COMMENT= Localized interface for Thunderbird
-
-EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip
-
-PLIST?= ${WRKDIR}/plist
-PLISTD?= ${WRKDIR}/plist_dirs
-PLISTF?= ${WRKDIR}/plist_files
-
-.ifndef WITHOUT_SWITCHER
-RUN_DEPENDS+= xpi-quick-locale-switcher>=0:${PORTSDIR}/www/xpi-quick-locale-switcher
-.endif
-
-LATEST_LINK= thunderbird-esr-i18n
-NO_BUILD= yes
-USE_THUNDERBIRD= 10
-USE_XPI= thunderbird linux-thunderbird
-
-THUNDERBIRD_I18N_ALL= ar br ca cs da de en-GB en-US es-AR es-ES et eu fi fr \
- fy-NL ga-IE gd gl he hu is it ja ko lt nb-NO nl nn-NO \
- pl pt-BR pt-PT rm ru si sk sl sq sv-SE ta-LK tr uk zh-TW
-
-.ifdef PACKAGE_BUILDING
-THUNDERBIRD_I18N?= all
-.else
-THUNDERBIRD_I18N?= es-ES pt-BR ru ja de fr ko it
-.endif
-
-.if ${THUNDERBIRD_I18N} == all
-THUNDERBIRD_I18N_= ${THUNDERBIRD_I18N_ALL}
-.endif
-THUNDERBIRD_I18N_?= ${THUNDERBIRD_I18N}
-
-WDIR= langpack-*@thunderbird.mozilla.org
-
-XPI_DISTNAMES= ${THUNDERBIRD_I18N_}
-.for dist in ${XPI_DISTNAMES}
-XPI_ID_${dist}= langpack-${dist}@thunderbird.mozilla.org
-.endfor
-
-do-extract:
- @${RM} -rf ${WRKDIR}
- @${MKDIR} ${WRKDIR} ${WRKSRC}
- @for lang in ${THUNDERBIRD_I18N_}; do \
- if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\
- then \
- exit 1; \
- fi; \
- cd ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org/; \
- ${FIND} -H -s * ! -type d | \
- ${SED} -e "s|^|lib/xpi/langpack-$$lang@thunderbird.mozilla.org/|" >> ${PLISTF} && \
- ${FIND} -d * -type d | \
- ${SED} -e "s|^|@dirrm lib/xpi/langpack-$$lang@thunderbird.mozilla.org/|" >> ${PLISTD}; \
- done
- ${CAT} ${PLISTF} | ${SORT} >> ${PLIST}
- ${CAT} ${PLISTD} | ${SORT} -r >> ${PLIST}
-
-do-install:
- @${INSTALL} -d ${XPI_LIBDIR} ${XPI_SLDIRS_ALL}
- @${CP} -R ${WRKSRC}/ ${XPI_LIBDIR}/
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${WDIR}/
- @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${WDIR}/
- @for _dir in ${XPI_LINKFARMS} ; { ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q} ; }
- @${ECHO_CMD} '@exec ${INSTALL} -d ${XPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A}
- @${ECHO_CMD} '@exec for _dir in ${XPI_LINKFARMS} ; { \
- ${LN} -sf ${XPI_LIBDIR}/${WDIR} $$_dir/ ${_Q}; }' ${_A}
- @${ECHO_CMD} '@unexec for _dir in ${XPI_LINKFARMS} ${XPI_LIBDIR}; { ${RM} -fR $$_dir/${WDIR} ; }' ${_A}
- @${ECHO_CMD} '@unexec ${RMDIR} ${XPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A}
-
-post-patch:
- ${FIND} ${WRKSRC} -name install.rdf -print0 | \
- ${XARGS} -0L1 ${REINPLACE_CMD} -i '' '/<?xml/,$$!d'
-
-list-langs:
- @fetch -o- "http://releases.mozilla.org/pub/mozilla.org/${MASTER_SITE_SUBDIR}"|\
- perl -ne 'if(/.*href="([a-zA-Z-]+).xpi.*/){print "$$1 "}'
-
-.include "${.CURDIR}/../../www/xpi-adblock/Makefile.xpi"
-.include <bsd.port.mk>
diff --git a/mail/thunderbird-esr-i18n/distinfo b/mail/thunderbird-esr-i18n/distinfo
deleted file mode 100644
index 61813a2d542d..000000000000
--- a/mail/thunderbird-esr-i18n/distinfo
+++ /dev/null
@@ -1,84 +0,0 @@
-SHA256 (xpi/thunderbird-i18n-10.0.12/ar.xpi) = 8640606545b0f908e76889ee279e9fae03f7d6cb6874fc7ac2e4ee9f18633426
-SIZE (xpi/thunderbird-i18n-10.0.12/ar.xpi) = 441467
-SHA256 (xpi/thunderbird-i18n-10.0.12/br.xpi) = fdaa276753268349115d5c69171e20c5a5a65163a93dae3af1d56c734be37f8c
-SIZE (xpi/thunderbird-i18n-10.0.12/br.xpi) = 415527
-SHA256 (xpi/thunderbird-i18n-10.0.12/ca.xpi) = 048a97a326e3c96315bd0fe0794565c1c9a218ef7a2b29909d82f5aaaec08164
-SIZE (xpi/thunderbird-i18n-10.0.12/ca.xpi) = 416070
-SHA256 (xpi/thunderbird-i18n-10.0.12/cs.xpi) = f98e04fff0c361cf641f65ce003f2302203dcc44c7e23277fd625415d5c3aae5
-SIZE (xpi/thunderbird-i18n-10.0.12/cs.xpi) = 419419
-SHA256 (xpi/thunderbird-i18n-10.0.12/da.xpi) = 84c41306ec93f2effa1584e715802d4394967f290c1eead20bbf0ab21ac37f71
-SIZE (xpi/thunderbird-i18n-10.0.12/da.xpi) = 363377
-SHA256 (xpi/thunderbird-i18n-10.0.12/de.xpi) = c4699b580db139597596b12c77e8fe8dd1dfdcf877edcdb10d9220b62cc2de2a
-SIZE (xpi/thunderbird-i18n-10.0.12/de.xpi) = 418267
-SHA256 (xpi/thunderbird-i18n-10.0.12/en-GB.xpi) = 4a36fa81eb83964ae211074d1befa5b6582a4eb9ba80927fd86b5303eb82c8af
-SIZE (xpi/thunderbird-i18n-10.0.12/en-GB.xpi) = 391743
-SHA256 (xpi/thunderbird-i18n-10.0.12/en-US.xpi) = 7ee165bed1e9f2294398d02b9e9b4412e214998593efc94f4787483fdf6d462b
-SIZE (xpi/thunderbird-i18n-10.0.12/en-US.xpi) = 391242
-SHA256 (xpi/thunderbird-i18n-10.0.12/es-AR.xpi) = f6b6020981533c95b1f3cb390081d448439ec1fc0333c47d41294907e8c11d93
-SIZE (xpi/thunderbird-i18n-10.0.12/es-AR.xpi) = 410727
-SHA256 (xpi/thunderbird-i18n-10.0.12/es-ES.xpi) = 5a39d54385c37d9229a954275cbfb20cd3de7c59e16b0a2a718fa95f58f8d5b5
-SIZE (xpi/thunderbird-i18n-10.0.12/es-ES.xpi) = 355143
-SHA256 (xpi/thunderbird-i18n-10.0.12/et.xpi) = ecb178ff7a985ac2860629d974ace70855cb9c81ca7ee984bd1409b57b0bf3de
-SIZE (xpi/thunderbird-i18n-10.0.12/et.xpi) = 410725
-SHA256 (xpi/thunderbird-i18n-10.0.12/eu.xpi) = 6bab4baac74e8f1c0ea2d4aafdd229d04a4db681a457e74719ef7086894ec3f5
-SIZE (xpi/thunderbird-i18n-10.0.12/eu.xpi) = 406387
-SHA256 (xpi/thunderbird-i18n-10.0.12/fi.xpi) = 2af4203f980d915f68167c09144ed6b4630583203f4f4e7e455a519644f1ecc1
-SIZE (xpi/thunderbird-i18n-10.0.12/fi.xpi) = 411928
-SHA256 (xpi/thunderbird-i18n-10.0.12/fr.xpi) = 138b0853522a5cea6c9b361f0b4915b99d5874cdf2d8f8d6390cf91765757ef2
-SIZE (xpi/thunderbird-i18n-10.0.12/fr.xpi) = 414750
-SHA256 (xpi/thunderbird-i18n-10.0.12/fy-NL.xpi) = d052d6520e9dc41134e3d0afee4beb0abed9d809a391293b034a2db57606f95b
-SIZE (xpi/thunderbird-i18n-10.0.12/fy-NL.xpi) = 413985
-SHA256 (xpi/thunderbird-i18n-10.0.12/ga-IE.xpi) = 4208354ce071bb1a049646916e0a0921cc8393da5399df1c458d556cf8e8fc64
-SIZE (xpi/thunderbird-i18n-10.0.12/ga-IE.xpi) = 423261
-SHA256 (xpi/thunderbird-i18n-10.0.12/gd.xpi) = bd1de14cd558a179978d9e4138c5866a5cd35c8affb683b653e747c546b36c1d
-SIZE (xpi/thunderbird-i18n-10.0.12/gd.xpi) = 425877
-SHA256 (xpi/thunderbird-i18n-10.0.12/gl.xpi) = 0d01229d75fbf49bf0217df70a986679e92f69a6c206e43591bfdefe117cbcb6
-SIZE (xpi/thunderbird-i18n-10.0.12/gl.xpi) = 409229
-SHA256 (xpi/thunderbird-i18n-10.0.12/he.xpi) = de5ba8c32c2b909c770eced2e237fe54213fc01271bdbef6d720e01d8b21812d
-SIZE (xpi/thunderbird-i18n-10.0.12/he.xpi) = 439207
-SHA256 (xpi/thunderbird-i18n-10.0.12/hu.xpi) = 54bd3e348c0d4177dabd6789e77dfbee08547591b258acfe18030fdc7e66eac6
-SIZE (xpi/thunderbird-i18n-10.0.12/hu.xpi) = 426357
-SHA256 (xpi/thunderbird-i18n-10.0.12/is.xpi) = f4abd2e33b51762bc90700097d45f5a5629934d40666a58d8f577a9043941b3b
-SIZE (xpi/thunderbird-i18n-10.0.12/is.xpi) = 412635
-SHA256 (xpi/thunderbird-i18n-10.0.12/it.xpi) = b0313761e838f887a906ec514f70267124d5e103e96a0eaee57d18f73ca41411
-SIZE (xpi/thunderbird-i18n-10.0.12/it.xpi) = 347634
-SHA256 (xpi/thunderbird-i18n-10.0.12/ja.xpi) = ac34c2227b3327a86f699dd0968041b350d216cd6ecfb1e948032e8e4294ea6c
-SIZE (xpi/thunderbird-i18n-10.0.12/ja.xpi) = 459031
-SHA256 (xpi/thunderbird-i18n-10.0.12/ko.xpi) = 8acecd1f7649c4d18ef8f36d5666215598818934315dd05c1672bc37439b1630
-SIZE (xpi/thunderbird-i18n-10.0.12/ko.xpi) = 372016
-SHA256 (xpi/thunderbird-i18n-10.0.12/lt.xpi) = af71d869af00d7b4507d1da907cec67583951a138caed60dbc55bbfe4403b1d4
-SIZE (xpi/thunderbird-i18n-10.0.12/lt.xpi) = 531023
-SHA256 (xpi/thunderbird-i18n-10.0.12/nb-NO.xpi) = 4d580bb55cb5c060dbf1c50294e072be7fec2dd680ed65a6a178bf3d6f7d4727
-SIZE (xpi/thunderbird-i18n-10.0.12/nb-NO.xpi) = 407730
-SHA256 (xpi/thunderbird-i18n-10.0.12/nl.xpi) = 79e093884f05848ce3176dcd03a67734f44a43ce721936c5966c1ba2032a2bdc
-SIZE (xpi/thunderbird-i18n-10.0.12/nl.xpi) = 407985
-SHA256 (xpi/thunderbird-i18n-10.0.12/nn-NO.xpi) = 28c90815dcb7ed4b2226f0e93800a433633f44cc88fe79cb86233cf76352b568
-SIZE (xpi/thunderbird-i18n-10.0.12/nn-NO.xpi) = 409459
-SHA256 (xpi/thunderbird-i18n-10.0.12/pl.xpi) = 594209d10ba7155e288fa5c5767374ba074e5419b62a0ca373b4c9eee9d75762
-SIZE (xpi/thunderbird-i18n-10.0.12/pl.xpi) = 393579
-SHA256 (xpi/thunderbird-i18n-10.0.12/pt-BR.xpi) = 33eeef67280c75853335d06fac8c6d3b15e3b0e3e18e5e6f92914e069784d06e
-SIZE (xpi/thunderbird-i18n-10.0.12/pt-BR.xpi) = 417230
-SHA256 (xpi/thunderbird-i18n-10.0.12/pt-PT.xpi) = 3cdd5bb8072f83295979347cd67ad8cdee896f7c4fc5ce910815afe87525441f
-SIZE (xpi/thunderbird-i18n-10.0.12/pt-PT.xpi) = 414266
-SHA256 (xpi/thunderbird-i18n-10.0.12/rm.xpi) = 6188a9730c0310d0f5fbcef056855c9244c451534f9790a47df498849a867229
-SIZE (xpi/thunderbird-i18n-10.0.12/rm.xpi) = 414710
-SHA256 (xpi/thunderbird-i18n-10.0.12/ru.xpi) = 74401e13a9c7e2748e798a5dbe9f46ba75ac8215189f034dfe965821be32f612
-SIZE (xpi/thunderbird-i18n-10.0.12/ru.xpi) = 411635
-SHA256 (xpi/thunderbird-i18n-10.0.12/si.xpi) = 0ee022882f55d521f324c8109e0c39cbe91e96b7544faebde1dba8c233366018
-SIZE (xpi/thunderbird-i18n-10.0.12/si.xpi) = 456608
-SHA256 (xpi/thunderbird-i18n-10.0.12/sk.xpi) = ccdafe5cfc51715ce2dcc0f496554656a16a26ab3ded3aa9888a1cea87343cd4
-SIZE (xpi/thunderbird-i18n-10.0.12/sk.xpi) = 425030
-SHA256 (xpi/thunderbird-i18n-10.0.12/sl.xpi) = 1437078e9486244904e0368fe99f3cde58d67a6261d3bebaa3d41f4fa40f27b4
-SIZE (xpi/thunderbird-i18n-10.0.12/sl.xpi) = 410432
-SHA256 (xpi/thunderbird-i18n-10.0.12/sq.xpi) = 2a4747afc1667b437de4628ca305fc71ca4b4a33c7566fa8d31dc139c10fb37c
-SIZE (xpi/thunderbird-i18n-10.0.12/sq.xpi) = 360481
-SHA256 (xpi/thunderbird-i18n-10.0.12/sv-SE.xpi) = 5699c1117ebb00fb247f13a9ce1b75b24e7126f826d7e26cce2114b97560db66
-SIZE (xpi/thunderbird-i18n-10.0.12/sv-SE.xpi) = 478282
-SHA256 (xpi/thunderbird-i18n-10.0.12/ta-LK.xpi) = 533ed4e1ae373ce6cf07ee0773717117ea4bccb2e7eb7242d352f227de9e57fa
-SIZE (xpi/thunderbird-i18n-10.0.12/ta-LK.xpi) = 475719
-SHA256 (xpi/thunderbird-i18n-10.0.12/tr.xpi) = 1825b73858ffeec3e48b1c46429c9ee3a1f205d878942cbd8664b0e861beecef
-SIZE (xpi/thunderbird-i18n-10.0.12/tr.xpi) = 418210
-SHA256 (xpi/thunderbird-i18n-10.0.12/uk.xpi) = 49deb8c09c042e6021dce36135627dc8e461c752a26bb7fd43301a936b1c9fc9
-SIZE (xpi/thunderbird-i18n-10.0.12/uk.xpi) = 463925
-SHA256 (xpi/thunderbird-i18n-10.0.12/zh-TW.xpi) = 3baa27565d941d5ab34e3b0cb4275778aca577a3d2ac58f39852505ad414d203
-SIZE (xpi/thunderbird-i18n-10.0.12/zh-TW.xpi) = 431828
diff --git a/mail/thunderbird-esr-i18n/pkg-descr b/mail/thunderbird-esr-i18n/pkg-descr
deleted file mode 100644
index e5842d14f281..000000000000
--- a/mail/thunderbird-esr-i18n/pkg-descr
+++ /dev/null
@@ -1,3 +0,0 @@
-Language packs for Thunderbird
-
-WWW: http://www.mozilla.org/projects/l10n/
diff --git a/mail/thunderbird-esr/Makefile b/mail/thunderbird-esr/Makefile
deleted file mode 100644
index bb3d028a322f..000000000000
--- a/mail/thunderbird-esr/Makefile
+++ /dev/null
@@ -1,190 +0,0 @@
-# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
-# $FreeBSD$
-
-PORTNAME= thunderbird
-DISTVERSION= 10.0.12
-CATEGORIES= mail ipv6
-MASTER_SITES= ${MASTER_SITE_MOZILLA}
-MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}esr/source
-DISTFILES= ${PORTNAME}-${DISTVERSION}esr.source${EXTRACT_SUFX}
-EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}esr.source${EXTRACT_SUFX}
-
-MAINTAINER= gecko@FreeBSD.org
-COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
-
-BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \
- nss>=3.13.6_1:${PORTSDIR}/security/nss \
- sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \
- cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
- unzip:${PORTSDIR}/archivers/unzip
-
-EM_VERSION= 1.4.3
-
-USE_AUTOTOOLS= autoconf213:env
-LATEST_LINK= thunderbird-esr
-USE_GECKO= gecko
-CONFLICTS= thunderbird-1[1-9].*
-USE_MOZILLA= # empty
-
-MAKE_JOBS_SAFE= yes
-WANT_GNOME= yes
-USE_QT4= # empty
-QT_NONSTANDARD= yes
-ALL_TARGET= default
-GNU_CONFIGURE= yes
-USE_BZIP2= yes
-USE_GMAKE= yes
-USE_GL= gl
-
-MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket
-MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \
- --enable-single-profile --disable-profilesharing \
- --enable-application=mail --enable-official-branding
-MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
-MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
-MOZ_PKGCONFIG_FILES=
-
-PORTNAME_ICON= ${MOZILLA}.png
-PORTNAME_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png
-
-SYSTEM_PREFS= ${FAKEDIR}/lib/${PORTNAME}/defaults/pref/${PORTNAME}.js
-MOZ_PIS_SCRIPTS=moz_pis_S50cleanhome
-
-OPTIONS_DEFINE= ENIGMAIL LIGHTNING
-OPTIONS_DEFAULT=ENIGMAIL LIGHTNING
-
-.include "${.CURDIR}/../../www/firefox/Makefile.options"
-.include <bsd.port.pre.mk>
-
-WRKSRC= ${WRKDIR}/comm-esr10
-MOZSRC:= ${WRKSRC}/mozilla
-
-XPI_LIBDIR= ${PREFIX}/lib/xpi
-
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
-.if !empty(CXX:M*clang++*) || (${CXX:Mc++} && ${OSVERSION} > 1000023)
-CFLAGS+= -Wno-return-type-c-linkage
-.endif
-
-.if ${PORT_OPTIONS:MENIGMAIL}
-MASTER_SITES+= http://www.enigmail.net/download/source/:enigmail
-DISTFILES+= ${EM_DISTFILE}:enigmail
-RUN_DEPENDS+= gpg:${PORTSDIR}/security/gnupg
-EM_DISTNAME= enigmail-${EM_VERSION}
-EM_DISTFILE= ${EM_DISTNAME}.tar.gz
-EM_XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/bin/${EM_DISTNAME}-freebsd-${ARCH:S/amd64/x86_64/}.xpi
-EM_ORIG_ID= {847b3a00-7ab1-11d4-8f02-006008948af5}
-EM_ID= ${PORTNAME}@mozilla-enigmail.org
-EM_ID_RFILES= ${XPI_LIBDIR}/${EM_ID}/install.rdf \
- ${XPI_LIBDIR}/${EM_ID}/components/enigmail.js \
- ${XPI_LIBDIR}/${EM_ID}/modules/enigmailCommon.jsm
-.endif
-
-.if ${PORT_OPTIONS:MLIGHTNING}
-MOZ_OPTIONS+= --enable-calendar
-MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar
-LIGHTNING_DIR= share/lightning
-XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning.xpi
-XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103}
-XPI_ID= lightning@thunderbird.mozilla.org
-.else
-MOZ_OPTIONS+= --disable-calendar
-.endif
-
-post-extract:
- @${SED} -e 's|@PORTNAME_ICON@|${PORTNAME_ICON}|;s|@MOZILLA@|${MOZILLA}|' \
- <${FILESDIR}/thunderbird.desktop.in >${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop
-.if ${PORT_OPTIONS:MENIGMAIL}
- @${TAR} -xf ${_DISTDIR}/${EM_DISTFILE} \
- -C ${WRKSRC}/mailnews/extensions
-.endif
-
-post-patch:
- @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
- ${WRKSRC}/mail/app/nsMailApp.cpp
-.if ${PORT_OPTIONS:MENIGMAIL}
- @${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
- ${WRKSRC}/mailnews/extensions/enigmail/makemake
- @${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \
- -e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \
- ${WRKSRC}/mailnews/extensions/enigmail/Makefile.in
- @${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \
- -e '/em:minVersion/s/1[0-9].0/10.0/' \
- -e '/em:maxVersion/s/pre//' \
- ${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf
-.endif
-
-pre-configure:
- (cd ${WRKSRC} && ${AUTOCONF})
- (cd ${MOZSRC} && ${AUTOCONF})
- (cd ${MOZSRC}/js/src/ && ${AUTOCONF})
-
-.if ${PORT_OPTIONS:MENIGMAIL}
-post-build:
- cd ${WRKSRC}/mailnews/extensions/enigmail && \
- ./makemake -r -o ${MOZ_OBJDIR}
- ${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} all xpi \
- -C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
-.endif
-
-port-pre-install:
- ${MKDIR} ${FAKEDIR}/lib/${PORTNAME}/defaults
-
-pre-install:
- @${ECHO_CMD} 'share/applications/${PORTNAME}.desktop' >> ${PLIST}
- @${ECHO_CMD} 'share/pixmaps/${PORTNAME_ICON}' >> ${PLIST}
- @${ECHO_CMD} '@dirrmtry share/applications' >> ${PLIST}
-
-post-install:
- ${MKDIR} ${PREFIX}/share/applications
- ${INSTALL_DATA} ${WRKDIR}/${MOZILLA_EXEC_NAME}.desktop ${PREFIX}/share/applications
- ${LN} -sf ${PORTNAME_ICON_SRC} ${PREFIX}/share/pixmaps/${PORTNAME_ICON}
-.if ${PORT_OPTIONS:MLIGHTNING}
- @${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird
- @(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE})
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${XPI_ID}
- @${REINPLACE_CMD} -i "" "s/${XPI_ORIG_ID}/${XPI_ID}/" ${XPI_LIBDIR}/${XPI_ID}/install.rdf
- @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${XPI_ID}
- @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${LOCALBASE}/lib/thunderbird/extensions 2>/dev/null || true
- @${LN} -sf ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/thunderbird 2>/dev/null || true
- @(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -not -type d) | ${SORT} | \
- ${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST}
- @${ECHO_CMD} 'lib/xpi/symlinks/thunderbird/${XPI_ID}' >> ${TMPPLIST}
- @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${XPI_ID} ${LOCALBASE}/lib/thunderbird/extensions 2>/dev/null || true' >> ${TMPPLIST}
- @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/thunderbird/extensions/${XPI_ID}' >> ${TMPPLIST}
- @(cd ${XPI_LIBDIR}; ${FIND} ${XPI_ID} -type d) | ${SORT} -r | \
- ${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
-.endif
-.if ${PORT_OPTIONS:MENIGMAIL}
- @${MKDIR} ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME}
- @(cd ${XPI_LIBDIR}/${EM_ID}; ${TAR} -xf ${EM_XPI_FILE})
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${XPI_LIBDIR}/${EM_ID}
- @${REINPLACE_CMD} -i "" "s/${EM_ORIG_ID}/${EM_ID}/" ${EM_ID_RFILES}
- @${CHMOD} -R a+rX,go-w ${XPI_LIBDIR}/${EM_ID}
- @${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true
- @${LN} -sf ${XPI_LIBDIR}/${EM_ID} ${XPI_LIBDIR}/symlinks/${PORTNAME} 2>/dev/null || true
- @(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -not -type d) | ${SORT} | \
- ${SED} -ne 's,^,lib/xpi/,p' >> ${TMPPLIST}
- @${ECHO_CMD} 'lib/xpi/symlinks/${PORTNAME}/${EM_ID}' >> ${TMPPLIST}
- @${ECHO_CMD} '@exec ${LN} -sf %D/lib/xpi/${EM_ID} ${LOCALBASE}/lib/${PORTNAME}/extensions 2>/dev/null || true' >> ${TMPPLIST}
- @${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/lib/${PORTNAME}/extensions/${EM_ID}' >> ${TMPPLIST}
- @(cd ${XPI_LIBDIR}; ${FIND} ${EM_ID} -type d) | ${SORT} -r | \
- ${SED} -ne 's,^,@dirrm lib/xpi/,p' >> ${TMPPLIST}
-.endif
-.if ${PORT_OPTIONS:MLIGHTNING} || ${PORT_OPTIONS:MENIGMAIL}
- @${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks/${PORTNAME} 2>/dev/null || true' >> ${TMPPLIST}
- @${ECHO_CMD} '@unexec rmdir %D/lib/xpi/symlinks 2>/dev/null || true' >> ${TMPPLIST}
- @${ECHO_CMD} '@unexec rmdir %D/lib/xpi 2>/dev/null || true' >> ${TMPPLIST}
-.endif
-
-.include <bsd.port.post.mk>
diff --git a/mail/thunderbird-esr/distinfo b/mail/thunderbird-esr/distinfo
deleted file mode 100644
index d3d15a8de407..000000000000
--- a/mail/thunderbird-esr/distinfo
+++ /dev/null
@@ -1,4 +0,0 @@
-SHA256 (thunderbird-10.0.12esr.source.tar.bz2) = 9868f2523685b581626ce1d3280b47803b23e3578e1caec4493b31d0b1b02075
-SIZE (thunderbird-10.0.12esr.source.tar.bz2) = 97703324
-SHA256 (enigmail-1.4.3.tar.gz) = 440035f19a22e8e234c530a0e78fb9ee74bb934fcf721777868de79324636d27
-SIZE (enigmail-1.4.3.tar.gz) = 1337811
diff --git a/mail/thunderbird-esr/files/moz_pis_S50cleanhome b/mail/thunderbird-esr/files/moz_pis_S50cleanhome
deleted file mode 100644
index 348592392043..000000000000
--- a/mail/thunderbird-esr/files/moz_pis_S50cleanhome
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-
-# S50cleanhome
-# a script to polite ${HOME}/${MOZ_PIS_USER_DIR}
-
-# We run in our own subshell
-
-# First, verify protocol
-[ "$1" != "start" ] && exit 1
-[ -z "${MOZ_PIS_API}" -o ${MOZ_PIS_API} -ne 2 ] && exit 1
-[ -z "${MOZ_PIS_MOZBINDIR}" -o ! -d "${MOZ_PIS_MOZBINDIR}" ] && exit 1
-[ -z "${HOME}" -o ! -d "${HOME}" ] && exit 1
-[ -z "${MOZ_PIS_USER_DIR}" -o ! -d "${HOME}/${MOZ_PIS_USER_DIR}" ] && exit 1
-
-# Try to polite ${HOME}/${MOZ_PIS_USER_DIR}
-
-# This must be really needed?
-# rm -f "${$HOME}/${MOZ_PIS_USER_DIR}/pluginreg.dat"
-
-# Try to polite profile dirs
-if [ -f "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" ]; then
- sed -e '/Path=/! d' -e "s,Path=,${HOME}/${MOZ_PIS_USER_DIR}/," \
- "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" \
- | while read dir
- do
- [ ! -d "${dir}" ] && continue
- # at last, debian do this, we do for new builds
- # rm -f "${dir}/XUL.mfasl"
- # make reclaculate compreg.dat, xpti.dat for new builds
- [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] &&
- rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl"
- done
-fi
diff --git a/mail/thunderbird-esr/files/patch-alsapulse b/mail/thunderbird-esr/files/patch-alsapulse
deleted file mode 100644
index 47580cd562b3..000000000000
--- a/mail/thunderbird-esr/files/patch-alsapulse
+++ /dev/null
@@ -1,119 +0,0 @@
---- mozilla/config/autoconf.mk.in~
-+++ mozilla/config/autoconf.mk.in
-@@ -568,7 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF
- MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@
- MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
-
-+MOZ_ALSA = @MOZ_ALSA@
- MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
-+MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@
-+
-+MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@
-+MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@
-+MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@
-
- GLIB_CFLAGS = @GLIB_CFLAGS@
- GLIB_LIBS = @GLIB_LIBS@
---- mozilla/configure.in~
-+++ mozilla/configure.in
-@@ -5758,17 +5775,48 @@ dnl ====================================
- dnl = Check alsa availability on Linux if using sydneyaudio
- dnl ========================================================
-
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[ --enable-alsa Enable Alsa support],
-+MOZ_ALSA=1,
-+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
-+
- dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then
- case "$target_os" in
- linux*)
-+ MOZ_ALSA=1
-+ ;;
-+ esac
-+fi
-+
-+if test -n "$MOZ_ALSA"; then
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
- [echo "$MOZ_ALSA_PKG_ERRORS"
- AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
-- ;;
-- esac
- fi
-
-+AC_SUBST(MOZ_ALSA_CFLAGS)
-+AC_SUBST(MOZ_ALSA)
-+
-+dnl ========================================================
-+dnl = Enable PulseAudio
-+dnl ========================================================
-+
-+MOZ_ARG_ENABLE_BOOL(pulseaudio,
-+[ --enable-pulseaudio Enable PulseAudio support],
-+MOZ_PULSEAUDIO=1,
-+MOZ_PULSEAUDIO=)
-+
-+if test -n "$MOZ_PULSEAUDIO"; then
-+ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
-+ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
-+ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])])
-+fi
-+
-+AC_SUBST(MOZ_PULSEAUDIO_CFLAGS)
-+AC_SUBST(MOZ_PULSEAUDIO_LIBS)
-+AC_SUBST(MOZ_PULSEAUDIO)
-+
- dnl ========================================================
- dnl Permissions System
- dnl ========================================================
---- mozilla/media/libsydneyaudio/src/Makefile.in~
-+++ mozilla/media/libsydneyaudio/src/Makefile.in
-@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
- CSRCS = \
- sydney_audio_android.c \
- $(NULL)
--else ifeq ($(OS_ARCH),Linux)
--CSRCS = \
-- sydney_audio_alsa.c \
-- $(NULL)
- endif
-
- ifeq ($(OS_ARCH),WINNT)
-@@ -68,6 +64,18 @@ CSRCS = \
- $(NULL)
- endif
-
-+ifdef MOZ_ALSA
-+CSRCS = \
-+ sydney_audio_alsa.c \
-+ $(NULL)
-+endif
-+
-+ifdef MOZ_PULSEAUDIO
-+CSRCS = \
-+ sydney_audio_pulseaudio.c \
-+ $(NULL)
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += winmm.lib
- endif
---- mozilla/toolkit/library/libxul-config.mk~
-+++ mozilla/toolkit/library/libxul-config.mk
-@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX
- EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
- endif
-
--ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
-+ifdef MOZ_ALSA
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
-+
-+ifdef MOZ_PULSEAUDIO
-+EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
- endif
-
- ifdef HAVE_CLOCK_MONOTONIC
diff --git a/mail/thunderbird-esr/files/patch-bug653551 b/mail/thunderbird-esr/files/patch-bug653551
deleted file mode 100644
index 08b62b48897a..000000000000
--- a/mail/thunderbird-esr/files/patch-bug653551
+++ /dev/null
@@ -1,29 +0,0 @@
-commit 47ea30f
-Author: Landry Breuil <landry@openbsd.org>
-Date: Thu Feb 2 15:31:56 2012 +0900
-
- Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha
----
- js/src/configure.in | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git mozilla/js/src/configure.in mozilla/js/src/configure.in
-index 84390cf..d663c46 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -2806,13 +2806,15 @@ arm*-*)
- AC_DEFINE(JS_NUNBOX32)
- ;;
- sparc*-*)
-+ if test ! "$HAVE_64BIT_OS" ; then
- NANOJIT_ARCH=Sparc
- ENABLE_METHODJIT=1
- ENABLE_MONOIC=1
- ENABLE_POLYIC=1
- ENABLE_METHODJIT_TYPED_ARRAY=1
- AC_DEFINE(JS_CPU_SPARC)
- AC_DEFINE(JS_NUNBOX32)
-+ fi
- ;;
- mips*-*)
- ENABLE_METHODJIT=1
diff --git a/mail/thunderbird-esr/files/patch-bug685258 b/mail/thunderbird-esr/files/patch-bug685258
deleted file mode 100644
index cac425d6adba..000000000000
--- a/mail/thunderbird-esr/files/patch-bug685258
+++ /dev/null
@@ -1,17 +0,0 @@
-# HG changeset patch
-# User Oleg Romashin <romaxa@gmail.com>
-# Parent a2291c212856ad27622416e83c8311b6a33b52f1
-Bug 685258 - Pulse audio backend does not check provided playback and crashes r=derf
-
-diff --git a/content/media/nsAudioStream.cpp b/content/media/nsAudioStream.cpp
---- mozilla/content/media/nsAudioStream.cpp
-+++ mozilla/content/media/nsAudioStream.cpp
-@@ -429,7 +429,7 @@ nsresult nsNativeAudioStream::Init(PRInt32 aNumChannels, PRInt32 aRate, SampleFo
- mFormat = aFormat;
-
- if (sa_stream_create_pcm(reinterpret_cast<sa_stream_t**>(&mAudioHandle),
-- NULL,
-+ "Mozilla",
- SA_MODE_WRONLY,
- SA_PCM_FORMAT_S16_NE,
- aRate,
diff --git a/mail/thunderbird-esr/files/patch-bug691898 b/mail/thunderbird-esr/files/patch-bug691898
deleted file mode 100644
index adf059a59554..000000000000
--- a/mail/thunderbird-esr/files/patch-bug691898
+++ /dev/null
@@ -1,285 +0,0 @@
-From: Mike Hommey <mh@glandium.org>
-Date: Sat, 24 Dec 2011 09:56:58 +0100
-Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
- YARR JIT is not supported
-
----
- js/src/Makefile.in | 21 +++++++++++++--------
- js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
- js/src/vm/RegExpObject.cpp | 36 ------------------------------------
- js/src/vm/RegExpObject.h | 27 ++++++---------------------
- js/src/yarr/wtfbridge.h | 2 --
- 5 files changed, 25 insertions(+), 89 deletions(-)
-
-diff --git a/js/src/Makefile.in b/js/src/Makefile.in
-index fc48cbd..49f0bdc 100644
---- mozilla/js/src/Makefile.in
-+++ mozilla/js/src/Makefile.in
-@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
-
- ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
-
--VPATH += $(srcdir)/yarr/pcre \
-+VPATH += $(srcdir)/assembler \
-+ $(srcdir)/assembler/wtf \
-+ $(srcdir)/yarr \
- $(NULL)
-
- CPPSRCS += \
-- pcre_compile.cpp \
-- pcre_exec.cpp \
-- pcre_tables.cpp \
-- pcre_xclass.cpp \
-- pcre_ucp_searchfuncs.cpp \
-+ Assertions.cpp \
-+ OSAllocatorOS2.cpp \
-+ OSAllocatorPosix.cpp \
-+ OSAllocatorWin.cpp \
-+ PageBlock.cpp \
-+ YarrInterpreter.cpp \
-+ YarrPattern.cpp \
-+ YarrSyntaxChecker.cpp \
- $(NULL)
- else
-
-@@ -1015,10 +1020,10 @@ endif
- # Needed to "configure" it correctly. Unfortunately these
- # flags wind up being applied to all code in js/src, not just
- # the code in js/src/assembler.
--CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
-+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
-
- ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
--CXXFLAGS += -DENABLE_JIT=1
-+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
- endif
-
- INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
-diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
-index 5f7817d..91108a7 100644
---- mozilla/js/src/vm/RegExpObject-inl.h
-+++ mozilla/js/src/vm/RegExpObject-inl.h
-@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
- return RetType(self);
- }
-
-+#if ENABLE_YARR_JIT
- /* This function should be deleted once bad Android platforms phase out. See bug 604774. */
- inline bool
- RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
-@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
- return true;
- #endif
- }
-+#endif
-
- inline bool
- RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts,
- uintN *parenCount, RegExpFlag flags)
- {
--#if ENABLE_YARR_JIT
- /* Parse the pattern. */
- ErrorCode yarrError;
- YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
-@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
- * case we have to bytecode compile it.
- */
-
--#ifdef JS_METHODJIT
-+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
- if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
- if (!cx->compartment->ensureJaegerCompartmentExists(cx))
- return false;
-@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
- }
- #endif
-
-+#if ENABLE_YARR_JIT
- codeBlock.setFallBack(true);
-+#endif
- byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
- return true;
--#else /* !defined(ENABLE_YARR_JIT) */
-- int error = 0;
-- compiled = jsRegExpCompile(pattern.chars(), pattern.length(),
-- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase,
-- multiline() ? JSRegExpMultiline : JSRegExpSingleLine,
-- parenCount, &error);
-- if (error) {
-- reportPCREError(cx, error);
-- return false;
-- }
-- return true;
--#endif
- }
-
- inline bool
-@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
- else
- result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
- #else
-- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
-+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
- #endif
-
- if (result == -1)
- return Success_NotFound;
-
--#if !ENABLE_YARR_JIT
-- if (result < 0) {
-- reportPCREError(cx, result);
-- return Error;
-- }
--#endif
--
- JS_ASSERT(result >= 0);
- return Success;
- }
-diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
-index f75c6a5..7631dd5 100644
---- mozilla/js/src/vm/RegExpObject.cpp
-+++ mozilla/js/src/vm/RegExpObject.cpp
-@@ -251,7 +251,6 @@ Class js::RegExpClass = {
- NULL /* trace */
- };
-
--#if ENABLE_YARR_JIT
- void
- RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
- {
-@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
- }
- }
-
--#else /* !ENABLE_YARR_JIT */
--
--void
--RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
--{
--#define REPORT(msg_) \
-- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
-- return
-- switch (error) {
-- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
-- case 1: REPORT(JSMSG_TRAILING_SLASH);
-- case 2: REPORT(JSMSG_TRAILING_SLASH);
-- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 6: REPORT(JSMSG_BAD_CLASS_RANGE);
-- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 8: REPORT(JSMSG_BAD_CLASS_RANGE);
-- case 9: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
-- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
-- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 14: REPORT(JSMSG_MISSING_PAREN);
-- case 15: REPORT(JSMSG_BAD_BACKREF);
-- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- default:
-- JS_NOT_REACHED("Precondition violation: unknown PCRE error code.");
-- }
--#undef REPORT
--}
--#endif /* ENABLE_YARR_JIT */
--
- bool
- js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
- {
-diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
-index 1449d56..279f3c0 100644
---- mozilla/js/src/vm/RegExpObject.h
-+++ mozilla/js/src/vm/RegExpObject.h
-@@ -49,8 +49,6 @@
- #include "yarr/Yarr.h"
- #if ENABLE_YARR_JIT
- #include "yarr/YarrJIT.h"
--#else
--#include "yarr/pcre/pcre.h"
- #endif
-
- namespace js {
-@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
- /* Abstracts away the gross |RegExpPrivate| backend details. */
- class RegExpPrivateCode
- {
--#if ENABLE_YARR_JIT
- typedef JSC::Yarr::BytecodePattern BytecodePattern;
- typedef JSC::Yarr::ErrorCode ErrorCode;
-+ typedef JSC::Yarr::YarrPattern YarrPattern;
-+#if ENABLE_YARR_JIT
- typedef JSC::Yarr::JSGlobalData JSGlobalData;
- typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
-- typedef JSC::Yarr::YarrPattern YarrPattern;
-
- /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
- YarrCodeBlock codeBlock;
-- BytecodePattern *byteCode;
--#else
-- JSRegExp *compiled;
- #endif
-+ BytecodePattern *byteCode;
-
- public:
- RegExpPrivateCode()
- :
- #if ENABLE_YARR_JIT
- codeBlock(),
-- byteCode(NULL)
--#else
-- compiled(NULL)
- #endif
-+ byteCode(NULL)
- { }
-
- ~RegExpPrivateCode() {
- #if ENABLE_YARR_JIT
- codeBlock.release();
-+#endif
- if (byteCode)
- Foreground::delete_<BytecodePattern>(byteCode);
--#else
-- if (compiled)
-- jsRegExpFree(compiled);
--#endif
- }
-
- #if ENABLE_YARR_JIT
- static inline bool isJITRuntimeEnabled(JSContext *cx);
-- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
--#else
-- void reportPCREError(JSContext *cx, int error);
- #endif
-+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
-
- inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
- RegExpFlag flags);
-@@ -205,11 +194,7 @@ class RegExpPrivateCode
- int *output, size_t outputCount);
-
- static size_t getOutputSize(size_t pairCount) {
--#if ENABLE_YARR_JIT
- return pairCount * 2;
--#else
-- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
--#endif
- }
- };
-
-diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
-index ac41d08..fb8eb86 100644
---- mozilla/js/src/yarr/wtfbridge.h
-+++ mozilla/js/src/yarr/wtfbridge.h
-@@ -49,9 +49,7 @@
- #include "jsprvtd.h"
- #include "vm/String.h"
- #include "assembler/wtf/Platform.h"
--#if ENABLE_YARR_JIT
- #include "assembler/jit/ExecutableAllocator.h"
--#endif
-
- namespace JSC { namespace Yarr {
-
diff --git a/mail/thunderbird-esr/files/patch-bug714312 b/mail/thunderbird-esr/files/patch-bug714312
deleted file mode 100644
index 02d0871c9a76..000000000000
--- a/mail/thunderbird-esr/files/patch-bug714312
+++ /dev/null
@@ -1,73 +0,0 @@
-commit c104d9b
-Author: Landry Breuil <landry@openbsd.org>
-Date: Mon Jan 9 17:32:00 2012 -0600
-
- Bug 714312 - Use <machine/endian.h> to get endianess on BSD systems, fixing the BSD build. r=ted
-
- --HG--
- extra : rebase_source : 8b418bdb2d713093d138ffed20bf1630c05f396b
----
- js/src/configure.in | 5 +++++
- js/src/js-config.h.in | 4 ++++
- js/src/jscpucfg.h | 17 +++++++++++++++++
- 3 files changed, 26 insertions(+)
-
-diff --git mozilla/js/src/configure.in mozilla/js/src/configure.in
-index 164c896..361b29e 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -2934,6 +2934,11 @@ if test "$ac_cv_header_endian_h" = yes;
- AC_DEFINE(JS_HAVE_ENDIAN_H)
- fi
-
-+AC_CHECK_HEADERS(machine/endian.h)
-+if test "$ac_cv_header_machine_endian_h" = yes; then
-+ AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)
-+fi
-+
- AC_CHECK_HEADERS(sys/isa_defs.h)
- if test "$ac_cv_header_sys_isa_defs_h" = yes; then
- AC_DEFINE(JS_HAVE_SYS_ISA_DEFS_H)
-diff --git mozilla/js/src/js-config.h.in mozilla/js/src/js-config.h.in
-index fb009fa..402262e 100644
---- mozilla/js/src/js-config.h.in
-+++ mozilla/js/src/js-config.h.in
-@@ -59,6 +59,10 @@
- useable. See jscpucfg.h. */
- #undef JS_HAVE_ENDIAN_H
-
-+/* Define to 1 if the <machine/endian.h> header is present and
-+ useable. See jscpucfg.h. */
-+#undef JS_HAVE_MACHINE_ENDIAN_H
-+
- /* Define to 1 if the <sys/isa_defs.h> header is present and
- useable. See jscpucfg.h. */
- #undef JS_HAVE_SYS_ISA_DEFS_H
-diff --git mozilla/js/src/jscpucfg.h mozilla/js/src/jscpucfg.h
-index dd32bce..5fd8415 100644
---- mozilla/js/src/jscpucfg.h
-+++ mozilla/js/src/jscpucfg.h
-@@ -92,6 +92,23 @@
- # error "endian.h does not define __BYTE_ORDER. Cannot determine endianness."
- # endif
-
-+/* BSDs */
-+#elif defined(JS_HAVE_MACHINE_ENDIAN_H)
-+# include <sys/types.h>
-+# include <machine/endian.h>
-+
-+# if defined(_BYTE_ORDER)
-+# if _BYTE_ORDER == _LITTLE_ENDIAN
-+# define IS_LITTLE_ENDIAN 1
-+# undef IS_BIG_ENDIAN
-+# elif _BYTE_ORDER == _BIG_ENDIAN
-+# undef IS_LITTLE_ENDIAN
-+# define IS_BIG_ENDIAN 1
-+# endif
-+# else /* !defined(_BYTE_ORDER) */
-+# error "machine/endian.h does not define _BYTE_ORDER. Cannot determine endianness."
-+# endif
-+
- #elif defined(JS_HAVE_SYS_ISA_DEFS_H)
- # include <sys/isa_defs.h>
-
diff --git a/mail/thunderbird-esr/files/patch-bug725655 b/mail/thunderbird-esr/files/patch-bug725655
deleted file mode 100644
index 56b9e36a8e41..000000000000
--- a/mail/thunderbird-esr/files/patch-bug725655
+++ /dev/null
@@ -1,53 +0,0 @@
-commit 18b9c9d
-Author: Martin Stránský <stransky@redhat.com>
-Date: Fri Feb 10 16:07:41 2012 +0100
-
- Bug 725655 - gcc 4.7 build failures (missing headers). r=benjamin
----
- ipc/chromium/src/base/file_util_linux.cc | 3 +++
- ipc/chromium/src/base/message_pump_libevent.cc | 3 +++
- ipc/chromium/src/base/time_posix.cc | 3 +++
- 3 files changed, 9 insertions(+)
-
-diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc
-index cca706f..171e44f 100644
---- mozilla/ipc/chromium/src/base/file_util_linux.cc
-+++ mozilla/ipc/chromium/src/base/file_util_linux.cc
-@@ -5,6 +5,9 @@
- #include "base/file_util.h"
-
- #include <fcntl.h>
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include <string>
- #include <vector>
-diff --git mozilla/ipc/chromium/src/base/message_pump_libevent.cc mozilla/ipc/chromium/src/base/message_pump_libevent.cc
-index 6194f79..9f31dbb 100644
---- mozilla/ipc/chromium/src/base/message_pump_libevent.cc
-+++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc
-@@ -6,6 +6,9 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include "eintr_wrapper.h"
- #include "base/logging.h"
-diff --git mozilla/ipc/chromium/src/base/time_posix.cc mozilla/ipc/chromium/src/base/time_posix.cc
-index 8d1a1d5..abf2a56 100644
---- mozilla/ipc/chromium/src/base/time_posix.cc
-+++ mozilla/ipc/chromium/src/base/time_posix.cc
-@@ -13,6 +13,9 @@
- #else
- #include <time.h>
- #endif
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include <limits>
-
diff --git a/mail/thunderbird-esr/files/patch-bug728968 b/mail/thunderbird-esr/files/patch-bug728968
deleted file mode 100644
index 72da7af43d41..000000000000
--- a/mail/thunderbird-esr/files/patch-bug728968
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 4075972
-Author: Mike Hommey <mh+mozilla@glandium.org>
-Date: Thu Feb 23 11:00:46 2012 +0100
-
- Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey
----
- configure.in | 29 ++++++++++++++++-------------
- 1 file changed, 16 insertions(+), 13 deletions(-)
-
-diff --git mozilla/configure.in mozilla/configure.in
-index 3ba7e2f..3d0614c 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -3728,20 +3728,23 @@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6
- AC_CHECK_FUNCS(flockfile getpagesize)
- AC_CHECK_FUNCS(localtime_r strtok_r)
-
--dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt
--_SAVE_LDFLAGS=$LDFLAGS
--LDFLAGS="$LDFLAGS -lrt"
--AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt,
-- ac_cv_have_clock_monotonic,
-- [AC_TRY_LINK([#include <time.h>],
-- [ struct timespec ts;
-- clock_gettime(CLOCK_MONOTONIC, &ts); ],
-- ac_cv_have_clock_monotonic=yes,
-- ac_cv_have_clock_monotonic=no)])
--LDFLAGS=$_SAVE_LDFLAGS
--if test "$ac_cv_have_clock_monotonic" = "yes"; then
-+dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
-+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
-+ ac_cv_clock_monotonic,
-+ [for libs in "" -lrt; do
-+ _SAVE_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $libs"
-+ AC_TRY_LINK([#include <time.h>],
-+ [ struct timespec ts;
-+ clock_gettime(CLOCK_MONOTONIC, &ts); ],
-+ ac_cv_clock_monotonic=$libs
-+ break,
-+ ac_cv_clock_monotonic=no)
-+ LDFLAGS="$_SAVE_LDFLAGS"
-+ done])
-+if test "$ac_cv_clock_monotonic" != "no"; then
- HAVE_CLOCK_MONOTONIC=1
-- REALTIME_LIBS=-lrt
-+ REALTIME_LIBS=$ac_cv_clock_monotonic
- AC_DEFINE(HAVE_CLOCK_MONOTONIC)
- AC_SUBST(HAVE_CLOCK_MONOTONIC)
- AC_SUBST(REALTIME_LIBS)
diff --git a/mail/thunderbird-esr/files/patch-bug729155 b/mail/thunderbird-esr/files/patch-bug729155
deleted file mode 100644
index b4791bb1141a..000000000000
--- a/mail/thunderbird-esr/files/patch-bug729155
+++ /dev/null
@@ -1,18 +0,0 @@
---- mozilla/dom/plugins/ipc/PluginMessageUtils.cpp
-+++ mozilla/dom/plugins/ipc/PluginMessageUtils.cpp
-@@ -114,6 +114,7 @@ MediateRace(const RPCChannel::Message& parent,
- }
- }
-
-+#if defined(OS_LINUX)
- static string
- ReplaceAll(const string& haystack, const string& needle, const string& with)
- {
-@@ -127,6 +128,7 @@ ReplaceAll(const string& haystack, const string& needle, const string& with)
-
- return munged;
- }
-+#endif
-
- string
- MungePluginDsoPath(const string& path)
diff --git a/mail/thunderbird-esr/files/patch-bug741737 b/mail/thunderbird-esr/files/patch-bug741737
deleted file mode 100644
index d4ceffbe8cef..000000000000
--- a/mail/thunderbird-esr/files/patch-bug741737
+++ /dev/null
@@ -1,90 +0,0 @@
-changeset: 91900:eee73897136b
-user: Martin Stransky <stransky@redhat.com>
-date: Tue Apr 17 19:57:40 2012 -0400
-summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
-
-diff --git a/configure.in b/configure.in
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
-
- dnl system libvpx Support
- dnl ========================================================
--MOZ_ARG_WITH_STRING(system-libvpx,
--[ --with-system-libvpx=[PFX]
-- Use system libvpx [installed at prefix PFX]],
-- LIBVPX_DIR=$withval)
-+MOZ_ARG_WITH_BOOL(system-libvpx,
-+[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
-+ MOZ_NATIVE_LIBVPX=1)
-
--MOZ_NATIVE_LIBVPX=
- MOZ_LIBVPX_INCLUDES=
- MOZ_LIBVPX_LIBS=
-
-@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
- AC_DEFINE(MOZ_VP8_ENCODER)
- fi
-
-- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
-- _SAVE_CFLAGS=$CFLAGS
-- _SAVE_LDFLAGS=$LDFLAGS
-- _SAVE_LIBS=$LIBS
-- if test "${LIBVPX_DIR}" = "yes"; then
-- LIBVPX_DIR=/usr
-- fi
-- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
-- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
-- MOZ_NATIVE_LIBVPX_DEC_TEST=
-- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
-- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
-- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
-- fi],
-- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
-- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
-- [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
-- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
-- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
-- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
-- dnl We need at least v0.9.7 to fix several crash bugs (for which we
-- dnl had local patches prior to v0.9.7).
-- dnl
-- dnl This is a terrible test for the library version, but we don't
-- dnl have a good one. There is no version number in a public header,
-- dnl and testing the headers still doesn't guarantee we link against
-- dnl the right version. While we could call vpx_codec_version() at
-- dnl run-time, that would break cross-compiling. There are no
-- dnl additional exported symbols between the v0.9.7 release and the
-- dnl v0.9.6 one to check for.
-- AC_TRY_COMPILE([
-- #include <vpx/vpx_decoder.h>
-- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
-- #error "test failed."
-- #endif
-- ],
-- [return 0;],
-- [AC_MSG_RESULT([yes])
-- MOZ_NATIVE_LIBVPX=1
-- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
-- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
-- [AC_MSG_RESULT([no])
-- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
-- fi
-- CFLAGS=$_SAVE_CFLAGS
-- LDFLAGS=$_SAVE_LDFLAGS
-- LIBS=$_SAVE_LIBS
-+ if test -n "$MOZ_NATIVE_LIBVPX"; then
-+ dnl ============================
-+ dnl === libvpx Version check ===
-+ dnl ============================
-+ dnl Check to see if we have a system libvpx package.
-+ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
-+
-+ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
-+ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
-+
-+ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
-+ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
- fi
- fi
-
diff --git a/mail/thunderbird-esr/files/patch-bug753046 b/mail/thunderbird-esr/files/patch-bug753046
deleted file mode 100644
index 63700c2f41d8..000000000000
--- a/mail/thunderbird-esr/files/patch-bug753046
+++ /dev/null
@@ -1,1202 +0,0 @@
-# Bug 753046 - Add support for DragonFly/NetBSD
-
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp
-@@ -5,6 +5,7 @@
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- #ifdef MOZ_WIDGET_QT
-+#include <unistd.h> // for _exit()
- #include <QtCore/QTimer>
- #include "nsQAppInstance.h"
- #include "NestedLoopTimer.h"
-@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin
-
- // TODO: use PluginPRLibrary here
-
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- mShutdownFunc =
- (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
-
-@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
- PLUGIN_LOG_DEBUG_METHOD;
- AssertPluginThread();
-
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
- *_retval = mGetEntryPointsFunc(&mFunctions);
-@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N
- SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/));
- #endif
-
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
- return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.h
-@@ -340,7 +340,7 @@ private:
-
- // we get this from the plugin
- NP_PLUGINSHUTDOWN mShutdownFunc;
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_BSD)
- NP_PLUGINUNIXINIT mInitializeFunc;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
- NP_PLUGININIT mInitializeFunc;
-$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
-+++ mozilla/ipc/chromium/Makefile.in
-@@ -278,6 +278,34 @@ endif
-
- endif # } OS_LINUX
-
-+ifdef OS_BSD # {
-+
-+CPPSRCS += \
-+ atomicops_internals_x86_gcc.cc \
-+ file_util_linux.cc \
-+ process_util_bsd.cc \
-+ time_posix.cc \
-+ $(NULL)
-+
-+ifdef MOZ_ENABLE_GTK2
-+CPPSRCS += \
-+ message_pump_glib.cc \
-+ $(NULL)
-+endif
-+
-+ifdef MOZ_ENABLE_QT
-+MOCSRCS = \
-+ moc_message_pump_qt.cc \
-+ $(NULL)
-+
-+CPPSRCS += \
-+ $(MOCSRCS) \
-+ message_pump_qt.cc \
-+ $(NULL)
-+endif
-+
-+endif # } OS_BSD
-+
- # libevent
-
- ifndef MOZ_NATIVE_LIBEVENT # {
-$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100
-@@ -56,17 +56,6 @@
- -I$(DEPTH)/ipc/ipdl/_ipdlheaders \
- $(NULL)
-
--ifeq ($(OS_ARCH),Darwin) # {
--
--OS_MACOSX = 1
--OS_POSIX = 1
--
--DEFINES += \
-- -DOS_MACOSX=1 \
-- -DOS_POSIX=1 \
-- $(NULL)
--
--else # } {
- ifeq ($(OS_ARCH),WINNT) # {
- OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp)
-
-@@ -93,13 +82,65 @@
- endif
-
- else # } {
--
--OS_LINUX = 1
- OS_POSIX = 1
-+DEFINES += -DOS_POSIX=1
-+
-+ifeq ($(OS_ARCH),Darwin) # {
-+
-+OS_MACOSX = 1
-+DEFINES += \
-+ -DOS_MACOSX=1 \
-+ $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),DragonFly) # {
-+
-+OS_DRAGONFLY = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+ -DOS_DRAGONFLY=1 \
-+ -DOS_BSD=1 \
-+ $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),FreeBSD) # {
-+
-+OS_FREEBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+ -DOS_FREEBSD=1 \
-+ -DOS_BSD=1 \
-+ $(NULL)
-
-+else # } {
-+ifeq ($(OS_ARCH),NetBSD) # {
-+
-+OS_NETBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+ -DOS_NETBSD=1 \
-+ -DOS_BSD=1 \
-+ $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),OpenBSD) # {
-+
-+OS_OPENBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+ -DOS_OPENBSD=1 \
-+ -DOS_BSD=1 \
-+ $(NULL)
-+
-+else # } {
-+
-+OS_LINUX = 1
- DEFINES += \
- -DOS_LINUX=1 \
-- -DOS_POSIX=1 \
- $(NULL)
-
- # NB: to stop gcc warnings about exporting template instantiation
-@@ -107,4 +147,8 @@
-
- endif # }
- endif # }
-+endif # }
-+endif # }
-+endif # }
-+endif # }
-
-$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/base_paths.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/base_paths.h
-@@ -13,7 +13,7 @@
- #include "base/base_paths_win.h"
- #elif defined(OS_MACOSX)
- #include "base/base_paths_mac.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "base/base_paths_linux.h"
- #endif
- #include "base/path_service.h"
-$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/debug_util_posix.cc
-@@ -5,7 +5,7 @@
- #include "build/build_config.h"
- #include "base/debug_util.h"
-
--#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__))
-+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
-
- #include <errno.h>
- #include <fcntl.h>
-@@ -17,9 +17,16 @@
- #include <unistd.h>
- #if MOZ_HAVE_EXECINFO_H
- #include <execinfo.h>
-+#endif
-+
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- #include <sys/sysctl.h>
- #endif
-
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
- #include "base/basictypes.h"
- #include "base/eintr_wrapper.h"
- #include "base/logging.h"
-@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
- return false;
- }
-
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
-
- // Based on Apple's recommended method as described in
- // http://developer.apple.com/qa/qa2004/qa1361.html
-@@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() {
-
- // This process is being debugged if the P_TRACED flag is set.
- is_set = true;
-+#if defined(OS_DRAGONFLY)
-+ being_debugged = (info.kp_flags & P_TRACED) != 0;
-+#elif defined(OS_FREEBSD)
-+ being_debugged = (info.ki_flag & P_TRACED) != 0;
-+#elif defined(OS_OPENBSD)
-+ being_debugged = (info.p_flag & P_TRACED) != 0;
-+#else
- being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
-+#endif
- return being_debugged;
- }
-
-diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h
-new file mode 100644
-index 0000000..3fc1a87
---- /dev/null
-+++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h
-@@ -0,0 +1,112 @@
-+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// derived from dir_reader_linux.h
-+
-+#ifndef BASE_DIR_READER_BSD_H_
-+#define BASE_DIR_READER_BSD_H_
-+#pragma once
-+
-+#include <dirent.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <stdint.h>
-+#include <unistd.h>
-+
-+#include "base/logging.h"
-+#include "base/eintr_wrapper.h"
-+
-+// See the comments in dir_reader_posix.h about this.
-+
-+namespace base {
-+
-+class DirReaderBSD {
-+ public:
-+ explicit DirReaderBSD(const char* directory_path)
-+#ifdef O_DIRECTORY
-+ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)),
-+#else
-+ : fd_(open(directory_path, O_RDONLY)),
-+#endif
-+ offset_(0),
-+ size_(0) {
-+ memset(buf_, 0, sizeof(buf_));
-+ }
-+
-+ ~DirReaderBSD() {
-+ if (fd_ >= 0) {
-+ if (HANDLE_EINTR(close(fd_)))
-+ DLOG(ERROR) << "Failed to close directory handle";
-+ }
-+ }
-+
-+ bool IsValid() const {
-+ return fd_ >= 0;
-+ }
-+
-+ // Move to the next entry returning false if the iteration is complete.
-+ bool Next() {
-+ if (size_) {
-+ struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]);
-+#ifdef OS_DRAGONFLY
-+ offset_ += _DIRENT_DIRSIZ(dirent);
-+#else
-+ offset_ += dirent->d_reclen;
-+#endif
-+ }
-+
-+ if (offset_ != size_)
-+ return true;
-+
-+#ifdef OS_OPENBSD
-+ const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_);
-+#else
-+ const int r = getdents(fd_, buf_, sizeof(buf_));
-+#endif
-+ if (r == 0)
-+ return false;
-+ if (r == -1) {
-+#ifdef OS_OPENBSD
-+ DLOG(ERROR) << "getdirentries returned an error: " << errno;
-+#else
-+ DLOG(ERROR) << "getdents returned an error: " << errno;
-+#endif
-+ return false;
-+ }
-+ size_ = r;
-+ offset_ = 0;
-+ return true;
-+ }
-+
-+ const char* name() const {
-+ if (!size_)
-+ return NULL;
-+
-+ const struct dirent* dirent =
-+ reinterpret_cast<const struct dirent*>(&buf_[offset_]);
-+ return dirent->d_name;
-+ }
-+
-+ int fd() const {
-+ return fd_;
-+ }
-+
-+ static bool IsFallback() {
-+ return false;
-+ }
-+
-+ private:
-+ const int fd_;
-+ char buf_[512];
-+#ifdef OS_OPENBSD
-+ off_t *basep_;
-+#endif
-+ size_t offset_, size_;
-+
-+ DISALLOW_COPY_AND_ASSIGN(DirReaderBSD);
-+};
-+
-+} // namespace base
-+
-+#endif // BASE_DIR_READER_BSD_H_
-diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h
-index 9a34492..62b280c 100644
---- mozilla/ipc/chromium/src/base/dir_reader_posix.h
-+++ mozilla/ipc/chromium/src/base/dir_reader_posix.h
-@@ -18,6 +18,8 @@
-
- #if defined(OS_LINUX)
- #include "base/dir_reader_linux.h"
-+#elif defined(OS_BSD)
-+#include "base/dir_reader_bsd.h"
- #else
- #include "base/dir_reader_fallback.h"
- #endif
-@@ -26,6 +28,8 @@
-
- #if defined(OS_LINUX)
- typedef DirReaderLinux DirReaderPosix;
-+#elif defined(OS_BSD)
-+typedef DirReaderBSD DirReaderPosix;
- #else
- typedef DirReaderFallback DirReaderPosix;
- #endif
-diff --git mozilla/ipc/chromium/src/base/file_util_linux.cc mozilla/ipc/chromium/src/base/file_util_linux.cc
-index 171e44f..0c6dfcc 100644
---- mozilla/ipc/chromium/src/base/file_util_linux.cc
-+++ mozilla/ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) {
- }
-
- bool GetShmemTempDir(FilePath* path) {
--#ifdef ANDROID
-+#if defined(ANDROID) || defined(OS_BSD)
- return GetTempDir(path);
- #else
- *path = FilePath("/dev/shm");
-$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util_posix.cc
-@@ -31,7 +31,7 @@
- #include "base/time.h"
-
- // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
--#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#ifndef HAVE_STAT64
- #define stat64 stat
- #endif
-
-$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/message_loop.cc 2012-02-21 21:24:41.000000000 +0100
-@@ -19,7 +19,7 @@
- #if defined(OS_POSIX)
- #include "base/message_pump_libevent.h"
- #endif
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #ifdef MOZ_WIDGET_GTK2
- #include "base/message_pump_glib.h"
- #endif
-@@ -119,7 +119,7 @@
- if (type_ == TYPE_UI) {
- #if defined(OS_MACOSX)
- pump_ = base::MessagePumpMac::Create();
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- pump_ = new base::MessagePumpForUI();
- #endif // OS_LINUX
- } else if (type_ == TYPE_IO) {
-$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread.h
-@@ -22,9 +22,12 @@ typedef void* PlatformThreadHandle; // HANDLE
- #elif defined(OS_POSIX)
- #include <pthread.h>
- typedef pthread_t PlatformThreadHandle;
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_OPENBSD)
- #include <unistd.h>
- typedef pid_t PlatformThreadId;
-+#elif defined(OS_BSD)
-+#include <sys/types.h>
-+typedef lwpid_t PlatformThreadId;
- #elif defined(OS_MACOSX)
- #include <mach/mach.h>
- typedef mach_port_t PlatformThreadId;
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,9 +9,23 @@
-
- #if defined(OS_MACOSX)
- #include <mach/mach.h>
-+#elif defined(OS_NETBSD)
-+#include <lwp.h>
- #elif defined(OS_LINUX)
- #include <sys/syscall.h>
- #include <unistd.h>
-+#elif defined(OS_DRAGONFLY)
-+#include <unistd.h>
-+#elif defined(OS_FREEBSD)
-+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
-+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
-+#include <pthread_np.h>
- #endif
-
- #if defined(OS_MACOSX)
-@@ -38,9 +45,20 @@
- // into the kernel.
- #if defined(OS_MACOSX)
- return mach_thread_self();
--#elif defined (__OpenBSD__)
-+#elif defined(OS_NETBSD)
-+ return _lwp_self();
-+#elif defined(OS_DRAGONFLY)
-+ return lwp_gettid();
-+#elif defined(OS_FREEBSD)
-+# if __FreeBSD_version > 900030
-+ return pthread_getthreadid_np();
-+# else
-+ long lwpid;
-+ thr_self(&lwpid);
-+ return lwpid;
-+# endif
-+#elif defined(OS_OPENBSD)
-- // TODO(BSD): find a better thread ID
-- return (intptr_t)(pthread_self());
-+ return (intptr_t) (pthread_self());
- #elif defined(OS_LINUX)
- return syscall(__NR_gettid);
- #endif
-$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/process_util.h 2012-01-31 13:14:54.000000000 +0100
-@@ -280,6 +280,7 @@ class NamedProcessIterator {
- const ProcessEntry* NextProcessEntry();
-
- private:
-+#if !defined(OS_BSD)
- // Determines whether there's another process (regardless of executable)
- // left in the list of all processes. Returns true and sets entry_ to
- // that process's info if there is one, false otherwise.
-@@ -292,18 +292,24 @@
- void InitProcessEntry(ProcessEntry* entry);
-
- std::wstring executable_name_;
-+#endif
-
- #if defined(OS_WIN)
- HANDLE snapshot_;
- bool started_iteration_;
- #elif defined(OS_LINUX)
- DIR *procfs_dir_;
-+#elif defined(OS_BSD)
-+ std::vector<ProcessEntry> content;
-+ size_t nextEntry;
- #elif defined(OS_MACOSX)
- std::vector<kinfo_proc> kinfo_procs_;
- size_t index_of_kinfo_proc_;
- #endif
-+#if !defined(OS_BSD)
- ProcessEntry entry_;
- const ProcessFilter* filter_;
-+#endif
-
- DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator);
- };
-$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,318 @@
-+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// derived from process_util_linux.cc and process_util_mac.cc
-+
-+#include "base/process_util.h"
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/wait.h>
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
-+#include <ctype.h>
-+#include <fcntl.h>
-+#include <kvm.h>
-+#include <unistd.h>
-+
-+#include <string>
-+
-+#include "base/debug_util.h"
-+#include "base/eintr_wrapper.h"
-+#include "base/file_util.h"
-+#include "base/logging.h"
-+#include "base/string_tokenizer.h"
-+#include "base/string_util.h"
-+
-+#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \
-+ || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500)
-+#define HAVE_POSIX_SPAWN 1
-+#endif
-+
-+#ifndef __dso_public
-+# ifdef __exported
-+# define __dso_public __exported
-+# else
-+# define __dso_public __attribute__((__visibility__("default")))
-+# endif
-+#endif
-+
-+#ifdef HAVE_POSIX_SPAWN
-+#include <spawn.h>
-+extern "C" char **environ __dso_public;
-+#endif
-+
-+namespace {
-+
-+enum ParsingState {
-+ KEY_NAME,
-+ KEY_VALUE
-+};
-+
-+static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
-+
-+} // namespace
-+
-+namespace base {
-+
-+#ifdef HAVE_POSIX_SPAWN
-+
-+void FreeEnvVarsArray(char* array[], int length)
-+{
-+ for (int i = 0; i < length; i++) {
-+ free(array[i]);
-+ }
-+ delete[] array;
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+ const file_handle_mapping_vector& fds_to_remap,
-+ bool wait, ProcessHandle* process_handle) {
-+ return LaunchApp(argv, fds_to_remap, environment_map(),
-+ wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+ const file_handle_mapping_vector& fds_to_remap,
-+ const environment_map& env_vars_to_set,
-+ bool wait, ProcessHandle* process_handle,
-+ ProcessArchitecture arch) {
-+ bool retval = true;
-+
-+ char* argv_copy[argv.size() + 1];
-+ for (size_t i = 0; i < argv.size(); i++) {
-+ argv_copy[i] = const_cast<char*>(argv[i].c_str());
-+ }
-+ argv_copy[argv.size()] = NULL;
-+
-+ // Make sure we don't leak any FDs to the child process by marking all FDs
-+ // as close-on-exec.
-+ SetAllFDsToCloseOnExec();
-+
-+ // Copy environment to a new char array and add the variables
-+ // in env_vars_to_set.
-+ // Existing variables are overwritten by env_vars_to_set.
-+ int pos = 0;
-+ environment_map combined_env_vars = env_vars_to_set;
-+ while(environ[pos] != NULL) {
-+ std::string varString = environ[pos];
-+ std::string varName = varString.substr(0, varString.find_first_of('='));
-+ std::string varValue = varString.substr(varString.find_first_of('=') + 1);
-+ if (combined_env_vars.find(varName) == combined_env_vars.end()) {
-+ combined_env_vars[varName] = varValue;
-+ }
-+ pos++;
-+ }
-+ int varsLen = combined_env_vars.size() + 1;
-+
-+ char** vars = new char*[varsLen];
-+ int i = 0;
-+ for (environment_map::const_iterator it = combined_env_vars.begin();
-+ it != combined_env_vars.end(); ++it) {
-+ std::string entry(it->first);
-+ entry += "=";
-+ entry += it->second;
-+ vars[i] = strdup(entry.c_str());
-+ i++;
-+ }
-+ vars[i] = NULL;
-+
-+ posix_spawn_file_actions_t file_actions;
-+ if (posix_spawn_file_actions_init(&file_actions) != 0) {
-+ FreeEnvVarsArray(vars, varsLen);
-+ return false;
-+ }
-+
-+ // Turn fds_to_remap array into a set of dup2 calls.
-+ for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin();
-+ it != fds_to_remap.end();
-+ ++it) {
-+ int src_fd = it->first;
-+ int dest_fd = it->second;
-+
-+ if (src_fd == dest_fd) {
-+ int flags = fcntl(src_fd, F_GETFD);
-+ if (flags != -1) {
-+ fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC);
-+ }
-+ } else {
-+ if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) {
-+ posix_spawn_file_actions_destroy(&file_actions);
-+ FreeEnvVarsArray(vars, varsLen);
-+ return false;
-+ }
-+ }
-+ }
-+
-+ pid_t pid = 0;
-+ int spawn_succeeded = (posix_spawnp(&pid,
-+ argv_copy[0],
-+ &file_actions,
-+ NULL,
-+ argv_copy,
-+ vars) == 0);
-+
-+ FreeEnvVarsArray(vars, varsLen);
-+
-+ posix_spawn_file_actions_destroy(&file_actions);
-+
-+ bool process_handle_valid = pid > 0;
-+ if (!spawn_succeeded || !process_handle_valid) {
-+ retval = false;
-+ } else {
-+ if (wait)
-+ HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+ if (process_handle)
-+ *process_handle = pid;
-+ }
-+
-+ return retval;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+ bool wait, bool start_hidden, ProcessHandle* process_handle) {
-+ // TODO(playmobil): Do we need to respect the start_hidden flag?
-+ file_handle_mapping_vector no_files;
-+ return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#else // no posix_spawn, use fork/exec
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+ const file_handle_mapping_vector& fds_to_remap,
-+ bool wait, ProcessHandle* process_handle) {
-+ return LaunchApp(argv, fds_to_remap, environment_map(),
-+ wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+ const file_handle_mapping_vector& fds_to_remap,
-+ const environment_map& env_vars_to_set,
-+ bool wait, ProcessHandle* process_handle,
-+ ProcessArchitecture arch) {
-+ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
-+ // Illegal to allocate memory after fork and before execvp
-+ InjectiveMultimap fd_shuffle1, fd_shuffle2;
-+ fd_shuffle1.reserve(fds_to_remap.size());
-+ fd_shuffle2.reserve(fds_to_remap.size());
-+
-+ pid_t pid = fork();
-+ if (pid < 0)
-+ return false;
-+
-+ if (pid == 0) {
-+ for (file_handle_mapping_vector::const_iterator
-+ it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) {
-+ fd_shuffle1.push_back(InjectionArc(it->first, it->second, false));
-+ fd_shuffle2.push_back(InjectionArc(it->first, it->second, false));
-+ }
-+
-+ if (!ShuffleFileDescriptors(&fd_shuffle1))
-+ _exit(127);
-+
-+ CloseSuperfluousFds(fd_shuffle2);
-+
-+ for (environment_map::const_iterator it = env_vars_to_set.begin();
-+ it != env_vars_to_set.end(); ++it) {
-+ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
-+ _exit(127);
-+ }
-+
-+ for (size_t i = 0; i < argv.size(); i++)
-+ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+ argv_cstr[argv.size()] = NULL;
-+ execvp(argv_cstr[0], argv_cstr.get());
-+ // if we get here, we're in serious trouble and should complain loudly
-+ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+ exit(127);
-+ } else {
-+ gProcessLog.print("==> process %d launched child process %d\n",
-+ GetCurrentProcId(), pid);
-+ if (wait)
-+ HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+ if (process_handle)
-+ *process_handle = pid;
-+ }
-+
-+ return true;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+ bool wait, bool start_hidden,
-+ ProcessHandle* process_handle) {
-+ file_handle_mapping_vector no_files;
-+ return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#endif
-+
-+NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name,
-+ const ProcessFilter* filter)
-+{
-+ int numEntries;
-+ kvm_t *kvm;
-+ std::string exe(WideToASCII(executable_name));
-+
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
-+ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries);
-+ if (procs != NULL && numEntries > 0) {
-+ for (int i = 0; i < numEntries; i++) {
-+# if defined(OS_DRAGONFLY)
-+ if (exe != procs[i].kp_comm) continue;
-+ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue;
-+ ProcessEntry e;
-+ e.pid = procs[i].kp_pid;
-+ e.ppid = procs[i].kp_ppid;
-+ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile);
-+ content.push_back(e);
-+# elif defined(OS_FREEBSD)
-+ if (exe != procs[i].ki_comm) continue;
-+ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue;
-+ ProcessEntry e;
-+ e.pid = procs[i].ki_pid;
-+ e.ppid = procs[i].ki_ppid;
-+ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile);
-+ content.push_back(e);
-+# endif
-+#else
-+ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
-+#if defined(OS_OPENBSD)
-+ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries);
-+#else
-+ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries);
-+#endif
-+ if (procs != NULL && numEntries > 0) {
-+ for (int i = 0; i < numEntries; i++) {
-+ if (exe != procs[i].p_comm) continue;
-+ if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue;
-+ ProcessEntry e;
-+ e.pid = procs[i].p_pid;
-+ e.ppid = procs[i].p_ppid;
-+ strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile);
-+ content.push_back(e);
-+#endif
-+ }
-+ }
-+ nextEntry = 0;
-+ kvm_close(kvm);
-+}
-+
-+NamedProcessIterator::~NamedProcessIterator() {
-+}
-+
-+const ProcessEntry* NamedProcessIterator::NextProcessEntry() {
-+ if (nextEntry >= content.size()) return NULL;
-+ return &content[nextEntry++];
-+}
-+
-+bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
-+ return false;
-+}
-+
-+} // namespace base
-$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_posix.cc
-@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj
- #elif defined(OS_MACOSX)
- static const rlim_t kSystemDefaultMaxFds = 256;
- static const char kFDDir[] = "/dev/fd";
-+#elif defined(OS_BSD)
-+ // the getrlimit below should never fail, so whatever ..
-+ static const rlim_t kSystemDefaultMaxFds = 1024;
-+ // at least /dev/fd will exist
-+ static const char kFDDir[] = "/dev/fd";
- #endif
-
- // Get the maximum number of FDs possible.
-@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj
- void SetAllFDsToCloseOnExec() {
- #if defined(OS_LINUX)
- const char fd_dir[] = "/proc/self/fd";
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
- const char fd_dir[] = "/dev/fd";
- #endif
- ScopedDIR dir_closer(opendir(fd_dir));
-$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $
-
---- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2011-11-04 21:34:00.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/sys_info_posix.cc
-@@ -18,6 +18,11 @@
- #include <mach/mach_init.h>
- #endif
-
-+#if defined(OS_NETBSD)
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #include "base/logging.h"
- #include "base/string_util.h"
-
-@@ -26,7 +31,11 @@ namespace base {
- int SysInfo::NumberOfProcessors() {
- // It seems that sysconf returns the number of "logical" processors on both
- // mac and linux. So we get the number of "online logical" processors.
-+#ifdef _SC_NPROCESSORS_ONLN
- static long res = sysconf(_SC_NPROCESSORS_ONLN);
-+#else
-+ static long res = 1;
-+#endif
- if (res == -1) {
- NOTREACHED();
- return 1;
-@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory()
- }
-
- return static_cast<int64>(hostinfo.max_mem);
-+#elif defined(OS_NETBSD)
-+ int mib[2];
-+ int rc;
-+ int64_t memSize;
-+ size_t len = sizeof(memSize);
-+
-+ mib[0] = CTL_HW;
-+ mib[1] = HW_PHYSMEM64;
-+ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
-+ if (-1 != rc) {
-+ return memSize;
-+ }
-+ return 0;
-+
- #else
- long pages = sysconf(_SC_PHYS_PAGES);
- long page_size = sysconf(_SC_PAGE_SIZE);
-$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h
-@@ -34,7 +34,7 @@
- #include "base/third_party/nspr/prcpucfg_win.h"
- #elif defined(__APPLE__)
- #include "base/third_party/nspr/prcpucfg_mac.h"
--#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
- #include "base/third_party/nspr/prcpucfg_linux.h"
- #elif defined(__OpenBSD__)
- #include "base/third_party/nspr/prcpucfg_openbsd.h"
-$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc
-@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp
- LL_ADD(retVal, retVal, temp);
-
- return retVal;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_DRAGONFLY)
- struct tm exp_tm = {0};
- exp_tm.tm_sec = exploded->tm_sec;
- exp_tm.tm_min = exploded->tm_min;
-@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp
- result *= kSecondsToMicroseconds;
- result += exploded->tm_usec;
- return result;
-+#elif defined(OS_FREEBSD) || defined(OS_NETBSD)
-+ struct tm exp_tm = {0};
-+ exp_tm.tm_sec = exploded->tm_sec;
-+ exp_tm.tm_min = exploded->tm_min;
-+ exp_tm.tm_hour = exploded->tm_hour;
-+ exp_tm.tm_mday = exploded->tm_mday;
-+ exp_tm.tm_mon = exploded->tm_month;
-+ exp_tm.tm_year = exploded->tm_year - 1900;
-+
-+ // time_t is 64bit
-+ time_t absolute_time = timegm(&exp_tm);
-+
-+ PRTime result = static_cast<PRTime>(absolute_time);
-+ result -= exploded->tm_params.tp_gmt_offset +
-+ exploded->tm_params.tp_dst_offset;
-+ result *= kSecondsToMicroseconds;
-+ result += exploded->tm_usec;
-+ return result;
- #else
- #error No PR_ImplodeTime implemented on your platform.
- #endif
-diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
-index abf2a56..48791f6 100644
---- mozilla/ipc/chromium/src/base/time_posix.cc
-+++ mozilla/ipc/chromium/src/base/time_posix.cc
-@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() {
- // With numer and denom = 1 (the expected case), the 64-bit absolute time
- // reported in nanoseconds is enough to last nearly 585 years.
-
--#elif defined(__OpenBSD__) || defined(OS_POSIX) && \
-+#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \
- defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
-
- struct timespec ts;
-$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/build/build_config.h
-@@ -19,6 +19,12 @@
- #define OS_MACOSX 1
- #elif defined(__linux__) || defined(ANDROID)
- #define OS_LINUX 1
-+#elif defined(__DragonFly__)
-+#define OS_DRAGONFLY 1
-+#elif defined(__FreeBSD__)
-+#define OS_FREEBSD 1
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
- #elif defined(__OpenBSD__)
- #define OS_OPENBSD 1
- #elif defined(_WIN32)
-@@ -27,9 +33,16 @@
- #error Please add support for your platform in build/build_config.h
- #endif
-
-+// For access to standard BSD features, use OS_BSD instead of a
-+// more specific macro.
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \
-+ || defined(OS_NETBSD) || defined(OS_OPENBSD)
-+#define OS_BSD 1
-+#endif
-+
- // For access to standard POSIX features, use OS_POSIX instead of a more
- // specific macro.
--#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- #define OS_POSIX 1
- #endif
-
-diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-index bd866ee..2ea5b19 100644
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-@@ -7,6 +7,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <stddef.h>
-+#include <unistd.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2011-06-15 21:57:27.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h
-@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess
- };
-
- // This is a control message buffer large enough to hold kMaxReadFDs
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_NETBSD)
- // TODO(agl): OSX appears to have non-constant CMSG macros!
- char input_cmsg_buf_[1024];
- #else
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h
-@@ -195,7 +195,7 @@
- };
- #endif
-
--#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
-+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
- // There size_t is a synonym for |unsigned long| ...
- template <>
- struct ParamTraits<size_t> {
-@@ -248,7 +248,7 @@
- };
- #endif // defined(OS_MACOSX)
-
--#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
-+#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS))
- // int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
- template <>
- struct ParamTraits<int64> {
-$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h
-@@ -7,7 +7,7 @@
-
- #include "base/basictypes.h"
-
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
- #include "base/shared_memory.h"
- #endif
-
-@@ -66,7 +66,7 @@ class TransportDIB {
- uint32 sequence_num;
- };
- typedef HandleAndSequenceNum Id;
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
- typedef base::SharedMemoryHandle Handle;
- // On Mac, the inode number of the backing file is used as an id.
- typedef base::SharedMemoryId Id;
-@@ -108,7 +108,7 @@ class TransportDIB {
-
- private:
- TransportDIB();
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
- explicit TransportDIB(base::SharedMemoryHandle dib);
- base::SharedMemory shared_memory_;
- uint32 sequence_num_;
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/glue/GeckoChildProcessHost.cpp
-@@ -430,7 +430,7 @@
- // and passing wstrings from one config to the other is unsafe. So
- // we split the logic here.
-
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- base::environment_map newEnvVars;
- // XPCOM may not be initialized in some subprocesses. We don't want
- // to initialize XPCOM just for the directory service, especially
-@@ -445,8 +445,8 @@
- if (NS_SUCCEEDED(rv)) {
- nsCString path;
- greDir->GetNativePath(path);
--# ifdef OS_LINUX
--# ifdef ANDROID
-+# if defined(OS_LINUX) || defined(OS_BSD)
-+# if defined(ANDROID) || defined(OS_BSD)
- path += "/lib";
- # endif // ANDROID
- const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
-@@ -557,7 +557,7 @@
- childArgv.push_back(pidstring);
-
- #if defined(MOZ_CRASHREPORTER)
--# if defined(OS_LINUX)
-+# if defined(OS_LINUX) || defined(OS_BSD)
- int childCrashFd, childCrashRemapFd;
- if (!CrashReporter::CreateNotificationPipeForChild(
- &childCrashFd, &childCrashRemapFd))
-@@ -594,7 +594,7 @@
- #endif
-
- base::LaunchApp(childArgv, mFileMap,
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- newEnvVars,
- #endif
- false, &process, arch);
-diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
-index f37998d..b05dc7b 100644
---- mozilla/ipc/glue/SharedMemorySysV.h
-+++ mozilla/ipc/glue/SharedMemorySysV.h
-@@ -8,7 +8,7 @@
- #ifndef mozilla_ipc_SharedMemorySysV_h
- #define mozilla_ipc_SharedMemorySysV_h
-
--#if defined(OS_LINUX) && !defined(ANDROID)
-+#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
-
- // SysV shared memory isn't available on Windows, but we define the
- // following macro so that #ifdefs are clearer (compared to #ifdef
-$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $
-
---- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000
-+++ mozilla/toolkit/library/Makefile.in
-@@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
- endif
- endif
-
-+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+# keep `environ' unresolved, see bug 14426 for binutils
-+EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet)
- ifdef ACCESSIBILITY
diff --git a/mail/thunderbird-esr/files/patch-bug761077 b/mail/thunderbird-esr/files/patch-bug761077
deleted file mode 100644
index 3c8040ed6754..000000000000
--- a/mail/thunderbird-esr/files/patch-bug761077
+++ /dev/null
@@ -1,88 +0,0 @@
-diff --git mozilla/xpcom/reflect/xptcall/public/genstubs.pl mozilla/xpcom/reflect/xptcall/public/genstubs.pl
-index b8a87a5..918c4cf 100644
---- mozilla/xpcom/reflect/xptcall/public/genstubs.pl
-+++ mozilla/xpcom/reflect/xptcall/public/genstubs.pl
-@@ -44,7 +44,7 @@ print OUTFILE "* 0 is QueryInterface\n";
- print OUTFILE "* 1 is AddRef\n";
- print OUTFILE "* 2 is Release\n";
- print OUTFILE "*/\n";
--print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))\n";
-+print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))\n";
- for($i = 0; $i < $entry_count; $i++) {
- print OUTFILE "NS_IMETHOD Stub",$i+3,"();\n";
- }
-diff --git mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-index eb66761..807db26 100644
---- mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-+++ mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-@@ -8,7 +8,7 @@
- * 1 is AddRef
- * 2 is Release
- */
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- NS_IMETHOD Stub3();
- NS_IMETHOD Stub4();
- NS_IMETHOD Stub5();
-diff --git mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
-index ae6ed66..2783957 100644
---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
-+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
-@@ -70,7 +70,7 @@ endif
- endif
- endif
- # IA64 Linux
--ifneq (,$(filter Linux,$(OS_ARCH)))
-+ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
- ifneq (,$(findstring ia64,$(OS_TEST)))
- CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
- ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -269,7 +269,7 @@ endif
- #
- # Linux/PPC
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
-+ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
- ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -278,7 +278,7 @@ endif
- #
- # Linux/PPC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
-+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
- ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -350,7 +350,7 @@ endif
- #
- # OpenBSD/SPARC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64)
-+ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
- ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
- endif
-diff --git mozilla/xpcom/reflect/xptcall/src/xptcprivate.h mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
-index d903ced..e4ec832 100644
---- mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
-+++ mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
-@@ -14,7 +14,7 @@
-
- class xptiInterfaceEntry;
-
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
- #else
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0;
-@@ -31,7 +31,7 @@ public:
- #undef STUB_ENTRY
- #undef SENTINEL_ENTRY
-
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
- #else
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
diff --git a/mail/thunderbird-esr/files/patch-bug778056 b/mail/thunderbird-esr/files/patch-bug778056
deleted file mode 100644
index 2a792aba9aa0..000000000000
--- a/mail/thunderbird-esr/files/patch-bug778056
+++ /dev/null
@@ -1,21 +0,0 @@
---- mozilla/memory/mozalloc/mozalloc.cpp~
-+++ mozilla/memory/mozalloc/mozalloc.cpp
-@@ -52,6 +52,9 @@
- #if defined(XP_UNIX)
- # include <unistd.h> // for valloc on *BSD
- #endif //if defined(XP_UNIX)
-+#ifdef __FreeBSD__
-+# include <malloc_np.h> // for malloc_usable_size
-+#endif
-
- #if defined(MOZ_MEMORY)
- // jemalloc.h doesn't redeclare symbols if they're provided by the OS
-@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr)
-
- #if defined(XP_MACOSX)
- return malloc_size(ptr);
--#elif defined(MOZ_MEMORY)
-+#elif defined(MOZ_MEMORY) || defined(__FreeBSD__)
- return malloc_usable_size(ptr);
- #elif defined(XP_WIN)
- return _msize(ptr);
diff --git a/mail/thunderbird-esr/files/patch-bug778078 b/mail/thunderbird-esr/files/patch-bug778078
deleted file mode 100644
index 6043f4a30c90..000000000000
--- a/mail/thunderbird-esr/files/patch-bug778078
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.cpp~
-+++ mozilla/toolkit/xre/nsAppRunner.cpp
-@@ -2998,7 +2998,7 @@ XRE_main(int argc, char* argv[], const n
- gQtOnlyArgv[gQtOnlyArgc] = nsnull;
- #endif
- #if defined(MOZ_WIDGET_GTK2)
--#ifdef MOZ_MEMORY
-+#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__)
- // Disable the slice allocator, since jemalloc already uses similar layout
- // algorithms, and using a sub-allocator tends to increase fragmentation.
- // This must be done before g_thread_init() is called.
diff --git a/mail/thunderbird-esr/files/patch-bug779847 b/mail/thunderbird-esr/files/patch-bug779847
deleted file mode 100644
index ed30d515af31..000000000000
--- a/mail/thunderbird-esr/files/patch-bug779847
+++ /dev/null
@@ -1,28 +0,0 @@
---- mozilla/gfx/ycbcr/Makefile.in
-+++ mozilla/gfx/ycbcr/Makefile.in
-@@ -54,23 +54,13 @@ CPPSRCS += yuv_row_win.cpp \
- $(NULL)
- endif
- else
--ifeq ($(OS_ARCH),Linux)
--CPPSRCS += yuv_row_posix.cpp \
-- $(NULL)
--else
--ifeq ($(OS_ARCH),SunOS)
--CPPSRCS += yuv_row_posix.cpp \
-- $(NULL)
--else
--ifeq ($(OS_ARCH),Darwin)
-+ifneq (,$(filter Linux SunOS Darwin DragonFly FreeBSD NetBSD OpenBSD, $(OS_ARCH)))
- CPPSRCS += yuv_row_posix.cpp \
- $(NULL)
- else
- CPPSRCS += yuv_row_other.cpp \
- $(NULL)
--endif # Darwin
--endif # SunOS
--endif # linux
-+endif # posix
- endif # windows
-
- ifeq (arm,$(findstring arm,$(OS_TEST)))
diff --git a/mail/thunderbird-esr/files/patch-bug781457 b/mail/thunderbird-esr/files/patch-bug781457
deleted file mode 100644
index 1a883966b942..000000000000
--- a/mail/thunderbird-esr/files/patch-bug781457
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/xpcom/base/nsStackWalk.cpp.orig 2010-09-12 19:34:04.012503905 +0300
-+++ mozilla/xpcom/base/nsStackWalk.cpp 2010-09-12 19:34:41.294462134 +0300
-@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
-
- #elif defined(HAVE__UNWIND_BACKTRACE)
-
-+#define _GNU_SOURCE
- // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
- #include <unwind.h>
-
diff --git a/mail/thunderbird-esr/files/patch-bug783463 b/mail/thunderbird-esr/files/patch-bug783463
deleted file mode 100644
index 64c28f6ceede..000000000000
--- a/mail/thunderbird-esr/files/patch-bug783463
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozilla/widget/src/qt/nsNativeThemeQt.cpp~
-+++ mozilla/widget/src/qt/nsNativeThemeQt.cpp
-@@ -25,7 +25,6 @@
- #include "nsThemeConstants.h"
- #include "nsIServiceManager.h"
- #include "nsIDOMHTMLInputElement.h"
--#include <malloc.h>
-
-
- #include "gfxASurface.h"
---- mozilla/widget/src/qt/nsSound.cpp~
-+++ mozilla/widget/src/qt/nsSound.cpp
-@@ -40,6 +40,7 @@
- #include <QSound>
-
- #include <string.h>
-+#include <unistd.h>
-
- #include "nscore.h"
- #include "plstr.h"
diff --git a/mail/thunderbird-esr/files/patch-bug784776 b/mail/thunderbird-esr/files/patch-bug784776
deleted file mode 100644
index d8f0e6326249..000000000000
--- a/mail/thunderbird-esr/files/patch-bug784776
+++ /dev/null
@@ -1,22 +0,0 @@
---- mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp~
-+++ mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
-@@ -100,7 +100,7 @@ void nsDateTimeFormatUnix::LocalePreferr
- struct tm *tmc;
- int i;
-
-- tt = time((time_t)NULL);
-+ tt = time(NULL);
- tmc = localtime(&tt);
-
- tmc->tm_hour=22; // put the test sample hour to 22:00 which is 10PM
---- mozilla/xpcom/glue/nsBaseHashtable.h~
-+++ mozilla/xpcom/glue/nsBaseHashtable.h
-@@ -147,7 +147,7 @@ public:
- {
- EntryType* ent = this->GetEntry(aKey);
- if (!ent)
-- return NULL;
-+ return 0;
-
- return ent->mData;
- }
diff --git a/mail/thunderbird-esr/files/patch-bug788039 b/mail/thunderbird-esr/files/patch-bug788039
deleted file mode 100644
index c42105d133c4..000000000000
--- a/mail/thunderbird-esr/files/patch-bug788039
+++ /dev/null
@@ -1,59 +0,0 @@
-# Bug 788039 - With no prefix search libevent via pkg-config.
-
---- mozilla/config/autoconf.mk.in~
-+++ mozilla/config/autoconf.mk.in
-@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA
-
- MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@
- MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@
--MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@
-+MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@
-
- MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@
- MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@
---- mozilla/configure.in~
-+++ mozilla/configure.in
-@@ -3854,7 +3854,7 @@ fi
- dnl system libevent Support
- dnl ========================================================
- MOZ_ARG_WITH_STRING(system-libevent,
--[ --with-system-libevent=[PFX]
-+[ --with-system-libevent[=PFX]
- Use system libevent [installed at prefix PFX]],
- LIBEVENT_DIR=$withval)
-
-@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS
- _SAVE_LIBS=$LIBS
- if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
- MOZ_NATIVE_LIBEVENT=
-+elif test "$LIBEVENT_DIR" = yes; then
-+ PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
-+ MOZ_NATIVE_LIBEVENT=1,
-+ AC_MSG_ERROR([--with-system-libevent requested but libevent package not found]))
- else
-- if test "${LIBEVENT_DIR}" = "yes"; then
-- LIBEVENT_DIR=/usr
-- fi
- CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
- LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
- MOZ_CHECK_HEADER(event.h,
-@@ -3876,16 +3877,16 @@ else
- AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
- AC_CHECK_LIB(event, event_init,
- [MOZ_NATIVE_LIBEVENT=1
-- MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include"
-+ MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
- MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
-- [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=])
-+ [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
- fi
- CFLAGS=$_SAVE_CFLAGS
- LDFLAGS=$_SAVE_LDFLAGS
- LIBS=$_SAVE_LIBS
-
- AC_SUBST(MOZ_NATIVE_LIBEVENT)
--AC_SUBST(MOZ_LIBEVENT_INCLUDES)
-+AC_SUBST(MOZ_LIBEVENT_CFLAGS)
- AC_SUBST(MOZ_LIBEVENT_LIBS)
-
- dnl ========================================================
diff --git a/mail/thunderbird-esr/files/patch-bug788108 b/mail/thunderbird-esr/files/patch-bug788108
deleted file mode 100644
index db2399499397..000000000000
--- a/mail/thunderbird-esr/files/patch-bug788108
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozilla/content/base/public/nsContentUtils.h~
-+++ mozilla/content/base/public/nsContentUtils.h
-@@ -18,17 +18,6 @@
- #include <ieeefp.h>
- #endif
-
--//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
--#ifdef __FreeBSD__
--#include <ieeefp.h>
--#ifdef __alpha__
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
--#else
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
--#endif
--static fp_except_t oldmask = fpsetmask(~allmask);
--#endif
--
- #include "nsAString.h"
- #include "nsIStatefulFrame.h"
- #include "nsNodeInfoManager.h"
diff --git a/mail/thunderbird-esr/files/patch-bug789436 b/mail/thunderbird-esr/files/patch-bug789436
deleted file mode 100644
index 2479d8e69c78..000000000000
--- a/mail/thunderbird-esr/files/patch-bug789436
+++ /dev/null
@@ -1,27 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.cpp~
-+++ mozilla/toolkit/xre/nsAppRunner.cpp
-@@ -1388,11 +1388,6 @@ static int MSCRTReportHook( int aReportType, char *aMessage, int *oReturnValue)
-
- #endif
-
--#if defined(FREEBSD)
--// pick up fpsetmask prototype.
--#include <ieeefp.h>
--#endif
--
- static inline void
- DumpVersion()
- {
-@@ -4136,12 +4131,5 @@ SetupErrorHandling(const char* progname)
-
- // Unbuffer stdout, needed for tinderbox tests.
- setbuf(stdout, 0);
--
--#if defined(FREEBSD)
-- // Disable all SIGFPE's on FreeBSD, as it has non-IEEE-conformant fp
-- // trap behavior that trips up on floating-point tests performed by
-- // the JS engine. See bugzilla bug 9967 details.
-- fpsetmask(0);
--#endif
- }
-
diff --git a/mail/thunderbird-esr/files/patch-bug789693 b/mail/thunderbird-esr/files/patch-bug789693
deleted file mode 100644
index 82b76c8d0a7c..000000000000
--- a/mail/thunderbird-esr/files/patch-bug789693
+++ /dev/null
@@ -1,108 +0,0 @@
---- mozilla/toolkit/components/startup/nsAppStartup.cpp
-+++ mozilla/toolkit/components/startup/nsAppStartup.cpp
-@@ -50,17 +50,40 @@
- #include <sys/syscall.h>
- #endif
-
--#ifdef XP_MACOSX
-+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
-+#include <sys/param.h>
- #include <sys/sysctl.h>
- #endif
-
--#ifdef __OpenBSD__
--#include <sys/param.h>
--#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
- #endif
-
- #include "mozilla/Telemetry.h"
-
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(XP_MACOSX)
-+#define KP_START_SEC kp_proc.p_un.__p_starttime.tv_sec
-+#define KP_START_USEC kp_proc.p_un.__p_starttime.tv_usec
-+#elif defined(__DragonFly__)
-+#define KP_START_SEC kp_start.tv_sec
-+#define KP_START_USEC kp_start.tv_usec
-+#elif defined(__FreeBSD__)
-+#define KP_START_SEC ki_start.tv_sec
-+#define KP_START_USEC ki_start.tv_usec
-+#else
-+#define KP_START_SEC p_ustart_sec
-+#define KP_START_USEC p_ustart_usec
-+#endif
-+
- static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
-
- using namespace mozilla;
-@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
- #endif
- return timestamp;
- }
--#elif defined(XP_MACOSX)
-+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
- static PRTime
- CalculateProcessCreationTimestamp()
- {
-- int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
-- size_t buffer_size;
-- if (sysctl(mib, 4, NULL, &buffer_size, NULL, 0))
-- return 0;
-+ int mib[] = {
-+ CTL_KERN,
-+ KERN_PROC,
-+ KERN_PROC_PID,
-+ getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+ sizeof(KINFO_PROC),
-+ 1,
-+#endif
-+ };
-+ u_int miblen = sizeof(mib) / sizeof(mib[0]);
-
-- struct kinfo_proc *proc = (kinfo_proc*) malloc(buffer_size);
-- if (sysctl(mib, 4, proc, &buffer_size, NULL, 0)) {
-- free(proc);
-- return 0;
-- }
-- PRTime starttime = static_cast<PRTime>(proc->kp_proc.p_un.__p_starttime.tv_sec) * PR_USEC_PER_SEC;
-- starttime += proc->kp_proc.p_un.__p_starttime.tv_usec;
-- free(proc);
-- return starttime;
--}
--#elif defined(__OpenBSD__)
--static PRTime
--CalculateProcessCreationTimestamp()
--{
-- int mib[6] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), sizeof(struct kinfo_proc), 1 };
-- size_t buffer_size;
-- if (sysctl(mib, 6, NULL, &buffer_size, NULL, 0))
-+ KINFO_PROC proc;
-+ size_t buffer_size = sizeof(proc);
-+ if (sysctl(mib, miblen, &proc, &buffer_size, NULL, 0))
- return 0;
-
-- struct kinfo_proc *proc = (struct kinfo_proc*) malloc(buffer_size);
-- if (sysctl(mib, 6, proc, &buffer_size, NULL, 0)) {
-- free(proc);
-- return 0;
-- }
-- PRTime starttime = static_cast<PRTime>(proc->p_ustart_sec) * PR_USEC_PER_SEC;
-- starttime += proc->p_ustart_usec;
-- free(proc);
-+ PRTime starttime = static_cast<PRTime>(proc.KP_START_SEC) * PR_USEC_PER_SEC;
-+ starttime += proc.KP_START_USEC;
- return starttime;
- }
- #else
diff --git a/mail/thunderbird-esr/files/patch-bug791305 b/mail/thunderbird-esr/files/patch-bug791305
deleted file mode 100644
index e4c44a405f57..000000000000
--- a/mail/thunderbird-esr/files/patch-bug791305
+++ /dev/null
@@ -1,107 +0,0 @@
-commit c269a16
-Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
-Date: Fri Sep 14 15:54:55 2012 -0400
-
- Bug 791305. Use libjpeg's color conversion code instead of our own. r=joe,r=khuey
-
- libjpeg-turbo supports converting directly to a format compatible with cairo's
- FORMAT_RGB24. Use that instead of our own handcoded function. This also gives
- us SSE2 and NEON version of this function.
-
- --HG--
- extra : rebase_source : 18f48925f023a33ec2a097d4f4e5cc2ab40be1e9
----
- configure.in | 6 +-
- image/decoders/nsJPEGDecoder.cpp | 311 ++-------------------------------------
- 2 files changed, 20 insertions(+), 297 deletions(-)
-
-diff --git mozilla/image/decoders/nsJPEGDecoder.cpp mozilla/image/decoders/nsJPEGDecoder.cpp
-index c1fb515..1d2a259 100644
---- mozilla/image/decoders/nsJPEGDecoder.cpp
-+++ mozilla/image/decoders/nsJPEGDecoder.cpp
-@@ -22,6 +22,13 @@
- extern "C" {
- #include "iccjpeg.h"
-
-+#ifdef JCS_EXTENSIONS
-+#if defined(IS_BIG_ENDIAN)
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
-+#else
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
-+#endif
-+#else
- /* Colorspace conversion (copied from jpegint.h) */
- struct jpeg_color_deconverter {
- JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-@@ -34,6 +41,7 @@ METHODDEF(void)
- ycc_rgb_convert_argb (j_decompress_ptr cinfo,
- JSAMPIMAGE input_buf, JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows);
-+#endif
- }
-
- static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
-@@ -329,7 +340,18 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
- case JCS_GRAYSCALE:
- case JCS_RGB:
- case JCS_YCbCr:
-+#ifdef JCS_EXTENSIONS
-+ // if we're not color managing we can decode directly to
-+ // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
-+ if (mCMSMode != eCMSMode_All) {
-+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
-+ mInfo.out_color_components = 4;
-+ } else {
-+ mInfo.out_color_space = JCS_RGB;
-+ }
-+#else
- mInfo.out_color_space = JCS_RGB;
-+#endif
- break;
- case JCS_CMYK:
- case JCS_YCCK:
-@@ -397,6 +419,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
- return; /* I/O suspension */
- }
-
-+#ifndef JCS_EXTENSIONS
- /* Force to use our YCbCr to Packed RGB converter when possible */
- if (!mTransform && (mCMSMode != eCMSMode_All) &&
- mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
-@@ -404,6 +427,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
- mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
- mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
- }
-+#endif
-
- /* If this is a progressive JPEG ... */
- mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
-@@ -542,7 +566,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
- PRUint32 *imageRow = ((PRUint32*)mImageData) +
- (mInfo.output_scanline * mInfo.output_width);
-
-+#ifdef JCS_EXTENSIONS
-+ if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
-+#else
- if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
-+#endif
- /* Special case: scanline will be directly converted into packed ARGB */
- if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
- *suspend = true; /* suspend */
-@@ -858,6 +887,7 @@ term_source (j_decompress_ptr jd)
- } // namespace mozilla
-
-
-+#ifndef JCS_EXTENSIONS
- /**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
-
- /*
-@@ -1130,7 +1160,8 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
- }
- }
- }
-+#endif
-
-
- /**************** Inverted CMYK -> RGB conversion **************/
- /*
diff --git a/mail/thunderbird-esr/files/patch-bug791366 b/mail/thunderbird-esr/files/patch-bug791366
deleted file mode 100644
index f7eb443b9a26..000000000000
--- a/mail/thunderbird-esr/files/patch-bug791366
+++ /dev/null
@@ -1,124 +0,0 @@
-diff --git mozilla/xpcom/base/nsMemoryReporterManager.cpp mozilla/xpcom/base/nsMemoryReporterManager.cpp
-index a9aff58..674e757 100644
---- mozilla/xpcom/base/nsMemoryReporterManager.cpp
-+++ mozilla/xpcom/base/nsMemoryReporterManager.cpp
-@@ -64,7 +64,7 @@ extern void jemalloc_stats(jemalloc_stat
- # endif // XP_LINUX
- #endif // MOZ_MEMORY
-
--#if defined(XP_LINUX) || defined(XP_MACOSX)
-+#ifdef XP_UNIX
-
- #include <sys/time.h>
- #include <sys/resource.h>
-@@ -122,6 +122,78 @@ static PRInt64 GetResident()
- return GetProcSelfStatmField(1);
- }
-
-+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
-+#endif
-+
-+#include <unistd.h>
-+
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(__DragonFly__)
-+#define KP_SIZE(kp) (kp.kp_vm_map_size)
-+#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize())
-+#elif defined(__FreeBSD__)
-+#define KP_SIZE(kp) (kp.ki_size)
-+#define KP_RSS(kp) (kp.ki_rssize * getpagesize())
-+#elif defined(__NetBSD__)
-+#define KP_SIZE(kp) (kp.p_vm_msize * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#elif defined(__OpenBSD__)
-+#define KP_SIZE(kp) ((kp.p_vm_dsize + kp.p_vm_ssize \
-+ + kp.p_vm_tsize) * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#endif
-+
-+static nsresult GetKinfoProcSelf(KINFO_PROC *proc)
-+{
-+ int mib[] = {
-+ CTL_KERN,
-+ KERN_PROC,
-+ KERN_PROC_PID,
-+ getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+ sizeof(KINFO_PROC),
-+ 1,
-+#endif
-+ };
-+ u_int miblen = sizeof(mib) / sizeof(mib[0]);
-+ size_t size = sizeof(KINFO_PROC);
-+ if (sysctl(mib, miblen, proc, &size, NULL, 0))
-+ return NS_ERROR_FAILURE;
-+
-+ return NS_OK;
-+}
-+
-+static PRInt64 GetVsize()
-+{
-+ KINFO_PROC proc;
-+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
-+ return KP_SIZE(proc);
-+
-+ return -1;
-+}
-+
-+static PRInt64 GetResident()
-+{
-+ KINFO_PROC proc;
-+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
-+ return KP_RSS(proc);
-+
-+ return -1;
-+}
-+
- #elif defined(XP_MACOSX)
-
- #include <mach/mach_init.h>
-@@ -224,7 +297,7 @@ static PRInt64 GetResident()
-
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
-+#if defined(XP_UNIX) || defined(XP_WIN)
- NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
- "vsize",
- KIND_OTHER,
-@@ -239,7 +312,7 @@ NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
- "measure of the memory resources used by the process.")
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX)
-+#if defined(XP_UNIX)
- NS_MEMORY_REPORTER_IMPLEMENT(PageFaultsSoft,
- "page-faults-soft",
- KIND_OTHER,
-@@ -457,11 +530,11 @@ nsMemoryReporterManager::Init()
- REGISTER(HeapUnallocated);
- REGISTER(Resident);
-
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
-+#if defined(XP_UNIX) || defined(XP_WIN)
- REGISTER(Vsize);
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX)
-+#if defined(XP_UNIX)
- REGISTER(PageFaultsSoft);
- REGISTER(PageFaultsHard);
- #endif
diff --git a/mail/thunderbird-esr/files/patch-bug799441 b/mail/thunderbird-esr/files/patch-bug799441
deleted file mode 100644
index 6e27d090483c..000000000000
--- a/mail/thunderbird-esr/files/patch-bug799441
+++ /dev/null
@@ -1,116 +0,0 @@
-commit b9accdd
-Author: Mike Hommey <mh+mozilla@glandium.org>
-Date: Thu Oct 18 14:47:10 2012 +0200
-
- Bug 799441 - Build GIO module in libxul. r=ted
----
- configure.in | 6 ++++++
- extensions/gio/Makefile.in | 14 +++-----------
- toolkit/library/Makefile.in | 5 +++++
- toolkit/library/nsStaticXULComponents.cpp | 7 +++++++
- toolkit/toolkit-tiers.mk | 4 ++++
- 5 files changed, 25 insertions(+), 11 deletions(-)
-
-diff --git configure.in configure.in
-index a9fb5f1..37e6db8 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -6086,6 +6086,12 @@ if test -n "$LIBXUL_SDK_DIR" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; th
- MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
- fi
-
-+if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
-+ MOZ_GIO_COMPONENT=1
-+ MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
-+fi
-+AC_SUBST(MOZ_GIO_COMPONENT)
-+
- if test -z "$MOZ_JSDEBUGGER" -a `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
- AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.])
- MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
-diff --git extensions/gio/Makefile.in extensions/gio/Makefile.in
-index ccf2846..79112a8 100644
---- mozilla/extensions/gio/Makefile.in
-+++ mozilla/extensions/gio/Makefile.in
-@@ -14,6 +14,9 @@ MODULE = nkgio
- LIBRARY_NAME = nkgio
- SHORT_LIBNAME = nkgio
- IS_COMPONENT = 1
-+EXPORT_LIBRARY = 1
-+MODULE_NAME = nsGIOModule
-+LIBXUL_LIBRARY = 1
-
- CPPSRCS = \
- nsGIOProtocolHandler.cpp \
-@@ -21,15 +24,4 @@ CPPSRCS = \
-
- LOCAL_INCLUDES = $(MOZ_GIO_CFLAGS)
-
--EXTRA_DSO_LDOPTS = \
-- $(XPCOM_GLUE_LDOPTS) \
-- $(NSPR_LIBS) \
-- $(MOZ_GIO_LIBS) \
-- $(NULL)
--
--# make sure this component is never statically linked into the main
--# application. this is necessary since we don't want to force users
--# to install gio in order to use the rest of mozilla ;-)
--FORCE_SHARED_LIB= 1
--
- include $(topsrcdir)/config/rules.mk
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 7f9046e..6499758 100644
---- mozilla/toolkit/library/libxul-config.mk
-+++ mozilla/toolkit/library/libxul-config.mk
-@@ -333,6 +333,11 @@ COMPONENT_LIBS += gkdebug
- endif
- endif
-
-+ifdef MOZ_GIO_COMPONENT
-+DEFINES += -DMOZ_GIO_COMPONENT
-+COMPONENT_LIBS += nkgio
-+endif
-+
- ifdef MOZ_APP_COMPONENT_LIBS
- COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
- endif
-diff --git toolkit/library/nsStaticXULComponents.cpp toolkit/library/nsStaticXULComponents.cpp
-index e1d90f2..85b21a2 100644
---- mozilla/toolkit/library/nsStaticXULComponents.cpp
-+++ mozilla/toolkit/library/nsStaticXULComponents.cpp
-@@ -164,6 +164,12 @@
- #define PROFILER_MODULE
- #endif
-
-+#if defined(MOZ_GIO_COMPONENT)
-+#define GIO_MODULE MODULE(nsGIOModule)
-+#else
-+#define GIO_MODULE
-+#endif
-+
- #define XUL_MODULES \
- MODULE(nsUConvModule) \
- MODULE(nsI18nModule) \
-@@ -220,6 +226,7 @@
- MODULE(nsTelemetryModule) \
- MODULE(jsinspector) \
- MODULE(jsdebugger) \
-+ GIO_MODULE \
- /* end of list */
-
- #define MODULE(_name) \
-diff --git toolkit/toolkit-tiers.mk toolkit/toolkit-tiers.mk
-index e87d7af..4b16d23 100644
---- mozilla/toolkit/toolkit-tiers.mk
-+++ mozilla/toolkit/toolkit-tiers.mk
-@@ -252,6 +252,10 @@ tier_platform_dirs += js/ductwork/debugger
-
- tier_platform_dirs += other-licenses/snappy
-
-+ifdef MOZ_GIO_COMPONENT
-+tier_platform_dirs += extensions/gio
-+endif
-+
- ifdef APP_LIBXUL_STATICDIRS
- # Applications can cheat and ask for code to be
- # built before libxul so libxul can be linked against it.
diff --git a/mail/thunderbird-esr/files/patch-clang32-visibility-hack b/mail/thunderbird-esr/files/patch-clang32-visibility-hack
deleted file mode 100644
index 010130bc7a44..000000000000
--- a/mail/thunderbird-esr/files/patch-clang32-visibility-hack
+++ /dev/null
@@ -1,30 +0,0 @@
---- configure.in~
-+++ configure.in
-@@ -3230,6 +3230,7 @@ EOF
- ac_cv_have_visibility_class_bug,
- [cat > conftest.c <<EOF
- #pragma GCC visibility push(hidden)
-+struct TestStruct;
- struct __attribute__ ((visibility ("default"))) TestStruct {
- static void Init();
- };
---- mozilla/configure.in~
-+++ mozilla/configure.in
-@@ -3230,6 +3230,7 @@ EOF
- ac_cv_have_visibility_class_bug,
- [cat > conftest.c <<EOF
- #pragma GCC visibility push(hidden)
-+struct TestStruct;
- struct __attribute__ ((visibility ("default"))) TestStruct {
- static void Init();
- };
---- mozilla/js/src/configure.in~
-+++ mozilla/js/src/configure.in
-@@ -3230,6 +3230,7 @@ EOF
- ac_cv_have_visibility_class_bug,
- [cat > conftest.c <<EOF
- #pragma GCC visibility push(hidden)
-+struct TestStruct;
- struct __attribute__ ((visibility ("default"))) TestStruct {
- static void Init();
- };
diff --git a/mail/thunderbird-esr/files/patch-config-autoconf.mk.in b/mail/thunderbird-esr/files/patch-config-autoconf.mk.in
deleted file mode 100644
index 877c48294fc6..000000000000
--- a/mail/thunderbird-esr/files/patch-config-autoconf.mk.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- config/autoconf.mk.in.orig 2009-04-24 03:46:37.000000000 +0200
-+++ config/autoconf.mk.in 2009-05-11 15:03:26.000000000 +0200
-@@ -57,14 +57,14 @@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- bindir = @bindir@
--includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+includedir = @includedir@/%%MOZILLA%%
- libdir = @libdir@
- datadir = @datadir@
- mandir = @mandir@
--idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+idldir = $(datadir)/idl/%%MOZILLA%%
-
--installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
--sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
-+installdir = $(libdir)/%%MOZILLA%%
-+sdkdir = $(libdir)/%%MOZILLA%%
-
- DIST = $(DEPTH)/dist
- LIBXUL_SDK = @LIBXUL_SDK@
diff --git a/mail/thunderbird-esr/files/patch-dom-ipc-ContentChild.cpp b/mail/thunderbird-esr/files/patch-dom-ipc-ContentChild.cpp
deleted file mode 100644
index 3fc0e4cf5047..000000000000
--- a/mail/thunderbird-esr/files/patch-dom-ipc-ContentChild.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/dom/ipc/ContentChild.cpp~
-+++ mozilla/dom/ipc/ContentChild.cpp
-@@ -42,6 +42,7 @@
- #endif
-
- #ifdef MOZ_WIDGET_QT
-+#include <unistd.h>
- #include "nsQAppInstance.h"
- #endif
-
diff --git a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libldap-Makefile.in b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libldap-Makefile.in
deleted file mode 100644
index 63f7b76052c3..000000000000
--- a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libldap-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- ldap/sdks/c-sdk/ldap/libraries/libldap/Makefile.in.orig 2009-11-10 09:56:42.000000000 +0100
-+++ ldap/sdks/c-sdk/ldap/libraries/libldap/Makefile.in 2009-11-10 09:58:15.000000000 +0100
-@@ -254,6 +254,10 @@
- EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lbe
- endif
-
-+ifeq ($(OS_ARCH), FreeBSD)
-+EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lpthread
-+endif
-+
- ifeq ($(OS_ARCH), NetBSD)
- EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME)
- endif
diff --git a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libprldap-Makefile.in b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libprldap-Makefile.in
deleted file mode 100644
index df2e10326632..000000000000
--- a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libprldap-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- ldap/sdks/c-sdk/ldap/libraries/libprldap/Makefile.in.orig 2008-09-11 16:38:35.000000000 +0200
-+++ ldap/sdks/c-sdk/ldap/libraries/libprldap/Makefile.in 2009-12-09 08:53:46.000000000 +0100
-@@ -147,6 +147,11 @@
- CUSTOM_LIBS=1
- endif
-
-+ifeq ($(OS_ARCH), FreeBSD)
-+EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lpthread
-+CUSTOM_LIBS=1
-+endif
-+
- # no extra libs on HP-UX
- ifeq ($(OS_ARCH), HP-UX)
- CUSTOM_LIBS=1
diff --git a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in b/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
deleted file mode 100644
index 4ec8205074ee..000000000000
--- a/mail/thunderbird-esr/files/patch-ldap-sdks-c-sdk-ldap-libraries-libssldap-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in~
-+++ ldap/sdks/c-sdk/ldap/libraries/libssldap/Makefile.in
-@@ -188,6 +188,9 @@ endif
-
- OBJDEST = $(OBJDIR_NAME)
-
-+# accept -pthread with MOZ_NATIVE_NSS
-+LINK_DLL = $(CC_FOR_LINK) -shared -o $@ $(OBJS) $(EXTRA_DLL_LIBS)
-+
- ###########################################################################
-
- ifeq ($(USE_DLL_EXPORTS_FILE), 1)
diff --git a/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
deleted file mode 100644
index 0d17050c939c..000000000000
--- a/mail/thunderbird-esr/files/patch-mail-app-nsMailApp.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mail/app/nsMailApp.cpp~
-+++ mail/app/nsMailApp.cpp
-@@ -154,6 +154,7 @@ int main(int argc, char* argv[])
- TriggerQuirks();
- #endif
-
-+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/thunderbird", 0);
- nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
- if (NS_FAILED(rv)) {
- Output("Couldn't calculate the application directory.\n");
diff --git a/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp b/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp
deleted file mode 100644
index 9bae143f2e26..000000000000
--- a/mail/thunderbird-esr/files/patch-mailnews-addrbook-src-nsDirPrefs.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- mailnews/addrbook/src/nsDirPrefs.cpp~
-+++ mailnews/addrbook/src/nsDirPrefs.cpp
-@@ -375,7 +375,7 @@ static bool DIR_SetServerPosition(nsVoid
- DIR_Server *s=nsnull;
-
- switch (position) {
-- case DIR_POS_APPEND:
-+ case (PRInt32)DIR_POS_APPEND:
- /* Do nothing if the request is to append a server that is already
- * in the list.
- */
-@@ -401,7 +401,7 @@ static bool DIR_SetServerPosition(nsVoid
- wholeList->AppendElement(server);
- break;
-
-- case DIR_POS_DELETE:
-+ case (PRInt32)DIR_POS_DELETE:
- /* Remove the prefs corresponding to the given server. If the prefName
- * value is nsnull, the server has never been saved and there are no
- * prefs to remove.
diff --git a/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp b/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp
deleted file mode 100644
index b3a6df4d2c90..000000000000
--- a/mail/thunderbird-esr/files/patch-mailnews-compose-src-nsSmtpProtocol.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- mailnews/compose/src/nsSmtpProtocol.cpp~
-+++ mailnews/compose/src/nsSmtpProtocol.cpp
-@@ -127,16 +127,16 @@ nsresult nsExplainErrorDetails(nsISmtpUr
-
- switch (code)
- {
-- case NS_ERROR_SMTP_SERVER_ERROR:
-- case NS_ERROR_TCP_READ_ERROR:
-- case NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED:
-- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1:
-- case NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2:
-- case NS_ERROR_SENDING_FROM_COMMAND:
-- case NS_ERROR_SENDING_RCPT_COMMAND:
-- case NS_ERROR_SENDING_DATA_COMMAND:
-- case NS_ERROR_SENDING_MESSAGE:
-- case NS_ERROR_SMTP_GREETING:
-+ case (int)NS_ERROR_SMTP_SERVER_ERROR:
-+ case (int)NS_ERROR_TCP_READ_ERROR:
-+ case (int)NS_ERROR_SMTP_TEMP_SIZE_EXCEEDED:
-+ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_1:
-+ case (int)NS_ERROR_SMTP_PERM_SIZE_EXCEEDED_2:
-+ case (int)NS_ERROR_SENDING_FROM_COMMAND:
-+ case (int)NS_ERROR_SENDING_RCPT_COMMAND:
-+ case (int)NS_ERROR_SENDING_DATA_COMMAND:
-+ case (int)NS_ERROR_SENDING_MESSAGE:
-+ case (int)NS_ERROR_SMTP_GREETING:
- bundle->GetStringFromID(NS_ERROR_GET_CODE(code), getter_Copies(eMsg));
- msg = nsTextFormatter::vsmprintf(eMsg.get(), args);
- break;
diff --git a/mail/thunderbird-esr/files/patch-mozilla-config_autoconf.mk.in b/mail/thunderbird-esr/files/patch-mozilla-config_autoconf.mk.in
deleted file mode 100644
index 7d3316500fa7..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-config_autoconf.mk.in
+++ /dev/null
@@ -1,22 +0,0 @@
---- mozilla/config/autoconf.mk.in.orig 2007-08-28 12:02:43.000000000 -0400
-+++ mozilla/config/autoconf.mk.in 2007-09-26 14:21:51.000000000 -0400
-@@ -58,14 +58,14 @@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- bindir = @bindir@
--includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+includedir = @includedir@/%%MOZILLA%%
- libdir = @libdir@
- datadir = @datadir@
- mandir = @mandir@
--idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+idldir = $(datadir)/idl/%%MOZILLA%%
-
--installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
--sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
-+installdir = $(libdir)/%%MOZILLA%%
-+sdkdir = $(libdir)/%%MOZILLA%%
-
- DIST = $(DEPTH)/dist
- LIBXUL_SDK = @LIBXUL_SDK@
-
diff --git a/mail/thunderbird-esr/files/patch-mozilla-extensions-spellcheck-hunspell-src-mozHunspell.cpp b/mail/thunderbird-esr/files/patch-mozilla-extensions-spellcheck-hunspell-src-mozHunspell.cpp
deleted file mode 100644
index 165e7f647be3..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-extensions-spellcheck-hunspell-src-mozHunspell.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp~
-+++ mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList()
- }
- }
-
-+ // load system hunspell dictionaries
-+ nsIFile* hunDir;
-+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+ true, (nsILocalFile**)&hunDir);
-+ LoadDictionariesFromDir(hunDir);
-+
- // find dictionaries from extensions requiring restart
- nsCOMPtr<nsISimpleEnumerator> dictDirs;
- rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
diff --git a/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-qcmstypes.h b/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-qcmstypes.h
deleted file mode 100644
index 7a23c9dd3820..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-gfx-qcms-qcmstypes.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/gfx/qcms/qcmstypes.h.orig 2010-11-22 12:01:36.000000000 +0100
-+++ mozilla/gfx/qcms/qcmstypes.h 2010-11-22 12:02:42.000000000 +0100
-@@ -25,7 +25,7 @@
- #ifdef __OS2__
- /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
- #include <stdlib.h>
--#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
-+#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED)
- typedef PRUptrdiff uintptr_t;
- #endif
- #endif
diff --git a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in
deleted file mode 100644
index 294e8270334a..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
---- mozilla/ipc/chromium/Makefile.in~
-+++ mozilla/ipc/chromium/Makefile.in
-@@ -43,6 +43,14 @@ include $(DEPTH)/config/autoconf.mk
-
- OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS))
-
-+# workaround IPC hang with libevent2
-+ifndef MOZ_DEBUG
-+ifneq (,$(filter 4.2.%, $(CXX_VERSION)))
-+MOZ_OPTIMIZE_FLAGS = -O1
-+OS_CXXFLAGS += $(MOZ_OPTIMIZE_FLAGS)
-+endif
-+endif
-+
- LIBRARY_NAME = chromium_s
- FORCE_STATIC_LIB = 1
- LIBXUL_LIBRARY = 1
-@@ -55,9 +60,7 @@ vpath %.c \
- $(srcdir)/src/third_party/libevent \
- $(NULL)
- else # } else {
--# message_pump_libevent.cc includes third_party/libevent/event.h,
--# which we put in $(DIST), see export rule below
--LOCAL_INCLUDES += -I$(DIST)
-+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS))
- endif # }
-
- vpath %.cc \
diff --git a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
deleted file mode 100644
index 3fe4995aa0f8..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~
-+++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc
-@@ -15,7 +15,7 @@
- #include "base/scoped_nsautorelease_pool.h"
- #include "base/scoped_ptr.h"
- #include "base/time.h"
--#include "third_party/libevent/event.h"
-+#include "event.h"
-
- // Lifecycle of struct event
- // Libevent uses two main data structures:
diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in b/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in
deleted file mode 100644
index 3b174c18585c..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/js/src/configure.in.orig 2012-01-29 15:44:24.000000000 +0100
-+++ mozilla/js/src/configure.in 2012-01-30 23:37:46.541060008 +0100
-@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp b/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp
deleted file mode 100644
index 009b469dcd7f..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-js-src-methodjit-MethodJIT.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- mozilla/js/src/methodjit/MethodJIT.cpp~
-+++ mozilla/js/src/methodjit/MethodJIT.cpp
-@@ -171,7 +171,7 @@
-
- JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0);
-
--#if defined(__linux__) && defined(JS_CPU_X64)
-+#if defined(__ELF__) && defined(JS_CPU_X64)
- # define SYMBOL_STRING_RELOC(name) #name "@plt"
- #else
- # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name)
-@@ -149,7 +149,7 @@
-
- #if defined(XP_MACOSX)
- # define HIDE_SYMBOL(name) ".private_extern _" #name
--#elif defined(__linux__)
-+#elif defined(__ELF__)
- # define HIDE_SYMBOL(name) ".hidden" #name
- #else
- # define HIDE_SYMBOL(name)
diff --git a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c b/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c
deleted file mode 100644
index ddb42a92a1e3..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-media-libsydneyaudio-src-sydney_audio_oss.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- mozilla/media/libsydneyaudio/src/sydney_audio_oss.c~
-+++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c
-@@ -446,6 +446,10 @@ static void audio_callback(void* data)
- printf("!"); /* not enough audio data */
- #endif
- bytes = bytes-bytes_to_copy;
-+ struct timespec ts = {0, 1000000};
-+ pthread_mutex_unlock(&s->mutex);
-+ nanosleep(&ts, NULL);
-+ pthread_mutex_lock(&s->mutex);
- break;
- }
- free(s->bl_head);
diff --git a/mail/thunderbird-esr/files/patch-mozilla-security-manager-ssl-src-nsNSSComponent.cpp b/mail/thunderbird-esr/files/patch-mozilla-security-manager-ssl-src-nsNSSComponent.cpp
deleted file mode 100644
index 272a02bdb9e0..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-security-manager-ssl-src-nsNSSComponent.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/security/manager/ssl/src/nsNSSComponent.cpp.orig Mon May 29 23:10:54 2006
-+++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp Mon May 29 23:12:22 2006
-@@ -110,6 +110,7 @@
- #include "nss.h"
- #include "pk11func.h"
- #include "ssl.h"
-+#define NSS_ENABLE_ECC 1
- #include "sslproto.h"
- #include "secmod.h"
- #include "sechash.h"
diff --git a/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-Makefile.in b/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-Makefile.in
deleted file mode 100644
index 224a65d1efe0..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla-toolkit-xre-Makefile.in
+++ /dev/null
@@ -1,8 +0,0 @@
---- mozilla/toolkit/xre/Makefile.in.orig 2007-09-10 10:31:53.000000000 -0400
-+++ mozilla/toolkit/xre/Makefile.in 2007-09-10 10:35:00.000000000 -0400
-@@ -263,5 +263,3 @@
- libs:: platform.ini
- $(INSTALL) $^ $(DIST)/bin
-
--install::
-- $(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)
diff --git a/mail/thunderbird-esr/files/patch-mozilla_toolkit_mozapps_installer_packager_mk b/mail/thunderbird-esr/files/patch-mozilla_toolkit_mozapps_installer_packager_mk
deleted file mode 100644
index 9a2a4ea99070..000000000000
--- a/mail/thunderbird-esr/files/patch-mozilla_toolkit_mozapps_installer_packager_mk
+++ /dev/null
@@ -1,13 +0,0 @@
-$OpenBSD: patch-toolkit_mozapps_installer_packager_mk,v 1.11 2012/06/11 15:29:56 landry Exp $
-install headers/idl/sdk libs only if xulrunner
---- mozilla/toolkit/mozapps/installer/packager.mk.orig Fri Jun 1 14:04:20 2012
-+++ mozilla/toolkit/mozapps/installer/packager.mk Tue Jun 5 07:55:51 2012
-@@ -886,7 +886,7 @@ endif
- $(NSINSTALL) -D $(DESTDIR)$(bindir)
- $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
--ifdef INSTALL_SDK # Here comes the hard part
-+ifeq ($(MOZ_APP_NAME),xulrunner)
- $(NSINSTALL) -D $(DESTDIR)$(includedir)
- (cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
- (cd $(DESTDIR)$(includedir) && tar -xf -)
diff --git a/mail/thunderbird-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp b/mail/thunderbird-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp
deleted file mode 100644
index 341a9f7562e7..000000000000
--- a/mail/thunderbird-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/toolkit/xre/nsEmbedFunctions.cpp~
-+++ mozilla/toolkit/xre/nsEmbedFunctions.cpp
-@@ -36,6 +36,7 @@
- * ***** END LICENSE BLOCK ***** */
-
- #if defined(MOZ_WIDGET_QT)
-+#include <unistd.h>
- #include "nsQAppInstance.h"
- #endif
-
diff --git a/mail/thunderbird-esr/files/thunderbird.desktop.in b/mail/thunderbird-esr/files/thunderbird.desktop.in
deleted file mode 100644
index 790a064ec01d..000000000000
--- a/mail/thunderbird-esr/files/thunderbird.desktop.in
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Thunderbird
-GenericName=Mail Client
-Comment=Mail client and News Reader
-Exec=@MOZILLA@ %U
-Icon=@PORTNAME_ICON@
-StartupNotify=false
-Terminal=false
-Type=Application
-Categories=Application;Network;
diff --git a/mail/thunderbird-esr/pkg-descr b/mail/thunderbird-esr/pkg-descr
deleted file mode 100644
index 9ef9a8246af4..000000000000
--- a/mail/thunderbird-esr/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-Mozilla Thunderbird is a redesign of the Mozilla mail component with the goal
-of becoming a cross-platform stand alone mail application using the XUL
-user interface language. See the Mozilla Thunderbird project page for
-more details.
-
-WWW: http://www.mozilla.com/thunderbird/
diff --git a/mail/thunderbird-i18n/Makefile b/mail/thunderbird-i18n/Makefile
index 07df4e6cea96..d4005bd1e42f 100644
--- a/mail/thunderbird-i18n/Makefile
+++ b/mail/thunderbird-i18n/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird-i18n
-PORTVERSION= 17.0.4
+PORTVERSION= 17.0.5
CATEGORIES= mail
MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}esr/linux-i686/xpi
PKGNAMEPREFIX=
@@ -45,7 +45,7 @@ do-extract:
@${RM} -rf ${WRKDIR}
@${MKDIR} ${WRKDIR} ${WRKSRC}
@for lang in ${THUNDERBIRD_I18N_}; do \
- if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\
+ if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\
then \
exit 1; \
fi; \
diff --git a/mail/thunderbird-i18n/distinfo b/mail/thunderbird-i18n/distinfo
index b5250c2a323a..7185ca0cce13 100644
--- a/mail/thunderbird-i18n/distinfo
+++ b/mail/thunderbird-i18n/distinfo
@@ -1,84 +1,84 @@
-SHA256 (xpi/thunderbird-i18n-17.0.4/ar.xpi) = e039fefa92fc6345a74c113e110901e83f5de4331f1073de836a86b947a7f190
-SIZE (xpi/thunderbird-i18n-17.0.4/ar.xpi) = 445977
-SHA256 (xpi/thunderbird-i18n-17.0.4/br.xpi) = 02511cc2ebf07ce5e4a820456d4a2f224586a81e43b30304efc1f6ec8bad5d6e
-SIZE (xpi/thunderbird-i18n-17.0.4/br.xpi) = 417071
-SHA256 (xpi/thunderbird-i18n-17.0.4/ca.xpi) = 832559f44041f4ee2827868634bc79ca9cb2476fafc87fef666faf4990bacf12
-SIZE (xpi/thunderbird-i18n-17.0.4/ca.xpi) = 418407
-SHA256 (xpi/thunderbird-i18n-17.0.4/cs.xpi) = 2492f52859a1a1ec7716a2e64269790dd7251444345607fc7e427722dd18325c
-SIZE (xpi/thunderbird-i18n-17.0.4/cs.xpi) = 420627
-SHA256 (xpi/thunderbird-i18n-17.0.4/da.xpi) = 7b71744f4b9d72ac2686a6caff0f839d55580ef2164a38b879a9d63b08ec0a22
-SIZE (xpi/thunderbird-i18n-17.0.4/da.xpi) = 398980
-SHA256 (xpi/thunderbird-i18n-17.0.4/de.xpi) = 28047c853e9088d63b8e833767f0a1b5602f82702d434c218a76a721d4b24720
-SIZE (xpi/thunderbird-i18n-17.0.4/de.xpi) = 393632
-SHA256 (xpi/thunderbird-i18n-17.0.4/en-GB.xpi) = e3cc830d6abccd7da1edeb130036422903166942d6399e5773c492dc33b428b1
-SIZE (xpi/thunderbird-i18n-17.0.4/en-GB.xpi) = 390694
-SHA256 (xpi/thunderbird-i18n-17.0.4/en-US.xpi) = 32565328e79e74aaf7ab00a5f18258595f2e86610b7b11a08cec96e25ad60ba0
-SIZE (xpi/thunderbird-i18n-17.0.4/en-US.xpi) = 390780
-SHA256 (xpi/thunderbird-i18n-17.0.4/es-AR.xpi) = 9396500ed0a5d2cd4444718acb61ff2f8a624f07c6c0add8f8c36821b2576eba
-SIZE (xpi/thunderbird-i18n-17.0.4/es-AR.xpi) = 415499
-SHA256 (xpi/thunderbird-i18n-17.0.4/es-ES.xpi) = 5d881355da3d2e8e42953edc657922a77e4540529d7365a07d629118c2f93475
-SIZE (xpi/thunderbird-i18n-17.0.4/es-ES.xpi) = 356861
-SHA256 (xpi/thunderbird-i18n-17.0.4/et.xpi) = fc481bf9a252f606fc876e4d34c2445c64a90bf3b5e0fc87449e773d5ca2c8b3
-SIZE (xpi/thunderbird-i18n-17.0.4/et.xpi) = 411892
-SHA256 (xpi/thunderbird-i18n-17.0.4/eu.xpi) = f3ce6271ca7dbc824abe20d9247fcd310f9f46bdc0632b0384263ad9ff5a6bc8
-SIZE (xpi/thunderbird-i18n-17.0.4/eu.xpi) = 407190
-SHA256 (xpi/thunderbird-i18n-17.0.4/fi.xpi) = 9ed2bcc8db0fb36ddf2f4e1719e97a259621c0807759dcd6d75fd920d4d2d21b
-SIZE (xpi/thunderbird-i18n-17.0.4/fi.xpi) = 413620
-SHA256 (xpi/thunderbird-i18n-17.0.4/fr.xpi) = 00308a39144987a1bc0cba6a7ea9348e41acc2fe9faed234c6804eb5c22610b7
-SIZE (xpi/thunderbird-i18n-17.0.4/fr.xpi) = 420826
-SHA256 (xpi/thunderbird-i18n-17.0.4/fy-NL.xpi) = 189a4072c0c050b86d99a1a7aea653bb6085865b47d490704fa9fb51e4eb2a61
-SIZE (xpi/thunderbird-i18n-17.0.4/fy-NL.xpi) = 415712
-SHA256 (xpi/thunderbird-i18n-17.0.4/ga-IE.xpi) = 522cf62f206d2c2f7c67404523e9f77164fc2a7d508e1c4dec6361250de46c0f
-SIZE (xpi/thunderbird-i18n-17.0.4/ga-IE.xpi) = 425395
-SHA256 (xpi/thunderbird-i18n-17.0.4/gd.xpi) = 1d0b416a691b4a458c3d74ef69caba4348ac206b4d42db24e60929eefec402d5
-SIZE (xpi/thunderbird-i18n-17.0.4/gd.xpi) = 428939
-SHA256 (xpi/thunderbird-i18n-17.0.4/gl.xpi) = 0fc31d402fb8460eff43018b6b2f4add021804edd23ce279911ea8ad7e2f8cdf
-SIZE (xpi/thunderbird-i18n-17.0.4/gl.xpi) = 410370
-SHA256 (xpi/thunderbird-i18n-17.0.4/he.xpi) = 1487236524c2bcfbb3bb5fa6d2f2154d64d748eedd12ab96dd580e0cba946309
-SIZE (xpi/thunderbird-i18n-17.0.4/he.xpi) = 439504
-SHA256 (xpi/thunderbird-i18n-17.0.4/hu.xpi) = 51395b5e8120f9a1cb7040959975a4a3c0f4a3acc5ab57671b64a017fb284c2f
-SIZE (xpi/thunderbird-i18n-17.0.4/hu.xpi) = 433187
-SHA256 (xpi/thunderbird-i18n-17.0.4/is.xpi) = 9f668b8bb1a6d44fb7519e8c4d98533c2f80fd1c84fa5fe0e3224044d3112763
-SIZE (xpi/thunderbird-i18n-17.0.4/is.xpi) = 414069
-SHA256 (xpi/thunderbird-i18n-17.0.4/it.xpi) = 02d0b8f3d468f269362c04259fc8707e58267def0c4df1abce1a1d49831fafc2
-SIZE (xpi/thunderbird-i18n-17.0.4/it.xpi) = 348621
-SHA256 (xpi/thunderbird-i18n-17.0.4/ja.xpi) = 502e1e996be4cc6314b9646a83ec0a6b62ac762002088c0b48cb6456cbdd4fd3
-SIZE (xpi/thunderbird-i18n-17.0.4/ja.xpi) = 463488
-SHA256 (xpi/thunderbird-i18n-17.0.4/ko.xpi) = d10e12e7d744bbc91a73aa6e42c387cb05d157a95485f62baa7f9c3c2215a278
-SIZE (xpi/thunderbird-i18n-17.0.4/ko.xpi) = 412964
-SHA256 (xpi/thunderbird-i18n-17.0.4/lt.xpi) = 4d66657535056f4f19effc5bb1ede9230951ff511ed18ad4b51f1f1129ccde19
-SIZE (xpi/thunderbird-i18n-17.0.4/lt.xpi) = 519802
-SHA256 (xpi/thunderbird-i18n-17.0.4/nb-NO.xpi) = a44a8979e497fb8e23a70b0c41a5ad4585607ef45eaa79875ab3d3ebb29fc524
-SIZE (xpi/thunderbird-i18n-17.0.4/nb-NO.xpi) = 408519
-SHA256 (xpi/thunderbird-i18n-17.0.4/nl.xpi) = a9c6b701edb496289119d1c9905d80ca362757b2cb07410cb53ff22bf9df7c61
-SIZE (xpi/thunderbird-i18n-17.0.4/nl.xpi) = 408527
-SHA256 (xpi/thunderbird-i18n-17.0.4/nn-NO.xpi) = 0d8ea2d1e934a9d9b5ac27cc8aa98dd057fcdc1fe1cd0e9e6fa92f9754603ee7
-SIZE (xpi/thunderbird-i18n-17.0.4/nn-NO.xpi) = 431472
-SHA256 (xpi/thunderbird-i18n-17.0.4/pl.xpi) = bf9c3c895c81ae7f3f4c48f7d4566d9cd83dce528586fc2fcca077d1c064b9f4
-SIZE (xpi/thunderbird-i18n-17.0.4/pl.xpi) = 402114
-SHA256 (xpi/thunderbird-i18n-17.0.4/pt-BR.xpi) = 076427dc1f445d88bda77f9ff1426041e9d1894b7105e815474a7403aa095edc
-SIZE (xpi/thunderbird-i18n-17.0.4/pt-BR.xpi) = 415778
-SHA256 (xpi/thunderbird-i18n-17.0.4/pt-PT.xpi) = 0483e2a1e5e5c1d2f380b1a3b383b2821968581a4b283f89db5c78e6f2508eed
-SIZE (xpi/thunderbird-i18n-17.0.4/pt-PT.xpi) = 445754
-SHA256 (xpi/thunderbird-i18n-17.0.4/rm.xpi) = 073b733654f80e609832ce81f4a2b0e3acd8ca071dc1a4352fc804842dd3ca79
-SIZE (xpi/thunderbird-i18n-17.0.4/rm.xpi) = 415531
-SHA256 (xpi/thunderbird-i18n-17.0.4/ru.xpi) = 0a8af78c82f2a74a81244af42da67993c1a14a6b919d480a344f41d8668e5598
-SIZE (xpi/thunderbird-i18n-17.0.4/ru.xpi) = 415708
-SHA256 (xpi/thunderbird-i18n-17.0.4/si.xpi) = ff598f3db2e9344960674a47d9efa3876b7750a56679f5bc4177c192772a2d19
-SIZE (xpi/thunderbird-i18n-17.0.4/si.xpi) = 494162
-SHA256 (xpi/thunderbird-i18n-17.0.4/sk.xpi) = 364dc60eafec703fade801fc14b7bf94590db4206f27d82b71c7977444cd1e7e
-SIZE (xpi/thunderbird-i18n-17.0.4/sk.xpi) = 429756
-SHA256 (xpi/thunderbird-i18n-17.0.4/sl.xpi) = 821c936dce601dec1cc5180f1e7893a235bf0ddccddf3bad4b26bbe65e966b45
-SIZE (xpi/thunderbird-i18n-17.0.4/sl.xpi) = 442096
-SHA256 (xpi/thunderbird-i18n-17.0.4/sq.xpi) = 9fee45bf383fe6c6829d38728428baa5b4e1dbeeb4cdb27341b40ebc05a705e4
-SIZE (xpi/thunderbird-i18n-17.0.4/sq.xpi) = 418780
-SHA256 (xpi/thunderbird-i18n-17.0.4/sv-SE.xpi) = 070c04fe56c29031bbc20f849d2aedb31265003ecd0bbb5d0da57116260b2b31
-SIZE (xpi/thunderbird-i18n-17.0.4/sv-SE.xpi) = 413218
-SHA256 (xpi/thunderbird-i18n-17.0.4/ta-LK.xpi) = cdb347b78d49ec86176cc35da1d337a57ab1abf1bf8588cbe91c44a0404e90a6
-SIZE (xpi/thunderbird-i18n-17.0.4/ta-LK.xpi) = 517913
-SHA256 (xpi/thunderbird-i18n-17.0.4/tr.xpi) = 8693131fd1c14ebb0c7b6631410b8780da4fb8f565505f1c5d4701cdad361ef5
-SIZE (xpi/thunderbird-i18n-17.0.4/tr.xpi) = 444944
-SHA256 (xpi/thunderbird-i18n-17.0.4/uk.xpi) = aa8c240255d6a319e3b72ea8ea5c55ae6c3649ebbeb153986512f9dd9239cc1d
-SIZE (xpi/thunderbird-i18n-17.0.4/uk.xpi) = 471143
-SHA256 (xpi/thunderbird-i18n-17.0.4/zh-TW.xpi) = f7538eb7e9ab4c9766dbedfb68612f603a4441bc67832674da31b22519882f0b
-SIZE (xpi/thunderbird-i18n-17.0.4/zh-TW.xpi) = 437591
+SHA256 (xpi/thunderbird-i18n-17.0.5/ar.xpi) = a895c50567eb0060854019921ab1b7f9d68ca56d76f7f73d7d2fe4fa201fbb50
+SIZE (xpi/thunderbird-i18n-17.0.5/ar.xpi) = 445976
+SHA256 (xpi/thunderbird-i18n-17.0.5/br.xpi) = e43198ba660f8b2b5c9ef2dd428549c98c27cf3398eccb6e4d2e77e4bd79eaad
+SIZE (xpi/thunderbird-i18n-17.0.5/br.xpi) = 417071
+SHA256 (xpi/thunderbird-i18n-17.0.5/ca.xpi) = 644a001ee2100ab455b66cfcaba491af6ba75120f69d4cc8ac5b927339c529f0
+SIZE (xpi/thunderbird-i18n-17.0.5/ca.xpi) = 418407
+SHA256 (xpi/thunderbird-i18n-17.0.5/cs.xpi) = 357bee0902b90a1210aa9843c8e7857eae1b94370020c8487282d59a488bcc78
+SIZE (xpi/thunderbird-i18n-17.0.5/cs.xpi) = 420627
+SHA256 (xpi/thunderbird-i18n-17.0.5/da.xpi) = c8ec9031d017d4bbb90eafa98fae5c784d08c0dd4358b4f4574d6c317548caeb
+SIZE (xpi/thunderbird-i18n-17.0.5/da.xpi) = 398980
+SHA256 (xpi/thunderbird-i18n-17.0.5/de.xpi) = 20246a979c14a4544fac5ea35d319258d51d593eff2a602d04c80d62f7d61574
+SIZE (xpi/thunderbird-i18n-17.0.5/de.xpi) = 393632
+SHA256 (xpi/thunderbird-i18n-17.0.5/en-GB.xpi) = d622039e5f4c0871508fdb654ed96ff2cda85721535e08e16962aa9a700c83d8
+SIZE (xpi/thunderbird-i18n-17.0.5/en-GB.xpi) = 390694
+SHA256 (xpi/thunderbird-i18n-17.0.5/en-US.xpi) = 968e42159c16bcc1b7523f228010afb203f544db09317b9f78b2cf7596e77f0b
+SIZE (xpi/thunderbird-i18n-17.0.5/en-US.xpi) = 390780
+SHA256 (xpi/thunderbird-i18n-17.0.5/es-AR.xpi) = 9f56e7295c4de06c4cabcc0fc64db26423f9415ba419202b016dcd61cf397ed2
+SIZE (xpi/thunderbird-i18n-17.0.5/es-AR.xpi) = 415499
+SHA256 (xpi/thunderbird-i18n-17.0.5/es-ES.xpi) = 1e9f7b437ab08e91e5fb039dd617891229357acf3b4a2ef487c4449521c86656
+SIZE (xpi/thunderbird-i18n-17.0.5/es-ES.xpi) = 356861
+SHA256 (xpi/thunderbird-i18n-17.0.5/et.xpi) = 7c515dd0615c14ef1bf26dbbaeb8324d5597b547c03ff7b8201e1007661be845
+SIZE (xpi/thunderbird-i18n-17.0.5/et.xpi) = 411892
+SHA256 (xpi/thunderbird-i18n-17.0.5/eu.xpi) = 6b241859c6eb30dd4ec3ea3f436da426475e677257586e1a3126ac8a6668afc7
+SIZE (xpi/thunderbird-i18n-17.0.5/eu.xpi) = 407189
+SHA256 (xpi/thunderbird-i18n-17.0.5/fi.xpi) = f039a084cc38d9e1f33ccb6cb579b8abe4f7ae95a9fc04d84734859990191475
+SIZE (xpi/thunderbird-i18n-17.0.5/fi.xpi) = 413620
+SHA256 (xpi/thunderbird-i18n-17.0.5/fr.xpi) = 2ad4ae0da6e482cb667deaa9fd439806c72d1f14b8530aff3c8e3750b1d47ec0
+SIZE (xpi/thunderbird-i18n-17.0.5/fr.xpi) = 420826
+SHA256 (xpi/thunderbird-i18n-17.0.5/fy-NL.xpi) = ef09775e3974be8b6994770793dd9edd008e27b0841194d91f5ec020b5676c49
+SIZE (xpi/thunderbird-i18n-17.0.5/fy-NL.xpi) = 415712
+SHA256 (xpi/thunderbird-i18n-17.0.5/ga-IE.xpi) = 823d78e621fecca08589773ded8dd6099faecedf5ef4097da66ffe16c78e29ed
+SIZE (xpi/thunderbird-i18n-17.0.5/ga-IE.xpi) = 425395
+SHA256 (xpi/thunderbird-i18n-17.0.5/gd.xpi) = 587dbff956aca0f295322b847f927c74c8d032ed4ae0f566a11a5de0c6811f85
+SIZE (xpi/thunderbird-i18n-17.0.5/gd.xpi) = 428939
+SHA256 (xpi/thunderbird-i18n-17.0.5/gl.xpi) = 125a14bccb420d71792e8fc52655032baffde887d2c322527f3e11e5c2d47069
+SIZE (xpi/thunderbird-i18n-17.0.5/gl.xpi) = 410370
+SHA256 (xpi/thunderbird-i18n-17.0.5/he.xpi) = f15933476b38aaeead09a9517c2bc89f236b5dbf595f65e8be05e0f85ac96fb1
+SIZE (xpi/thunderbird-i18n-17.0.5/he.xpi) = 439504
+SHA256 (xpi/thunderbird-i18n-17.0.5/hu.xpi) = 77292c922fd097fbbce065b7ce95e95890159bdf496e0fdc36f7cfeeecd12da3
+SIZE (xpi/thunderbird-i18n-17.0.5/hu.xpi) = 433186
+SHA256 (xpi/thunderbird-i18n-17.0.5/is.xpi) = a1a1664d4ef35af52aa701231d6cee733e70411d24f3c6bb27a2d003022f5dcf
+SIZE (xpi/thunderbird-i18n-17.0.5/is.xpi) = 414068
+SHA256 (xpi/thunderbird-i18n-17.0.5/it.xpi) = e94ff8019ba450384155b9191a10a6df15860360a01d79b0b72d19ab9f60c004
+SIZE (xpi/thunderbird-i18n-17.0.5/it.xpi) = 348621
+SHA256 (xpi/thunderbird-i18n-17.0.5/ja.xpi) = e0c40d7192c30a8ec3b2a04eab251aac8e16b99ecd53e5de880dbbfa3cf549a1
+SIZE (xpi/thunderbird-i18n-17.0.5/ja.xpi) = 463488
+SHA256 (xpi/thunderbird-i18n-17.0.5/ko.xpi) = b5e4beca15983d134bd92d09a8f2846bd0e1a7469d896d6f83f6c1eccab244a8
+SIZE (xpi/thunderbird-i18n-17.0.5/ko.xpi) = 412964
+SHA256 (xpi/thunderbird-i18n-17.0.5/lt.xpi) = 8412dd792bda43c960f4f86070b5645e6b30b7ace9cf478f27b83a2ae2001107
+SIZE (xpi/thunderbird-i18n-17.0.5/lt.xpi) = 519802
+SHA256 (xpi/thunderbird-i18n-17.0.5/nb-NO.xpi) = 0ff536aad4b03355d221a084110ac37162096c5e7e0eaec267bcf15766bcb582
+SIZE (xpi/thunderbird-i18n-17.0.5/nb-NO.xpi) = 408519
+SHA256 (xpi/thunderbird-i18n-17.0.5/nl.xpi) = 65c3926f247080a11dd7e6dd24e4ecaef251ee0ff1188db3b338e193ab849e7a
+SIZE (xpi/thunderbird-i18n-17.0.5/nl.xpi) = 408527
+SHA256 (xpi/thunderbird-i18n-17.0.5/nn-NO.xpi) = 3efbf9f409b38cf742c974a6c418e2d44bd80c040a0d2cd0c88548dc3265e428
+SIZE (xpi/thunderbird-i18n-17.0.5/nn-NO.xpi) = 431472
+SHA256 (xpi/thunderbird-i18n-17.0.5/pl.xpi) = 26079889be42bbfe0a561f3c72a2bef89470a4312544c600dde7fb9106725280
+SIZE (xpi/thunderbird-i18n-17.0.5/pl.xpi) = 402114
+SHA256 (xpi/thunderbird-i18n-17.0.5/pt-BR.xpi) = aea1e660b1da7b6af02b44b211e5945acdc4186573dd0fb0e6c486d5155eb41f
+SIZE (xpi/thunderbird-i18n-17.0.5/pt-BR.xpi) = 415778
+SHA256 (xpi/thunderbird-i18n-17.0.5/pt-PT.xpi) = 85747c873660d5a4f3e94e2eedcfdbe63a73292ffb77b9d3a182bd5b682c116e
+SIZE (xpi/thunderbird-i18n-17.0.5/pt-PT.xpi) = 445754
+SHA256 (xpi/thunderbird-i18n-17.0.5/rm.xpi) = f76e4465a280f8b71f9937dc902d1c4dcf1adf835b1daed1916f619b87831f39
+SIZE (xpi/thunderbird-i18n-17.0.5/rm.xpi) = 415531
+SHA256 (xpi/thunderbird-i18n-17.0.5/ru.xpi) = 85b306fcc0032ab81b86ef03549ccf019a32a9d811c38e796d796523f30e36f8
+SIZE (xpi/thunderbird-i18n-17.0.5/ru.xpi) = 415708
+SHA256 (xpi/thunderbird-i18n-17.0.5/si.xpi) = 6c9222d802c3aad59c68b8d165dc0ed433cdc07ca12196f1e0c58ee7aec3fc7d
+SIZE (xpi/thunderbird-i18n-17.0.5/si.xpi) = 494162
+SHA256 (xpi/thunderbird-i18n-17.0.5/sk.xpi) = df616a212daf49a45a0aff11bc9264e99ee2854691cc569cd6f4aa7b57a4ca98
+SIZE (xpi/thunderbird-i18n-17.0.5/sk.xpi) = 429756
+SHA256 (xpi/thunderbird-i18n-17.0.5/sl.xpi) = bcc2badb1cc8e7d94621e558fa2ad7f1608011d243f7c23f952a8b6a19afd907
+SIZE (xpi/thunderbird-i18n-17.0.5/sl.xpi) = 442096
+SHA256 (xpi/thunderbird-i18n-17.0.5/sq.xpi) = 47f5d71fd8e0b0e4250d544564ad8d91149c5311c4f04fa1c215979d52f72b9f
+SIZE (xpi/thunderbird-i18n-17.0.5/sq.xpi) = 418781
+SHA256 (xpi/thunderbird-i18n-17.0.5/sv-SE.xpi) = ab121125b9714b5b8acd6fc52415d47d53df4ef561188b65dd4b9b687b6c1c7a
+SIZE (xpi/thunderbird-i18n-17.0.5/sv-SE.xpi) = 413218
+SHA256 (xpi/thunderbird-i18n-17.0.5/ta-LK.xpi) = 789946d7a9f3a04ea37fd43b6c4e6b9907611e2ecf9428e471c1162bfbbd47a2
+SIZE (xpi/thunderbird-i18n-17.0.5/ta-LK.xpi) = 517912
+SHA256 (xpi/thunderbird-i18n-17.0.5/tr.xpi) = 420969d11d6f2e8945ab3a50bc0779cbdc135f32cdd7423ac3f6d8042abdc4f7
+SIZE (xpi/thunderbird-i18n-17.0.5/tr.xpi) = 444945
+SHA256 (xpi/thunderbird-i18n-17.0.5/uk.xpi) = 30270bfb9b6a99cae60a37fa08614af1ed0deb2044f6de52c79c56da5ab4ffeb
+SIZE (xpi/thunderbird-i18n-17.0.5/uk.xpi) = 471142
+SHA256 (xpi/thunderbird-i18n-17.0.5/zh-TW.xpi) = 194b9a773cdf8a078b11928e56807b58a111d849af272116c8323d5c147ceb69
+SIZE (xpi/thunderbird-i18n-17.0.5/zh-TW.xpi) = 437591
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index b0c77276d14b..9a6bbc431811 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird
-DISTVERSION= 17.0.4
+DISTVERSION= 17.0.5
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}esr/source
@@ -24,7 +24,7 @@ EM_VERSION= 1.5.1
USE_AUTOTOOLS= autoconf213:env
USE_PYTHON_BUILD=-2.7
USE_GECKO= gecko
-CONFLICTS= thunderbird-2[0-9].* thunderbird-1[1-689].* thunderbird-10.*
+CONFLICTS= thunderbird-24.* thunderbird-1[1-6].* thunderbird-10.*
USE_MOZILLA= # empty
MAKE_JOBS_SAFE= yes
@@ -62,17 +62,6 @@ MOZSRC:= ${WRKSRC}/mozilla
XPI_LIBDIR= ${PREFIX}/lib/xpi
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if ${PORT_OPTIONS:MENIGMAIL}
MASTER_SITES+= http://www.enigmail.net/download/source/:enigmail
DISTFILES+= ${EM_DISTFILE}:enigmail
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 01bd2a50190d..6d683516fd17 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,4 +1,4 @@
-SHA256 (thunderbird-17.0.4esr.source.tar.bz2) = e453a0509e28af0001de917801aad274c9a532de80f124a68b2df32b9d152137
-SIZE (thunderbird-17.0.4esr.source.tar.bz2) = 113367797
+SHA256 (thunderbird-17.0.5esr.source.tar.bz2) = d8a6ff5c35fb030514d24eb7b6e224cb0dc69dce85051a2d03952d5308bc67f6
+SIZE (thunderbird-17.0.5esr.source.tar.bz2) = 113259410
SHA256 (enigmail-1.5.1.tar.gz) = 234ca3c8f7c74afb64ebdaa4762e358f35a72c1f8de007b992497fc2db803af0
SIZE (enigmail-1.5.1.tar.gz) = 1213954
diff --git a/mail/thunderbird/files/patch-bug753046 b/mail/thunderbird/files/patch-bug753046
index 8dbb09a9b55e..0a11537b30d7 100644
--- a/mail/thunderbird/files/patch-bug753046
+++ b/mail/thunderbird/files/patch-bug753046
@@ -460,7 +460,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,16 +9,30 @@
+@@ -9,16 +9,24 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -474,13 +474,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
-#include <pthread_np.h>
+#elif defined(OS_FREEBSD)
+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
#endif
+
+#if !defined(OS_MACOSX)
diff --git a/mail/thunderbird/files/patch-bug810716 b/mail/thunderbird/files/patch-bug810716
new file mode 100644
index 000000000000..93e59a2d7929
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug810716
@@ -0,0 +1,95 @@
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- configure.in
++++ configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
+index e828beb..6444246 100644
+--- mozilla/extensions/auth/nsAuthGSSAPI.cpp
++++ mozilla/extensions/auth/nsAuthGSSAPI.cpp
+@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
+ #endif
+
+ #if defined(HAVE_RES_NINIT)
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ #endif
+
+diff --git js/src/configure.in js/src/configure.in
+index e25f569..b9722f9 100644
+--- mozilla/js/src/configure.in
++++ mozilla/js/src/configure.in
+@@ -2797,14 +2797,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
diff --git a/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp b/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp
deleted file mode 100644
index f31ba356b0ab..000000000000
--- a/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/content/media/nsAudioStream.cpp~
-+++ mozilla/content/media/nsAudioStream.cpp
-@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
- gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nsnull));
- }
- } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
-+#if defined(__FreeBSD__) && __FreeBSD_version < 800097
-+ bool value = Preferences::GetBool(aPref, false);
-+#else
- bool value = Preferences::GetBool(aPref, true);
-+#endif
- mozilla::MutexAutoLock lock(*gAudioPrefsLock);
- gUseCubeb = value;
- } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-js-confdefs.h.in b/mail/thunderbird/files/patch-mozilla-js-src-js-confdefs.h.in
deleted file mode 100644
index 6d7fa6c39ca6..000000000000
--- a/mail/thunderbird/files/patch-mozilla-js-src-js-confdefs.h.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/js/src/js-confdefs.h.in~
-+++ mozilla/js/src/js-confdefs.h.in
-@@ -12,6 +12,7 @@
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/security/nss/Makefile b/security/nss/Makefile
index f3386c88da35..94b93a4a50a8 100644
--- a/security/nss/Makefile
+++ b/security/nss/Makefile
@@ -22,11 +22,11 @@ MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= ${PREFIX}/lib/nss
USE_GMAKE= yes
USE_PERL5_BUILD=yes
-MAKE_ENV= BSD_LDOPTS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" \
+MAKE_ENV= LIBRARY_PATH="${LOCALBASE}/lib" \
SQLITE_INCLUDE_DIR="${LOCALBASE}/include" \
NSS_ENABLE_ECC=1 NSS_USE_SYSTEM_SQLITE=1
ALL_TARGET= nss_build_all
-CFLAGS+= -I${LOCALBASE}/include/nspr -L${LOCALBASE}/lib
+CFLAGS+= -I${LOCALBASE}/include/nspr
SUB_FILES= nss-config nss.pc
SUB_LIST= MAJOR_VERSION=${PORTVERSION:R:R} \
@@ -55,13 +55,6 @@ BINS= ${DIST}/${OPSYS}${OSREL}_DBG.OBJ
.if ${ARCH} == amd64
USE_BINUTILS= # intel-gcm.s
CFLAGS+= -B${LOCALBASE}/bin
-.if defined(WITH_CLANG_IS_CC) || ${CC:Mcc} && ${OSVERSION} > 1000023
-EXTRA_PATCHES+= ${FILESDIR}/extra-bug835050
-.endif
-.if ${CC:Mcc} && (${OSVERSION} >= 800000 && ${OSVERSION} < 802503 \
- || ${OSVERSION} < 704101)
-USE_GCC?= yes # -mssse3
-.endif
.endif
check regression-test test:
@@ -79,8 +72,6 @@ check regression-test test:
fi
post-patch:
- @${REINPLACE_CMD} -e "s|-pthread|${PTHREAD_LIBS}|g" \
- ${WRKSRC:H:H}/security/coreconf/FreeBSD.mk
@${REINPLACE_CMD} '/NSS_DEFAULT_SYSTEM/s,/etc,${PREFIX}&,' \
${WRKSRC}/lib/sysinit/nsssysinit.c
@cd ${WRKSRC} && \
diff --git a/security/nss/files/patch-..::coreconf::FreeBSD.mk b/security/nss/files/patch-..::coreconf::FreeBSD.mk
index c215c366f0af..6bdfef625b29 100644
--- a/security/nss/files/patch-..::coreconf::FreeBSD.mk
+++ b/security/nss/files/patch-..::coreconf::FreeBSD.mk
@@ -27,13 +27,7 @@
OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-@@ -65,20 +80,20 @@
- USE_PTHREADS = 1
- DEFINES += -D_THREAD_SAFE -D_REENTRANT
- OS_LIBS += -pthread
--DSO_LDOPTS += -pthread
-+DSO_LDOPTS += $(BSD_LDOPTS)
- endif
+@@ -70,15 +85,15 @@
ARCH = freebsd
diff --git a/security/nss/files/extra-bug835050 b/security/nss/files/patch-bug856300
index a9ccd0a0c0d1..7653f0fd6b4b 100644
--- a/security/nss/files/extra-bug835050
+++ b/security/nss/files/patch-bug856300
@@ -1,10 +1,11 @@
--- lib/freebl/Makefile~
+++ lib/freebl/Makefile
-@@ -659,7 +659,5 @@ $(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(
+@@ -659,7 +659,7 @@ $(OBJDIR)/$(PROG_PREFIX)intel-gcm-wrap$(
# symbolic names to registers, for example,
# .set Htbl, %rdi
# So we can't use Clang's integrated assembler with intel-gcm.s.
-ifneq (,$(findstring clang,$(AS)))
++ifneq (,$(findstring clang,$(shell $(AS) -v 2>&1)))
$(OBJDIR)/$(PROG_PREFIX)intel-gcm$(OBJ_SUFFIX): ASFLAGS += -no-integrated-as
endif
--endif
+ endif
diff --git a/security/vuxml/vuln.xml b/security/vuxml/vuln.xml
index 964c7b810cad..900181866cfa 100644
--- a/security/vuxml/vuln.xml
+++ b/security/vuxml/vuln.xml
@@ -51,6 +51,92 @@ Note: Please add new entries to the beginning of this file.
-->
<vuxml xmlns="http://www.vuxml.org/apps/vuxml-1">
+ <vuln vid="94976433-9c74-11e2-a9fc-d43d7e0c7c02">
+ <topic>mozilla -- multiple vulnerabilities</topic>
+ <affects>
+ <package>
+ <name>firefox</name>
+ <range><gt>18.0,1</gt><lt>20.0,1</lt></range>
+ <range><lt>17.0.3,1</lt></range>
+ </package>
+ <package>
+ <name>linux-firefox</name>
+ <range><lt>17.0.5,1</lt></range>
+ </package>
+ <package>
+ <name>linux-seamonkey</name>
+ <range><lt>2.17</lt></range>
+ </package>
+ <package>
+ <name>linux-thunderbird</name>
+ <range><lt>17.0.5</lt></range>
+ </package>
+ <package>
+ <name>seamonkey</name>
+ <range><lt>2.17</lt></range>
+ </package>
+ <package>
+ <name>thunderbird</name>
+ <range><gt>11.0</gt><lt>17.0.5</lt></range>
+ </package>
+ </affects>
+ <description>
+ <body xmlns="http://www.w3.org/1999/xhtml">
+ <p>The Mozilla Project reports:</p>
+ <blockquote cite="http://www.mozilla.org/security/known-vulnerabilities/">
+ <p>MFSA 2013-30 Miscellaneous memory safety hazards (rv:20.0 /
+ rv:17.0.5)</p>
+ <p>MFSA 2013-31 Out-of-bounds write in Cairo library</p>
+ <p>MFSA 2013-32 Privilege escalation through Mozilla Maintenance
+ Service</p>
+ <p>MFSA 2013-33 World read and write access to app_tmp directory on
+ Android</p>
+ <p>MFSA 2013-34 Privilege escalation through Mozilla Updater</p>
+ <p>MFSA 2013-35 WebGL crash with Mesa graphics driver on Linux</p>
+ <p>MFSA 2013-36 Bypass of SOW protections allows cloning of protected
+ nodes</p>
+ <p>MFSA 2013-37 Bypass of tab-modal dialog origin disclosure</p>
+ <p>MFSA 2013-38 Cross-site scripting (XSS) using timed history
+ navigations</p>
+ <p>MFSA 2013-39 Memory corruption while rendering grayscale PNG
+ images</p>
+ <p>MFSA 2013-40 Out-of-bounds array read in CERT_DecodeCertPackage</p>
+ </blockquote>
+ </body>
+ </description>
+ <references>
+ <cvename>CVE-2013-0788</cvename>
+ <cvename>CVE-2013-0789</cvename>
+ <cvename>CVE-2013-0790</cvename>
+ <cvename>CVE-2013-0791</cvename>
+ <cvename>CVE-2013-0792</cvename>
+ <cvename>CVE-2013-0793</cvename>
+ <cvename>CVE-2013-0794</cvename>
+ <cvename>CVE-2013-0795</cvename>
+ <cvename>CVE-2013-0796</cvename>
+ <cvename>CVE-2013-0797</cvename>
+ <cvename>CVE-2013-0798</cvename>
+ <cvename>CVE-2013-0799</cvename>
+ <cvename>CVE-2013-0800</cvename>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-30.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-31.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-32.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-33.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-34.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-35.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-36.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-37.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-38.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-39.html</url>
+ <url>http://www.mozilla.org/security/announce/2013/mfsa2013-40.html</url>
+ <url>http://www.mozilla.org/security/known-vulnerabilities/</url>
+ </references>
+ <dates>
+ <discovery>2013-04-02</discovery>
+ <entry>2013-04-03</entry>
+ </dates>
+ </vuln>
+
<vuln vid="13031d98-9bd1-11e2-a7be-8c705af55518">
<topic>FreeBSD -- BIND remote denial of service</topic>
<affects>
diff --git a/www/firefox-esr-i18n/Makefile b/www/firefox-esr-i18n/Makefile
index c22a8fb39385..ed03c5d55667 100644
--- a/www/firefox-esr-i18n/Makefile
+++ b/www/firefox-esr-i18n/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox-i18n
-PORTVERSION= 17.0.4
+PORTVERSION= 17.0.5
CATEGORIES= www
MASTER_SITE_SUBDIR= firefox/releases/${PORTVERSION}esr/linux-i686/xpi
PKGNAMEPREFIX=
@@ -51,7 +51,7 @@ pre-everything::
do-extract:
@${MKDIR} ${WRKSRC}
@for lang in ${FIREFOX_I18N_}; do \
- if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\
+ if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\
then \
exit 1; \
fi; \
diff --git a/www/firefox-esr-i18n/distinfo b/www/firefox-esr-i18n/distinfo
index 66f3c795abca..890753eaef72 100644
--- a/www/firefox-esr-i18n/distinfo
+++ b/www/firefox-esr-i18n/distinfo
@@ -1,164 +1,164 @@
-SHA256 (xpi/firefox-i18n-17.0.4/af.xpi) = a06004c0f2e5dddefcc73884e0397f35dc1506df907f5cabd498bd6641ba4f8a
-SIZE (xpi/firefox-i18n-17.0.4/af.xpi) = 281145
-SHA256 (xpi/firefox-i18n-17.0.4/ak.xpi) = 8d459266d2989a4d64a99cdf3a48038df2f674541e6259f20893dd328eb78e8a
-SIZE (xpi/firefox-i18n-17.0.4/ak.xpi) = 282976
-SHA256 (xpi/firefox-i18n-17.0.4/ar.xpi) = f2e37e09b16c37af44a372f685d481286b3f338fc760c84fc334b3a4b75e651d
-SIZE (xpi/firefox-i18n-17.0.4/ar.xpi) = 311506
-SHA256 (xpi/firefox-i18n-17.0.4/ast.xpi) = a278cf4519a4cd431a595d7c3140e5d318976c70545190d3c8a089e8c89619f7
-SIZE (xpi/firefox-i18n-17.0.4/ast.xpi) = 264123
-SHA256 (xpi/firefox-i18n-17.0.4/be.xpi) = 4d03bcdbf0a4b22938e3512f99f7be24c8ad8d50c44b5ca8042c3d8804d55d31
-SIZE (xpi/firefox-i18n-17.0.4/be.xpi) = 273411
-SHA256 (xpi/firefox-i18n-17.0.4/bg.xpi) = c0ce090e81564d2b352e6bde0f4ac0e24c2de777529cf5f0e55d74c49e13f122
-SIZE (xpi/firefox-i18n-17.0.4/bg.xpi) = 327260
-SHA256 (xpi/firefox-i18n-17.0.4/bn-BD.xpi) = 04e13676bfe1f5d43a629b569521eda5c63e4dc2a3f1de7111a36a7409339e5b
-SIZE (xpi/firefox-i18n-17.0.4/bn-BD.xpi) = 339303
-SHA256 (xpi/firefox-i18n-17.0.4/bn-IN.xpi) = b17b9b800a95d9040c5a548adaa4237a4bb1b5e2cb3cb58f5f6e2e512d0b4280
-SIZE (xpi/firefox-i18n-17.0.4/bn-IN.xpi) = 373021
-SHA256 (xpi/firefox-i18n-17.0.4/br.xpi) = 12c9bc21177b1436a84b65928678a1adc643eda0cb2308fda791f0ada31381a0
-SIZE (xpi/firefox-i18n-17.0.4/br.xpi) = 291583
-SHA256 (xpi/firefox-i18n-17.0.4/bs.xpi) = 07b13861cefe09a58d0a5153b62f6848b1079c105b1c849c3dee937240e442a6
-SIZE (xpi/firefox-i18n-17.0.4/bs.xpi) = 292223
-SHA256 (xpi/firefox-i18n-17.0.4/ca.xpi) = 36d20fe208aa71bd7acd53d8e501a9d8ce1358b3531b89e73bd9ff33fd1a8c5f
-SIZE (xpi/firefox-i18n-17.0.4/ca.xpi) = 293532
-SHA256 (xpi/firefox-i18n-17.0.4/cs.xpi) = 5dd8d167c0085dff9bacb74438f05d205148ca71f28710eb30c0ec3bb69db106
-SIZE (xpi/firefox-i18n-17.0.4/cs.xpi) = 294133
-SHA256 (xpi/firefox-i18n-17.0.4/cy.xpi) = 8cd05825c0ff4f20af69ae2d55ed928d04d7bf9242b50d340b67868d5731c234
-SIZE (xpi/firefox-i18n-17.0.4/cy.xpi) = 284868
-SHA256 (xpi/firefox-i18n-17.0.4/da.xpi) = ea70245f858679fa988036add074fcdc99314102258b4404c132bbfc6e5dcbda
-SIZE (xpi/firefox-i18n-17.0.4/da.xpi) = 282669
-SHA256 (xpi/firefox-i18n-17.0.4/de.xpi) = 76b9b3cc6845e1b327625b753b9c5a850218aad496c982a54e97c8c15d8951b7
-SIZE (xpi/firefox-i18n-17.0.4/de.xpi) = 270384
-SHA256 (xpi/firefox-i18n-17.0.4/el.xpi) = 8bd391d5b0fa972bb4d3cf165d62ff274c8d33c2246e4a28a756950dfdd59be0
-SIZE (xpi/firefox-i18n-17.0.4/el.xpi) = 311653
-SHA256 (xpi/firefox-i18n-17.0.4/en-GB.xpi) = 9093d70d0b4f4347b98b3f88da225ae374497d6e2ab87250af66222acbc791da
-SIZE (xpi/firefox-i18n-17.0.4/en-GB.xpi) = 272104
-SHA256 (xpi/firefox-i18n-17.0.4/en-US.xpi) = 5f6c38c7733d43638efd844ad292ba49bc0c3bc1eb326a77d567b6b6a63662bc
-SIZE (xpi/firefox-i18n-17.0.4/en-US.xpi) = 272155
-SHA256 (xpi/firefox-i18n-17.0.4/en-ZA.xpi) = 2057e8fa4d9f70982a734202ce72c9575d2acf4147007f90806a3b84c9b922a6
-SIZE (xpi/firefox-i18n-17.0.4/en-ZA.xpi) = 272935
-SHA256 (xpi/firefox-i18n-17.0.4/eo.xpi) = be1bab18409a54a3bda2cb56a10019bb7d089724e178aa8ced1b2f82ec4c8f7c
-SIZE (xpi/firefox-i18n-17.0.4/eo.xpi) = 284800
-SHA256 (xpi/firefox-i18n-17.0.4/es-AR.xpi) = 4e610b8e331368ed80597196b4d0e18c38247675e62714ce9edc417c1e6f8bb6
-SIZE (xpi/firefox-i18n-17.0.4/es-AR.xpi) = 289239
-SHA256 (xpi/firefox-i18n-17.0.4/es-CL.xpi) = 103a6e758db575f6a0085376624cfa63eb74b11116ffe4ec1241be256ba09af5
-SIZE (xpi/firefox-i18n-17.0.4/es-CL.xpi) = 296878
-SHA256 (xpi/firefox-i18n-17.0.4/es-ES.xpi) = d5eae453bb189e99d581a885fbc480fc235f9533d24646861f38bbc27f67d2e5
-SIZE (xpi/firefox-i18n-17.0.4/es-ES.xpi) = 242185
-SHA256 (xpi/firefox-i18n-17.0.4/es-MX.xpi) = 367f8161de97d5f68a29e3379603051d056b4b117c2615e34c99ce6d8e90092c
-SIZE (xpi/firefox-i18n-17.0.4/es-MX.xpi) = 247971
-SHA256 (xpi/firefox-i18n-17.0.4/et.xpi) = e96edbc283ed61c6c79628cb6649c81eaa7fa5ace6b8d79b40c890e28e452b50
-SIZE (xpi/firefox-i18n-17.0.4/et.xpi) = 284694
-SHA256 (xpi/firefox-i18n-17.0.4/eu.xpi) = cd7be3d40b49d3db99b628c04097cc56ad2f4e95839daba299e2c8989e04c51d
-SIZE (xpi/firefox-i18n-17.0.4/eu.xpi) = 284227
-SHA256 (xpi/firefox-i18n-17.0.4/fa.xpi) = dcd36e1de67b86b87f2dd2a17e1d16f30f21cdfd05222d482026ee868a3f1d75
-SIZE (xpi/firefox-i18n-17.0.4/fa.xpi) = 323997
-SHA256 (xpi/firefox-i18n-17.0.4/fi.xpi) = 9d3da52e62053d0cde417762ef15e99d4d27f0b5ba3e81af9c3573c19a078a9a
-SIZE (xpi/firefox-i18n-17.0.4/fi.xpi) = 288655
-SHA256 (xpi/firefox-i18n-17.0.4/fr.xpi) = 4262cf95c1d998421ab3e2f6dcd141ebef96614d7ac93323446bc1d45fd45a6f
-SIZE (xpi/firefox-i18n-17.0.4/fr.xpi) = 293362
-SHA256 (xpi/firefox-i18n-17.0.4/fy-NL.xpi) = 83a899babc2fc811934e90e86ad0be0f055448654aab41d6a78eb17cc6846a8f
-SIZE (xpi/firefox-i18n-17.0.4/fy-NL.xpi) = 289690
-SHA256 (xpi/firefox-i18n-17.0.4/ga-IE.xpi) = 57c65ede7370f586074f12601e53b5213659ad38648912ff422b72d98fdc2d82
-SIZE (xpi/firefox-i18n-17.0.4/ga-IE.xpi) = 296976
-SHA256 (xpi/firefox-i18n-17.0.4/gl.xpi) = 68a394151e9ca6221ac5f28aa28ead49a7a86b61b53aed8a0a1f241165376976
-SIZE (xpi/firefox-i18n-17.0.4/gl.xpi) = 286997
-SHA256 (xpi/firefox-i18n-17.0.4/gu-IN.xpi) = d8dfc07805c3871decaa841768a530944910980b77895ae82e0f7a5249480cfd
-SIZE (xpi/firefox-i18n-17.0.4/gu-IN.xpi) = 319480
-SHA256 (xpi/firefox-i18n-17.0.4/he.xpi) = af1a8fc3352e37d35996469e3c28b65aceef8d7fb06ae8bc0c7eaf28f7fe14ca
-SIZE (xpi/firefox-i18n-17.0.4/he.xpi) = 301482
-SHA256 (xpi/firefox-i18n-17.0.4/hi-IN.xpi) = be384e4831b839249cec96c57e531fcd9457017b1946f4cc60c7595350e37c81
-SIZE (xpi/firefox-i18n-17.0.4/hi-IN.xpi) = 330864
-SHA256 (xpi/firefox-i18n-17.0.4/hr.xpi) = 55f5c7b92ee4abb073e20d4fca947510e7b735d78ade6cf38d4e32c5afbb357a
-SIZE (xpi/firefox-i18n-17.0.4/hr.xpi) = 287940
-SHA256 (xpi/firefox-i18n-17.0.4/hu.xpi) = 56033923ddbfe74a32bea31da848c827cc11ba5347e858c5e005d64d82aa1f71
-SIZE (xpi/firefox-i18n-17.0.4/hu.xpi) = 303047
-SHA256 (xpi/firefox-i18n-17.0.4/hy-AM.xpi) = 88fc9be4cc1ab4b3713a69b530e2a8235bf69b1cef30f19390cbb07c687b0642
-SIZE (xpi/firefox-i18n-17.0.4/hy-AM.xpi) = 328203
-SHA256 (xpi/firefox-i18n-17.0.4/id.xpi) = eb5426d2790578037168dbb8e35c3741544841613caa0cc2fd461268ce5cdb36
-SIZE (xpi/firefox-i18n-17.0.4/id.xpi) = 283725
-SHA256 (xpi/firefox-i18n-17.0.4/is.xpi) = 72ac421c8c61e3395b4260b8b4c2ed1d7522beffd65f04f43fbfebde4e10b590
-SIZE (xpi/firefox-i18n-17.0.4/is.xpi) = 284908
-SHA256 (xpi/firefox-i18n-17.0.4/it.xpi) = 50e9464acb0c4579f976243bce9674c3c3df3c94249d1c028e8854529b8dcfd4
-SIZE (xpi/firefox-i18n-17.0.4/it.xpi) = 238645
-SHA256 (xpi/firefox-i18n-17.0.4/ja.xpi) = 4d26164fdae4404d42844a238cb6b7788c80c8c0b80120fd46d308f491b38514
-SIZE (xpi/firefox-i18n-17.0.4/ja.xpi) = 322490
-SHA256 (xpi/firefox-i18n-17.0.4/kk.xpi) = 12f91f9b1b5b12707663e0b291e66a8bfdeb7e9f8df37203ef31ccd7a572bc3c
-SIZE (xpi/firefox-i18n-17.0.4/kk.xpi) = 330351
-SHA256 (xpi/firefox-i18n-17.0.4/kn.xpi) = e5666bc829153255e0710e1fcc4b408d077bd00ab3de5f0264257374910f1e64
-SIZE (xpi/firefox-i18n-17.0.4/kn.xpi) = 354900
-SHA256 (xpi/firefox-i18n-17.0.4/ko.xpi) = cf2bdbe2f0bc0ede809b56cddf66cc604872942aeb0e7cf2da5abd85e0427c5a
-SIZE (xpi/firefox-i18n-17.0.4/ko.xpi) = 296728
-SHA256 (xpi/firefox-i18n-17.0.4/ku.xpi) = 77e5701c21208aaaa6a76427b9011471060f10fced9b7843ae4c644af375049e
-SIZE (xpi/firefox-i18n-17.0.4/ku.xpi) = 304898
-SHA256 (xpi/firefox-i18n-17.0.4/lg.xpi) = 68f698c8e50ac99bb2b75f09684bc8f8a2bb63037eb44d102ce8dcf2d99f3d22
-SIZE (xpi/firefox-i18n-17.0.4/lg.xpi) = 290627
-SHA256 (xpi/firefox-i18n-17.0.4/lt.xpi) = 3c2edb70dfabdc1758584a197458982bdc4802c94ee8dd1dc154ae6e868accb0
-SIZE (xpi/firefox-i18n-17.0.4/lt.xpi) = 349462
-SHA256 (xpi/firefox-i18n-17.0.4/lv.xpi) = b16f194408070789f307edaffe876f5c35bc0eadbd7d4eeaec38512a966be924
-SIZE (xpi/firefox-i18n-17.0.4/lv.xpi) = 291404
-SHA256 (xpi/firefox-i18n-17.0.4/mai.xpi) = 9ad6bee8ec54d72662901d347f5df95a05043479ffd272704281de9f67f7b6a7
-SIZE (xpi/firefox-i18n-17.0.4/mai.xpi) = 328267
-SHA256 (xpi/firefox-i18n-17.0.4/mk.xpi) = 9b4906affaec09a3c376f37899a8936b557c7a32700f254cb588febe7ca01311
-SIZE (xpi/firefox-i18n-17.0.4/mk.xpi) = 315578
-SHA256 (xpi/firefox-i18n-17.0.4/ml.xpi) = 575a8776a8211d910b1bb6719c41b1f95940bb30e20fe3a2428893c76b56297a
-SIZE (xpi/firefox-i18n-17.0.4/ml.xpi) = 361541
-SHA256 (xpi/firefox-i18n-17.0.4/mr.xpi) = ecb53d6575397c08e5262c03f1fd1ef3a878ad47f47d80afeacbc63e8b17a109
-SIZE (xpi/firefox-i18n-17.0.4/mr.xpi) = 327860
-SHA256 (xpi/firefox-i18n-17.0.4/nb-NO.xpi) = bd187cc0fbabb660a36d47f900d1ccd8d3756e1c5f34d9fa751fd67a4395ade8
-SIZE (xpi/firefox-i18n-17.0.4/nb-NO.xpi) = 284889
-SHA256 (xpi/firefox-i18n-17.0.4/nl.xpi) = 2300e96e8388fecb4a4b8bf7e81517f5580936366e92fae8b9cc00f17ff7c4f5
-SIZE (xpi/firefox-i18n-17.0.4/nl.xpi) = 286112
-SHA256 (xpi/firefox-i18n-17.0.4/nn-NO.xpi) = a124891bdb6173aac237cd1ad83c7e8878bdd6c8fa6a967d63e246cb413a6d96
-SIZE (xpi/firefox-i18n-17.0.4/nn-NO.xpi) = 287844
-SHA256 (xpi/firefox-i18n-17.0.4/nso.xpi) = db2a66cecc3ddd52aabf7e5b3a2f2fe33eb34ec9e6273a784ec01f03addd9918
-SIZE (xpi/firefox-i18n-17.0.4/nso.xpi) = 288150
-SHA256 (xpi/firefox-i18n-17.0.4/or.xpi) = 070aca9a249059148902cc6c4efbd7bd9f6cee52906e634500b60e2532a5ec02
-SIZE (xpi/firefox-i18n-17.0.4/or.xpi) = 329683
-SHA256 (xpi/firefox-i18n-17.0.4/pa-IN.xpi) = 7f97845c3999e8eaea80694f634514bbcc1d04882743db78304da6c34090ad9b
-SIZE (xpi/firefox-i18n-17.0.4/pa-IN.xpi) = 318504
-SHA256 (xpi/firefox-i18n-17.0.4/pl.xpi) = 60bc76823710a40c468478f3874797b31e597bb41abe829ad17f58787ecd9757
-SIZE (xpi/firefox-i18n-17.0.4/pl.xpi) = 301035
-SHA256 (xpi/firefox-i18n-17.0.4/pt-BR.xpi) = b65ed348ce7e6fe1cb7a3c13a2a2fb434e44c545c9d8bcd98165095ad928af8a
-SIZE (xpi/firefox-i18n-17.0.4/pt-BR.xpi) = 289244
-SHA256 (xpi/firefox-i18n-17.0.4/pt-PT.xpi) = e2ff066886bb325247546c5e892f155b93cf5610970f61db101705203278c1e6
-SIZE (xpi/firefox-i18n-17.0.4/pt-PT.xpi) = 291458
-SHA256 (xpi/firefox-i18n-17.0.4/rm.xpi) = 954bf1a5cf10288f35fea02d27bbef0be4ebefd93dc370b235f5c638c10ea180
-SIZE (xpi/firefox-i18n-17.0.4/rm.xpi) = 288466
-SHA256 (xpi/firefox-i18n-17.0.4/ro.xpi) = edb45bec963a2059fd9c3d863285ca89e9c230a180afe68ab2dccc452da515c0
-SIZE (xpi/firefox-i18n-17.0.4/ro.xpi) = 310252
-SHA256 (xpi/firefox-i18n-17.0.4/ru.xpi) = 8b1747a94b4d3c8a16624e45462a084bae1a8296269f51143d5d776512186edf
-SIZE (xpi/firefox-i18n-17.0.4/ru.xpi) = 284915
-SHA256 (xpi/firefox-i18n-17.0.4/si.xpi) = ba6f484e6920976e67b8dace6dff9f0b313c04ddae3c1c15029deb03b28a1e9a
-SIZE (xpi/firefox-i18n-17.0.4/si.xpi) = 317364
-SHA256 (xpi/firefox-i18n-17.0.4/sk.xpi) = 1288947f9c6f0dbc37bb80d10a9f2083088f72eb8d3e0e7a73e63e8cb565162e
-SIZE (xpi/firefox-i18n-17.0.4/sk.xpi) = 301479
-SHA256 (xpi/firefox-i18n-17.0.4/sl.xpi) = d603ceca14818375c5a2dac3b1a0d59d5c40bb47405aae28a378fb395a81763c
-SIZE (xpi/firefox-i18n-17.0.4/sl.xpi) = 286638
-SHA256 (xpi/firefox-i18n-17.0.4/son.xpi) = 590baeb71cc5fbff0a51c1aadfa2f5cba4be85674d252da8a690d43bb8b5211a
-SIZE (xpi/firefox-i18n-17.0.4/son.xpi) = 283684
-SHA256 (xpi/firefox-i18n-17.0.4/sq.xpi) = d76115e0e166134cfeca1daf7274b32c4a7626cabb099c846f74bed73af0919a
-SIZE (xpi/firefox-i18n-17.0.4/sq.xpi) = 291166
-SHA256 (xpi/firefox-i18n-17.0.4/sr.xpi) = 044cb7b717021d5d4f1eb5b4bf93c9a6ac092e9883d02eb4832ae0cb6978c5b8
-SIZE (xpi/firefox-i18n-17.0.4/sr.xpi) = 334015
-SHA256 (xpi/firefox-i18n-17.0.4/sv-SE.xpi) = b9da3f0dfb2f8fc956e0eded061ccce89b9ffef16c187ef1969129d9b7076fe6
-SIZE (xpi/firefox-i18n-17.0.4/sv-SE.xpi) = 288084
-SHA256 (xpi/firefox-i18n-17.0.4/ta-LK.xpi) = ce4a5e0c0dec76d3677aa50a0a2e1827665c7fbc55d5647f0abd5cee00d53a36
-SIZE (xpi/firefox-i18n-17.0.4/ta-LK.xpi) = 339932
-SHA256 (xpi/firefox-i18n-17.0.4/ta.xpi) = bbe40c4cb61b91c8816ee8e172691d7b5889b4350cedac53a7c9af42c0e53d55
-SIZE (xpi/firefox-i18n-17.0.4/ta.xpi) = 325367
-SHA256 (xpi/firefox-i18n-17.0.4/te.xpi) = 8bc90a8a48ffc535c996ededdc8fc7d38ae37aa01c9e07b9a0dbeef2af9313c8
-SIZE (xpi/firefox-i18n-17.0.4/te.xpi) = 341958
-SHA256 (xpi/firefox-i18n-17.0.4/th.xpi) = 63abf3842b681378e7289bcf0cf6f2c001eb7e139a7ae1537eb7476df715a524
-SIZE (xpi/firefox-i18n-17.0.4/th.xpi) = 323677
-SHA256 (xpi/firefox-i18n-17.0.4/tr.xpi) = f6e814aacca6a2ebf85cc1a493d06a2881b6093e93ad641bbaa58285ed2724b6
-SIZE (xpi/firefox-i18n-17.0.4/tr.xpi) = 295842
-SHA256 (xpi/firefox-i18n-17.0.4/uk.xpi) = 04f3ac2af67d573b69847a872ba04772bd22339f1f400e0a940a0aa5294c80e8
-SIZE (xpi/firefox-i18n-17.0.4/uk.xpi) = 324251
-SHA256 (xpi/firefox-i18n-17.0.4/vi.xpi) = 55bf713af043de37d8e1d061ef57711cae221007f06159e0fc95337567b23db0
-SIZE (xpi/firefox-i18n-17.0.4/vi.xpi) = 313549
-SHA256 (xpi/firefox-i18n-17.0.4/zh-CN.xpi) = 744af223818bda8fe5690937beb25303bf7e90bc27417de69e265ee364175b4f
-SIZE (xpi/firefox-i18n-17.0.4/zh-CN.xpi) = 304250
-SHA256 (xpi/firefox-i18n-17.0.4/zh-TW.xpi) = 54fc9cfbcb89d2584ff143e07141ac6b2fce2ba8b366e18c39a7f653fff80492
-SIZE (xpi/firefox-i18n-17.0.4/zh-TW.xpi) = 305438
-SHA256 (xpi/firefox-i18n-17.0.4/zu.xpi) = 8ad282819d5482913efc24df7f3a709758db878f2f3fd39837c73947ef678d61
-SIZE (xpi/firefox-i18n-17.0.4/zu.xpi) = 296594
+SHA256 (xpi/firefox-i18n-17.0.5/af.xpi) = 1c7f0f11ea1efad528253c5d399a31ab3cc87f6faa2a7057a6fcbbde938758d0
+SIZE (xpi/firefox-i18n-17.0.5/af.xpi) = 281146
+SHA256 (xpi/firefox-i18n-17.0.5/ak.xpi) = 721c1702014423530e3ae07d8488873287f99847f9d7ba3f41993c2185a733af
+SIZE (xpi/firefox-i18n-17.0.5/ak.xpi) = 282977
+SHA256 (xpi/firefox-i18n-17.0.5/ar.xpi) = 64eb3ae88ea63f1c338b0e1f4ec4028235b821cddf64f529d2e7cc4a1c94dd67
+SIZE (xpi/firefox-i18n-17.0.5/ar.xpi) = 311507
+SHA256 (xpi/firefox-i18n-17.0.5/ast.xpi) = 3d748fe9a614ce9abbae7b07bf8aa4fb9fd699c9c49fcc4fbc51d422c279ba45
+SIZE (xpi/firefox-i18n-17.0.5/ast.xpi) = 264123
+SHA256 (xpi/firefox-i18n-17.0.5/be.xpi) = 31dee5af3b9f9b7ff2c27d06838abee824c2a3a68c395125b3beb1b74d9b29c5
+SIZE (xpi/firefox-i18n-17.0.5/be.xpi) = 273412
+SHA256 (xpi/firefox-i18n-17.0.5/bg.xpi) = 943376b45a1843e76e3964a2ccf9510c451bec27a2080891ae34bc8e1e30ffce
+SIZE (xpi/firefox-i18n-17.0.5/bg.xpi) = 327261
+SHA256 (xpi/firefox-i18n-17.0.5/bn-BD.xpi) = c4b9dbab4707ab75f9e6c6b54c0a83f59d3bdb566dc382f7d749ef0f8b538939
+SIZE (xpi/firefox-i18n-17.0.5/bn-BD.xpi) = 339304
+SHA256 (xpi/firefox-i18n-17.0.5/bn-IN.xpi) = d6b215e24c3782cacf9aff8a62c566e35f8e06a0ce5dca2cdf30992abfdf6b5d
+SIZE (xpi/firefox-i18n-17.0.5/bn-IN.xpi) = 373021
+SHA256 (xpi/firefox-i18n-17.0.5/br.xpi) = 01169985c535d386c24606b44d33feeecedbd7d9cae7a9ef17ff28817b2af8c3
+SIZE (xpi/firefox-i18n-17.0.5/br.xpi) = 291583
+SHA256 (xpi/firefox-i18n-17.0.5/bs.xpi) = 381a211811bee3746968612369e2fd5e6889479a1998f9313d549a73b68efb75
+SIZE (xpi/firefox-i18n-17.0.5/bs.xpi) = 292224
+SHA256 (xpi/firefox-i18n-17.0.5/ca.xpi) = 0172a83a49495c5470b3971725e6d939e23258fc5164b83f08289820b9b722d0
+SIZE (xpi/firefox-i18n-17.0.5/ca.xpi) = 293532
+SHA256 (xpi/firefox-i18n-17.0.5/cs.xpi) = 4fc46fe690696b4d249a009a25b77257788b9d84f6d0c0cf194276a9d85f9607
+SIZE (xpi/firefox-i18n-17.0.5/cs.xpi) = 294133
+SHA256 (xpi/firefox-i18n-17.0.5/cy.xpi) = 3ca3cb99ab06662a5e1b5d9951ee9e7f3ea8df9cedba735151e9116a44a42462
+SIZE (xpi/firefox-i18n-17.0.5/cy.xpi) = 284868
+SHA256 (xpi/firefox-i18n-17.0.5/da.xpi) = 58c0bc0f1a4d99307606e67180747abcdb7664b2bbe57faddc028b3a326ad1a2
+SIZE (xpi/firefox-i18n-17.0.5/da.xpi) = 282669
+SHA256 (xpi/firefox-i18n-17.0.5/de.xpi) = 36df074bfe4d4020fe37032756d1b7120ef9c91b1791c27febb8c97e12348598
+SIZE (xpi/firefox-i18n-17.0.5/de.xpi) = 270384
+SHA256 (xpi/firefox-i18n-17.0.5/el.xpi) = db8f0d1f997b966df1ea6b08001c4f04f59506ce9d03f90f08fe525815f2baa4
+SIZE (xpi/firefox-i18n-17.0.5/el.xpi) = 311653
+SHA256 (xpi/firefox-i18n-17.0.5/en-GB.xpi) = dee30eb53ae4a27a45db7ec25fed16016d589c88075f59d13875caa9d126d7df
+SIZE (xpi/firefox-i18n-17.0.5/en-GB.xpi) = 272105
+SHA256 (xpi/firefox-i18n-17.0.5/en-US.xpi) = 1d2da0a593d21138c5ddf515da34c085fb03e409757eea1b49d169b21ffa0975
+SIZE (xpi/firefox-i18n-17.0.5/en-US.xpi) = 272155
+SHA256 (xpi/firefox-i18n-17.0.5/en-ZA.xpi) = aaaf142545aeb379d305c85095bc79293a9a2cb47d705e2d49042beb9fc17896
+SIZE (xpi/firefox-i18n-17.0.5/en-ZA.xpi) = 272936
+SHA256 (xpi/firefox-i18n-17.0.5/eo.xpi) = 9b6e1badc991462695099115174c80ea6349fbc7a8f85c88b4fe861c4357bb78
+SIZE (xpi/firefox-i18n-17.0.5/eo.xpi) = 284801
+SHA256 (xpi/firefox-i18n-17.0.5/es-AR.xpi) = 033727ec5a4df317ea4d2a9ed53f0a4da52a85e93496745a8835e7fa04b9dd18
+SIZE (xpi/firefox-i18n-17.0.5/es-AR.xpi) = 289240
+SHA256 (xpi/firefox-i18n-17.0.5/es-CL.xpi) = 5de431f6994705a5e317f445d44b9e87826e148eaa5ef0b9cd39c5c582dc6e84
+SIZE (xpi/firefox-i18n-17.0.5/es-CL.xpi) = 296878
+SHA256 (xpi/firefox-i18n-17.0.5/es-ES.xpi) = d5470f8887160357a61f2f4fa8c1ad7344b5fd77b13f5152c02d1df1af05e5f2
+SIZE (xpi/firefox-i18n-17.0.5/es-ES.xpi) = 242185
+SHA256 (xpi/firefox-i18n-17.0.5/es-MX.xpi) = c391571b6dc91aa2df2242b55b36ba3eebdd037b55d99cd8225328f1050871f4
+SIZE (xpi/firefox-i18n-17.0.5/es-MX.xpi) = 247972
+SHA256 (xpi/firefox-i18n-17.0.5/et.xpi) = 85e6ef3a4792e7e41f91cac974429aa47f2268e8c67828f5e5c729e3791647b7
+SIZE (xpi/firefox-i18n-17.0.5/et.xpi) = 284694
+SHA256 (xpi/firefox-i18n-17.0.5/eu.xpi) = 3fc8b2e334bdf1a22daa0e9ef7035e0689f0bbfaa0c2f82cde24eee0e503e876
+SIZE (xpi/firefox-i18n-17.0.5/eu.xpi) = 284227
+SHA256 (xpi/firefox-i18n-17.0.5/fa.xpi) = 9dd0ebee8a3e688fb97f73ecfee8af22f425ab9dfa58dadacce430a54e4ca498
+SIZE (xpi/firefox-i18n-17.0.5/fa.xpi) = 323998
+SHA256 (xpi/firefox-i18n-17.0.5/fi.xpi) = 2117c522fddcaee71798dba5fa845258dba6f1497d7717d40c8c3867ae83ff6d
+SIZE (xpi/firefox-i18n-17.0.5/fi.xpi) = 288655
+SHA256 (xpi/firefox-i18n-17.0.5/fr.xpi) = 814c4a2fbcec99362d6f2926e48e5ef537f99dc2bfc5337e9d3c3106679a318f
+SIZE (xpi/firefox-i18n-17.0.5/fr.xpi) = 293362
+SHA256 (xpi/firefox-i18n-17.0.5/fy-NL.xpi) = 3c7a603b55cd1cc4d5505f66c912a87952a1128996db43adebe4bc6a5e4b8e8d
+SIZE (xpi/firefox-i18n-17.0.5/fy-NL.xpi) = 289691
+SHA256 (xpi/firefox-i18n-17.0.5/ga-IE.xpi) = 2fd621a413c4a93e87458cc9ce243a6b6126736b99326f971bc41257a60bfb3e
+SIZE (xpi/firefox-i18n-17.0.5/ga-IE.xpi) = 296976
+SHA256 (xpi/firefox-i18n-17.0.5/gl.xpi) = b302cc7760696568fe2f6106923bfcd8e03458f6298aaa7548d76912f973adfe
+SIZE (xpi/firefox-i18n-17.0.5/gl.xpi) = 286998
+SHA256 (xpi/firefox-i18n-17.0.5/gu-IN.xpi) = 1646b98e0ba654eaa64085f81d810b392390e9b4ea91f565583f9b06ca3ecbe4
+SIZE (xpi/firefox-i18n-17.0.5/gu-IN.xpi) = 319480
+SHA256 (xpi/firefox-i18n-17.0.5/he.xpi) = 7a9e245d094fbcaeac9bde75e290d0b69991efd053839aa14194101eb314592f
+SIZE (xpi/firefox-i18n-17.0.5/he.xpi) = 301482
+SHA256 (xpi/firefox-i18n-17.0.5/hi-IN.xpi) = b65dc1d081ec0ff54dc8e762d33e6c987e3cf3f61846e14397cc2a932b732053
+SIZE (xpi/firefox-i18n-17.0.5/hi-IN.xpi) = 330865
+SHA256 (xpi/firefox-i18n-17.0.5/hr.xpi) = a479d9ad741ba101f9debc12a57ef09a763810471ea37e9d8a7cef35d488cd3f
+SIZE (xpi/firefox-i18n-17.0.5/hr.xpi) = 287940
+SHA256 (xpi/firefox-i18n-17.0.5/hu.xpi) = 73a0be757399ddedb2a4e725e50ebb564a0ac67e835b18ed7bdd229f5da548e8
+SIZE (xpi/firefox-i18n-17.0.5/hu.xpi) = 303044
+SHA256 (xpi/firefox-i18n-17.0.5/hy-AM.xpi) = 031ce0fb6692ada8ca3c14c81e0166699df0078c37cf2509d5153b546526df29
+SIZE (xpi/firefox-i18n-17.0.5/hy-AM.xpi) = 328204
+SHA256 (xpi/firefox-i18n-17.0.5/id.xpi) = db2904d0390cd968d0b1df8b44f6337b7f63bd226bfda6150ebbf51fd82b6ab0
+SIZE (xpi/firefox-i18n-17.0.5/id.xpi) = 283726
+SHA256 (xpi/firefox-i18n-17.0.5/is.xpi) = 9e6d8c3321cb6aa3f7c6405c3c92da81daefbb43e2e2144bce98cb1e9035b318
+SIZE (xpi/firefox-i18n-17.0.5/is.xpi) = 284908
+SHA256 (xpi/firefox-i18n-17.0.5/it.xpi) = 405a180337d5efed07a0e801af2ebe46a8131a7d62ca3f6958a630542dfca205
+SIZE (xpi/firefox-i18n-17.0.5/it.xpi) = 238645
+SHA256 (xpi/firefox-i18n-17.0.5/ja.xpi) = 2485b6d68f309e3c062cc0937e5be2a6b8e458fbda72df876e59d9f091b7a9ae
+SIZE (xpi/firefox-i18n-17.0.5/ja.xpi) = 322490
+SHA256 (xpi/firefox-i18n-17.0.5/kk.xpi) = 6fcec5d4ae163a7a017c1fc5642f3ee42f87c3f3b3335bca698c79646622849e
+SIZE (xpi/firefox-i18n-17.0.5/kk.xpi) = 330352
+SHA256 (xpi/firefox-i18n-17.0.5/kn.xpi) = d1eb36abc87c147988a6e6401a9c74fa9b35f4efba4967c208a29b2cf90fabb0
+SIZE (xpi/firefox-i18n-17.0.5/kn.xpi) = 354901
+SHA256 (xpi/firefox-i18n-17.0.5/ko.xpi) = 64156919aa0f3fd20717e91261d98d16631a9c6cdbe9e9aae36524fbecb5d76a
+SIZE (xpi/firefox-i18n-17.0.5/ko.xpi) = 296729
+SHA256 (xpi/firefox-i18n-17.0.5/ku.xpi) = a142c220d8896d817dc7c78a633cbcfb5401ca8ad72adad941933cefac10095b
+SIZE (xpi/firefox-i18n-17.0.5/ku.xpi) = 304898
+SHA256 (xpi/firefox-i18n-17.0.5/lg.xpi) = 48f512a7da6591fa74e15d7c8e817a1763d62d8fa68b0430689aa4edf5adb0a7
+SIZE (xpi/firefox-i18n-17.0.5/lg.xpi) = 290628
+SHA256 (xpi/firefox-i18n-17.0.5/lt.xpi) = b20148abf9ca8cb98643e35997626254beb04dc72e41dc4a5e1d0743085c371c
+SIZE (xpi/firefox-i18n-17.0.5/lt.xpi) = 349462
+SHA256 (xpi/firefox-i18n-17.0.5/lv.xpi) = 96596b53c8bf4244babe7fd009e5c2e1700619162a10c2c383ef119fc9a8630d
+SIZE (xpi/firefox-i18n-17.0.5/lv.xpi) = 291404
+SHA256 (xpi/firefox-i18n-17.0.5/mai.xpi) = 1c637a5eec4f8ea8c879bb907362d9987f72bd6047873a5472015d43b753c69d
+SIZE (xpi/firefox-i18n-17.0.5/mai.xpi) = 328268
+SHA256 (xpi/firefox-i18n-17.0.5/mk.xpi) = 28e006a92e01257e81114d12a837271b3cea5f5c31f927073698c39b9f5d4d39
+SIZE (xpi/firefox-i18n-17.0.5/mk.xpi) = 315579
+SHA256 (xpi/firefox-i18n-17.0.5/ml.xpi) = 59ea098626ef6f8bb40004749d9ef9307bd49e1f08b8651061837430a4c56e81
+SIZE (xpi/firefox-i18n-17.0.5/ml.xpi) = 361542
+SHA256 (xpi/firefox-i18n-17.0.5/mr.xpi) = 91bcb1b5b7c625a132288d500f497c4bfcca17e36b1ea7132436e5184d46322a
+SIZE (xpi/firefox-i18n-17.0.5/mr.xpi) = 327861
+SHA256 (xpi/firefox-i18n-17.0.5/nb-NO.xpi) = 3d163cc1e7c16a8263ea61128d579330e994bb17f5a70c9260366339e167b170
+SIZE (xpi/firefox-i18n-17.0.5/nb-NO.xpi) = 284889
+SHA256 (xpi/firefox-i18n-17.0.5/nl.xpi) = 069fc453652d8b26e2e7c9586672fd5dd332a61aeafd818450bbac5e55a0056e
+SIZE (xpi/firefox-i18n-17.0.5/nl.xpi) = 286113
+SHA256 (xpi/firefox-i18n-17.0.5/nn-NO.xpi) = a20430c4de8151ee638ee73bf06deade026323ef2fb9beb7a0ee1afab6738cc5
+SIZE (xpi/firefox-i18n-17.0.5/nn-NO.xpi) = 287845
+SHA256 (xpi/firefox-i18n-17.0.5/nso.xpi) = db39426b437d8fbd8c35d0373e3db33a7781ab35f9796fcf04990fca56692de9
+SIZE (xpi/firefox-i18n-17.0.5/nso.xpi) = 288150
+SHA256 (xpi/firefox-i18n-17.0.5/or.xpi) = 046aa18bd285000af21c35a6af4e55854ed8362cf518cf46bcd9efbf11b3ddbd
+SIZE (xpi/firefox-i18n-17.0.5/or.xpi) = 329684
+SHA256 (xpi/firefox-i18n-17.0.5/pa-IN.xpi) = 417527d33561fc736c2012e5ffafa9054e28d72892038210a5a2a6cf99fda57c
+SIZE (xpi/firefox-i18n-17.0.5/pa-IN.xpi) = 318504
+SHA256 (xpi/firefox-i18n-17.0.5/pl.xpi) = 6278c98f22493869fec20fba0ee8e534e984bf7c20725e3ab037f1ad4f809328
+SIZE (xpi/firefox-i18n-17.0.5/pl.xpi) = 301036
+SHA256 (xpi/firefox-i18n-17.0.5/pt-BR.xpi) = 68da80fe3171298274d43194e6ae2c52b4e1c2bf1f2cce738102c84fb28efc56
+SIZE (xpi/firefox-i18n-17.0.5/pt-BR.xpi) = 289244
+SHA256 (xpi/firefox-i18n-17.0.5/pt-PT.xpi) = bc74462519c37788a9c48dd011e128e34908a2d977333017e0cda11e25a07589
+SIZE (xpi/firefox-i18n-17.0.5/pt-PT.xpi) = 291458
+SHA256 (xpi/firefox-i18n-17.0.5/rm.xpi) = 34720e9e78742cf8ecd58089daddda3dd2c816934580ae1c73da260108feadb8
+SIZE (xpi/firefox-i18n-17.0.5/rm.xpi) = 288467
+SHA256 (xpi/firefox-i18n-17.0.5/ro.xpi) = b35e5e1c14a981f9f3a4bc0639f6aa99100c84e9d1cf2abfe58400ef3f162544
+SIZE (xpi/firefox-i18n-17.0.5/ro.xpi) = 310252
+SHA256 (xpi/firefox-i18n-17.0.5/ru.xpi) = fb2328fc121bcaf48b1f098a1e668a7bff2cbc47d5761dba438b8245e3af1c94
+SIZE (xpi/firefox-i18n-17.0.5/ru.xpi) = 284915
+SHA256 (xpi/firefox-i18n-17.0.5/si.xpi) = a6567687f49b1e894f44eb1249a39e788d0584416cc957eb6b7d71f3b244e4ed
+SIZE (xpi/firefox-i18n-17.0.5/si.xpi) = 317365
+SHA256 (xpi/firefox-i18n-17.0.5/sk.xpi) = 2d561cfc6784bc61e613a2329addac41cd7b65e2faa5cec23fcd8360d187b21f
+SIZE (xpi/firefox-i18n-17.0.5/sk.xpi) = 301479
+SHA256 (xpi/firefox-i18n-17.0.5/sl.xpi) = d2453136caf1d37de09e6bdc4b7eb8f33a19735a53b77b0aa76924ae5d1d3e73
+SIZE (xpi/firefox-i18n-17.0.5/sl.xpi) = 286638
+SHA256 (xpi/firefox-i18n-17.0.5/son.xpi) = 11c529e4eb9c7c07523ea3b381dda08bbcdfc11dc9700d1280bf4873daf715e8
+SIZE (xpi/firefox-i18n-17.0.5/son.xpi) = 283684
+SHA256 (xpi/firefox-i18n-17.0.5/sq.xpi) = ad1831e09fc679c4683997d0d14f00ee8ae3e2bb489a575ae3fb52ba1d96df71
+SIZE (xpi/firefox-i18n-17.0.5/sq.xpi) = 291166
+SHA256 (xpi/firefox-i18n-17.0.5/sr.xpi) = 87b0285e59f0907c4f29653ce5b609856986be8f170187b6befebc188e4aa982
+SIZE (xpi/firefox-i18n-17.0.5/sr.xpi) = 334016
+SHA256 (xpi/firefox-i18n-17.0.5/sv-SE.xpi) = eb2d0db7fce1b71081dd86e4287a7142fd921c1741700378a37db61b7ec7a976
+SIZE (xpi/firefox-i18n-17.0.5/sv-SE.xpi) = 288084
+SHA256 (xpi/firefox-i18n-17.0.5/ta-LK.xpi) = fc5470b39b8f89004e1cd1f1ce83b1be6766d50f352e75a2e2b67520c0f5bb05
+SIZE (xpi/firefox-i18n-17.0.5/ta-LK.xpi) = 339932
+SHA256 (xpi/firefox-i18n-17.0.5/ta.xpi) = 99005d920f0fc2c7aeb576db68b88b4c0773ba7671b6bd7c7dd1a65beb406d28
+SIZE (xpi/firefox-i18n-17.0.5/ta.xpi) = 325367
+SHA256 (xpi/firefox-i18n-17.0.5/te.xpi) = 097e90c31b932d8e3bc6a6f5732e2b65e870a88e363996dd3427412cb1190e0d
+SIZE (xpi/firefox-i18n-17.0.5/te.xpi) = 341958
+SHA256 (xpi/firefox-i18n-17.0.5/th.xpi) = 4d878a2daa93c13eb92311f2b474917ee057cad838b3b523f9f45eaa0e5fca83
+SIZE (xpi/firefox-i18n-17.0.5/th.xpi) = 323677
+SHA256 (xpi/firefox-i18n-17.0.5/tr.xpi) = f6aed5e6845d2bb1482537dd9a634a168d73bb783627f6670a808b9b44585a4d
+SIZE (xpi/firefox-i18n-17.0.5/tr.xpi) = 295842
+SHA256 (xpi/firefox-i18n-17.0.5/uk.xpi) = 35b962feba64154cc3f85d710db1bf5f6ba641c0b012580377f7d4425655bd9e
+SIZE (xpi/firefox-i18n-17.0.5/uk.xpi) = 324251
+SHA256 (xpi/firefox-i18n-17.0.5/vi.xpi) = ea645b5649b6f76c09b3adfc5331e8369a3fd4dd211841eb0c39810bf639156c
+SIZE (xpi/firefox-i18n-17.0.5/vi.xpi) = 313549
+SHA256 (xpi/firefox-i18n-17.0.5/zh-CN.xpi) = 339a161d6e85d6b2ec7713a7616d9e060c984c3f058bc970b2ea41f12126aa8f
+SIZE (xpi/firefox-i18n-17.0.5/zh-CN.xpi) = 304251
+SHA256 (xpi/firefox-i18n-17.0.5/zh-TW.xpi) = 53b06efdfc8f08d9f779b626769b75d3462b1e1cacc12c4fb698afd3e438a403
+SIZE (xpi/firefox-i18n-17.0.5/zh-TW.xpi) = 305438
+SHA256 (xpi/firefox-i18n-17.0.5/zu.xpi) = b63cdc27afda7be4904b7ca11672bb35d55570198e3a79527f79e502a51a99cd
+SIZE (xpi/firefox-i18n-17.0.5/zu.xpi) = 296595
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index da40cc596a8c..11ea136f1cd0 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 17.0.4
+DISTVERSION= 17.0.5
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
@@ -56,17 +56,6 @@ OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/OSS/ALSA/}
WRKSRC:= ${WRKDIR}/mozilla-esr17
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if ${PORT_OPTIONS:MPGO}
USE_GCC?= any
USE_DISPLAY= yes
diff --git a/www/firefox-esr/distinfo b/www/firefox-esr/distinfo
index 43d0e1f70c5c..e50832525115 100644
--- a/www/firefox-esr/distinfo
+++ b/www/firefox-esr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-17.0.4esr.source.tar.bz2) = a3ffa72ac0554fc76899f3f293fee3e05e073117145c4a80a673207fce4806de
-SIZE (firefox-17.0.4esr.source.tar.bz2) = 90791964
+SHA256 (firefox-17.0.5esr.source.tar.bz2) = ba2cb1c1bf747190dceb71a31a187811c9c6fc1da56c9a9db70cfd5a1780eb14
+SIZE (firefox-17.0.5esr.source.tar.bz2) = 91105421
diff --git a/www/firefox-esr/files/patch-bug753046 b/www/firefox-esr/files/patch-bug753046
index c5ecdbd8af1b..3d99258b8323 100644
--- a/www/firefox-esr/files/patch-bug753046
+++ b/www/firefox-esr/files/patch-bug753046
@@ -460,7 +460,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,16 +9,30 @@
+@@ -9,16 +9,24 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -474,13 +474,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
-#include <pthread_np.h>
+#elif defined(OS_FREEBSD)
+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
#endif
+
+#if !defined(OS_MACOSX)
diff --git a/www/firefox-esr/files/patch-bug810716 b/www/firefox-esr/files/patch-bug810716
new file mode 100644
index 000000000000..8c08e9a66986
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug810716
@@ -0,0 +1,68 @@
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- configure.in
++++ configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
+index e828beb..6444246 100644
+--- extensions/auth/nsAuthGSSAPI.cpp
++++ extensions/auth/nsAuthGSSAPI.cpp
+@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
+ #endif
+
+ #if defined(HAVE_RES_NINIT)
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ #endif
+
+diff --git js/src/configure.in js/src/configure.in
+index e25f569..b9722f9 100644
+--- js/src/configure.in
++++ js/src/configure.in
+@@ -2797,14 +2797,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
diff --git a/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp b/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp
deleted file mode 100644
index bd0f0d4963db..000000000000
--- a/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- content/media/nsAudioStream.cpp~
-+++ content/media/nsAudioStream.cpp
-@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
- gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nsnull));
- }
- } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
-+#if defined(__FreeBSD__) && __FreeBSD_version < 800097
-+ bool value = Preferences::GetBool(aPref, false);
-+#else
- bool value = Preferences::GetBool(aPref, true);
-+#endif
- mozilla::MutexAutoLock lock(*gAudioPrefsLock);
- gUseCubeb = value;
- } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {
diff --git a/www/firefox-esr/files/patch-js-src-js-confdefs.h.in b/www/firefox-esr/files/patch-js-src-js-confdefs.h.in
deleted file mode 100644
index cb032237b2cc..000000000000
--- a/www/firefox-esr/files/patch-js-src-js-confdefs.h.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- js/src/js-confdefs.h.in~
-+++ js/src/js-confdefs.h.in
-@@ -12,6 +12,7 @@
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/www/firefox-esr/pkg-message b/www/firefox-esr/pkg-message
index b282c9ce33a1..33841ae90f29 100644
--- a/www/firefox-esr/pkg-message
+++ b/www/firefox-esr/pkg-message
@@ -17,7 +17,7 @@ The SSH server on remote_host must allow pub key authentication.
Firefox and HTML5
Certain functions used to display HTML5 elements need the sem module
-on 7.x and 8.x releases.
+only on 8.x releases.
If your Firefox crashes with the following message while viewing a
HTML5 page:
diff --git a/www/firefox-i18n/Makefile b/www/firefox-i18n/Makefile
index b30547e80af1..8e12aa68a0bd 100644
--- a/www/firefox-i18n/Makefile
+++ b/www/firefox-i18n/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox-i18n
-PORTVERSION= 19.0.2
+PORTVERSION= 20.0
CATEGORIES= www
MASTER_SITE_SUBDIR= firefox/releases/${PORTVERSION}/linux-i686/xpi
PKGNAMEPREFIX=
@@ -14,7 +14,7 @@ COMMENT= Localized interface for Firefox
EXTRACT_DEPENDS= zip:${PORTSDIR}/archivers/zip
-USE_FIREFOX= 19
+USE_FIREFOX= 20
USE_XPI= firefox linux-firefox
USE_SUBMAKE= yes
@@ -50,7 +50,7 @@ pre-everything::
do-extract:
@${MKDIR} ${WRKSRC}
@for lang in ${FIREFOX_I18N_}; do \
- if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\
+ if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\
then \
exit 1; \
fi; \
diff --git a/www/firefox-i18n/distinfo b/www/firefox-i18n/distinfo
index 5cf7588c9bcf..04e02606fa7d 100644
--- a/www/firefox-i18n/distinfo
+++ b/www/firefox-i18n/distinfo
@@ -1,164 +1,164 @@
-SHA256 (xpi/firefox-i18n-19.0.2/af.xpi) = 8786161b560114a797a6b04d7753bb62d111c2e29af4c52edd89b96972c50371
-SIZE (xpi/firefox-i18n-19.0.2/af.xpi) = 293480
-SHA256 (xpi/firefox-i18n-19.0.2/ak.xpi) = f11467975c99150b21c520f8c04b0361d8b18c02c36bff4d69d5b894e5c89dcd
-SIZE (xpi/firefox-i18n-19.0.2/ak.xpi) = 296795
-SHA256 (xpi/firefox-i18n-19.0.2/ar.xpi) = 19aaa7db154c0e38711a7be29a5f39f8f878cd94b8b1e35b5c29ccdffde1044c
-SIZE (xpi/firefox-i18n-19.0.2/ar.xpi) = 324466
-SHA256 (xpi/firefox-i18n-19.0.2/ast.xpi) = 5f66f20c20570269c7ddca82605abe714194ddc5ff1146c20e42d7804efb483e
-SIZE (xpi/firefox-i18n-19.0.2/ast.xpi) = 269699
-SHA256 (xpi/firefox-i18n-19.0.2/be.xpi) = 8f4df614850bf6a5e52b03e34498abccb91ebf6c088b597e0cf1cf6c78ba0453
-SIZE (xpi/firefox-i18n-19.0.2/be.xpi) = 287724
-SHA256 (xpi/firefox-i18n-19.0.2/bg.xpi) = be2d88a5e1f2edff074863e7a9a182cba0549cc4e1d2b4db82af92e559f54231
-SIZE (xpi/firefox-i18n-19.0.2/bg.xpi) = 341211
-SHA256 (xpi/firefox-i18n-19.0.2/bn-BD.xpi) = 33f49b5f391a39447459db087b19ba92cdc204125d6d8cfa2118bbff95eae875
-SIZE (xpi/firefox-i18n-19.0.2/bn-BD.xpi) = 354719
-SHA256 (xpi/firefox-i18n-19.0.2/bn-IN.xpi) = 8c863f4b266e4d1e2935e39072237fec2f42aa542d4d73fcb773c1ce5d0a69f5
-SIZE (xpi/firefox-i18n-19.0.2/bn-IN.xpi) = 386851
-SHA256 (xpi/firefox-i18n-19.0.2/br.xpi) = 26edaff0842e5697266aad796306ed8ccd9c36ac6c63df68e7b202203d9313c1
-SIZE (xpi/firefox-i18n-19.0.2/br.xpi) = 302696
-SHA256 (xpi/firefox-i18n-19.0.2/bs.xpi) = 107c480de49f82502a433a9e7d5ae5e063df496414d37739de0a6d31c62023f8
-SIZE (xpi/firefox-i18n-19.0.2/bs.xpi) = 298729
-SHA256 (xpi/firefox-i18n-19.0.2/ca.xpi) = 72fb151a507b028e760bdc3f2991ff5516cddb052c9f2abfad6b90727947a755
-SIZE (xpi/firefox-i18n-19.0.2/ca.xpi) = 305631
-SHA256 (xpi/firefox-i18n-19.0.2/cs.xpi) = 4faa9652d8ea853f98418445fb22d26d80980537b3044fefd18e66d1ee5609b4
-SIZE (xpi/firefox-i18n-19.0.2/cs.xpi) = 304697
-SHA256 (xpi/firefox-i18n-19.0.2/cy.xpi) = 05264e3a771c2479f82a1c3d5410c3f49647ca4d365ced30de799785127a4bdb
-SIZE (xpi/firefox-i18n-19.0.2/cy.xpi) = 297430
-SHA256 (xpi/firefox-i18n-19.0.2/da.xpi) = 1016a9c44554be5042344a7757dfecfdad0131647dac5a37d386043da2194407
-SIZE (xpi/firefox-i18n-19.0.2/da.xpi) = 294086
-SHA256 (xpi/firefox-i18n-19.0.2/de.xpi) = 2dd66a0b8dc218004511a743982fb869bcce9e924146fd51d70a3e04aa9f4346
-SIZE (xpi/firefox-i18n-19.0.2/de.xpi) = 284208
-SHA256 (xpi/firefox-i18n-19.0.2/el.xpi) = 308bc74ee28a36faaac256f9d2c0af640d934ed85762135445f47a5955ba1809
-SIZE (xpi/firefox-i18n-19.0.2/el.xpi) = 331441
-SHA256 (xpi/firefox-i18n-19.0.2/en-GB.xpi) = fd07f56725a43706312328efb54dea87f7b995670e5d95912fa60aa5ac560b96
-SIZE (xpi/firefox-i18n-19.0.2/en-GB.xpi) = 283378
-SHA256 (xpi/firefox-i18n-19.0.2/en-US.xpi) = 48669de5c199594925b4e95e620108fc6c269933f75740b92e0bbb54fbf8d873
-SIZE (xpi/firefox-i18n-19.0.2/en-US.xpi) = 284312
-SHA256 (xpi/firefox-i18n-19.0.2/en-ZA.xpi) = dc51f7c4a58784ed7f55e9969742d57abc2e2d08e7288cfecc0c684e6699b5ec
-SIZE (xpi/firefox-i18n-19.0.2/en-ZA.xpi) = 285996
-SHA256 (xpi/firefox-i18n-19.0.2/eo.xpi) = dea67bc22a452eeb407bb67db6f321879378b26fca47fc73e2375f187071cdd3
-SIZE (xpi/firefox-i18n-19.0.2/eo.xpi) = 297645
-SHA256 (xpi/firefox-i18n-19.0.2/es-AR.xpi) = 6c704759f7ee13f9c58dade8a644fdffa80a74eba5666dcdb1abe65a154fac29
-SIZE (xpi/firefox-i18n-19.0.2/es-AR.xpi) = 300309
-SHA256 (xpi/firefox-i18n-19.0.2/es-CL.xpi) = 48c894538cdbb1458b26ec684a2b6ad3b933e37acc513e051fe971dc9c161ad2
-SIZE (xpi/firefox-i18n-19.0.2/es-CL.xpi) = 310182
-SHA256 (xpi/firefox-i18n-19.0.2/es-ES.xpi) = 0ecaf70626a19439003895d0268f8fd40a5e031b4b16bfb5331dc01df257a9e3
-SIZE (xpi/firefox-i18n-19.0.2/es-ES.xpi) = 251867
-SHA256 (xpi/firefox-i18n-19.0.2/es-MX.xpi) = e8da28c64f54030aa1c501944450fcc45a87e2d6422e27eb6d2abb468ba9b07e
-SIZE (xpi/firefox-i18n-19.0.2/es-MX.xpi) = 262700
-SHA256 (xpi/firefox-i18n-19.0.2/et.xpi) = da3fb11e82825b48eae8f10a5f1433b0630e6d7538a1f1cfeab31738c261184f
-SIZE (xpi/firefox-i18n-19.0.2/et.xpi) = 295618
-SHA256 (xpi/firefox-i18n-19.0.2/eu.xpi) = d840d85cf9fab1a78955d1176e206f472b921207e913332a7d16c59d0036e6cf
-SIZE (xpi/firefox-i18n-19.0.2/eu.xpi) = 296324
-SHA256 (xpi/firefox-i18n-19.0.2/fa.xpi) = b5ad8aad1a1955f0b25cc93a7b19ee1e99bbfe3326883d00732e988ec69d0ed8
-SIZE (xpi/firefox-i18n-19.0.2/fa.xpi) = 333057
-SHA256 (xpi/firefox-i18n-19.0.2/fi.xpi) = f87f7f3cd8968818bc41e29a5e27d5cbe1e1a81da03323b780435d1610f04f74
-SIZE (xpi/firefox-i18n-19.0.2/fi.xpi) = 301417
-SHA256 (xpi/firefox-i18n-19.0.2/fr.xpi) = 5f1c1b1d1191e67704993a410170904a160166508f6324dcb1ec546be787c042
-SIZE (xpi/firefox-i18n-19.0.2/fr.xpi) = 304706
-SHA256 (xpi/firefox-i18n-19.0.2/fy-NL.xpi) = 0aa97a5f8749459766c74e9d839db4c7f7e69152b1029fc12d9828c227adc97c
-SIZE (xpi/firefox-i18n-19.0.2/fy-NL.xpi) = 301155
-SHA256 (xpi/firefox-i18n-19.0.2/ga-IE.xpi) = d7019c744e7f9d265629b28b4850bf482e8aff597e8077c2dc4189e045ea8557
-SIZE (xpi/firefox-i18n-19.0.2/ga-IE.xpi) = 311074
-SHA256 (xpi/firefox-i18n-19.0.2/gl.xpi) = a8d6a5e0c6e4390c2bc831fd657b388d2c4010f72fb1861efc0a04bad9fa297e
-SIZE (xpi/firefox-i18n-19.0.2/gl.xpi) = 297732
-SHA256 (xpi/firefox-i18n-19.0.2/gu-IN.xpi) = 7695f5b4323947875ed27932fc4916697bf5e52ebc0532786d84e5c59f8f346e
-SIZE (xpi/firefox-i18n-19.0.2/gu-IN.xpi) = 334029
-SHA256 (xpi/firefox-i18n-19.0.2/he.xpi) = 36dcdee4f67a7f4fdd4edc1a65b37085648510917d70863216a7fa0cc93b7bf8
-SIZE (xpi/firefox-i18n-19.0.2/he.xpi) = 315415
-SHA256 (xpi/firefox-i18n-19.0.2/hi-IN.xpi) = 974eda65fc471ad3c327c4bdc4fc3fb035dd19c56f568ac150ef8b2e7bf38775
-SIZE (xpi/firefox-i18n-19.0.2/hi-IN.xpi) = 345262
-SHA256 (xpi/firefox-i18n-19.0.2/hr.xpi) = 04610cccbda1674ab2597f3edbcb29337d31c7964b503edbb3967657c1242eed
-SIZE (xpi/firefox-i18n-19.0.2/hr.xpi) = 299018
-SHA256 (xpi/firefox-i18n-19.0.2/hu.xpi) = cf91711f0279056d189e29a525a90084441f480c9000495dcbd1e499a4790960
-SIZE (xpi/firefox-i18n-19.0.2/hu.xpi) = 315578
-SHA256 (xpi/firefox-i18n-19.0.2/hy-AM.xpi) = d41e3ea84d7a7894262145fe981c0241932f0cfe681daeeb89ac4c992f173e2a
-SIZE (xpi/firefox-i18n-19.0.2/hy-AM.xpi) = 341821
-SHA256 (xpi/firefox-i18n-19.0.2/id.xpi) = 61b1e51e13e629e054573c019e57fc7ce72ad2e42612382bcc07fe350d0c8ecd
-SIZE (xpi/firefox-i18n-19.0.2/id.xpi) = 292472
-SHA256 (xpi/firefox-i18n-19.0.2/is.xpi) = be0e3f28d1d115ae8740847f83c25c9f8d578804f69d37d279137609b6fb2159
-SIZE (xpi/firefox-i18n-19.0.2/is.xpi) = 297284
-SHA256 (xpi/firefox-i18n-19.0.2/it.xpi) = d9a38a846b36ba490162a9e28c7507266b7a5707f3a840e026d4ed840c21920e
-SIZE (xpi/firefox-i18n-19.0.2/it.xpi) = 247778
-SHA256 (xpi/firefox-i18n-19.0.2/ja.xpi) = 20fa9f703f7a7ff51bad50c468277b436689198f5113c85a510b931f2a32c5fc
-SIZE (xpi/firefox-i18n-19.0.2/ja.xpi) = 335904
-SHA256 (xpi/firefox-i18n-19.0.2/kk.xpi) = 18e764a97a5520c4d31954a7ccde7caf3a17d1010dc09155d71de9d91a154cf1
-SIZE (xpi/firefox-i18n-19.0.2/kk.xpi) = 341872
-SHA256 (xpi/firefox-i18n-19.0.2/kn.xpi) = a26f0d054bf45c1e53cb446247daee9640478e6533b43edb65bb9c59cca5a6ab
-SIZE (xpi/firefox-i18n-19.0.2/kn.xpi) = 368747
-SHA256 (xpi/firefox-i18n-19.0.2/ko.xpi) = db54c16cfaaa87e3adb4253a047523b68eb82f19bb82a35562da2c23b0077e1d
-SIZE (xpi/firefox-i18n-19.0.2/ko.xpi) = 308895
-SHA256 (xpi/firefox-i18n-19.0.2/ku.xpi) = f464dc4097d84724510e07aed6819a7d067566db8966530d3c51a69b2f178279
-SIZE (xpi/firefox-i18n-19.0.2/ku.xpi) = 317700
-SHA256 (xpi/firefox-i18n-19.0.2/lg.xpi) = 8b73d2a3da814e99061e5973861f43ca4351e0327efd68eae585cca9a3cc5e1c
-SIZE (xpi/firefox-i18n-19.0.2/lg.xpi) = 304559
-SHA256 (xpi/firefox-i18n-19.0.2/lt.xpi) = 872892e48c493867e8d92732740318d205399427e4800b48c4184d8cb28b3091
-SIZE (xpi/firefox-i18n-19.0.2/lt.xpi) = 315942
-SHA256 (xpi/firefox-i18n-19.0.2/lv.xpi) = b7543a8de5a15264eadfa8fad6fa3704bc93ef34660fa8b426c5eef8e745d35c
-SIZE (xpi/firefox-i18n-19.0.2/lv.xpi) = 296144
-SHA256 (xpi/firefox-i18n-19.0.2/mai.xpi) = 21f1c276d14dcb82ed42702ae12c032dddeaeb663aba0576b572828a7499d4c0
-SIZE (xpi/firefox-i18n-19.0.2/mai.xpi) = 342111
-SHA256 (xpi/firefox-i18n-19.0.2/mk.xpi) = 61b238c101ca4af6cd1d3724b4aca8d52d6c68ed0ee4a72985606d07c0024558
-SIZE (xpi/firefox-i18n-19.0.2/mk.xpi) = 327846
-SHA256 (xpi/firefox-i18n-19.0.2/ml.xpi) = c6831841aa10f5811a441600a7feca183dfde7ac1a075a8474340d57836fb6b3
-SIZE (xpi/firefox-i18n-19.0.2/ml.xpi) = 375911
-SHA256 (xpi/firefox-i18n-19.0.2/mr.xpi) = 74eb27538f970b15e8e06ec474631799d4bdea281e1d0c7d3758347a757effc6
-SIZE (xpi/firefox-i18n-19.0.2/mr.xpi) = 342900
-SHA256 (xpi/firefox-i18n-19.0.2/nb-NO.xpi) = 16a737b5e09814248a591351694c99a42521938920ba64079f3a88e9767eea4b
-SIZE (xpi/firefox-i18n-19.0.2/nb-NO.xpi) = 296250
-SHA256 (xpi/firefox-i18n-19.0.2/nl.xpi) = f9fea52f631bdb9cf370f9d25183fc5db4a3b026d81d25b79695a9a9c93714ba
-SIZE (xpi/firefox-i18n-19.0.2/nl.xpi) = 297333
-SHA256 (xpi/firefox-i18n-19.0.2/nn-NO.xpi) = d2b686450c6eacf5469d19205204b26602624f309b6c4c93d0a94d4458414346
-SIZE (xpi/firefox-i18n-19.0.2/nn-NO.xpi) = 301552
-SHA256 (xpi/firefox-i18n-19.0.2/nso.xpi) = 53da11545e00a4b78be94f9742b649fa59ac5f9d2f391a8cc05940fa9abade2f
-SIZE (xpi/firefox-i18n-19.0.2/nso.xpi) = 302143
-SHA256 (xpi/firefox-i18n-19.0.2/or.xpi) = f27b6d1f774abf4fa6789510a532c4af23cba8f28c3cce892c26ed0c8aee2596
-SIZE (xpi/firefox-i18n-19.0.2/or.xpi) = 344152
-SHA256 (xpi/firefox-i18n-19.0.2/pa-IN.xpi) = 682ce39c4898f960cdd04ec2ced08f63f3db785862251575358e6f345c82d30d
-SIZE (xpi/firefox-i18n-19.0.2/pa-IN.xpi) = 332279
-SHA256 (xpi/firefox-i18n-19.0.2/pl.xpi) = cc5ae32296885a89e14c1854ceaf5905a235321a18d405b5cc61964614c2b6f7
-SIZE (xpi/firefox-i18n-19.0.2/pl.xpi) = 308691
-SHA256 (xpi/firefox-i18n-19.0.2/pt-BR.xpi) = db3ef359925739d546245f06a40930e49fe114dc716174ac306e02e5042c5508
-SIZE (xpi/firefox-i18n-19.0.2/pt-BR.xpi) = 302351
-SHA256 (xpi/firefox-i18n-19.0.2/pt-PT.xpi) = c4d429247b5d4739ec9dff4fab9c48a1877d794e23bcdaaec6fa81febfe15c87
-SIZE (xpi/firefox-i18n-19.0.2/pt-PT.xpi) = 303166
-SHA256 (xpi/firefox-i18n-19.0.2/rm.xpi) = 8e0e13372eb6ec05b63c6dcf40a526222b22547edcdd1672a14803db4c350da4
-SIZE (xpi/firefox-i18n-19.0.2/rm.xpi) = 299336
-SHA256 (xpi/firefox-i18n-19.0.2/ro.xpi) = 3f3668b1afeb6cb60a38196c52afaa5e93b4cd2d130774caf8e8553ae43f4835
-SIZE (xpi/firefox-i18n-19.0.2/ro.xpi) = 324144
-SHA256 (xpi/firefox-i18n-19.0.2/ru.xpi) = be3d464ff79f4fb9839ead7dfd5df700ba72971fd1fcc91df8242c4ebfea0720
-SIZE (xpi/firefox-i18n-19.0.2/ru.xpi) = 294933
-SHA256 (xpi/firefox-i18n-19.0.2/si.xpi) = dc6f2ff847959834d8adb71b1c2abf895eecee6dfd4443fe084abef9a5603c01
-SIZE (xpi/firefox-i18n-19.0.2/si.xpi) = 331553
-SHA256 (xpi/firefox-i18n-19.0.2/sk.xpi) = 20495f29f3b03bec5513ed5f6bcee6ca295f7dcbfb5075b6b54a5c3c6606837a
-SIZE (xpi/firefox-i18n-19.0.2/sk.xpi) = 312848
-SHA256 (xpi/firefox-i18n-19.0.2/sl.xpi) = 02fb65724d8aca3db0fbb08fcd3f7a06e81a719c12e7dea841257f3391293b91
-SIZE (xpi/firefox-i18n-19.0.2/sl.xpi) = 295535
-SHA256 (xpi/firefox-i18n-19.0.2/son.xpi) = 9b40e65bd3ae4bd360b9be9fe89faf3865a3e99875f1dffa9cec668dbfce52b6
-SIZE (xpi/firefox-i18n-19.0.2/son.xpi) = 297377
-SHA256 (xpi/firefox-i18n-19.0.2/sq.xpi) = 14faa8da0cf25d632c1fb7923c1e6a1fad163b8536213fedc3779c8000d88be1
-SIZE (xpi/firefox-i18n-19.0.2/sq.xpi) = 304123
-SHA256 (xpi/firefox-i18n-19.0.2/sr.xpi) = a20c33241c4f5b408fffdfa31c7151d3f8383eb382ff556f3fc6011dd80fc628
-SIZE (xpi/firefox-i18n-19.0.2/sr.xpi) = 347553
-SHA256 (xpi/firefox-i18n-19.0.2/sv-SE.xpi) = ff1d75c7cd05a5750687d5b246298ed3d64cd284c5947dabd9ba44035eb9bf3f
-SIZE (xpi/firefox-i18n-19.0.2/sv-SE.xpi) = 299878
-SHA256 (xpi/firefox-i18n-19.0.2/ta-LK.xpi) = cb987227bef3fd36e12555221d24d5d36f425f652d9c4307da44f65847aa0d1c
-SIZE (xpi/firefox-i18n-19.0.2/ta-LK.xpi) = 353089
-SHA256 (xpi/firefox-i18n-19.0.2/ta.xpi) = dd17fcabc8c2af975a423b94e315c607ba7e9d90e019dfd182e33c86e0281e39
-SIZE (xpi/firefox-i18n-19.0.2/ta.xpi) = 338036
-SHA256 (xpi/firefox-i18n-19.0.2/te.xpi) = 29167f2f5e13cdd129a38e840cb4bd85aa2c1a788a08059546af7b3a6017f272
-SIZE (xpi/firefox-i18n-19.0.2/te.xpi) = 353258
-SHA256 (xpi/firefox-i18n-19.0.2/th.xpi) = 2de3617c4c5609454524be31f6ac6595ac99fc419902641ab1c4f2237b6f6ee0
-SIZE (xpi/firefox-i18n-19.0.2/th.xpi) = 337188
-SHA256 (xpi/firefox-i18n-19.0.2/tr.xpi) = 8adc8faa636bf3754799fb2deb72fb0aa76bcec397593a424bc41fa7c31bacd0
-SIZE (xpi/firefox-i18n-19.0.2/tr.xpi) = 307542
-SHA256 (xpi/firefox-i18n-19.0.2/uk.xpi) = 07f9282873596a64d16e73cda9640a5f9b8245d9c76c624b1178d6482ee716d0
-SIZE (xpi/firefox-i18n-19.0.2/uk.xpi) = 338323
-SHA256 (xpi/firefox-i18n-19.0.2/vi.xpi) = ba733ddf714395e633619d8c1e25710fb25cfd9168e2a1dc88a14b3b8f65ea25
-SIZE (xpi/firefox-i18n-19.0.2/vi.xpi) = 320835
-SHA256 (xpi/firefox-i18n-19.0.2/zh-CN.xpi) = 1d39ca2d1a1d14ebd50d6cbb3a3d74b2cd1041d93d21b71c4114a712f884def7
-SIZE (xpi/firefox-i18n-19.0.2/zh-CN.xpi) = 317961
-SHA256 (xpi/firefox-i18n-19.0.2/zh-TW.xpi) = 4b6b2acd1f382ebb1fb7711645c62ca959298e340b4a77e8dff3bb8ca68c61fb
-SIZE (xpi/firefox-i18n-19.0.2/zh-TW.xpi) = 318476
-SHA256 (xpi/firefox-i18n-19.0.2/zu.xpi) = 077a6e1c86de15763a819ac94e706f5ed071c52ba63e1986ba62b86e6a40d6be
-SIZE (xpi/firefox-i18n-19.0.2/zu.xpi) = 309496
+SHA256 (xpi/firefox-i18n-20.0/af.xpi) = a522041ef9e9c49cef1946df57a3076a14c9b10b907c96c021448d7f3303e96c
+SIZE (xpi/firefox-i18n-20.0/af.xpi) = 301043
+SHA256 (xpi/firefox-i18n-20.0/ak.xpi) = 61eeb234a1f8b6e4eb8f7c41f29a0b194884a67bef251b84658866b6d1fa7cba
+SIZE (xpi/firefox-i18n-20.0/ak.xpi) = 303972
+SHA256 (xpi/firefox-i18n-20.0/ar.xpi) = 33719f597e65c789511e80c5dbaeb4b09dcdd543e3c6c5104530ea81c94d43ab
+SIZE (xpi/firefox-i18n-20.0/ar.xpi) = 329939
+SHA256 (xpi/firefox-i18n-20.0/ast.xpi) = 1c8bc7934b97e46549f5f7eecba674d828ee7f02598f17d85b1ac9b671c80fc7
+SIZE (xpi/firefox-i18n-20.0/ast.xpi) = 274309
+SHA256 (xpi/firefox-i18n-20.0/be.xpi) = 9d527c2b61c173d145ec702cd0a511880971ef9509c5eac4fb80dde3905e9592
+SIZE (xpi/firefox-i18n-20.0/be.xpi) = 293092
+SHA256 (xpi/firefox-i18n-20.0/bg.xpi) = f894f87bbd9c9f1129c3178e1b5247e23fff0a8030da2789858302fe94405e7c
+SIZE (xpi/firefox-i18n-20.0/bg.xpi) = 348239
+SHA256 (xpi/firefox-i18n-20.0/bn-BD.xpi) = 84d5670ac1ec51191f497c824d53c5414e5b6b0ba2afa3fc5dc7f0c50a540cd9
+SIZE (xpi/firefox-i18n-20.0/bn-BD.xpi) = 362515
+SHA256 (xpi/firefox-i18n-20.0/bn-IN.xpi) = 7cba49b2703d08b3025d914a4d50a13671e4c327e9aafee8e1b203a58dcdf227
+SIZE (xpi/firefox-i18n-20.0/bn-IN.xpi) = 393934
+SHA256 (xpi/firefox-i18n-20.0/br.xpi) = 8a93cb226257dcdd13ed2de6e7b577f377fbacd60866b33bec125dbbf36c3af3
+SIZE (xpi/firefox-i18n-20.0/br.xpi) = 308303
+SHA256 (xpi/firefox-i18n-20.0/bs.xpi) = 485593959891f92ea0e5f0f5d1b1388a9c0404d1842c473ce3f1d36d5b6570fa
+SIZE (xpi/firefox-i18n-20.0/bs.xpi) = 304338
+SHA256 (xpi/firefox-i18n-20.0/ca.xpi) = e9da45497f6e5d53a2a33c16b21f51cf13a03d73ab84a6181687db2689674fe8
+SIZE (xpi/firefox-i18n-20.0/ca.xpi) = 310833
+SHA256 (xpi/firefox-i18n-20.0/cs.xpi) = 06475ac5be519fc502a1f8b018cec66f1b3bcb5c52f7af56776a317838d826ac
+SIZE (xpi/firefox-i18n-20.0/cs.xpi) = 310126
+SHA256 (xpi/firefox-i18n-20.0/cy.xpi) = a3d07d5b7bd3a4e0894f999d1cfad1f8c442490af0077561893354e3e73144e8
+SIZE (xpi/firefox-i18n-20.0/cy.xpi) = 302580
+SHA256 (xpi/firefox-i18n-20.0/da.xpi) = d9f3de69ca3164901ef0bb9108f7bcaac24bf72803779ab1448b4b66a6a86052
+SIZE (xpi/firefox-i18n-20.0/da.xpi) = 299834
+SHA256 (xpi/firefox-i18n-20.0/de.xpi) = 96469d35bb5c2d108a591d5ac00d115976be600754491b40ae4373b4abcbe479
+SIZE (xpi/firefox-i18n-20.0/de.xpi) = 292091
+SHA256 (xpi/firefox-i18n-20.0/el.xpi) = b198bd88d25cf2591f0abaa00ac39eddb9de30650622147f46db12802f08a53b
+SIZE (xpi/firefox-i18n-20.0/el.xpi) = 336878
+SHA256 (xpi/firefox-i18n-20.0/en-GB.xpi) = 4b24201b8428eda9d9015958fcbf8836c3520cf8716f884477c9c920d806d901
+SIZE (xpi/firefox-i18n-20.0/en-GB.xpi) = 288530
+SHA256 (xpi/firefox-i18n-20.0/en-US.xpi) = 0a3073caa3f67c3d8f05c2c5a12a860403b7611060ea36be4ba5eca22785f2be
+SIZE (xpi/firefox-i18n-20.0/en-US.xpi) = 289249
+SHA256 (xpi/firefox-i18n-20.0/en-ZA.xpi) = 8baf2ddf3686d897d8d05f23bf9243bcc17c37a746cd9ebadc7b1c4b086c48e1
+SIZE (xpi/firefox-i18n-20.0/en-ZA.xpi) = 289445
+SHA256 (xpi/firefox-i18n-20.0/eo.xpi) = b64086feef439656fafff187ebab91b9f55dfcb9bdfc91b2b180424bedbbb715
+SIZE (xpi/firefox-i18n-20.0/eo.xpi) = 302967
+SHA256 (xpi/firefox-i18n-20.0/es-AR.xpi) = 7448775f99f10787bd9e4b1ab94f1cab8bd9d59496059085b12891385495c7fe
+SIZE (xpi/firefox-i18n-20.0/es-AR.xpi) = 305557
+SHA256 (xpi/firefox-i18n-20.0/es-CL.xpi) = a6d38cef0a6caa267e921eed54650cadb70e80e438b83a61818310aac54c8fc7
+SIZE (xpi/firefox-i18n-20.0/es-CL.xpi) = 306524
+SHA256 (xpi/firefox-i18n-20.0/es-ES.xpi) = 7cd440f048386422093da60a3900817c5f0cff544bc5175585bcc8df541ab35e
+SIZE (xpi/firefox-i18n-20.0/es-ES.xpi) = 256497
+SHA256 (xpi/firefox-i18n-20.0/es-MX.xpi) = 2027211294090fb44d9a2703fc6775f155aa641dd89239eb9cba331f288ea6fb
+SIZE (xpi/firefox-i18n-20.0/es-MX.xpi) = 270358
+SHA256 (xpi/firefox-i18n-20.0/et.xpi) = be1c3de232a4c85b0eca675c6ae06c6bdf1754c2401346fc67c7f0f190d35e4a
+SIZE (xpi/firefox-i18n-20.0/et.xpi) = 300695
+SHA256 (xpi/firefox-i18n-20.0/eu.xpi) = 55171971fd5ad66d2d732c15d16a1df0521a0dcb6b1e98b1e97d2ec85e786f9e
+SIZE (xpi/firefox-i18n-20.0/eu.xpi) = 301606
+SHA256 (xpi/firefox-i18n-20.0/fa.xpi) = b540af8e6dddcaa94158a9bfb29c7a5dab37a8739d6e01e02defa1a775ae3869
+SIZE (xpi/firefox-i18n-20.0/fa.xpi) = 340391
+SHA256 (xpi/firefox-i18n-20.0/fi.xpi) = ebe0fa4d72859c5c008a63e4cca59d62e93117a4250366363c55cb7f1d403c19
+SIZE (xpi/firefox-i18n-20.0/fi.xpi) = 305263
+SHA256 (xpi/firefox-i18n-20.0/fr.xpi) = 225633c5978a30d6ac88a34888c1cb050c06247d1cb27c063542d5c6777aca8a
+SIZE (xpi/firefox-i18n-20.0/fr.xpi) = 310354
+SHA256 (xpi/firefox-i18n-20.0/fy-NL.xpi) = 024677f3d994ce2f5b0695d30106e071cd87e45aa9e42fe78ce10ba9cef6767e
+SIZE (xpi/firefox-i18n-20.0/fy-NL.xpi) = 306664
+SHA256 (xpi/firefox-i18n-20.0/ga-IE.xpi) = c81264faab863b19c44a5fff86c211fa74e8c02c95c4704416d6d51d8d131af2
+SIZE (xpi/firefox-i18n-20.0/ga-IE.xpi) = 314804
+SHA256 (xpi/firefox-i18n-20.0/gl.xpi) = bb94c16c221116805c6ad2d5d33755065a33fda37e6614f45ac17280dd3d6080
+SIZE (xpi/firefox-i18n-20.0/gl.xpi) = 303465
+SHA256 (xpi/firefox-i18n-20.0/gu-IN.xpi) = 2e661f6336350a12fcb7a35628bb842a4138f7bac8b50130059bb990eff5e180
+SIZE (xpi/firefox-i18n-20.0/gu-IN.xpi) = 341185
+SHA256 (xpi/firefox-i18n-20.0/he.xpi) = 25a1dd9f5079826b63123a1434be33d8b1d3510e332d9604ca3f97f047c239d8
+SIZE (xpi/firefox-i18n-20.0/he.xpi) = 322693
+SHA256 (xpi/firefox-i18n-20.0/hi-IN.xpi) = c8ad4189bc5dbed40e2a7bbbedc07ac5a03e3a4541b5f8aa584a17b63a3c9eb1
+SIZE (xpi/firefox-i18n-20.0/hi-IN.xpi) = 352528
+SHA256 (xpi/firefox-i18n-20.0/hr.xpi) = 48defce8c99b0444c4e147851c65e6a458d7f63c9c5a5c9bd221334f4fb3ae91
+SIZE (xpi/firefox-i18n-20.0/hr.xpi) = 304835
+SHA256 (xpi/firefox-i18n-20.0/hu.xpi) = bc535ab1a1dd622ae7a066242993a34e1083fc4f144b9d492ba41a2858b4fec4
+SIZE (xpi/firefox-i18n-20.0/hu.xpi) = 318361
+SHA256 (xpi/firefox-i18n-20.0/hy-AM.xpi) = b5241cad70c5970011887947f56cff38209f4f73de28404f93d0eef963291215
+SIZE (xpi/firefox-i18n-20.0/hy-AM.xpi) = 348777
+SHA256 (xpi/firefox-i18n-20.0/id.xpi) = e3665b5036cf4366631b70f281234008bd93610cdd16a8d2335fc59b77638dd9
+SIZE (xpi/firefox-i18n-20.0/id.xpi) = 297915
+SHA256 (xpi/firefox-i18n-20.0/is.xpi) = dfd109b41a46435cc488646fd759dc61b5b7e5cd55c77cc08174df07576019a9
+SIZE (xpi/firefox-i18n-20.0/is.xpi) = 302423
+SHA256 (xpi/firefox-i18n-20.0/it.xpi) = 02fdc8c7fc9498e6d599dedf267c458777325a3a7e2a0d1feb9f7b0eb7b327ed
+SIZE (xpi/firefox-i18n-20.0/it.xpi) = 252427
+SHA256 (xpi/firefox-i18n-20.0/ja.xpi) = 12cea77dd72a6e8648b758ac75082a72146ed56a57a54f535c89e6f18382d921
+SIZE (xpi/firefox-i18n-20.0/ja.xpi) = 341664
+SHA256 (xpi/firefox-i18n-20.0/kk.xpi) = cfe82a80879a9d32839489d532a036eca87bf2ffe3a025bef1e19662088f77d2
+SIZE (xpi/firefox-i18n-20.0/kk.xpi) = 349637
+SHA256 (xpi/firefox-i18n-20.0/kn.xpi) = 0b573fae4f8de56411ffa464ee93663e8eebaa9772384b7cbd72ae3d2f02e14a
+SIZE (xpi/firefox-i18n-20.0/kn.xpi) = 375789
+SHA256 (xpi/firefox-i18n-20.0/ko.xpi) = 946b66e09cc1265d6ec910252cd49621629edb98341da59462c3e98fed24db9b
+SIZE (xpi/firefox-i18n-20.0/ko.xpi) = 316095
+SHA256 (xpi/firefox-i18n-20.0/ku.xpi) = c295952f19d17da04cef15d09e0cc2665edba4eb666008943ca0151787c1ab6c
+SIZE (xpi/firefox-i18n-20.0/ku.xpi) = 323420
+SHA256 (xpi/firefox-i18n-20.0/lg.xpi) = 2203d502a3bae83dc2d9ff6da1283fda3b21c94796f7e366b8bf7f57be65b298
+SIZE (xpi/firefox-i18n-20.0/lg.xpi) = 311843
+SHA256 (xpi/firefox-i18n-20.0/lt.xpi) = 6e02895414a9009cdb01aec6a495cb54a582c7d558c290b39d43881c422ca125
+SIZE (xpi/firefox-i18n-20.0/lt.xpi) = 321800
+SHA256 (xpi/firefox-i18n-20.0/lv.xpi) = c9546bf7561e3a02f1b0d78d896f3fe7ade1cd066f2b18cc3c41ab1562c75245
+SIZE (xpi/firefox-i18n-20.0/lv.xpi) = 301694
+SHA256 (xpi/firefox-i18n-20.0/mai.xpi) = 6be9c97a29ea9c7d172609f36e9634d80dc59354c29c24ef6b8dd9132347a3ca
+SIZE (xpi/firefox-i18n-20.0/mai.xpi) = 349076
+SHA256 (xpi/firefox-i18n-20.0/mk.xpi) = 72fafb77308e874a4869ceedae5802d51fa7c0814b9c82bc2d3582e175f94451
+SIZE (xpi/firefox-i18n-20.0/mk.xpi) = 335357
+SHA256 (xpi/firefox-i18n-20.0/ml.xpi) = cff18a07174830b3ca22cccdcf1f58da195eb4905396095797da2e4769845539
+SIZE (xpi/firefox-i18n-20.0/ml.xpi) = 382989
+SHA256 (xpi/firefox-i18n-20.0/mr.xpi) = 42b9c731746a37dad0e9d9a62378e21fac20a908dbff2a0a47e802c3720211ab
+SIZE (xpi/firefox-i18n-20.0/mr.xpi) = 350303
+SHA256 (xpi/firefox-i18n-20.0/nb-NO.xpi) = abda55512bd8e0afa1df3b4b1e44b926dab5ccee8bcd604b08e06b554924a355
+SIZE (xpi/firefox-i18n-20.0/nb-NO.xpi) = 301424
+SHA256 (xpi/firefox-i18n-20.0/nl.xpi) = 72f60f291b2384982c1dc59bc96c8ae712d9b9da7aaa0d232c4c09bb46c3be30
+SIZE (xpi/firefox-i18n-20.0/nl.xpi) = 302851
+SHA256 (xpi/firefox-i18n-20.0/nn-NO.xpi) = c530083c19850e9fdd43f4fbce7467b24059f2a5809d8ccd3d3a5a8b206b8cbb
+SIZE (xpi/firefox-i18n-20.0/nn-NO.xpi) = 308530
+SHA256 (xpi/firefox-i18n-20.0/nso.xpi) = 27b442c4fc1102c03389744971fdf75db22b1d753be617cfb6641b12a100d2ee
+SIZE (xpi/firefox-i18n-20.0/nso.xpi) = 309466
+SHA256 (xpi/firefox-i18n-20.0/or.xpi) = 2ca9d95f1a59160036c2a3f16bb25f0ea5838fb53c616f866e9ca5596d09e439
+SIZE (xpi/firefox-i18n-20.0/or.xpi) = 351346
+SHA256 (xpi/firefox-i18n-20.0/pa-IN.xpi) = 32b535bcdced7c55861ff45f5fecaaa3ac6bfca421ad880350dda0d50e8e92d1
+SIZE (xpi/firefox-i18n-20.0/pa-IN.xpi) = 339275
+SHA256 (xpi/firefox-i18n-20.0/pl.xpi) = 2f5538996dcb49d862de7526f26fc483c6e8c733bb952ec56e8487b00ed565f0
+SIZE (xpi/firefox-i18n-20.0/pl.xpi) = 314382
+SHA256 (xpi/firefox-i18n-20.0/pt-BR.xpi) = 9aa385299003121d23bed0b1b6d5d8b0dd02228b0b54884ff48fd481a74b66be
+SIZE (xpi/firefox-i18n-20.0/pt-BR.xpi) = 307699
+SHA256 (xpi/firefox-i18n-20.0/pt-PT.xpi) = 97dc71a757268a8b98598476363ac7d76e1654508fbc7918e1f261d799f4db28
+SIZE (xpi/firefox-i18n-20.0/pt-PT.xpi) = 307007
+SHA256 (xpi/firefox-i18n-20.0/rm.xpi) = 33a2099dbf973400284a35acc6b06d81dbc1cc2c0ed2969a65af1108c0047b5a
+SIZE (xpi/firefox-i18n-20.0/rm.xpi) = 305912
+SHA256 (xpi/firefox-i18n-20.0/ro.xpi) = 5e9475677c823e8206dd069fa302fbf77c698d7925d5b6a8327c99acacd0e665
+SIZE (xpi/firefox-i18n-20.0/ro.xpi) = 331344
+SHA256 (xpi/firefox-i18n-20.0/ru.xpi) = 3a18b0e2c0e5ec804bd6a126470dc51d8e97d73c48215b63d37c496c680b0b90
+SIZE (xpi/firefox-i18n-20.0/ru.xpi) = 300314
+SHA256 (xpi/firefox-i18n-20.0/si.xpi) = f6cdbf89caa243eef8db42fe856ecf85ecf9c6def9c12e36ca6602cf6c540d30
+SIZE (xpi/firefox-i18n-20.0/si.xpi) = 338417
+SHA256 (xpi/firefox-i18n-20.0/sk.xpi) = e3bdbb30ab88151467693d745ecdeab38904d7aadc54034a666c13d903394ab1
+SIZE (xpi/firefox-i18n-20.0/sk.xpi) = 318314
+SHA256 (xpi/firefox-i18n-20.0/sl.xpi) = 3856881a6d630d2efcb9a07dc727251754d01df451ba3db59622b6e085c40d0a
+SIZE (xpi/firefox-i18n-20.0/sl.xpi) = 301223
+SHA256 (xpi/firefox-i18n-20.0/son.xpi) = 91487fcc08d45095b1e2e72b3b7b097d1673b5519302b5e57788c7804c31b80e
+SIZE (xpi/firefox-i18n-20.0/son.xpi) = 304376
+SHA256 (xpi/firefox-i18n-20.0/sq.xpi) = 274b43927186e42a3c2d5ccf98c356c42c9058e4f3f8007ab575e5800f9d2dcf
+SIZE (xpi/firefox-i18n-20.0/sq.xpi) = 307903
+SHA256 (xpi/firefox-i18n-20.0/sr.xpi) = d74e3929e87ae2b36999741fb7ea582e812826387c49cc2dff5bfbf4b55e2a91
+SIZE (xpi/firefox-i18n-20.0/sr.xpi) = 354392
+SHA256 (xpi/firefox-i18n-20.0/sv-SE.xpi) = d9ad3fe07fc91bbacdaa70c9e45a379914e8c2df810597d2b33bea53d2eff5d4
+SIZE (xpi/firefox-i18n-20.0/sv-SE.xpi) = 305170
+SHA256 (xpi/firefox-i18n-20.0/ta-LK.xpi) = 34facc00a11f09bd5b71ef74c82e9d9c849fbf43864f6b4fd9d05d27760b5123
+SIZE (xpi/firefox-i18n-20.0/ta-LK.xpi) = 358846
+SHA256 (xpi/firefox-i18n-20.0/ta.xpi) = 92b64517c63600fe8d0257fb67f84faa770d2f3452f5daa7e47b37119767ec1b
+SIZE (xpi/firefox-i18n-20.0/ta.xpi) = 343709
+SHA256 (xpi/firefox-i18n-20.0/te.xpi) = da61353731e39320f06bdd5ece3ce6bf6b37938a58a1c731383528fcab961618
+SIZE (xpi/firefox-i18n-20.0/te.xpi) = 360627
+SHA256 (xpi/firefox-i18n-20.0/th.xpi) = 4f4b5ae4aeda6442f41c1fd8ea0a9ed9a1c98040583fcf96ae1765ec8925530b
+SIZE (xpi/firefox-i18n-20.0/th.xpi) = 343717
+SHA256 (xpi/firefox-i18n-20.0/tr.xpi) = ab458118ead151a6459b91f4cb3f45d95c9fc0f827bdac648254852d5dc6c2fd
+SIZE (xpi/firefox-i18n-20.0/tr.xpi) = 313040
+SHA256 (xpi/firefox-i18n-20.0/uk.xpi) = 77a250d2141c2f4460dc64da0850ce2459de7eac2311a276522866d1bc9d3960
+SIZE (xpi/firefox-i18n-20.0/uk.xpi) = 343123
+SHA256 (xpi/firefox-i18n-20.0/vi.xpi) = c9a6fb8e2fa3a19a0c2cbfeb97065def9214b98c54da14f3c9083778f9b5e71d
+SIZE (xpi/firefox-i18n-20.0/vi.xpi) = 328524
+SHA256 (xpi/firefox-i18n-20.0/zh-CN.xpi) = c8842607e3c310cb5e27d747c37afe516206b131a13dce35b87f83a8c160aee9
+SIZE (xpi/firefox-i18n-20.0/zh-CN.xpi) = 323633
+SHA256 (xpi/firefox-i18n-20.0/zh-TW.xpi) = 3bf89aebde9b63fd5301cbcbff638dc6739d15c1aa819ee98379705f6a2aee63
+SIZE (xpi/firefox-i18n-20.0/zh-TW.xpi) = 324197
+SHA256 (xpi/firefox-i18n-20.0/zu.xpi) = 941b20745d398a90670ac042142fc97fe5b007a5818098c833b830a628580548
+SIZE (xpi/firefox-i18n-20.0/zu.xpi) = 315411
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 23fe43952339..aea6f0c49065 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 19.0.2
+DISTVERSION= 20.0
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
@@ -13,7 +13,7 @@ MAINTAINER= gecko@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
BUILD_DEPENDS= nspr>=4.9.4:${PORTSDIR}/devel/nspr \
- nss>=3.14.1:${PORTSDIR}/security/nss \
+ nss>=3.14.3:${PORTSDIR}/security/nss \
sqlite3>=3.7.14.1:${PORTSDIR}/databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
@@ -57,17 +57,6 @@ OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/OSS/ALSA/}
WRKSRC:= ${WRKDIR}/mozilla-release
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if ${PORT_OPTIONS:MPGO}
USE_GCC?= yes
USE_DISPLAY= yes
@@ -102,6 +91,7 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+ -e '/^SQLITE_VERSION/s/=.*/=3.7.14.1/' \
${WRKSRC}/configure.in
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/browser/app/nsBrowserApp.cpp
diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options
index f4d4f7de1280..61f1dde43ffb 100644
--- a/www/firefox/Makefile.options
+++ b/www/firefox/Makefile.options
@@ -8,6 +8,7 @@ OPTIONS_SINGLE+= AUDIO
OPTIONS_SINGLE_AUDIO= ALSA OSS PULSEAUDIO
ENIGMAIL_DESC?= Enigmail extension
+GIO_DESC?= GIO for file I/O # move to bsd.options.desc.mk
GNOMEUI_DESC?= libgnomeui support module
LIBPROXY_DESC?= Proxy support via libproxy
LIGHTNING_DESC?= Calendar extension
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 8245bff50a5f..268c587b4b92 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-19.0.2.source.tar.bz2) = f6850dbdaf63a67a184b3b23267619750981f291834fe8c04df9cea826a57d71
-SIZE (firefox-19.0.2.source.tar.bz2) = 99155868
+SHA256 (firefox-20.0.source.tar.bz2) = 69818444915d3002a0d15583d47bc86fcf5027b53fab2a8a91ae18a7bfa20577
+SIZE (firefox-20.0.source.tar.bz2) = 100311453
diff --git a/www/firefox/files/patch-alsapulse b/www/firefox/files/patch-alsapulse
deleted file mode 100644
index 6a8bad77fc17..000000000000
--- a/www/firefox/files/patch-alsapulse
+++ /dev/null
@@ -1,122 +0,0 @@
-diff --git configure.in configure.in
-index 5980b76..11f5f77 100644
---- configure.in
-+++ configure.in
-@@ -5618,11 +5618,25 @@ dnl ========================================================
-
- dnl If using sydneyaudio with Linux, ensure that the alsa library is available
- if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+ MOZ_ALSA=1
-+fi
-+
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[ --enable-alsa Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA=)
-+
-+if test -n "$MOZ_ALSA"; then
-+ AC_DEFINE(MOZ_CUBEB)
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
- [echo "$MOZ_ALSA_PKG_ERRORS"
- AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
- fi
-
-+AC_SUBST(MOZ_ALSA)
-+AC_SUBST(MOZ_ALSA_CFLAGS)
-+AC_SUBST(MOZ_ALSA_LIBS)
-+
- dnl ========================================================
- dnl = Enable PulseAudio
- dnl ========================================================
-@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
- AC_SUBST(MOZ_VP8_ENCODER)
- AC_SUBST(MOZ_VP8)
- AC_SUBST(MOZ_OGG)
--AC_SUBST(MOZ_ALSA_LIBS)
--AC_SUBST(MOZ_ALSA_CFLAGS)
- AC_SUBST(VPX_AS)
- AC_SUBST(VPX_ASFLAGS)
- AC_SUBST(VPX_DASH_C_FLAG)
-diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in
-index 5ab4dd8..c8df26f 100644
---- media/libcubeb/src/Makefile.in
-+++ media/libcubeb/src/Makefile.in
-@@ -24,10 +24,6 @@ endif
-
- ifeq ($(OS_TARGET),Android)
- # No Android implementation of libcubeb yet.
--else ifeq ($(OS_TARGET),Linux)
--CSRCS = \
-- cubeb_alsa.c \
-- $(NULL)
- endif
-
- ifeq ($(OS_TARGET),Darwin)
-@@ -42,6 +38,12 @@ CSRCS = \
- $(NULL)
- endif
-
-+ifdef MOZ_ALSA
-+CSRCS = \
-+ cubeb_alsa.c \
-+ $(NULL)
-+endif
-+
- ifdef MOZ_PULSEAUDIO
- CSRCS = \
- cubeb_pulse.c \
-diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
-index 8dda8ce..b19641d 100644
---- media/libsydneyaudio/src/Makefile.in
-+++ media/libsydneyaudio/src/Makefile.in
-@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
- CSRCS = \
- sydney_audio_android.c \
- $(NULL)
--else ifeq ($(OS_ARCH),Linux)
--CSRCS = \
-- sydney_audio_alsa.c \
-- $(NULL)
- endif
-
- ifeq ($(OS_ARCH),WINNT)
-@@ -68,6 +64,18 @@ CSRCS = \
- $(NULL)
- endif
-
-+ifdef MOZ_ALSA
-+CSRCS = \
-+ sydney_audio_alsa.c \
-+ $(NULL)
-+endif
-+
-+ifdef MOZ_PULSEAUDIO
-+CSRCS = \
-+ sydney_audio_pulseaudio.c \
-+ $(NULL)
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += winmm.lib
- endif
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 43384e9..e46a6e3 100644
---- toolkit/library/Makefile.in
-+++ toolkit/library/Makefile.in
-@@ -370,14 +370,11 @@ endif
-
- EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
-
--ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
-+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
-+ifdef MOZ_ALSA
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
--endif
--
- ifdef MOZ_PULSEAUDIO
--ifdef MOZ_CUBEB
- EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
- endif
- endif
diff --git a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
index 2d5190639b79..b8ff70542e0d 100644
--- a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,10 +1,10 @@
--- browser/app/nsBrowserApp.cpp~
+++ browser/app/nsBrowserApp.cpp
-@@ -197,6 +197,7 @@ int main(int argc, char* argv[])
+@@ -334,6 +334,7 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko19:%%LOCALBASE%%/lib/npapi/symlinks/firefox", 0);
- nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
- if (NS_FAILED(rv)) {
- Output("Couldn't calculate the application directory.\n");
+ int gotCounters;
+ #if defined(XP_UNIX)
+ struct rusage initialRUsage;
diff --git a/www/firefox/files/patch-bug780432 b/www/firefox/files/patch-bug780432
new file mode 100644
index 000000000000..076903cdeebc
--- /dev/null
+++ b/www/firefox/files/patch-bug780432
@@ -0,0 +1,17 @@
+diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
+index 8dda8ce..b19641d 100644
+--- media/libsydneyaudio/src/Makefile.in
++++ media/libsydneyaudio/src/Makefile.in
+@@ -68,6 +68,12 @@ ifdef MOZ_ALSA
+ $(NULL)
+ endif
+
++ifdef MOZ_PULSEAUDIO
++CSRCS = \
++ sydney_audio_pulseaudio.c \
++ $(NULL)
++endif
++
+ ifeq ($(OS_ARCH),WINNT)
+ OS_LIBS += winmm.lib
+ endif
diff --git a/www/firefox/files/patch-bug787804 b/www/firefox/files/patch-bug787804
deleted file mode 100644
index fd15771519d9..000000000000
--- a/www/firefox/files/patch-bug787804
+++ /dev/null
@@ -1,3557 +0,0 @@
-commit 74997f1
-Author: Jan Varga <jan.varga@gmail.com>
-Date: Mon Dec 17 20:25:10 2012 +0100
-
- Bug 787804 - Rewrite quota handling (eliminate test_quota.c). r=bent,asuth,vladan
----
- db/sqlite3/README.MOZILLA | 4 +-
- db/sqlite3/src/sqlite.def | 1 +
- db/sqlite3/src/test_quota.c | 2001 --------------------
- db/sqlite3/src/test_quota.h | 274 ---
- dom/Makefile.in | 1 +
- dom/dom-config.mk | 1 +
- dom/file/FileStreamWrappers.cpp | 11 -
- dom/file/LockedFile.cpp | 8 +-
- dom/file/nsIFileStorage.h | 40 +-
- dom/indexedDB/FileManager.cpp | 33 +-
- dom/indexedDB/FileManager.h | 20 +-
- dom/indexedDB/FileStream.cpp | 321 ----
- dom/indexedDB/FileStream.h | 140 --
- dom/indexedDB/IDBDatabase.cpp | 6 +
- dom/indexedDB/IDBFactory.cpp | 28 +-
- dom/indexedDB/IDBFactory.h | 8 +-
- dom/indexedDB/IDBFileHandle.cpp | 25 +-
- dom/indexedDB/IDBObjectStore.cpp | 10 +-
- dom/indexedDB/IDBTransaction.cpp | 3 +-
- dom/indexedDB/IndexedDatabaseInlines.h | 13 +
- dom/indexedDB/IndexedDatabaseManager.cpp | 162 +-
- dom/indexedDB/IndexedDatabaseManager.h | 11 +-
- dom/indexedDB/Makefile.in | 2 -
- dom/indexedDB/OpenDatabaseHelper.cpp | 104 +-
- dom/indexedDB/OpenDatabaseHelper.h | 12 +-
- dom/indexedDB/nsIStandardFileStream.idl | 60 -
- dom/indexedDB/test/Makefile.in | 2 +
- dom/indexedDB/test/file.js | 21 +-
- dom/indexedDB/test/test_file_quota.html | 14 +-
- dom/indexedDB/test/test_filehandle_quota.html | 5 +-
- dom/quota/FileStreams.cpp | 123 ++
- dom/quota/FileStreams.h | 115 ++
- dom/quota/Makefile.in | 33 +
- dom/quota/QuotaCommon.h | 23 +
- dom/quota/QuotaManager.cpp | 294 +++
- dom/quota/QuotaManager.h | 147 ++
- layout/build/Makefile.in | 1 +
- netwerk/base/src/Makefile.in | 1 +
- netwerk/base/src/nsFileStreams.cpp | 103 +-
- netwerk/base/src/nsFileStreams.h | 12 +-
- storage/public/Makefile.in | 1 -
- storage/public/mozIStorageService.idl | 13 +-
- .../public/mozIStorageServiceQuotaManagement.idl | 99 -
- storage/public/storage.h | 1 -
- storage/src/TelemetryVFS.cpp | 35 +-
- storage/src/mozStorageConnection.cpp | 85 +-
- storage/src/mozStorageConnection.h | 27 +-
- storage/src/mozStorageService.cpp | 168 +-
- storage/src/mozStorageService.h | 3 -
- toolkit/toolkit-makefiles.sh | 1 +
- 50 files changed, 1239 insertions(+), 3387 deletions(-)
-
-diff --git dom/Makefile.in dom/Makefile.in
-index 672e065..47cd253 100644
---- dom/Makefile.in
-+++ dom/Makefile.in
-@@ -58,6 +58,7 @@ PARALLEL_DIRS += \
- media \
- messages \
- power \
-+ quota \
- settings \
- sms \
- mms \
-diff --git dom/dom-config.mk dom/dom-config.mk
-index d0f46cc..1cf57ed 100644
---- dom/dom-config.mk
-+++ dom/dom-config.mk
-@@ -8,6 +8,7 @@ DOM_SRCDIRS = \
- dom/encoding \
- dom/file \
- dom/power \
-+ dom/quota \
- dom/media \
- dom/network/src \
- dom/settings \
-diff --git dom/file/FileStreamWrappers.cpp dom/file/FileStreamWrappers.cpp
-index 2283266..c4cf102 100644
---- dom/file/FileStreamWrappers.cpp
-+++ dom/file/FileStreamWrappers.cpp
-@@ -8,7 +8,6 @@
-
- #include "nsIFileStorage.h"
- #include "nsISeekableStream.h"
--#include "nsIStandardFileStream.h"
- #include "mozilla/Attributes.h"
-
- #include "FileHelper.h"
-@@ -246,16 +245,6 @@ FileOutputStreamWrapper::Close()
- nsresult rv = NS_OK;
-
- if (!mFirstTime) {
-- // We must flush buffers of the stream on the same thread on which we wrote
-- // some data.
-- nsCOMPtr<nsIStandardFileStream> sstream = do_QueryInterface(mFileStream);
-- if (sstream) {
-- rv = sstream->FlushBuffers();
-- if (NS_FAILED(rv)) {
-- NS_WARNING("Failed to flush buffers of the stream!");
-- }
-- }
--
- NS_ASSERTION(PR_GetCurrentThread() == mWriteThread,
- "Unsetting thread locals on wrong thread!");
- mFileHelper->mFileStorage->UnsetThreadLocals();
-diff --git dom/file/LockedFile.cpp dom/file/LockedFile.cpp
-index 0fca730..926df91 100644
---- dom/file/LockedFile.cpp
-+++ dom/file/LockedFile.cpp
-@@ -953,10 +953,10 @@ FinishHelper::Run()
- }
-
- for (uint32_t index = 0; index < mParallelStreams.Length(); index++) {
-- nsCOMPtr<nsIOutputStream> ostream =
-+ nsCOMPtr<nsIInputStream> stream =
- do_QueryInterface(mParallelStreams[index]);
-
-- if (NS_FAILED(ostream->Close())) {
-+ if (NS_FAILED(stream->Close())) {
- NS_WARNING("Failed to close stream!");
- }
-
-@@ -964,9 +964,9 @@ FinishHelper::Run()
- }
-
- if (mStream) {
-- nsCOMPtr<nsIOutputStream> ostream = do_QueryInterface(mStream);
-+ nsCOMPtr<nsIInputStream> stream = do_QueryInterface(mStream);
-
-- if (NS_FAILED(ostream->Close())) {
-+ if (NS_FAILED(stream->Close())) {
- NS_WARNING("Failed to close stream!");
- }
-
-diff --git dom/file/nsIFileStorage.h dom/file/nsIFileStorage.h
-index 92bb608..e985f0a 100644
---- dom/file/nsIFileStorage.h
-+++ dom/file/nsIFileStorage.h
-@@ -10,14 +10,17 @@
- #include "nsISupports.h"
-
- #define NS_FILESTORAGE_IID \
-- {0xbba9c2ff, 0x85c9, 0x47c1, \
-- { 0xaf, 0xce, 0x0a, 0x7e, 0x6f, 0x21, 0x50, 0x95 } }
-+ {0xa0801944, 0x2f1c, 0x4203, \
-+ { 0x9c, 0xaa, 0xaa, 0x47, 0xe0, 0x0c, 0x67, 0x92 } }
-
- class nsIFileStorage : public nsISupports
- {
- public:
- NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID)
-
-+ virtual const nsACString&
-+ StorageOrigin() = 0;
-+
- virtual nsISupports*
- StorageId() = 0;
-
-@@ -36,20 +39,23 @@ public:
-
- NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID)
-
--#define NS_DECL_NSIFILESTORAGE \
-- virtual nsISupports* \
-- StorageId(); \
-- \
-- virtual bool \
-- IsStorageInvalidated(); \
-- \
-- virtual bool \
-- IsStorageShuttingDown(); \
-- \
-- virtual void \
-- SetThreadLocals(); \
-- \
-- virtual void \
-- UnsetThreadLocals();
-+#define NS_DECL_NSIFILESTORAGE \
-+ virtual const nsACString& \
-+ StorageOrigin() MOZ_OVERRIDE; \
-+ \
-+ virtual nsISupports* \
-+ StorageId() MOZ_OVERRIDE; \
-+ \
-+ virtual bool \
-+ IsStorageInvalidated() MOZ_OVERRIDE; \
-+ \
-+ virtual bool \
-+ IsStorageShuttingDown() MOZ_OVERRIDE; \
-+ \
-+ virtual void \
-+ SetThreadLocals() MOZ_OVERRIDE; \
-+ \
-+ virtual void \
-+ UnsetThreadLocals() MOZ_OVERRIDE;
-
- #endif // nsIFileStorage_h__
-diff --git dom/indexedDB/FileManager.cpp dom/indexedDB/FileManager.cpp
-index 9db56e8..4ed6e9e 100644
---- dom/indexedDB/FileManager.cpp
-+++ dom/indexedDB/FileManager.cpp
-@@ -7,8 +7,8 @@
- #include "FileManager.h"
-
- #include "mozIStorageConnection.h"
--#include "mozIStorageServiceQuotaManagement.h"
- #include "mozIStorageStatement.h"
-+#include "nsIInputStream.h"
- #include "nsISimpleEnumerator.h"
-
- #include "mozStorageCID.h"
-@@ -18,6 +18,8 @@
- #include "IndexedDatabaseManager.h"
- #include "OpenDatabaseHelper.h"
-
-+#include "IndexedDatabaseInlines.h"
-+
- #define JOURNAL_DIRECTORY_NAME "journals"
-
- USING_INDEXEDDB_NAMESPACE
-@@ -262,13 +264,11 @@ FileManager::GetFileForId(nsIFile* aDirectory, int64_t aId)
-
- // static
- nsresult
--FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
-- nsIFile* aDirectory,
-+FileManager::InitDirectory(nsIFile* aDirectory,
- nsIFile* aDatabaseFile,
-- FactoryPrivilege aPrivilege)
-+ const nsACString& aOrigin)
- {
- NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-- NS_ASSERTION(aService, "Null service!");
- NS_ASSERTION(aDirectory, "Null directory!");
- NS_ASSERTION(aDatabaseFile, "Null database file!");
-
-@@ -310,8 +310,8 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
-
- if (hasElements) {
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = OpenDatabaseHelper::CreateDatabaseConnection(
-- NullString(), aDatabaseFile, aDirectory, getter_AddRefs(connection));
-+ rv = OpenDatabaseHelper::CreateDatabaseConnection(aDatabaseFile,
-+ aDirectory, NullString(), aOrigin, getter_AddRefs(connection));
- NS_ENSURE_SUCCESS(rv, rv);
-
- mozStorageTransaction transaction(connection, false);
-@@ -377,12 +377,17 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
- }
- }
-
-- if (aPrivilege == Chrome) {
-- return NS_OK;
-- }
-+ return NS_OK;
-+}
-+
-+// static
-+nsresult
-+FileManager::GetUsage(nsIFile* aDirectory, uint64_t* aUsage)
-+{
-+ uint64_t usage = 0;
-
- nsCOMPtr<nsISimpleEnumerator> entries;
-- rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
-+ nsresult rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
- NS_ENSURE_SUCCESS(rv, rv);
-
- bool hasMore;
-@@ -402,9 +407,13 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
- continue;
- }
-
-- rv = aService->UpdateQuotaInformationForFile(file);
-+ int64_t fileSize;
-+ rv = file->GetFileSize(&fileSize);
- NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, uint64_t(fileSize));
- }
-
-+ *aUsage = usage;
- return NS_OK;
- }
-diff --git dom/indexedDB/FileManager.h dom/indexedDB/FileManager.h
-index 2c72d0a..370d4a8 100644
---- dom/indexedDB/FileManager.h
-+++ dom/indexedDB/FileManager.h
-@@ -24,10 +24,10 @@ class FileManager
- friend class FileInfo;
-
- public:
-- FileManager(const nsACString& aOrigin,
-+ FileManager(const nsACString& aOrigin, FactoryPrivilege aPrivilege,
- const nsAString& aDatabaseName)
-- : mOrigin(aOrigin), mDatabaseName(aDatabaseName), mLastFileId(0),
-- mInvalidated(false)
-+ : mOrigin(aOrigin), mPrivilege(aPrivilege), mDatabaseName(aDatabaseName),
-+ mLastFileId(0), mInvalidated(false)
- { }
-
- ~FileManager()
-@@ -40,6 +40,11 @@ public:
- return mOrigin;
- }
-
-+ const FactoryPrivilege& Privilege() const
-+ {
-+ return mPrivilege;
-+ }
-+
- const nsAString& DatabaseName() const
- {
- return mDatabaseName;
-@@ -68,12 +73,15 @@ public:
- static already_AddRefed<nsIFile> GetFileForId(nsIFile* aDirectory,
- int64_t aId);
-
-- static nsresult InitDirectory(mozIStorageServiceQuotaManagement* aService,
-- nsIFile* aDirectory, nsIFile* aDatabaseFile,
-- FactoryPrivilege aPrivilege);
-+ static nsresult InitDirectory(nsIFile* aDirectory,
-+ nsIFile* aDatabaseFile,
-+ const nsACString& aOrigin);
-+
-+ static nsresult GetUsage(nsIFile* aDirectory, uint64_t* aUsage);
-
- private:
- nsCString mOrigin;
-+ FactoryPrivilege mPrivilege;
- nsString mDatabaseName;
-
- nsString mDirectoryPath;
-diff --git dom/indexedDB/FileStream.cpp dom/indexedDB/FileStream.cpp
-deleted file mode 100644
-index dddf5d5..0000000
---- dom/indexedDB/FileStream.cpp
-+++ /dev/null
-@@ -1,321 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "FileStream.h"
--
--#include "nsIFile.h"
--
--#include "nsThreadUtils.h"
--#include "test_quota.h"
--
--USING_INDEXEDDB_NAMESPACE
--
--NS_IMPL_THREADSAFE_ADDREF(FileStream)
--NS_IMPL_THREADSAFE_RELEASE(FileStream)
--
--NS_INTERFACE_MAP_BEGIN(FileStream)
-- NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardFileStream)
-- NS_INTERFACE_MAP_ENTRY(nsISeekableStream)
-- NS_INTERFACE_MAP_ENTRY(nsIInputStream)
-- NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
-- NS_INTERFACE_MAP_ENTRY(nsIStandardFileStream)
-- NS_INTERFACE_MAP_ENTRY(nsIFileMetadata)
--NS_INTERFACE_MAP_END
--
--NS_IMETHODIMP
--FileStream::Seek(int32_t aWhence, int64_t aOffset)
--{
-- // TODO: Add support for 64 bit file sizes, bug 752431
-- NS_ENSURE_TRUE(aOffset <= INT32_MAX, NS_ERROR_INVALID_ARG);
--
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- int whence;
-- switch (aWhence) {
-- case nsISeekableStream::NS_SEEK_SET:
-- whence = SEEK_SET;
-- break;
-- case nsISeekableStream::NS_SEEK_CUR:
-- whence = SEEK_CUR;
-- break;
-- case nsISeekableStream::NS_SEEK_END:
-- whence = SEEK_END;
-- break;
-- default:
-- return NS_ERROR_INVALID_ARG;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fseek(mQuotaFile, aOffset, whence);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Tell(int64_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- long rc = sqlite3_quota_ftell(mQuotaFile);
-- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR);
--
-- *aResult = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::SetEOF()
--{
-- int64_t pos;
-- nsresult rv = Tell(&pos);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_ftruncate(mQuotaFile, pos);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--
--NS_IMETHODIMP
--FileStream::Close()
--{
-- CleanUpOpen();
--
-- if (mQuotaFile) {
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fclose(mQuotaFile);
-- mQuotaFile = nullptr;
--
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
-- }
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Available(uint64_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- long rc = sqlite3_quota_file_available(mQuotaFile);
-- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR);
--
-- *aResult = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Read(char* aBuf, uint32_t aCount, uint32_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- size_t bytesRead = sqlite3_quota_fread(aBuf, 1, aCount, mQuotaFile);
-- if (bytesRead < aCount && sqlite3_quota_ferror(mQuotaFile)) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *aResult = bytesRead;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::ReadSegments(nsWriteSegmentFun aWriter, void* aClosure,
-- uint32_t aCount, uint32_t* aResult)
--{
-- NS_NOTREACHED("Don't call me!");
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::IsNonBlocking(bool *aNonBlocking)
--{
-- *aNonBlocking = false;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Write(const char* aBuf, uint32_t aCount, uint32_t *aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- size_t bytesWritten = sqlite3_quota_fwrite(aBuf, 1, aCount, mQuotaFile);
-- if (bytesWritten < aCount) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *aResult = bytesWritten;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Flush()
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fflush(mQuotaFile, 1);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval)
--{
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval)
--{
-- NS_NOTREACHED("Don't call me!");
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::Init(nsIFile* aFile, const nsAString& aMode, int32_t aFlags)
--{
-- NS_ASSERTION(!mQuotaFile && !mDeferredOpen, "Already initialized!");
--
-- nsresult rv = aFile->GetPath(mFilePath);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- mMode = aMode;
-- mFlags = aFlags;
--
-- if (mFlags & nsIStandardFileStream::FLAGS_DEFER_OPEN) {
-- mDeferredOpen = true;
-- return NS_OK;
-- }
--
-- return DoOpen();
--}
--
--NS_IMETHODIMP
--FileStream::GetSize(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- // TODO: Use sqlite3_quota_file_size() here, bug 760783
-- int64_t rc = sqlite3_quota_file_truesize(mQuotaFile);
--
-- NS_ASSERTION(rc >= 0, "The file is not under quota management!");
--
-- *_retval = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::GetLastModified(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- time_t mtime;
-- int rc = sqlite3_quota_file_mtime(mQuotaFile, &mtime);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- *_retval = mtime * PR_MSEC_PER_SEC;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::FlushBuffers()
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fflush(mQuotaFile, 0);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--nsresult
--FileStream::DoOpen()
--{
-- NS_ASSERTION(!mFilePath.IsEmpty(), "Must have a file path");
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- quota_FILE* quotaFile =
-- sqlite3_quota_fopen(NS_ConvertUTF16toUTF8(mFilePath).get(),
-- NS_ConvertUTF16toUTF8(mMode).get());
--
-- CleanUpOpen();
--
-- if (!quotaFile) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- mQuotaFile = quotaFile;
--
-- return NS_OK;
--}
-diff --git dom/indexedDB/FileStream.h dom/indexedDB/FileStream.h
-deleted file mode 100644
-index 09648b1..0000000
---- dom/indexedDB/FileStream.h
-+++ /dev/null
-@@ -1,140 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#ifndef mozilla_dom_indexeddb_filestream_h__
--#define mozilla_dom_indexeddb_filestream_h__
--
--#include "IndexedDatabase.h"
--
--#include "nsIFileStreams.h"
--#include "nsIInputStream.h"
--#include "nsIOutputStream.h"
--#include "nsISeekableStream.h"
--#include "nsIStandardFileStream.h"
--
--class nsIFile;
--struct quota_FILE;
--
--BEGIN_INDEXEDDB_NAMESPACE
--
--class FileStream : public nsISeekableStream,
-- public nsIInputStream,
-- public nsIOutputStream,
-- public nsIStandardFileStream,
-- public nsIFileMetadata
--{
--public:
-- FileStream()
-- : mFlags(0),
-- mDeferredOpen(false),
-- mQuotaFile(nullptr)
-- { }
--
-- virtual ~FileStream()
-- {
-- Close();
-- }
--
-- NS_DECL_ISUPPORTS
-- NS_DECL_NSISEEKABLESTREAM
-- NS_DECL_NSISTANDARDFILESTREAM
-- NS_DECL_NSIFILEMETADATA
--
-- // nsIInputStream
-- NS_IMETHOD
-- Close();
--
-- NS_IMETHOD
-- Available(uint64_t* _retval);
--
-- NS_IMETHOD
-- Read(char* aBuf, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, uint32_t aCount,
-- uint32_t* _retval);
--
-- NS_IMETHOD
-- IsNonBlocking(bool* _retval);
--
-- // nsIOutputStream
--
-- // Close() already declared
--
-- NS_IMETHOD
-- Flush();
--
-- NS_IMETHOD
-- Write(const char* aBuf, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- WriteFrom(nsIInputStream* aFromStream, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- WriteSegments(nsReadSegmentFun aReader, void* aClosure, uint32_t aCount,
-- uint32_t* _retval);
--
-- // IsNonBlocking() already declared
--
--protected:
-- /**
-- * Cleans up data prepared in Init.
-- */
-- void
-- CleanUpOpen()
-- {
-- mFilePath.Truncate();
-- mDeferredOpen = false;
-- }
--
-- /**
-- * Open the file. This is called either from Init
-- * or from DoPendingOpen (if FLAGS_DEFER_OPEN is used when initializing this
-- * stream). The default behavior of DoOpen is to open the file and save the
-- * file descriptor.
-- */
-- virtual nsresult
-- DoOpen();
--
-- /**
-- * If there is a pending open, do it now. It's important for this to be
-- * inlined since we do it in almost every stream API call.
-- */
-- nsresult
-- DoPendingOpen()
-- {
-- if (!mDeferredOpen) {
-- return NS_OK;
-- }
--
-- return DoOpen();
-- }
--
-- /**
-- * Data we need to do an open.
-- */
-- nsString mFilePath;
-- nsString mMode;
--
-- /**
-- * Flags describing our behavior. See the IDL file for possible values.
-- */
-- int32_t mFlags;
--
-- /**
-- * Whether we have a pending open (see FLAGS_DEFER_OPEN in the IDL file).
-- */
-- bool mDeferredOpen;
--
-- /**
-- * File descriptor for opened file.
-- */
-- quota_FILE* mQuotaFile;
--};
--
--END_INDEXEDDB_NAMESPACE
--
--#endif // mozilla_dom_indexeddb_filestream_h__
-diff --git dom/indexedDB/IDBDatabase.cpp dom/indexedDB/IDBDatabase.cpp
-index 63500b0..8842daf 100644
---- dom/indexedDB/IDBDatabase.cpp
-+++ dom/indexedDB/IDBDatabase.cpp
-@@ -779,6 +779,12 @@ IDBDatabase::Close()
- return NS_OK;
- }
-
-+const nsACString&
-+IDBDatabase::StorageOrigin()
-+{
-+ return Origin();
-+}
-+
- nsISupports*
- IDBDatabase::StorageId()
- {
-diff --git dom/indexedDB/IDBFactory.cpp dom/indexedDB/IDBFactory.cpp
-index 1007df1..c1f573e 100644
---- dom/indexedDB/IDBFactory.cpp
-+++ dom/indexedDB/IDBFactory.cpp
-@@ -253,8 +253,26 @@ IDBFactory::Create(ContentParent* aContentParent,
- }
-
- // static
-+already_AddRefed<nsIFileURL>
-+IDBFactory::GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin)
-+{
-+ nsCOMPtr<nsIURI> uri;
-+ nsresult rv = NS_NewFileURI(getter_AddRefs(uri), aDatabaseFile);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ nsCOMPtr<nsIFileURL> fileUrl = do_QueryInterface(uri);
-+ NS_ASSERTION(fileUrl, "This should always succeed!");
-+
-+ rv = fileUrl->SetQuery(NS_LITERAL_CSTRING("origin=") + aOrigin);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ return fileUrl.forget();
-+}
-+
-+// static
- already_AddRefed<mozIStorageConnection>
--IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
-+IDBFactory::GetConnection(const nsAString& aDatabaseFilePath,
-+ const nsACString& aOrigin)
- {
- NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
- NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")),
-@@ -271,13 +289,15 @@ IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
- NS_ENSURE_SUCCESS(rv, nullptr);
- NS_ENSURE_TRUE(exists, nullptr);
-
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-+ nsCOMPtr<nsIFileURL> dbFileUrl = GetDatabaseFileURL(dbFile, aOrigin);
-+ NS_ENSURE_TRUE(dbFileUrl, nullptr);
-+
-+ nsCOMPtr<mozIStorageService> ss =
- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
- NS_ENSURE_TRUE(ss, nullptr);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = ss->OpenDatabaseWithVFS(dbFile, NS_LITERAL_CSTRING("quota"),
-- getter_AddRefs(connection));
-+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- NS_ENSURE_SUCCESS(rv, nullptr);
-
- // Turn on foreign key constraints and recursive triggers.
-diff --git dom/indexedDB/IDBFactory.h dom/indexedDB/IDBFactory.h
-index d5461f7..49dad42 100644
---- dom/indexedDB/IDBFactory.h
-+++ dom/indexedDB/IDBFactory.h
-@@ -15,6 +15,8 @@
- #include "nsCycleCollectionParticipant.h"
-
- class nsIAtom;
-+class nsIFile;
-+class nsIFileURL;
- class nsPIDOMWindow;
-
- namespace mozilla {
-@@ -75,8 +77,12 @@ public:
- static nsresult Create(ContentParent* aContentParent,
- IDBFactory** aFactory);
-
-+ static already_AddRefed<nsIFileURL>
-+ GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin);
-+
- static already_AddRefed<mozIStorageConnection>
-- GetConnection(const nsAString& aDatabaseFilePath);
-+ GetConnection(const nsAString& aDatabaseFilePath,
-+ const nsACString& aOrigin);
-
- static nsresult
- LoadDatabaseInformation(mozIStorageConnection* aConnection,
-diff --git dom/indexedDB/IDBFileHandle.cpp dom/indexedDB/IDBFileHandle.cpp
-index e0340ff..f71fd56 100644
---- dom/indexedDB/IDBFileHandle.cpp
-+++ dom/indexedDB/IDBFileHandle.cpp
-@@ -6,15 +6,14 @@
-
- #include "IDBFileHandle.h"
-
--#include "nsIStandardFileStream.h"
--
- #include "mozilla/dom/file/File.h"
-+#include "mozilla/dom/quota/FileStreams.h"
- #include "nsDOMClassInfoID.h"
-
--#include "FileStream.h"
- #include "IDBDatabase.h"
-
- USING_INDEXEDDB_NAMESPACE
-+USING_QUOTA_NAMESPACE
-
- namespace {
-
-@@ -68,22 +67,22 @@ IDBFileHandle::Create(IDBDatabase* aDatabase,
- already_AddRefed<nsISupports>
- IDBFileHandle::CreateStream(nsIFile* aFile, bool aReadOnly)
- {
-- nsRefPtr<FileStream> stream = new FileStream();
-+ const nsACString& origin = mFileStorage->StorageOrigin();
-+
-+ nsCOMPtr<nsISupports> result;
-
-- nsString streamMode;
- if (aReadOnly) {
-- streamMode.AssignLiteral("rb");
-+ nsRefPtr<FileInputStream> stream = FileInputStream::Create(
-+ origin, aFile, -1, -1, nsIFileInputStream::DEFER_OPEN);
-+ result = NS_ISUPPORTS_CAST(nsIFileInputStream*, stream);
- }
- else {
-- streamMode.AssignLiteral("r+b");
-+ nsRefPtr<FileStream> stream = FileStream::Create(
-+ origin, aFile, -1, -1, nsIFileStream::DEFER_OPEN);
-+ result = NS_ISUPPORTS_CAST(nsIFileStream*, stream);
- }
-+ NS_ENSURE_TRUE(result, nullptr);
-
-- nsresult rv = stream->Init(aFile, streamMode,
-- nsIStandardFileStream::FLAGS_DEFER_OPEN);
-- NS_ENSURE_SUCCESS(rv, nullptr);
--
-- nsCOMPtr<nsISupports> result =
-- NS_ISUPPORTS_CAST(nsIStandardFileStream*, stream);
- return result.forget();
- }
-
-diff --git dom/indexedDB/IDBObjectStore.cpp dom/indexedDB/IDBObjectStore.cpp
-index 746d473..1f16d26 100644
---- dom/indexedDB/IDBObjectStore.cpp
-+++ dom/indexedDB/IDBObjectStore.cpp
-@@ -17,6 +17,7 @@
- #include "mozilla/dom/ContentParent.h"
- #include "mozilla/dom/StructuredCloneTags.h"
- #include "mozilla/dom/ipc/Blob.h"
-+#include "mozilla/dom/quota/FileStreams.h"
- #include "mozilla/storage.h"
- #include "nsContentUtils.h"
- #include "nsDOMClassInfo.h"
-@@ -27,10 +28,8 @@
- #include "nsServiceManagerUtils.h"
- #include "nsThreadUtils.h"
- #include "snappy/snappy.h"
--#include "test_quota.h"
-
- #include "AsyncConnectionHelper.h"
--#include "FileStream.h"
- #include "IDBCursor.h"
- #include "IDBEvents.h"
- #include "IDBFileHandle.h"
-@@ -51,6 +50,7 @@
- USING_INDEXEDDB_NAMESPACE
- using namespace mozilla::dom;
- using namespace mozilla::dom::indexedDB::ipc;
-+using mozilla::dom::quota::FileOutputStream;
-
- namespace {
-
-@@ -2734,9 +2734,9 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- nativeFile = fileManager->GetFileForId(directory, id);
- NS_ENSURE_TRUE(nativeFile, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsRefPtr<FileStream> outputStream = new FileStream();
-- rv = outputStream->Init(nativeFile, NS_LITERAL_STRING("wb"), 0);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ nsRefPtr<FileOutputStream> outputStream = FileOutputStream::Create(
-+ mObjectStore->Transaction()->Database()->Origin(), nativeFile);
-+ NS_ENSURE_TRUE(outputStream, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- rv = CopyData(inputStream, outputStream);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-diff --git dom/indexedDB/IDBTransaction.cpp dom/indexedDB/IDBTransaction.cpp
-index fcef7cc..a5345e2 100644
---- dom/indexedDB/IDBTransaction.cpp
-+++ dom/indexedDB/IDBTransaction.cpp
-@@ -352,7 +352,8 @@ IDBTransaction::GetOrCreateConnection(mozIStorageConnection** aResult)
-
- if (!mConnection) {
- nsCOMPtr<mozIStorageConnection> connection =
-- IDBFactory::GetConnection(mDatabase->FilePath());
-+ IDBFactory::GetConnection(mDatabase->FilePath(),
-+ mDatabase->Origin());
- NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE);
-
- nsresult rv;
-diff --git dom/indexedDB/IndexedDatabaseInlines.h dom/indexedDB/IndexedDatabaseInlines.h
-index 62e65d6..f27d60c 100644
---- dom/indexedDB/IndexedDatabaseInlines.h
-+++ dom/indexedDB/IndexedDatabaseInlines.h
-@@ -79,4 +79,17 @@ AppendConditionClause(const nsACString& aColumnName,
- aResult += NS_LITERAL_CSTRING(" :") + aArgName;
- }
-
-+inline void
-+IncrementUsage(uint64_t* aUsage, uint64_t aDelta)
-+{
-+ // Watch for overflow!
-+ if ((UINT64_MAX - *aUsage) < aDelta) {
-+ NS_WARNING("Usage exceeds the maximum!");
-+ *aUsage = UINT64_MAX;
-+ }
-+ else {
-+ *aUsage += aDelta;
-+ }
-+}
-+
- END_INDEXEDDB_NAMESPACE
-diff --git dom/indexedDB/IndexedDatabaseManager.cpp dom/indexedDB/IndexedDatabaseManager.cpp
-index e4ad647..88f09da 100644
---- dom/indexedDB/IndexedDatabaseManager.cpp
-+++ dom/indexedDB/IndexedDatabaseManager.cpp
-@@ -22,6 +22,7 @@
- #include "nsITimer.h"
-
- #include "mozilla/dom/file/FileService.h"
-+#include "mozilla/dom/quota/QuotaManager.h"
- #include "mozilla/dom/TabContext.h"
- #include "mozilla/LazyIdleThread.h"
- #include "mozilla/Preferences.h"
-@@ -36,7 +37,6 @@
- #include "nsThreadUtils.h"
- #include "nsXPCOM.h"
- #include "nsXPCOMPrivate.h"
--#include "test_quota.h"
- #include "xpcpublic.h"
-
- #include "AsyncConnectionHelper.h"
-@@ -48,6 +48,8 @@
- #include "OpenDatabaseHelper.h"
- #include "TransactionThreadPool.h"
-
-+#include "IndexedDatabaseInlines.h"
-+
- // The amount of time, in milliseconds, that our IO thread will stay alive
- // after the last event it processes.
- #define DEFAULT_THREAD_TIMEOUT_MS 30000
-@@ -70,6 +72,7 @@ using namespace mozilla::services;
- using namespace mozilla::dom;
- using mozilla::Preferences;
- using mozilla::dom::file::FileService;
-+using mozilla::dom::quota::QuotaManager;
-
- static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
-
-@@ -103,29 +106,6 @@ GetDatabaseBaseFilename(const nsAString& aFilename,
- return true;
- }
-
--class QuotaCallback MOZ_FINAL : public mozIStorageQuotaCallback
--{
--public:
-- NS_DECL_ISUPPORTS
--
-- NS_IMETHOD
-- QuotaExceeded(const nsACString& aFilename,
-- int64_t aCurrentSizeLimit,
-- int64_t aCurrentTotalSize,
-- nsISupports* aUserData,
-- int64_t* _retval)
-- {
-- if (IndexedDatabaseManager::QuotaIsLifted()) {
-- *_retval = 0;
-- return NS_OK;
-- }
--
-- return NS_ERROR_FAILURE;
-- }
--};
--
--NS_IMPL_THREADSAFE_ISUPPORTS1(QuotaCallback, mozIStorageQuotaCallback)
--
- // Adds all databases in the hash to the given array.
- template <class T>
- PLDHashOperator
-@@ -440,8 +420,8 @@ IndexedDatabaseManager::GetOrCreate()
- NS_LITERAL_CSTRING("IndexedDB I/O"),
- LazyIdleThread::ManualShutdown);
-
-- // We need one quota callback object to hand to SQLite.
-- instance->mQuotaCallbackSingleton = new QuotaCallback();
-+ // Make sure that the quota manager is up.
-+ NS_ENSURE_TRUE(QuotaManager::GetOrCreate(), nullptr);
-
- // Make a timer here to avoid potential failures later. We don't actually
- // initialize the timer until shutdown.
-@@ -996,37 +976,15 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- return NS_OK;
- }
-
-- // First figure out the filename pattern we'll use.
-- nsCOMPtr<nsIFile> patternFile;
-- rv = directory->Clone(getter_AddRefs(patternFile));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- rv = patternFile->Append(NS_LITERAL_STRING("*"));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- nsString pattern;
-- rv = patternFile->GetPath(pattern);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- // Now tell SQLite to start tracking this pattern for content.
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE);
--
-- if (aPrivilege != Chrome) {
-- rv = ss->SetQuotaForFilenamePattern(NS_ConvertUTF16toUTF8(pattern),
-- GetIndexedDBQuotaMB() * 1024 * 1024,
-- mQuotaCallbackSingleton, nullptr);
-- NS_ENSURE_SUCCESS(rv, rv);
-- }
--
- // We need to see if there are any files in the directory already. If they
- // are database files then we need to cleanup stored files (if it's needed)
-- // and also tell SQLite about all of them.
-+ // and also initialize the quota.
-
- nsAutoTArray<nsString, 20> subdirsToProcess;
- nsAutoTArray<nsCOMPtr<nsIFile> , 20> unknownFiles;
-
-+ uint64_t usage = 0;
-+
- nsTHashtable<nsStringHashKey> validSubdirs;
- validSubdirs.Init(20);
-
-@@ -1068,20 +1026,28 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- continue;
- }
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = directory->Clone(getter_AddRefs(fileManagerDirectory));
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = directory->Clone(getter_AddRefs(fmDirectory));
- NS_ENSURE_SUCCESS(rv, rv);
-
-- rv = fileManagerDirectory->Append(dbBaseFilename);
-+ rv = fmDirectory->Append(dbBaseFilename);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- rv = FileManager::InitDirectory(ss, fileManagerDirectory, file,
-- aPrivilege);
-+ rv = FileManager::InitDirectory(fmDirectory, file, aOrigin);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (aPrivilege != Chrome) {
-- rv = ss->UpdateQuotaInformationForFile(file);
-+ uint64_t fileUsage;
-+ rv = FileManager::GetUsage(fmDirectory, &fileUsage);
- NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, fileUsage);
-+
-+ int64_t fileSize;
-+ rv = file->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, uint64_t(fileSize));
- }
-
- validSubdirs.PutEntry(dbBaseFilename);
-@@ -1117,12 +1083,39 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- }
- }
-
-+ if (aPrivilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->InitQuotaForOrigin(aOrigin, GetIndexedDBQuotaMB(), usage);
-+ }
-+
- mInitializedOrigins.AppendElement(aOrigin);
-
- NS_ADDREF(*aDirectory = directory);
- return NS_OK;
- }
-
-+void
-+IndexedDatabaseManager::UninitializeOriginsByPattern(
-+ const nsACString& aPattern)
-+{
-+#ifdef DEBUG
-+ {
-+ bool correctThread;
-+ NS_ASSERTION(NS_SUCCEEDED(mIOThread->IsOnCurrentThread(&correctThread)) &&
-+ correctThread,
-+ "Running on the wrong thread!");
-+ }
-+#endif
-+
-+ for (int32_t i = mInitializedOrigins.Length() - 1; i >= 0; i--) {
-+ if (PatternMatchesOrigin(aPattern, mInitializedOrigins[i])) {
-+ mInitializedOrigins.RemoveElementAt(i);
-+ }
-+ }
-+}
-+
- bool
- IndexedDatabaseManager::QuotaIsLiftedInternal()
- {
-@@ -1250,16 +1243,14 @@ IndexedDatabaseManager::GetFileManager(const nsACString& aOrigin,
- }
-
- void
--IndexedDatabaseManager::AddFileManager(const nsACString& aOrigin,
-- const nsAString& aDatabaseName,
-- FileManager* aFileManager)
-+IndexedDatabaseManager::AddFileManager(FileManager* aFileManager)
- {
- NS_ASSERTION(aFileManager, "Null file manager!");
-
- nsTArray<nsRefPtr<FileManager> >* array;
-- if (!mFileManagers.Get(aOrigin, &array)) {
-+ if (!mFileManagers.Get(aFileManager->Origin(), &array)) {
- array = new nsTArray<nsRefPtr<FileManager> >();
-- mFileManagers.Put(aOrigin, array);
-+ mFileManagers.Put(aFileManager->Origin(), array);
- }
-
- array->AppendElement(aFileManager);
-@@ -1783,6 +1774,13 @@ OriginClearRunnable::DeleteFiles(IndexedDatabaseManager* aManager)
- // correctly...
- NS_ERROR("Failed to remove directory!");
- }
-+
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->RemoveQuotaForPattern(mOriginOrPattern);
-+
-+ aManager->UninitializeOriginsByPattern(mOriginOrPattern);
- }
- }
-
-@@ -1880,19 +1878,6 @@ IndexedDatabaseManager::AsyncUsageRunnable::Cancel()
- }
- }
-
--inline void
--IncrementUsage(uint64_t* aUsage, uint64_t aDelta)
--{
-- // Watch for overflow!
-- if ((INT64_MAX - *aUsage) <= aDelta) {
-- NS_WARNING("Database sizes exceed max we can report!");
-- *aUsage = INT64_MAX;
-- }
-- else {
-- *aUsage += aDelta;
-- }
--}
--
- nsresult
- IndexedDatabaseManager::AsyncUsageRunnable::TakeShortcut()
- {
-@@ -2295,25 +2280,22 @@ IndexedDatabaseManager::AsyncDeleteFileRunnable::Run()
- nsCOMPtr<nsIFile> file = mFileManager->GetFileForId(directory, mFileId);
- NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
-
-- nsString filePath;
-- nsresult rv = file->GetPath(filePath);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsresult rv;
-+ int64_t fileSize;
-
-- int rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(filePath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete stored file!");
-- return NS_ERROR_FAILURE;
-+ if (mFileManager->Privilege() != Chrome) {
-+ rv = file->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
- }
-
-- // sqlite3_quota_remove won't actually remove anything if we're not tracking
-- // the quota here. Manually remove the file if it exists.
-- bool exists;
-- rv = file->Exists(&exists);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ rv = file->Remove(false);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
-
-- if (exists) {
-- rv = file->Remove(false);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ if (mFileManager->Privilege() != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mFileManager->Origin(), fileSize);
- }
-
- directory = mFileManager->GetJournalDirectory();
-diff --git dom/indexedDB/IndexedDatabaseManager.h dom/indexedDB/IndexedDatabaseManager.h
-index f9fbbf2..1ea5425 100644
---- dom/indexedDB/IndexedDatabaseManager.h
-+++ dom/indexedDB/IndexedDatabaseManager.h
-@@ -23,7 +23,6 @@
-
- #define INDEXEDDB_MANAGER_CONTRACTID "@mozilla.org/dom/indexeddb/manager;1"
-
--class mozIStorageQuotaCallback;
- class nsIAtom;
- class nsIFile;
- class nsITimer;
-@@ -134,6 +133,8 @@ public:
- FactoryPrivilege aPrivilege,
- nsIFile** aDirectory);
-
-+ void UninitializeOriginsByPattern(const nsACString& aPattern);
-+
- // Determine if the quota is lifted for the Window the current thread is
- // using.
- static inline bool
-@@ -172,9 +173,7 @@ public:
- const nsAString& aDatabaseName);
-
- void
-- AddFileManager(const nsACString& aOrigin,
-- const nsAString& aDatabaseName,
-- FileManager* aFileManager);
-+ AddFileManager(FileManager* aFileManager);
-
- void InvalidateFileManagersForPattern(const nsACString& aPattern);
-
-@@ -502,10 +501,6 @@ private:
- // A timer that gets activated at shutdown to ensure we close all databases.
- nsCOMPtr<nsITimer> mShutdownTimer;
-
-- // A single threadsafe instance of our quota callback. Created on the main
-- // thread during GetOrCreate().
-- nsCOMPtr<mozIStorageQuotaCallback> mQuotaCallbackSingleton;
--
- // A list of all successfully initialized origins. This list isn't protected
- // by any mutex but it is only ever touched on the IO thread.
- nsTArray<nsCString> mInitializedOrigins;
-diff --git dom/indexedDB/Makefile.in dom/indexedDB/Makefile.in
-index fef0858..09d4853 100644
---- dom/indexedDB/Makefile.in
-+++ dom/indexedDB/Makefile.in
-@@ -25,7 +25,6 @@ CPPSRCS = \
- DatabaseInfo.cpp \
- FileInfo.cpp \
- FileManager.cpp \
-- FileStream.cpp \
- IDBCursor.cpp \
- IDBDatabase.cpp \
- IDBEvents.cpp \
-@@ -93,7 +92,6 @@ XPIDLSRCS = \
- nsIIDBVersionChangeEvent.idl \
- nsIIDBOpenDBRequest.idl \
- nsIIndexedDatabaseManager.idl \
-- nsIStandardFileStream.idl \
- $(NULL)
-
- DIRS += ipc
-diff --git dom/indexedDB/OpenDatabaseHelper.cpp dom/indexedDB/OpenDatabaseHelper.cpp
-index e71cad4..4cd7f61 100644
---- dom/indexedDB/OpenDatabaseHelper.cpp
-+++ dom/indexedDB/OpenDatabaseHelper.cpp
-@@ -8,11 +8,12 @@
-
- #include "nsIFile.h"
-
-+#include "mozilla/dom/quota/QuotaManager.h"
- #include "mozilla/storage.h"
- #include "nsEscape.h"
-+#include "nsNetUtil.h"
- #include "nsThreadUtils.h"
- #include "snappy/snappy.h"
--#include "test_quota.h"
-
- #include "nsIBFCacheEntry.h"
- #include "IDBEvents.h"
-@@ -21,6 +22,7 @@
-
- using namespace mozilla;
- USING_INDEXEDDB_NAMESPACE
-+USING_QUOTA_NAMESPACE
-
- namespace {
-
-@@ -1632,15 +1634,15 @@ OpenDatabaseHelper::DoDatabaseWork()
- rv = dbFile->GetPath(mDatabaseFilePath);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = dbDirectory->Clone(getter_AddRefs(fileManagerDirectory));
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = dbDirectory->Clone(getter_AddRefs(fmDirectory));
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Append(filename);
-+ rv = fmDirectory->Append(filename);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = CreateDatabaseConnection(mName, dbFile, fileManagerDirectory,
-+ rv = CreateDatabaseConnection(dbFile, fmDirectory, mName, mASCIIOrigin,
- getter_AddRefs(connection));
- if (NS_FAILED(rv) &&
- NS_ERROR_GET_MODULE(rv) != NS_ERROR_MODULE_DOM_INDEXEDDB) {
-@@ -1691,12 +1693,12 @@ OpenDatabaseHelper::DoDatabaseWork()
-
- nsRefPtr<FileManager> fileManager = mgr->GetFileManager(mASCIIOrigin, mName);
- if (!fileManager) {
-- fileManager = new FileManager(mASCIIOrigin, mName);
-+ fileManager = new FileManager(mASCIIOrigin, mPrivilege, mName);
-
-- rv = fileManager->Init(fileManagerDirectory, connection);
-+ rv = fileManager->Init(fmDirectory, connection);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- mgr->AddFileManager(mASCIIOrigin, mName, fileManager);
-+ mgr->AddFileManager(fileManager);
- }
-
- mFileManager = fileManager.forget();
-@@ -1707,23 +1709,26 @@ OpenDatabaseHelper::DoDatabaseWork()
- // static
- nsresult
- OpenDatabaseHelper::CreateDatabaseConnection(
-- const nsAString& aName,
- nsIFile* aDBFile,
-- nsIFile* aFileManagerDirectory,
-+ nsIFile* aFMDirectory,
-+ const nsAString& aName,
-+ const nsACString& aOrigin,
- mozIStorageConnection** aConnection)
- {
- NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
- NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-
-- NS_NAMED_LITERAL_CSTRING(quotaVFSName, "quota");
-+ nsCOMPtr<nsIFileURL> dbFileUrl =
-+ IDBFactory::GetDatabaseFileURL(aDBFile, aOrigin);
-+ NS_ENSURE_TRUE(dbFileUrl, NS_ERROR_FAILURE);
-
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-+ nsCOMPtr<mozIStorageService> ss =
- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- nsresult rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName,
-- getter_AddRefs(connection));
-+ nsresult rv =
-+ ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- if (rv == NS_ERROR_FILE_CORRUPTED) {
- // If we're just opening the database during origin initialization, then
- // we don't want to erase any files. The failure here will fail origin
-@@ -1737,21 +1742,20 @@ OpenDatabaseHelper::CreateDatabaseConnection(
- NS_ENSURE_SUCCESS(rv, rv);
-
- bool exists;
-- rv = aFileManagerDirectory->Exists(&exists);
-+ rv = aFMDirectory->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (exists) {
- bool isDirectory;
-- rv = aFileManagerDirectory->IsDirectory(&isDirectory);
-+ rv = aFMDirectory->IsDirectory(&isDirectory);
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = aFileManagerDirectory->Remove(true);
-+ rv = aFMDirectory->Remove(true);
- NS_ENSURE_SUCCESS(rv, rv);
- }
-
-- rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName,
-- getter_AddRefs(connection));
-+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- }
- NS_ENSURE_SUCCESS(rv, rv);
-
-@@ -2347,6 +2351,8 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- {
- NS_ASSERTION(!aConnection, "How did we get a connection here?");
-
-+ const FactoryPrivilege& privilege = mOpenHelper->Privilege();
-+
- IndexedDatabaseManager* mgr = IndexedDatabaseManager::Get();
- NS_ASSERTION(mgr, "This should never fail!");
-
-@@ -2372,59 +2378,57 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- rv = dbFile->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- int rc;
--
- if (exists) {
-- nsString dbFilePath;
-- rv = dbFile->GetPath(dbFilePath);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ int64_t fileSize;
-
-- rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(dbFilePath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete db file!");
-- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-+ if (privilege != Chrome) {
-+ rv = dbFile->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
- }
-
-- // sqlite3_quota_remove won't actually remove anything if we're not tracking
-- // the quota here. Manually remove the file if it exists.
-- rv = dbFile->Exists(&exists);
-+ rv = dbFile->Remove(false);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- if (exists) {
-- rv = dbFile->Remove(false);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ if (privilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, fileSize);
- }
- }
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = directory->Clone(getter_AddRefs(fileManagerDirectory));
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = directory->Clone(getter_AddRefs(fmDirectory));
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Append(filename);
-+ rv = fmDirectory->Append(filename);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Exists(&exists);
-+ rv = fmDirectory->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- if (exists) {
- bool isDirectory;
-- rv = fileManagerDirectory->IsDirectory(&isDirectory);
-+ rv = fmDirectory->IsDirectory(&isDirectory);
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsString fileManagerDirectoryPath;
-- rv = fileManagerDirectory->GetPath(fileManagerDirectoryPath);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ uint64_t usage = 0;
-
-- rc = sqlite3_quota_remove(
-- NS_ConvertUTF16toUTF8(fileManagerDirectoryPath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete file directory!");
-- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-+ if (privilege != Chrome) {
-+ rv = FileManager::GetUsage(fmDirectory, &usage);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
- }
-
-- rv = fileManagerDirectory->Remove(true);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ rv = fmDirectory->Remove(true);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+
-+ if (privilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, usage);
-+ }
- }
-
- return NS_OK;
-diff --git dom/indexedDB/OpenDatabaseHelper.h dom/indexedDB/OpenDatabaseHelper.h
-index 587301b..5a3d987 100644
---- dom/indexedDB/OpenDatabaseHelper.h
-+++ dom/indexedDB/OpenDatabaseHelper.h
-@@ -77,10 +77,16 @@ public:
- return mDatabase;
- }
-
-+ const FactoryPrivilege& Privilege() const
-+ {
-+ return mPrivilege;
-+ }
-+
- static
-- nsresult CreateDatabaseConnection(const nsAString& aName,
-- nsIFile* aDBFile,
-- nsIFile* aFileManagerDirectory,
-+ nsresult CreateDatabaseConnection(nsIFile* aDBFile,
-+ nsIFile* aFMDirectory,
-+ const nsAString& aName,
-+ const nsACString& aOrigin,
- mozIStorageConnection** aConnection);
-
- protected:
-diff --git dom/indexedDB/nsIStandardFileStream.idl dom/indexedDB/nsIStandardFileStream.idl
-deleted file mode 100644
-index 265c3ed..0000000
---- dom/indexedDB/nsIStandardFileStream.idl
-+++ /dev/null
-@@ -1,60 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "nsISupports.idl"
--
--interface nsIFile;
--
--/**
-- * A stream that allows you to read from a file or stream to a file
-- * using standard file APIs.
-- */
--[scriptable, uuid(ebbbb779-92a3-4b2a-b7cf-6efbe904c453)]
--interface nsIStandardFileStream : nsISupports
--{
-- /**
-- * If this is set, the file will be opened (i.e., a call to
-- * fopen done) only when we do an actual operation on the stream,
-- * or more specifically, when one of the following is called:
-- * - Seek
-- * - Tell
-- * - SetEOF
-- * - Available
-- * - Read
-- * - Write
-- * - Flush
-- * - GetSize
-- * - GetLastModified
-- * - Sync
-- *
-- * FLAGS_DEFER_OPEN is useful if we use the stream on a background
-- * thread, so that the opening and possible |stat|ing of the file
-- * happens there as well.
-- *
-- * @note Using this flag results in the file not being opened
-- * during the call to Init. This means that any errors that might
-- * happen when this flag is not set would happen during the
-- * first read. Also, the file is not locked when Init is called,
-- * so it might be deleted before we try to read from it.
-- */
-- const long FLAGS_DEFER_OPEN = 1 << 0;
--
-- /**
-- * @param file file to read from or stream to
-- * @param mode file open mode (see fopen documentation)
-- * @param flags flags specifying various behaviors of the class
-- * (see enumerations in the class)
-- */
-- void init(in nsIFile file,
-- in AString mode,
-- in long flags);
--
-- /**
-- * Flush all written content held in memory buffers out to disk.
-- * This is the equivalent of fflush()
-- */
-- void flushBuffers();
--};
-diff --git dom/indexedDB/test/Makefile.in dom/indexedDB/test/Makefile.in
-index 9c79b14..4c9a201 100644
---- dom/indexedDB/test/Makefile.in
-+++ dom/indexedDB/test/Makefile.in
-@@ -54,11 +54,13 @@ MOCHITEST_FILES = \
- test_file_os_delete.html \
- test_file_put_get_object.html \
- test_file_put_get_values.html \
-+ test_file_quota.html \
- test_file_replace.html \
- test_file_resurrection_delete.html \
- test_file_resurrection_transaction_abort.html \
- test_file_sharing.html \
- test_file_transaction_abort.html \
-+ test_filehandle_quota.html \
- test_filehandle_serialization.html \
- test_filehandle_store_snapshot.html \
- test_getAll.html \
-diff --git dom/indexedDB/test/file.js dom/indexedDB/test/file.js
-index 07bd10a..3c6194a 100644
---- dom/indexedDB/test/file.js
-+++ dom/indexedDB/test/file.js
-@@ -3,6 +3,8 @@
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-+const DEFAULT_QUOTA = 50 * 1024 * 1024;
-+
- var bufferCache = [];
- var utils = SpecialPowers.getDOMWindowUtils(window);
-
-@@ -184,25 +186,6 @@ function getUsage(usageHandler)
- idbManager.getUsageForURI(uri, callback);
- }
-
--function getUsageSync()
--{
-- let usage;
--
-- getUsage(function(aUsage, aFileUsage) {
-- usage = aUsage;
-- });
--
-- let comp = SpecialPowers.wrap(Components);
-- let thread = comp.classes["@mozilla.org/thread-manager;1"]
-- .getService(comp.interfaces.nsIThreadManager)
-- .currentThread;
-- while (!usage) {
-- thread.processNextEvent(true);
-- }
--
-- return usage;
--}
--
- function scheduleGC()
- {
- SpecialPowers.exactGC(window, continueToNextStep);
-diff --git dom/indexedDB/test/test_file_quota.html dom/indexedDB/test/test_file_quota.html
-index b07880d..9fbc0c0 100644
---- dom/indexedDB/test/test_file_quota.html
-+++ dom/indexedDB/test/test_file_quota.html
-@@ -13,14 +13,12 @@
- function testSteps()
- {
- const READ_WRITE = IDBTransaction.READ_WRITE;
-- const DEFAULT_QUOTA_MB = 50;
-
- const name = window.location.pathname;
-
- const objectStoreName = "Blobs";
-
-- const testData = { key: 0, value: {} };
-- const fileData = { key: 1, file: null };
-+ const fileData = { key: 1, file: getNullFile("random.bin", DEFAULT_QUOTA) };
-
- let request = indexedDB.open(name, 1);
- request.onerror = errorHandler;
-@@ -32,21 +30,17 @@
-
- let db = event.target.result;
-
-- let objectStore = db.createObjectStore(objectStoreName, { });
-- objectStore.add(testData.value, testData.key);
--
-- let size = (DEFAULT_QUOTA_MB + 1) * 1024 * 1024 - getUsageSync();
-- fileData.file = getNullFile("random.bin", size);
-+ db.createObjectStore(objectStoreName, { });
-
- event = yield;
-
- is(event.type, "success", "Got correct event type");
-
- trans = db.transaction([objectStoreName], READ_WRITE);
-- objectStore = trans.objectStore(objectStoreName);
-+ let objectStore = trans.objectStore(objectStoreName);
-
- request = objectStore.add(fileData.file, fileData.key);
-- request.addEventListener("error", new ExpectError("UnknownError"));
-+ request.addEventListener("error", new ExpectError("UnknownError", true));
- request.onsuccess = unexpectedSuccessHandler;
- event = yield;
-
-diff --git dom/indexedDB/test/test_filehandle_quota.html dom/indexedDB/test/test_filehandle_quota.html
-index addaf01..0506279 100644
---- dom/indexedDB/test/test_filehandle_quota.html
-+++ dom/indexedDB/test/test_filehandle_quota.html
-@@ -13,7 +13,6 @@
- function testSteps()
- {
- const READ_WRITE = IDBTransaction.READ_WRITE;
-- const DEFAULT_QUOTA_MB = 50;
-
- const name = window.location.pathname;
-
-@@ -39,10 +38,10 @@
-
- let lockedFile = fileHandle.open("readwrite");
-
-- let blob = getNullBlob((50 + 1) * 1024 * 1024 - getUsageSync());
-+ let blob = getNullBlob(DEFAULT_QUOTA);
-
- request = lockedFile.write(blob);
-- request.addEventListener("error", new ExpectError("UnknownError"));
-+ request.addEventListener("error", new ExpectError("UnknownError", true));
- request.onsuccess = unexpectedSuccessHandler;
- event = yield;
-
-diff --git dom/quota/FileStreams.cpp dom/quota/FileStreams.cpp
-new file mode 100644
-index 0000000..9de244f
---- /dev/null
-+++ dom/quota/FileStreams.cpp
-@@ -0,0 +1,123 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "FileStreams.h"
-+
-+USING_QUOTA_NAMESPACE
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStream<FileStreamBase>::SetEOF()
-+{
-+ nsresult rv = FileStreamBase::SetEOF();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (mQuotaObject) {
-+ int64_t offset;
-+ nsresult rv = FileStreamBase::Tell(&offset);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mQuotaObject->UpdateSize(offset);
-+ }
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStream<FileStreamBase>::Close()
-+{
-+ nsresult rv = FileStreamBase::Close();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mQuotaObject = nullptr;
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+nsresult
-+FileQuotaStream<FileStreamBase>::DoOpen()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ NS_ASSERTION(!mQuotaObject, "Creating quota object more than once?");
-+ mQuotaObject = quotaManager->GetQuotaObject(mOrigin,
-+ FileStreamBase::mOpenParams.localFile);
-+
-+ nsresult rv = FileStreamBase::DoOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (mQuotaObject && (FileStreamBase::mOpenParams.ioFlags & PR_TRUNCATE)) {
-+ mQuotaObject->UpdateSize(0);
-+ }
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStreamWithWrite<FileStreamBase>::Write(const char* aBuf,
-+ uint32_t aCount,
-+ uint32_t* _retval)
-+{
-+ nsresult rv;
-+
-+ if (FileQuotaStreamWithWrite::mQuotaObject) {
-+ int64_t offset;
-+ rv = FileStreamBase::Tell(&offset);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!FileQuotaStreamWithWrite::
-+ mQuotaObject->MaybeAllocateMoreSpace(offset, aCount)) {
-+ return NS_ERROR_FAILURE;
-+ }
-+ }
-+
-+ rv = FileStreamBase::Write(aBuf, aCount, _retval);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ return NS_OK;
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileInputStream, nsFileInputStream)
-+
-+already_AddRefed<FileInputStream>
-+FileInputStream::Create(const nsACString& aOrigin, nsIFile* aFile,
-+ int32_t aIOFlags, int32_t aPerm,
-+ int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileInputStream> stream = new FileInputStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileOutputStream, nsFileOutputStream)
-+
-+already_AddRefed<FileOutputStream>
-+FileOutputStream::Create(const nsACString& aOrigin, nsIFile* aFile,
-+ int32_t aIOFlags, int32_t aPerm,
-+ int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileOutputStream> stream = new FileOutputStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileStream, nsFileStream)
-+
-+already_AddRefed<FileStream>
-+FileStream::Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags,
-+ int32_t aPerm, int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileStream> stream = new FileStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-diff --git dom/quota/FileStreams.h dom/quota/FileStreams.h
-new file mode 100644
-index 0000000..77bfad4
---- /dev/null
-+++ dom/quota/FileStreams.h
-@@ -0,0 +1,115 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_filestreams_h__
-+#define mozilla_dom_quota_filestreams_h__
-+
-+#include "QuotaCommon.h"
-+
-+#include "nsFileStreams.h"
-+
-+#include "QuotaManager.h"
-+
-+BEGIN_QUOTA_NAMESPACE
-+
-+template <class FileStreamBase>
-+class FileQuotaStream : public FileStreamBase
-+{
-+public:
-+ // nsFileStreamBase override
-+ NS_IMETHOD
-+ SetEOF() MOZ_OVERRIDE;
-+
-+ NS_IMETHOD
-+ Close() MOZ_OVERRIDE;
-+
-+protected:
-+ FileQuotaStream(const nsACString& aOrigin)
-+ : mOrigin(aOrigin)
-+ { }
-+
-+ // nsFileStreamBase override
-+ virtual nsresult
-+ DoOpen() MOZ_OVERRIDE;
-+
-+ nsCString mOrigin;
-+ nsRefPtr<QuotaObject> mQuotaObject;
-+};
-+
-+template <class FileStreamBase>
-+class FileQuotaStreamWithWrite : public FileQuotaStream<FileStreamBase>
-+{
-+public:
-+ // nsFileStreamBase override
-+ NS_IMETHOD
-+ Write(const char* aBuf, uint32_t aCount, uint32_t* _retval) MOZ_OVERRIDE;
-+
-+protected:
-+ FileQuotaStreamWithWrite(const nsACString& aOrigin)
-+ : FileQuotaStream<FileStreamBase>(aOrigin)
-+ { }
-+};
-+
-+class FileInputStream : public FileQuotaStream<nsFileInputStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileInputStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileInputStream(const nsACString& aOrigin)
-+ : FileQuotaStream<nsFileInputStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileInputStream() {
-+ Close();
-+ }
-+};
-+
-+class FileOutputStream : public FileQuotaStreamWithWrite<nsFileOutputStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileOutputStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileOutputStream(const nsACString& aOrigin)
-+ : FileQuotaStreamWithWrite<nsFileOutputStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileOutputStream() {
-+ Close();
-+ }
-+};
-+
-+class FileStream : public FileQuotaStreamWithWrite<nsFileStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileStream(const nsACString& aOrigin)
-+ : FileQuotaStreamWithWrite<nsFileStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileStream() {
-+ Close();
-+ }
-+};
-+
-+END_QUOTA_NAMESPACE
-+
-+#endif /* mozilla_dom_quota_filestreams_h__ */
-diff --git dom/quota/Makefile.in dom/quota/Makefile.in
-new file mode 100644
-index 0000000..49be551
---- /dev/null
-+++ dom/quota/Makefile.in
-@@ -0,0 +1,33 @@
-+# This Source Code Form is subject to the terms of the Mozilla Public
-+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+# You can obtain one at http://mozilla.org/MPL/2.0/.
-+
-+DEPTH = ../..
-+topsrcdir = @top_srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-+
-+include $(DEPTH)/config/autoconf.mk
-+
-+MODULE = dom
-+LIBRARY_NAME = domquota_s
-+XPIDL_MODULE = dom_quota
-+LIBXUL_LIBRARY = 1
-+FORCE_STATIC_LIB = 1
-+
-+include $(topsrcdir)/dom/dom-config.mk
-+
-+EXPORTS_NAMESPACES = mozilla/dom/quota
-+
-+CPPSRCS = \
-+ FileStreams.cpp \
-+ QuotaManager.cpp \
-+ $(NULL)
-+
-+EXPORTS_mozilla/dom/quota = \
-+ FileStreams.h \
-+ QuotaCommon.h \
-+ QuotaManager.h \
-+ $(NULL)
-+
-+include $(topsrcdir)/config/rules.mk
-diff --git dom/quota/QuotaCommon.h dom/quota/QuotaCommon.h
-new file mode 100644
-index 0000000..a415d17
---- /dev/null
-+++ dom/quota/QuotaCommon.h
-@@ -0,0 +1,23 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_quotacommon_h__
-+#define mozilla_dom_quota_quotacommon_h__
-+
-+#include "nsAutoPtr.h"
-+#include "nsCOMPtr.h"
-+#include "nsDebug.h"
-+#include "nsStringGlue.h"
-+#include "nsTArray.h"
-+
-+#define BEGIN_QUOTA_NAMESPACE \
-+ namespace mozilla { namespace dom { namespace quota {
-+#define END_QUOTA_NAMESPACE \
-+ } /* namespace quota */ } /* namespace dom */ } /* namespace mozilla */
-+#define USING_QUOTA_NAMESPACE \
-+ using namespace mozilla::dom::quota;
-+
-+#endif // mozilla_dom_quota_quotacommon_h__
-diff --git dom/quota/QuotaManager.cpp dom/quota/QuotaManager.cpp
-new file mode 100644
-index 0000000..b251606
---- /dev/null
-+++ dom/quota/QuotaManager.cpp
-@@ -0,0 +1,294 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "QuotaManager.h"
-+
-+#include "nsIFile.h"
-+
-+#include "mozilla/ClearOnShutdown.h"
-+#include "nsComponentManagerUtils.h"
-+
-+#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
-+
-+USING_QUOTA_NAMESPACE
-+
-+namespace {
-+
-+nsAutoPtr<QuotaManager> gInstance;
-+
-+PLDHashOperator
-+RemoveQuotaForPatternCallback(const nsACString& aKey,
-+ nsRefPtr<OriginInfo>& aValue,
-+ void* aUserArg)
-+{
-+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!");
-+ NS_ASSERTION(aValue, "Null pointer!");
-+ NS_ASSERTION(aUserArg, "Null pointer!");
-+
-+ const nsACString* pattern =
-+ static_cast<const nsACString*>(aUserArg);
-+
-+ if (StringBeginsWith(aKey, *pattern)) {
-+ return PL_DHASH_REMOVE;
-+ }
-+
-+ return PL_DHASH_NEXT;
-+}
-+
-+} // anonymous namespace
-+
-+void
-+QuotaObject::AddRef()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ if (!quotaManager) {
-+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!");
-+
-+ NS_AtomicIncrementRefcnt(mRefCnt);
-+
-+ return;
-+ }
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ ++mRefCnt;
-+}
-+
-+void
-+QuotaObject::Release()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ if (!quotaManager) {
-+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!");
-+
-+ nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt);
-+ if (count == 0) {
-+ mRefCnt = 1;
-+ delete this;
-+ }
-+
-+ return;
-+ }
-+
-+ {
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ --mRefCnt;
-+
-+ if (mRefCnt > 0) {
-+ return;
-+ }
-+
-+ if (mOriginInfo) {
-+ mOriginInfo->mQuotaObjects.Remove(mPath);
-+ }
-+ }
-+
-+ delete this;
-+}
-+
-+void
-+QuotaObject::UpdateSize(int64_t aSize)
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ if (mOriginInfo) {
-+ mOriginInfo->mUsage -= mSize;
-+ mSize = aSize;
-+ mOriginInfo->mUsage += mSize;
-+ }
-+}
-+
-+bool
-+QuotaObject::MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount)
-+{
-+ int64_t end = aOffset + aCount;
-+
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ if (mSize >= end || !mOriginInfo) {
-+ return true;
-+ }
-+
-+ int64_t newUsage = mOriginInfo->mUsage - mSize + end;
-+ if (newUsage > mOriginInfo->mLimit) {
-+ if (!indexedDB::IndexedDatabaseManager::QuotaIsLifted()) {
-+ return false;
-+ }
-+
-+ nsCString origin = mOriginInfo->mOrigin;
-+
-+ mOriginInfo->LockedClearOriginInfos();
-+ NS_ASSERTION(!mOriginInfo,
-+ "Should have cleared in LockedClearOriginInfos!");
-+
-+ quotaManager->mOriginInfos.Remove(origin);
-+
-+ mSize = end;
-+
-+ return true;
-+ }
-+
-+ mOriginInfo->mUsage = newUsage;
-+ mSize = end;
-+
-+ return true;
-+}
-+
-+#ifdef DEBUG
-+void
-+OriginInfo::LockedClearOriginInfos()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->mQuotaMutex.AssertCurrentThreadOwns();
-+
-+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr);
-+}
-+#endif
-+
-+// static
-+PLDHashOperator
-+OriginInfo::ClearOriginInfoCallback(const nsAString& aKey,
-+ QuotaObject* aValue,
-+ void* aUserArg)
-+{
-+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!");
-+ NS_ASSERTION(aValue, "Null pointer!");
-+
-+ aValue->mOriginInfo = nullptr;
-+
-+ return PL_DHASH_NEXT;
-+}
-+
-+// static
-+QuotaManager*
-+QuotaManager::GetOrCreate()
-+{
-+ if (!gInstance) {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+
-+ gInstance = new QuotaManager();
-+
-+ ClearOnShutdown(&gInstance);
-+ }
-+
-+ return gInstance;
-+}
-+
-+// static
-+QuotaManager*
-+QuotaManager::Get()
-+{
-+ // Does not return an owning reference.
-+ return gInstance;
-+}
-+
-+void
-+QuotaManager::InitQuotaForOrigin(const nsACString& aOrigin,
-+ int64_t aLimit,
-+ int64_t aUsage)
-+{
-+ OriginInfo* info = new OriginInfo(aOrigin, aLimit * 1024 * 1024, aUsage);
-+
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ NS_ASSERTION(!mOriginInfos.GetWeak(aOrigin), "Replacing an existing entry!");
-+ mOriginInfos.Put(aOrigin, info);
-+}
-+
-+void
-+QuotaManager::DecreaseUsageForOrigin(const nsACString& aOrigin,
-+ int64_t aSize)
-+{
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ nsRefPtr<OriginInfo> originInfo;
-+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo));
-+
-+ if (originInfo) {
-+ originInfo->mUsage -= aSize;
-+ }
-+}
-+
-+void
-+QuotaManager::RemoveQuotaForPattern(const nsACString& aPattern)
-+{
-+ NS_ASSERTION(!aPattern.IsEmpty(), "Empty pattern!");
-+
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ mOriginInfos.Enumerate(RemoveQuotaForPatternCallback,
-+ const_cast<nsACString*>(&aPattern));
-+}
-+
-+already_AddRefed<QuotaObject>
-+QuotaManager::GetQuotaObject(const nsACString& aOrigin,
-+ nsIFile* aFile)
-+{
-+ NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-+
-+ nsString path;
-+ nsresult rv = aFile->GetPath(path);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ int64_t fileSize;
-+
-+ bool exists;
-+ rv = aFile->Exists(&exists);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ if (exists) {
-+ rv = aFile->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ }
-+ else {
-+ fileSize = 0;
-+ }
-+
-+ QuotaObject* info = nullptr;
-+ {
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ nsRefPtr<OriginInfo> originInfo;
-+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo));
-+
-+ if (!originInfo) {
-+ return nullptr;
-+ }
-+
-+ originInfo->mQuotaObjects.Get(path, &info);
-+
-+ if (!info) {
-+ info = new QuotaObject(originInfo, path, fileSize);
-+ originInfo->mQuotaObjects.Put(path, info);
-+ }
-+ }
-+
-+ nsRefPtr<QuotaObject> result = info;
-+ return result.forget();
-+}
-+
-+already_AddRefed<QuotaObject>
-+QuotaManager::GetQuotaObject(const nsACString& aOrigin,
-+ const nsAString& aPath)
-+{
-+ nsresult rv;
-+ nsCOMPtr<nsIFile> file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ rv = file->InitWithPath(aPath);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ return GetQuotaObject(aOrigin, file);
-+}
-diff --git dom/quota/QuotaManager.h dom/quota/QuotaManager.h
-new file mode 100644
-index 0000000..e19acdd
---- /dev/null
-+++ dom/quota/QuotaManager.h
-@@ -0,0 +1,147 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_quotamanager_h__
-+#define mozilla_dom_quota_quotamanager_h__
-+
-+#include "QuotaCommon.h"
-+
-+#include "mozilla/Mutex.h"
-+#include "nsDataHashtable.h"
-+#include "nsRefPtrHashtable.h"
-+#include "nsThreadUtils.h"
-+
-+BEGIN_QUOTA_NAMESPACE
-+
-+class OriginInfo;
-+class QuotaManager;
-+
-+class QuotaObject
-+{
-+ friend class OriginInfo;
-+ friend class QuotaManager;
-+
-+public:
-+ void
-+ AddRef();
-+
-+ void
-+ Release();
-+
-+ void
-+ UpdateSize(int64_t aSize);
-+
-+ bool
-+ MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount);
-+
-+private:
-+ QuotaObject(OriginInfo* aOriginInfo, const nsAString& aPath, int64_t aSize)
-+ : mOriginInfo(aOriginInfo), mPath(aPath), mSize(aSize)
-+ { }
-+
-+ virtual ~QuotaObject()
-+ { }
-+
-+ nsAutoRefCnt mRefCnt;
-+
-+ OriginInfo* mOriginInfo;
-+ nsString mPath;
-+ int64_t mSize;
-+};
-+
-+class OriginInfo
-+{
-+ friend class QuotaManager;
-+ friend class QuotaObject;
-+
-+public:
-+ OriginInfo(const nsACString& aOrigin, int64_t aLimit, int64_t aUsage)
-+ : mOrigin(aOrigin), mLimit(aLimit), mUsage(aUsage)
-+ {
-+ mQuotaObjects.Init();
-+ }
-+
-+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OriginInfo)
-+
-+private:
-+ void
-+#ifdef DEBUG
-+ LockedClearOriginInfos();
-+#else
-+ LockedClearOriginInfos()
-+ {
-+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr);
-+ }
-+#endif
-+
-+ static PLDHashOperator
-+ ClearOriginInfoCallback(const nsAString& aKey,
-+ QuotaObject* aValue, void* aUserArg);
-+
-+ nsDataHashtable<nsStringHashKey, QuotaObject*> mQuotaObjects;
-+
-+ nsCString mOrigin;
-+ int64_t mLimit;
-+ int64_t mUsage;
-+};
-+
-+class QuotaManager
-+{
-+ friend class nsAutoPtr<QuotaManager>;
-+ friend class OriginInfo;
-+ friend class QuotaObject;
-+
-+public:
-+ // Returns a non-owning reference.
-+ static QuotaManager*
-+ GetOrCreate();
-+
-+ // Returns a non-owning reference.
-+ static QuotaManager*
-+ Get();
-+
-+ void
-+ InitQuotaForOrigin(const nsACString& aOrigin,
-+ int64_t aLimit,
-+ int64_t aUsage);
-+
-+ void
-+ DecreaseUsageForOrigin(const nsACString& aOrigin,
-+ int64_t aSize);
-+
-+ void
-+ RemoveQuotaForPattern(const nsACString& aPattern);
-+
-+ already_AddRefed<QuotaObject>
-+ GetQuotaObject(const nsACString& aOrigin,
-+ nsIFile* aFile);
-+
-+ already_AddRefed<QuotaObject>
-+ GetQuotaObject(const nsACString& aOrigin,
-+ const nsAString& aPath);
-+
-+private:
-+ QuotaManager()
-+ : mQuotaMutex("QuotaManager.mQuotaMutex")
-+ {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+
-+ mOriginInfos.Init();
-+ }
-+
-+ virtual ~QuotaManager()
-+ {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+ }
-+
-+ mozilla::Mutex mQuotaMutex;
-+
-+ nsRefPtrHashtable<nsCStringHashKey, OriginInfo> mOriginInfos;
-+};
-+
-+END_QUOTA_NAMESPACE
-+
-+#endif /* mozilla_dom_quota_quotamanager_h__ */
-diff --git layout/build/Makefile.in layout/build/Makefile.in
-index e6b32da..496b55f 100644
---- layout/build/Makefile.in
-+++ layout/build/Makefile.in
-@@ -69,6 +69,7 @@ SHARED_LIBRARY_LIBS = \
- $(DEPTH)/dom/encoding/$(LIB_PREFIX)domencoding_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/file/$(LIB_PREFIX)domfile_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/power/$(LIB_PREFIX)dom_power_s.$(LIB_SUFFIX) \
-+ $(DEPTH)/dom/quota/$(LIB_PREFIX)domquota_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/settings/$(LIB_PREFIX)jsdomsettings_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/permission/$(LIB_PREFIX)jsdompermissionsettings_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/network/src/$(LIB_PREFIX)dom_network_s.$(LIB_SUFFIX) \
-diff --git netwerk/base/src/Makefile.in netwerk/base/src/Makefile.in
-index 0c0d60e..e8cef48 100644
---- netwerk/base/src/Makefile.in
-+++ netwerk/base/src/Makefile.in
-@@ -19,6 +19,7 @@ LIBXUL_LIBRARY = 1
- EXPORTS = \
- nsMIMEInputStream.h \
- nsURLHelper.h \
-+ nsFileStreams.h \
- $(NULL)
-
- EXPORTS_NAMESPACES = mozilla/net
-diff --git netwerk/base/src/nsFileStreams.cpp netwerk/base/src/nsFileStreams.cpp
-index 2420ffc..ecc26aa 100644
---- netwerk/base/src/nsFileStreams.cpp
-+++ netwerk/base/src/nsFileStreams.cpp
-@@ -51,7 +51,9 @@ nsFileStreamBase::~nsFileStreamBase()
- Close();
- }
-
--NS_IMPL_THREADSAFE_ISUPPORTS1(nsFileStreamBase, nsISeekableStream)
-+NS_IMPL_THREADSAFE_ISUPPORTS2(nsFileStreamBase,
-+ nsISeekableStream,
-+ nsIFileMetadata)
-
- NS_IMETHODIMP
- nsFileStreamBase::Seek(int32_t whence, int64_t offset)
-@@ -124,6 +126,52 @@ nsFileStreamBase::SetEOF()
- return NS_OK;
- }
-
-+NS_IMETHODIMP
-+nsFileStreamBase::GetSize(int64_t* _retval)
-+{
-+ nsresult rv = DoPendingOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!mFD) {
-+ return NS_BASE_STREAM_CLOSED;
-+ }
-+
-+ PRFileInfo64 info;
-+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-+ return NS_BASE_STREAM_OSERROR;
-+ }
-+
-+ *_retval = int64_t(info.size);
-+
-+ return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+nsFileStreamBase::GetLastModified(int64_t* _retval)
-+{
-+ nsresult rv = DoPendingOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!mFD) {
-+ return NS_BASE_STREAM_CLOSED;
-+ }
-+
-+ PRFileInfo64 info;
-+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-+ return NS_BASE_STREAM_OSERROR;
-+ }
-+
-+ int64_t modTime = int64_t(info.modifyTime);
-+ if (modTime == 0) {
-+ *_retval = 0;
-+ }
-+ else {
-+ *_retval = modTime / int64_t(PR_USEC_PER_MSEC);
-+ }
-+
-+ return NS_OK;
-+}
-+
- nsresult
- nsFileStreamBase::Close()
- {
-@@ -934,13 +982,12 @@ nsSafeFileOutputStream::Write(const char *buf, uint32_t count, uint32_t *result)
- ////////////////////////////////////////////////////////////////////////////////
- // nsFileStream
-
--NS_IMPL_ISUPPORTS_INHERITED4(nsFileStream,
-+NS_IMPL_ISUPPORTS_INHERITED3(nsFileStream,
- nsFileStreamBase,
- nsIInputStream,
- nsIOutputStream,
-- nsIFileStream,
-- nsIFileMetadata)
--
-+ nsIFileStream)
-+
- NS_IMETHODIMP
- nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm,
- int32_t behaviorFlags)
-@@ -959,50 +1006,4 @@ nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm,
- mBehaviorFlags & nsIFileStream::DEFER_OPEN);
- }
-
--NS_IMETHODIMP
--nsFileStream::GetSize(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mFD) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- PRFileInfo64 info;
-- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *_retval = int64_t(info.size);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--nsFileStream::GetLastModified(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mFD) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- PRFileInfo64 info;
-- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- int64_t modTime = int64_t(info.modifyTime);
-- if (modTime == 0) {
-- *_retval = 0;
-- }
-- else {
-- *_retval = modTime / int64_t(PR_USEC_PER_MSEC);
-- }
--
-- return NS_OK;
--}
--
- ////////////////////////////////////////////////////////////////////////////////
-diff --git netwerk/base/src/nsFileStreams.h netwerk/base/src/nsFileStreams.h
-index 13e5b45..1aa6a82 100644
---- netwerk/base/src/nsFileStreams.h
-+++ netwerk/base/src/nsFileStreams.h
-@@ -24,11 +24,13 @@
-
- ////////////////////////////////////////////////////////////////////////////////
-
--class nsFileStreamBase : public nsISeekableStream
-+class nsFileStreamBase : public nsISeekableStream,
-+ public nsIFileMetadata
- {
- public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSISEEKABLESTREAM
-+ NS_DECL_NSIFILEMETADATA
-
- nsFileStreamBase();
- virtual ~nsFileStreamBase();
-@@ -124,8 +126,8 @@ public:
- NS_IMETHOD IsNonBlocking(bool* _retval)
- {
- return nsFileStreamBase::IsNonBlocking(_retval);
-- }
--
-+ }
-+
- // Overrided from nsFileStreamBase
- NS_IMETHOD Seek(int32_t aWhence, int64_t aOffset);
-
-@@ -260,13 +262,11 @@ protected:
- class nsFileStream : public nsFileStreamBase,
- public nsIInputStream,
- public nsIOutputStream,
-- public nsIFileStream,
-- public nsIFileMetadata
-+ public nsIFileStream
- {
- public:
- NS_DECL_ISUPPORTS_INHERITED
- NS_DECL_NSIFILESTREAM
-- NS_DECL_NSIFILEMETADATA
- NS_FORWARD_NSIINPUTSTREAM(nsFileStreamBase::)
-
- // Can't use NS_FORWARD_NSIOUTPUTSTREAM due to overlapping methods
-diff --git storage/public/Makefile.in storage/public/Makefile.in
-index c485d4e..c05e6f3 100644
---- storage/public/Makefile.in
-+++ storage/public/Makefile.in
-@@ -36,7 +36,6 @@ XPIDLSRCS = \
- mozIStorageCompletionCallback.idl \
- mozIStorageBaseStatement.idl \
- mozIStorageAsyncStatement.idl \
-- mozIStorageServiceQuotaManagement.idl \
- mozIStorageVacuumParticipant.idl \
- $(NULL)
- # SEE ABOVE NOTE!
-diff --git storage/public/mozIStorageService.idl storage/public/mozIStorageService.idl
-index 3087a11..483649b 100644
---- storage/public/mozIStorageService.idl
-+++ storage/public/mozIStorageService.idl
-@@ -7,6 +7,7 @@
-
- interface mozIStorageConnection;
- interface nsIFile;
-+interface nsIFileURL;
-
- /**
- * The mozIStorageService interface is intended to be implemented by
-@@ -15,7 +16,7 @@ interface nsIFile;
- *
- * This is the only way to open a database connection.
- */
--[scriptable, uuid(fe8e95cb-b377-4c8d-bccb-d9198c67542b)]
-+[scriptable, uuid(12bfad34-cca3-40fb-8736-d8bf9db61a27)]
- interface mozIStorageService : nsISupports {
- /**
- * Get a connection to a named special database storage.
-@@ -106,6 +107,16 @@ interface mozIStorageService : nsISupports {
- */
- mozIStorageConnection openUnsharedDatabase(in nsIFile aDatabaseFile);
-
-+ /**
-+ * See openDatabase(). Exactly the same only initialized with a file URL.
-+ * Custom parameters can be passed to SQLite and VFS implementations through
-+ * the query part of the URL.
-+ *
-+ * @param aURL
-+ * A nsIFileURL that represents the database that is to be opened.
-+ */
-+ mozIStorageConnection openDatabaseWithFileURL(in nsIFileURL aFileURL);
-+
- /*
- * Utilities
- */
-diff --git storage/public/mozIStorageServiceQuotaManagement.idl storage/public/mozIStorageServiceQuotaManagement.idl
-deleted file mode 100644
-index ee5086b..0000000
---- storage/public/mozIStorageServiceQuotaManagement.idl
-+++ /dev/null
-@@ -1,99 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this
-- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "nsISupports.idl"
--
--interface mozIStorageConnection;
--interface nsIFile;
--
--[scriptable, function, uuid(ae94f0a5-ebdf-48f4-9959-085e13235d8d)]
--interface mozIStorageQuotaCallback : nsISupports
--{
-- /**
-- * Called when the file size quota for a group of databases is exceeded.
-- *
-- * @param aFilename
-- * The filename of the database that has exceeded the quota.
-- *
-- * @param aCurrentSizeLimit
-- * The current size (in bytes) of the quota.
-- *
-- * @param aCurrentTotalSize
-- * The current size of all databases in the quota group.
-- *
-- * @param aUserData
-- * Any additional data that was provided to the
-- * setQuotaForFilenamePattern function.
-- *
-- * @returns A new quota size. A new quota of 0 will disable the quota callback
-- * and any quota value less than aCurrentTotalSize will cause the
-- * database operation to fail with NS_ERROR_FILE_NO_DEVICE_SPACE.
-- */
-- long long quotaExceeded(in ACString aFilename,
-- in long long aCurrentSizeLimit,
-- in long long aCurrentTotalSize,
-- in nsISupports aUserData);
--};
--
--/**
-- * This is a temporary interface that should eventually merge with
-- * mozIStorageService.
-- */
--[scriptable, uuid(4d81faf5-fe01-428b-99b8-c94cba12fd72)]
--interface mozIStorageServiceQuotaManagement : nsISupports
--{
-- /**
-- * See mozIStorageService.openDatabase. Exactly the same only with a custom
-- * SQLite VFS.
-- */
-- mozIStorageConnection openDatabaseWithVFS(in nsIFile aDatabaseFile,
-- in ACString aVFSName);
--
-- /**
-- * Set a file size quota for a group of databases matching the given filename
-- * pattern, optionally specifying a callback when the quota is exceeded.
-- *
-- * @param aPattern
-- * A pattern to match filenames for inclusion in the quota system. May
-- * contain the following special characters:
-- * '*' Matches any sequence of zero or more characters.
-- * '?' Matches exactly one character.
-- * [...] Matches one character from the enclosed list of characters.
-- * [^...] Matches one character not in the enclosed list.
-- *
-- * @param aSizeLimit
-- * The size limit (in bytes) for the quota group.
-- *
-- * @param aCallback
-- * A callback that will be used when the quota is exceeded.
-- *
-- * @param aUserData
-- * Additional information to be passed to the callback.
-- */
-- void setQuotaForFilenamePattern(in ACString aPattern,
-- in long long aSizeLimit,
-- in mozIStorageQuotaCallback aCallback,
-- in nsISupports aUserData);
--
-- /**
-- * Adds, removes, or updates the file size information maintained by the quota
-- * system for files not opened through openDatabaseWithVFS().
-- *
-- * Use this function when you want files to be included in quota calculations
-- * that are either a) not SQLite databases, or b) SQLite databases that have
-- * not been opened.
-- *
-- * This function will have no effect on files that do not match an existing
-- * quota pattern (set previously by setQuotaForFilenamePattern()).
-- *
-- * @param aFile
-- * The file for which quota information should be updated. If the file
-- * exists then its size information will be added or refreshed. If the
-- * file does not exist then the file will be removed from tracking
-- * under the quota system.
-- */
-- void updateQuotaInformationForFile(in nsIFile aFile);
--};
-diff --git storage/public/storage.h storage/public/storage.h
-index 8e571e2..08f39f3 100644
---- storage/public/storage.h
-+++ storage/public/storage.h
-@@ -24,7 +24,6 @@
- #include "mozIStorageStatementCallback.h"
- #include "mozIStorageBindingParamsArray.h"
- #include "mozIStorageBindingParams.h"
--#include "mozIStorageServiceQuotaManagement.h"
- #include "mozIStorageVacuumParticipant.h"
- #include "mozIStorageCompletionCallback.h"
- #include "mozIStorageAsyncStatement.h"
-diff --git storage/src/TelemetryVFS.cpp storage/src/TelemetryVFS.cpp
-index 60de5c4..e4fce09 100644
---- storage/src/TelemetryVFS.cpp
-+++ storage/src/TelemetryVFS.cpp
-@@ -10,6 +10,7 @@
- #include "sqlite3.h"
- #include "nsThreadUtils.h"
- #include "mozilla/Util.h"
-+#include "mozilla/dom/quota/QuotaManager.h"
-
- /**
- * This preference is a workaround to allow users/sysadmins to identify
-@@ -24,6 +25,7 @@
- namespace {
-
- using namespace mozilla;
-+using namespace mozilla::dom::quota;
-
- struct Histograms {
- const char *name;
-@@ -82,9 +84,17 @@ private:
- };
-
- struct telemetry_file {
-- sqlite3_file base; // Base class. Must be first
-- Histograms *histograms; // histograms pertaining to this file
-- sqlite3_file pReal[1]; // This contains the vfs that actually does work
-+ // Base class. Must be first
-+ sqlite3_file base;
-+
-+ // histograms pertaining to this file
-+ Histograms *histograms;
-+
-+ // quota object for this file
-+ nsRefPtr<QuotaObject> quotaObject;
-+
-+ // This contains the vfs that actually does work
-+ sqlite3_file pReal[1];
- };
-
- /*
-@@ -99,6 +109,7 @@ xClose(sqlite3_file *pFile)
- if( rc==SQLITE_OK ){
- delete p->base.pMethods;
- p->base.pMethods = NULL;
-+ p->quotaObject = nullptr;
- }
- return rc;
- }
-@@ -126,6 +137,9 @@ int
- xWrite(sqlite3_file *pFile, const void *zBuf, int iAmt, sqlite_int64 iOfst)
- {
- telemetry_file *p = (telemetry_file *)pFile;
-+ if (p->quotaObject && !p->quotaObject->MaybeAllocateMoreSpace(iOfst, iAmt)) {
-+ return SQLITE_FULL;
-+ }
- IOThreadAutoTimer ioTimer(p->histograms->writeMS);
- int rc;
- rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst);
-@@ -144,6 +158,9 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size)
- int rc;
- Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_TRUNCATE_MS> timer;
- rc = p->pReal->pMethods->xTruncate(p->pReal, size);
-+ if (rc == SQLITE_OK && p->quotaObject) {
-+ p->quotaObject->UpdateSize(size);
-+ }
- return rc;
- }
-
-@@ -300,6 +317,18 @@ xOpen(sqlite3_vfs* vfs, const char *zName, sqlite3_file* pFile,
- break;
- }
- p->histograms = h;
-+
-+ const char* origin;
-+ if ((flags & SQLITE_OPEN_URI) &&
-+ (origin = sqlite3_uri_parameter(zName, "origin"))) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ MOZ_ASSERT(quotaManager);
-+
-+ p->quotaObject = quotaManager->GetQuotaObject(nsDependentCString(origin),
-+ NS_ConvertUTF8toUTF16(zName));
-+
-+ }
-+
- rc = orig_vfs->xOpen(orig_vfs, zName, p->pReal, flags, pOutFlags);
- if( rc != SQLITE_OK )
- return rc;
-diff --git storage/src/mozStorageConnection.cpp storage/src/mozStorageConnection.cpp
-index 3afd3e1b..430824a 100644
---- storage/src/mozStorageConnection.cpp
-+++ storage/src/mozStorageConnection.cpp
-@@ -12,6 +12,7 @@
- #include "nsIMemoryReporter.h"
- #include "nsThreadUtils.h"
- #include "nsIFile.h"
-+#include "nsIFileURL.h"
- #include "mozilla/Telemetry.h"
- #include "mozilla/Mutex.h"
- #include "mozilla/CondVar.h"
-@@ -471,34 +472,83 @@ Connection::getAsyncExecutionTarget()
- }
-
- nsresult
--Connection::initialize(nsIFile *aDatabaseFile,
-- const char* aVFSName)
-+Connection::initialize()
- {
- NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
- SAMPLE_LABEL("storage", "Connection::initialize");
-
-- int srv;
-- nsresult rv;
-+ // in memory database requested, sqlite uses a magic file name
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, NULL);
-+ if (srv != SQLITE_OK) {
-+ mDBConn = nullptr;
-+ return convertResultCode(srv);
-+ }
-+
-+ return initializeInternal(nullptr);
-+}
-+
-+nsresult
-+Connection::initialize(nsIFile *aDatabaseFile)
-+{
-+ NS_ASSERTION (aDatabaseFile, "Passed null file!");
-+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
-+ SAMPLE_LABEL("storage", "Connection::initialize");
-
- mDatabaseFile = aDatabaseFile;
-
-- if (aDatabaseFile) {
-- nsAutoString path;
-- rv = aDatabaseFile->GetPath(path);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsAutoString path;
-+ nsresult rv = aDatabaseFile->GetPath(path);
-+ NS_ENSURE_SUCCESS(rv, rv);
-
-- srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, mFlags,
-- aVFSName);
-- }
-- else {
-- // in memory database requested, sqlite uses a magic file name
-- srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, aVFSName);
-+ int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
-+ mFlags, NULL);
-+ if (srv != SQLITE_OK) {
-+ mDBConn = nullptr;
-+ return convertResultCode(srv);
- }
-+
-+ rv = initializeInternal(aDatabaseFile);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mDatabaseFile = aDatabaseFile;
-+
-+ return NS_OK;
-+}
-+
-+nsresult
-+Connection::initialize(nsIFileURL *aFileURL)
-+{
-+ NS_ASSERTION (aFileURL, "Passed null file URL!");
-+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
-+ SAMPLE_LABEL("storage", "Connection::initialize");
-+
-+ nsCOMPtr<nsIFile> databaseFile;
-+ nsresult rv = aFileURL->GetFile(getter_AddRefs(databaseFile));
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ nsAutoCString spec;
-+ rv = aFileURL->GetSpec(spec);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, NULL);
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
- }
-
-+ rv = initializeInternal(databaseFile);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mFileURL = aFileURL;
-+ mDatabaseFile = databaseFile;
-+
-+ return NS_OK;
-+}
-+
-+
-+nsresult
-+Connection::initializeInternal(nsIFile* aDatabaseFile)
-+{
- // Properly wrap the database handle's mutex.
- sharedDBMutex.initWithMutex(sqlite3_db_mutex(mDBConn));
-
-@@ -522,14 +572,14 @@ Connection::initialize(nsIFile *aDatabaseFile,
- nsAutoCString pageSizeQuery(MOZ_STORAGE_UNIQUIFY_QUERY_STR
- "PRAGMA page_size = ");
- pageSizeQuery.AppendInt(pageSize);
-- rv = ExecuteSimpleSQL(pageSizeQuery);
-+ nsresult rv = ExecuteSimpleSQL(pageSizeQuery);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Get the current page_size, since it may differ from the specified value.
- sqlite3_stmt *stmt;
- NS_NAMED_LITERAL_CSTRING(pragma_page_size,
- MOZ_STORAGE_UNIQUIFY_QUERY_STR "PRAGMA page_size");
-- srv = prepareStatement(pragma_page_size, &stmt);
-+ int srv = prepareStatement(pragma_page_size, &stmt);
- if (srv == SQLITE_OK) {
- if (SQLITE_ROW == stepStatement(stmt)) {
- pageSize = ::sqlite3_column_int64(stmt, 0);
-@@ -962,7 +1012,8 @@ Connection::Clone(bool aReadOnly,
- nsRefPtr<Connection> clone = new Connection(mStorageService, flags);
- NS_ENSURE_TRUE(clone, NS_ERROR_OUT_OF_MEMORY);
-
-- nsresult rv = clone->initialize(mDatabaseFile);
-+ nsresult rv = mFileURL ? clone->initialize(mFileURL)
-+ : clone->initialize(mDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Copy over pragmas from the original connection.
-diff --git storage/src/mozStorageConnection.h storage/src/mozStorageConnection.h
-index b71f5db..97f5cf8 100644
---- storage/src/mozStorageConnection.h
-+++ storage/src/mozStorageConnection.h
-@@ -25,6 +25,7 @@
-
- struct PRLock;
- class nsIFile;
-+class nsIFileURL;
- class nsIEventTarget;
- class nsIThread;
-
-@@ -63,18 +64,27 @@ public:
- Connection(Service *aService, int aFlags);
-
- /**
-+ * Creates the connection to an in-memory database.
-+ */
-+ nsresult initialize();
-+
-+ /**
- * Creates the connection to the database.
- *
- * @param aDatabaseFile
- * The nsIFile of the location of the database to open, or create if it
-- * does not exist. Passing in nullptr here creates an in-memory
-- * database.
-- * @param aVFSName
-- * The VFS that SQLite will use when opening this database. NULL means
-- * "default".
-+ * does not exist.
- */
-- nsresult initialize(nsIFile *aDatabaseFile,
-- const char* aVFSName = NULL);
-+ nsresult initialize(nsIFile *aDatabaseFile);
-+
-+ /**
-+ * Creates the connection to the database.
-+ *
-+ * @param aFileURL
-+ * The nsIFileURL of the location of the database to open, or create if it
-+ * does not exist.
-+ */
-+ nsresult initialize(nsIFileURL *aFileURL);
-
- // fetch the native handle
- sqlite3 *GetNativeConnection() { return mDBConn; }
-@@ -155,6 +165,8 @@ public:
- private:
- ~Connection();
-
-+ nsresult initializeInternal(nsIFile *aDatabaseFile);
-+
- /**
- * Sets the database into a closed state so no further actions can be
- * performed.
-@@ -206,6 +218,7 @@ private:
- int progressHandler();
-
- sqlite3 *mDBConn;
-+ nsCOMPtr<nsIFileURL> mFileURL;
- nsCOMPtr<nsIFile> mDatabaseFile;
-
- /**
-diff --git storage/src/mozStorageService.cpp storage/src/mozStorageService.cpp
-index 00661d6..862a7da 100644
---- storage/src/mozStorageService.cpp
-+++ storage/src/mozStorageService.cpp
-@@ -24,8 +24,6 @@
- #include "mozilla/Preferences.h"
-
- #include "sqlite3.h"
--#include "test_quota.h"
--#include "test_quota.c"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -35,61 +33,6 @@
- #include "nsIPromptService.h"
- #include "nsIMemoryReporter.h"
-
--namespace {
--
--class QuotaCallbackData
--{
--public:
-- QuotaCallbackData(mozIStorageQuotaCallback *aCallback,
-- nsISupports *aUserData)
-- : callback(aCallback), userData(aUserData)
-- {
-- MOZ_COUNT_CTOR(QuotaCallbackData);
-- }
--
-- ~QuotaCallbackData()
-- {
-- MOZ_COUNT_DTOR(QuotaCallbackData);
-- }
--
-- static void Callback(const char *zFilename,
-- sqlite3_int64 *piLimit,
-- sqlite3_int64 iSize,
-- void *pArg)
-- {
-- NS_ASSERTION(zFilename && strlen(zFilename), "Null or empty filename!");
-- NS_ASSERTION(piLimit, "Null pointer!");
--
-- QuotaCallbackData *data = static_cast<QuotaCallbackData*>(pArg);
-- if (!data) {
-- // No callback specified, return immediately.
-- return;
-- }
--
-- NS_ASSERTION(data->callback, "Should never have a null callback!");
--
-- nsDependentCString filename(zFilename);
--
-- int64_t newLimit;
-- if (NS_SUCCEEDED(data->callback->QuotaExceeded(filename, *piLimit,
-- iSize, data->userData,
-- &newLimit))) {
-- *piLimit = newLimit;
-- }
-- }
--
-- static void Destroy(void *aUserData)
-- {
-- delete static_cast<QuotaCallbackData*>(aUserData);
-- }
--
--private:
-- nsCOMPtr<mozIStorageQuotaCallback> callback;
-- nsCOMPtr<nsISupports> userData;
--};
--
--} // anonymous namespace
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -345,11 +288,10 @@ private:
- ////////////////////////////////////////////////////////////////////////////////
- //// Service
-
--NS_IMPL_THREADSAFE_ISUPPORTS3(
-+NS_IMPL_THREADSAFE_ISUPPORTS2(
- Service,
- mozIStorageService,
-- nsIObserver,
-- mozIStorageServiceQuotaManagement
-+ nsIObserver
- )
-
- Service *Service::gService = nullptr;
-@@ -438,10 +380,6 @@ Service::~Service()
-
- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_quota_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- rc = ::sqlite3_shutdown();
- if (rc != SQLITE_OK)
- NS_WARNING("sqlite3 did not shutdown cleanly.");
-@@ -636,9 +574,6 @@ Service::initialize()
- } else {
- NS_WARNING("Failed to register telemetry VFS");
- }
-- rc = ::sqlite3_quota_initialize("telemetry-vfs", 0);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
-
- // Set the default value for the toolkit.storage.synchronous pref. It will be
- // updated with the user preference on the main thread.
-@@ -739,28 +674,24 @@ Service::OpenSpecialDatabase(const char *aStorageKey,
- // connection to use a memory DB.
- }
- else if (::strcmp(aStorageKey, "profile") == 0) {
--
- rv = NS_GetSpecialDirectory(NS_APP_STORAGE_50_FILE,
- getter_AddRefs(storageFile));
- NS_ENSURE_SUCCESS(rv, rv);
-
-- nsString filename;
-- storageFile->GetPath(filename);
-- nsCString filename8 = NS_ConvertUTF16toUTF8(filename.get());
- // fall through to DB initialization
- }
- else {
- return NS_ERROR_INVALID_ARG;
- }
-
-- Connection *msc = new Connection(this, SQLITE_OPEN_READWRITE);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-+ nsRefPtr<Connection> msc = new Connection(this, SQLITE_OPEN_READWRITE);
-
-- rv = msc->initialize(storageFile);
-+ rv = storageFile ? msc->initialize(storageFile) : msc->initialize();
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
- return NS_OK;
-+
- }
-
- NS_IMETHODIMP
-@@ -774,12 +705,11 @@ Service::OpenDatabase(nsIFile *aDatabaseFile,
- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
- SQLITE_OPEN_CREATE;
- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-
- nsresult rv = msc->initialize(aDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
- return NS_OK;
- }
-
-@@ -794,12 +724,30 @@ Service::OpenUnsharedDatabase(nsIFile *aDatabaseFile,
- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_PRIVATECACHE |
- SQLITE_OPEN_CREATE;
- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-
- nsresult rv = msc->initialize(aDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
-+ return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+Service::OpenDatabaseWithFileURL(nsIFileURL *aFileURL,
-+ mozIStorageConnection **_connection)
-+{
-+ NS_ENSURE_ARG(aFileURL);
-+
-+ // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility
-+ // reasons.
-+ int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
-+ SQLITE_OPEN_CREATE | SQLITE_OPEN_URI;
-+ nsRefPtr<Connection> msc = new Connection(this, flags);
-+
-+ nsresult rv = msc->initialize(aFileURL);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ msc.forget(_connection);
- return NS_OK;
- }
-
-@@ -885,67 +833,5 @@ Service::Observe(nsISupports *, const char *aTopic, const PRUnichar *)
- return NS_OK;
- }
-
--////////////////////////////////////////////////////////////////////////////////
--//// mozIStorageServiceQuotaManagement
--
--NS_IMETHODIMP
--Service::OpenDatabaseWithVFS(nsIFile *aDatabaseFile,
-- const nsACString &aVFSName,
-- mozIStorageConnection **_connection)
--{
-- NS_ENSURE_ARG(aDatabaseFile);
--
-- // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility
-- // reasons.
-- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
-- SQLITE_OPEN_CREATE;
-- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
--
-- nsresult rv = msc->initialize(aDatabaseFile,
-- PromiseFlatCString(aVFSName).get());
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- NS_ADDREF(*_connection = msc);
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--Service::SetQuotaForFilenamePattern(const nsACString &aPattern,
-- int64_t aSizeLimit,
-- mozIStorageQuotaCallback *aCallback,
-- nsISupports *aUserData)
--{
-- NS_ENSURE_FALSE(aPattern.IsEmpty(), NS_ERROR_INVALID_ARG);
--
-- nsAutoPtr<QuotaCallbackData> data;
-- if (aSizeLimit && aCallback) {
-- data = new QuotaCallbackData(aCallback, aUserData);
-- }
--
-- int rc = ::sqlite3_quota_set(PromiseFlatCString(aPattern).get(),
-- aSizeLimit, QuotaCallbackData::Callback,
-- data, QuotaCallbackData::Destroy);
-- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc));
--
-- data.forget();
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--Service::UpdateQuotaInformationForFile(nsIFile *aFile)
--{
-- NS_ENSURE_ARG_POINTER(aFile);
--
-- nsString path;
-- nsresult rv = aFile->GetPath(path);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- int rc = ::sqlite3_quota_file(NS_ConvertUTF16toUTF8(path).get());
-- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc));
--
-- return NS_OK;
--}
--
- } // namespace storage
- } // namespace mozilla
-diff --git storage/src/mozStorageService.h storage/src/mozStorageService.h
-index 21c1ff8..3f5a546 100644
---- storage/src/mozStorageService.h
-+++ storage/src/mozStorageService.h
-@@ -15,7 +15,6 @@
- #include "mozilla/Mutex.h"
-
- #include "mozIStorageService.h"
--#include "mozIStorageServiceQuotaManagement.h"
-
- class nsIMemoryReporter;
- class nsIMemoryMultiReporter;
-@@ -28,7 +27,6 @@ namespace storage {
- class Connection;
- class Service : public mozIStorageService
- , public nsIObserver
-- , public mozIStorageServiceQuotaManagement
- {
- public:
- /**
-@@ -58,7 +56,6 @@ public:
- NS_DECL_ISUPPORTS
- NS_DECL_MOZISTORAGESERVICE
- NS_DECL_NSIOBSERVER
-- NS_DECL_MOZISTORAGESERVICEQUOTAMANAGEMENT
-
- /**
- * Obtains an already AddRefed pointer to XPConnect. This is used by
-diff --git toolkit/toolkit-makefiles.sh toolkit/toolkit-makefiles.sh
-index 6a7d714..8f1bbe0 100644
---- toolkit/toolkit-makefiles.sh
-+++ toolkit/toolkit-makefiles.sh
-@@ -68,6 +68,7 @@ MAKEFILES_dom="
- dom/plugins/base/Makefile
- dom/plugins/ipc/Makefile
- dom/power/Makefile
-+ dom/quota/Makefile
- dom/settings/Makefile
- dom/sms/Makefile
- dom/sms/interfaces/Makefile
diff --git a/www/firefox/files/patch-bug803480 b/www/firefox/files/patch-bug803480
new file mode 100644
index 000000000000..c15992fa36f8
--- /dev/null
+++ b/www/firefox/files/patch-bug803480
@@ -0,0 +1,41 @@
+diff --git configure.in configure.in
+index fa283d0..936b6e0 100644
+--- configure.in
++++ configure.in
+@@ -8229,16 +8229,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
+ NECKO_WIFI=,
+ NECKO_WIFI=1)
+
+-if test "$OS_ARCH" = "OS2"; then
+- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
+- NECKO_WIFI=
+-fi
+-if test "$NECKO_WIFI" -a \
+- "$OS_ARCH" != "Linux" -a \
+- "$OS_ARCH" != "Darwin" -a \
+- "$OS_ARCH" != "SunOS" -a \
+- "$OS_ARCH" != "WINNT"; then
+- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
++if test "$NECKO_WIFI"; then
++ case "$OS_TARGET" in
++ Android)
++ ;;
++ Darwin)
++ ;;
++ SunOS)
++ ;;
++ WINNT)
++ ;;
++ OS2)
++ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
++ NECKO_WIFI=
++ ;;
++ *)
++ if test -z "$MOZ_ENABLE_DBUS"; then
++ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
++ fi
++ ;;
++ esac
+ fi
+
+ if test "$NECKO_WIFI"; then
diff --git a/www/firefox/files/patch-bug807492 b/www/firefox/files/patch-bug807492
index 84472160d8b9..12bbb48a1cba 100644
--- a/www/firefox/files/patch-bug807492
+++ b/www/firefox/files/patch-bug807492
@@ -2,7 +2,7 @@ diff --git config/system-headers config/system-headers
index 9bd1efa..1095a01 100644
--- config/system-headers
+++ config/system-headers
-@@ -1066,8 +1066,10 @@ gst/app/gstappsink.h
+@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
@@ -17,7 +17,7 @@ diff --git configure.in configure.in
index c167461..8346c11 100644
--- configure.in
+++ configure.in
-@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then
+@@ -1449,16 +1449,27 @@ if test "$GNU_CC"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mssse3"
AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
@@ -45,7 +45,7 @@ index c167461..8346c11 100644
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
-@@ -5232,17 +5243,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow
+@@ -5259,17 +5270,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow
dnl --enable-webrtc to override. Can disable for everything in
dnl the master list above.
if test -n "$MOZ_WEBRTC"; then
@@ -64,13 +64,13 @@ index c167461..8346c11 100644
;;
esac
fi
-@@ -8909,16 +8920,21 @@ if test "${OS_TARGET}" = "WINNT"; then
- if test "$HAVE_64BIT_OS"; then
- OS_BITS=64
+@@ -9065,16 +9076,21 @@ elif test "${OS_TARGET}" = "Android"; then
+ EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android "
+ if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
+ EXTRA_GYP_DEFINES+=" -D armv7=0 "
else
- OS_BITS=32
+ EXTRA_GYP_DEFINES+=" -D armv7=1 "
fi
- EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
fi
+# Don't try to compile sse4.1 code if toolchain doesn't support
@@ -85,12 +85,12 @@ index c167461..8346c11 100644
dnl so that regeneration via dependencies works correctly
WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
- GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
+ GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
diff --git js/src/config/system-headers js/src/config/system-headers
index 9bd1efa..1095a01 100644
--- js/src/config/system-headers
+++ js/src/config/system-headers
-@@ -1066,8 +1066,10 @@ gst/app/gstappsink.h
+@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
@@ -114,20 +114,20 @@ index f1fc85f..141e8ca 100644
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \
$(NULL)
--ifeq ($(OS_ARCH), Darwin)
+-ifeq ($(OS_TARGET), Darwin)
+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LOCAL_INCLUDES += \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
$(NULL)
-+ifeq ($(OS_ARCH), Darwin)
++ifeq ($(OS_TARGET), Darwin)
DEFINES += -DDARWIN
+else
+DEFINES += -DBSD
+endif
endif
- ifeq ($(OS_ARCH), Linux)
+ ifeq ($(OS_TARGET), Linux)
LOCAL_INCLUDES += \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
@@ -146,7 +146,7 @@ index c1d5bf4..2ecf2c7 100644
endif
endif
--ifeq ($(OS_ARCH), Darwin)
+-ifeq ($(OS_TARGET), Darwin)
+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include
+ifeq ($(OS_TARGET), Darwin)
@@ -156,13 +156,13 @@ index c1d5bf4..2ecf2c7 100644
endif
+endif
- ifeq ($(OS_ARCH), Linux)
+ ifeq ($(OS_TARGET), Linux)
LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include
endif
- ifneq ($(OS_TARGET),WINNT)
- CPP_UNIT_TESTS = \
- ice_unittest.cpp \
+ ifeq ($(OS_TARGET), Android)
+ LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include
+
diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_party/nICEr/nicer.gyp
index 0e1f8b4..9a4b995 100644
--- media/mtransport/third_party/nICEr/nicer.gyp
@@ -210,7 +210,27 @@ diff --git media/mtransport/third_party/nICEr/src/stun/addrs.c media/mtransport/
index b0b66b2..04fea94 100644
--- media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ media/mtransport/third_party/nICEr/src/stun/addrs.c
-@@ -69,17 +69,17 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
+@@ -50,17 +50,19 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
+ #else
+ #include <syslog.h>
+ /* Work around an Android NDK < r8c bug */
+ #undef __unused
+ #include <linux/sysctl.h>
+ #endif
+ #include <net/if.h>
+ #ifndef LINUX
++#if !defined(__OpenBSD__) && !defined(__NetBSD__)
+ #include <net/if_var.h>
++#endif
+ #include <net/if_dl.h>
+ #include <net/if_types.h>
+ #include <sys/sockio.h>
+ #else
+ #include <linux/if.h>
+ #endif
+ #include <net/route.h>
+
+@@ -75,17 +77,17 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
#include <netdb.h>
#endif /* UNIX */
@@ -229,7 +249,7 @@ index b0b66b2..04fea94 100644
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
-@@ -675,17 +675,17 @@ nr_stun_remove_duplicate_addrs(nr_transport_addr addrs[], int remove_loopback, i
+@@ -685,17 +687,17 @@ nr_stun_remove_duplicate_addrs(nr_transport_addr addrs[], int remove_loopback, i
}
int
@@ -252,12 +272,18 @@ diff --git media/mtransport/third_party/nICEr/src/stun/stun.h media/mtransport/t
index a3c51f9..eb65ac8 100644
--- media/mtransport/third_party/nICEr/src/stun/stun.h
+++ media/mtransport/third_party/nICEr/src/stun/stun.h
-@@ -40,17 +40,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@@ -36,21 +36,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifdef WIN32
+ #include <winsock2.h>
+ #else
#include <sys/param.h>
#include <sys/socket.h>
#include <net/if.h>
#ifndef LINUX
++#if !defined(__OpenBSD__) && !defined(__NetBSD__)
#include <net/if_var.h>
++#endif
#include <net/if_dl.h>
#include <net/if_types.h>
#endif
@@ -341,13 +367,13 @@ index cc260b7..66af2d7 100644
if (!(my_locale = r_strdup(setlocale(LC_CTYPE, 0))))
ABORT(R_NO_MEMORY);
-@@ -91,28 +99,28 @@ mbslen(const char *s, size_t *ncharsp)
- if (!strstr(my_locale, "UTF-8"))
- ABORT(R_NOT_FOUND);
+@@ -93,28 +101,28 @@ mbslen(const char *s, size_t *ncharsp)
#else
- /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
- if (! strcasestr(setlocale(LC_CTYPE, 0), "UTF-8"))
- ABORT(R_NOT_FOUND);
+ /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
+ /* null-checking setlocale is required because Android */
+ char *locale = setlocale(LC_CTYPE, 0);
+ if (!locale || !strcasestr(locale, "UTF-8"))
+ ABORT(R_NOT_FOUND);
#endif
-#ifdef DARWIN
@@ -416,6 +442,28 @@ index 3cc8e1c..74016c6 100644
'NEW_STDIO'
'RETSIGTYPE=void',
'TIME_WITH_SYS_TIME_H=1',
+diff --git media/mtransport/third_party/nrappkit/src/log/r_log.c media/mtransport/third_party/nrappkit/src/log/r_log.c
+index b25d5c2..b207b8c 100644
+--- media/mtransport/third_party/nrappkit/src/log/r_log.c
++++ media/mtransport/third_party/nrappkit/src/log/r_log.c
+@@ -43,16 +43,17 @@ static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adam
+ #ifdef LINUX
+ #define _BSD_SOURCE
+ #endif
+
+ #include "r_log.h"
+ #include "hex.h"
+
+ #include <string.h>
++#include <errno.h>
+ #ifndef _MSC_VER
+ #include <strings.h>
+ #include <syslog.h>
+ #endif
+ #include <registry.h>
+ #include <time.h>
+
+
diff --git media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
index 15452e3..2c9651a 100644
--- media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
@@ -446,20 +494,20 @@ diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/qu
index bcb1ec0..bb73591 100644
--- media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
+++ media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-@@ -33,5 +33,5 @@
- #define _SYS_QUEUE_H_
-
+@@ -33,7 +33,7 @@
+ #ifndef _SYS_QUEUE_H_
+ #define _SYS_QUEUE_H_
+
-#ifndef DARWIN
-+#if !defined(BSD) && !defined(DARWIN)
++#if !defined(__FreeBSD__) && !defined(DARWIN)
#include <stddef.h>
#define __offsetof offsetof
#endif
-
diff --git media/mtransport/third_party/nrappkit/src/util/util.c media/mtransport/third_party/nrappkit/src/util/util.c
index 3aced8b..be020bb 100644
--- media/mtransport/third_party/nrappkit/src/util/util.c
+++ media/mtransport/third_party/nrappkit/src/util/util.c
-@@ -36,16 +36,19 @@
+@@ -36,20 +36,24 @@
ekr@rtfm.com Wed Dec 26 17:19:36 2001
*/
@@ -475,11 +523,16 @@ index 3aced8b..be020bb 100644
#include <dirent.h>
#endif
#include <string.h>
++#include <errno.h>
#include <ctype.h>
#include <sys/stat.h>
#ifdef OPENSSL
#include <openssl/evp.h>
-@@ -431,17 +434,17 @@ int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_
+ #endif
+ #include "nr_common.h"
+ #include "r_common.h"
+ #include "registry.h"
+@@ -431,17 +435,17 @@ int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_
abort:
if(die && _status){
r_log(log_fac,LOG_CRIT,"Exiting due to invalid configuration (key '%s')",key);
@@ -499,15 +552,15 @@ index 3aced8b..be020bb 100644
if (! buf)
diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp
-index f0cbf870..ba0f801 100644
+index 2a91e3d..31de641 100644
--- media/webrtc/signaling/signaling.gyp
+++ media/webrtc/signaling/signaling.gyp
-@@ -208,16 +208,29 @@
+@@ -212,16 +212,29 @@
'SIPCC_BUILD',
'HAVE_WINSOCK2_H',
'CPR_STDINT_INCLUDE=\\"mozilla/StandardInteger.h\\"'
],
-
+
'cflags_mozilla': [
],
}],
@@ -529,34 +582,34 @@ index f0cbf870..ba0f801 100644
],
'defines': [
'SIP_OS_OSX',
- 'OSX',
+ 'OSX',
'_FORTIFY_SOURCE=2',
],
-@@ -701,17 +714,17 @@
+@@ -747,17 +760,17 @@
'EXTERNAL_TICK_REQUIRED',
'GIPS_VER=3480',
],
-
+
'cflags_mozilla': [
],
-
+
}],
- ['OS=="mac"', {
+ ['OS=="mac" or os_bsd==1', {
'include_dirs': [
],
-
+
'sources': [
# SIPSTACK
'./src/sipcc/core/sipstack/sip_platform_task.c',
-
-@@ -746,24 +759,23 @@
+
+@@ -792,24 +805,23 @@
'./src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c',
'./src/sipcc/cpr/darwin/cpr_darwin_tst.h',
'./src/sipcc/cpr/darwin/cpr_darwin_types.h',
],
-
+
'defines' : [
'SIP_OS_OSX',
@@ -571,12 +624,12 @@ index f0cbf870..ba0f801 100644
- '_DARWIN_C_SOURCE',
'NO_NSPR_10_SUPPORT',
],
-
+
'cflags_mozilla': [
],
}],
],
-
+
diff --git media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
index a7c47e1..4f191de 100644
--- media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
@@ -611,7 +664,7 @@ diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/M
index a30e330..cfbd8a3 100644
--- media/webrtc/signaling/test/Makefile.in
+++ media/webrtc/signaling/test/Makefile.in
-@@ -22,32 +22,32 @@ LIBS = \
+@@ -22,17 +22,17 @@ LIBS = \
$(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
$(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
$(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \
@@ -620,7 +673,7 @@ index a30e330..cfbd8a3 100644
$(NULL)
ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
+-ifeq ($(OS_TARGET),Linux)
+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LIBS += \
$(MOZ_ALSA_LIBS) \
@@ -628,22 +681,25 @@ index a30e330..cfbd8a3 100644
endif
endif
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
+ ifeq ($(OS_TARGET),Android)
+ LIBS += \
+@@ -76,17 +76,17 @@ endif
+ ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
LIBS += \
$(XLIBS) \
- $(MOZ_GTK2_LIBS) \
- -lgthread-2.0 \
+ $(TK_LIBS) \
+ $(MOZ_PANGO_LIBS) \
$(NULL)
endif
--ifeq ($(OS_ARCH),Linux)
+-ifeq ($(OS_TARGET),Linux)
+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LIBS += \
$(MOZ_CAIRO_OSLIBS) \
$(NULL)
endif
- ifeq ($(OS_ARCH),Darwin)
+ ifeq ($(OS_TARGET),Darwin)
LIBS += \
-framework AudioToolbox \
diff --git media/webrtc/trunk/build/common.gypi media/webrtc/trunk/build/common.gypi
@@ -750,7 +806,7 @@ diff --git media/webrtc/trunk/src/build/common.gypi media/webrtc/trunk/src/build
index 9ca9f7c..d5c4ab9 100644
--- media/webrtc/trunk/src/build/common.gypi
+++ media/webrtc/trunk/src/build/common.gypi
-@@ -101,16 +101,23 @@
+@@ -101,16 +101,21 @@
'enable_protobuf%': 1,
'include_tests%': 1,
@@ -760,10 +816,8 @@ index 9ca9f7c..d5c4ab9 100644
'clang_use_chrome_plugins%': 0,
}],
+ ['OS=="linux" or OS=="solaris" or os_bsd==1', {
-+ 'include_alsa_audio%': 1,
+ 'include_v4l2_video_capture%': 1,
+ }, {
-+ 'include_alsa_audio%': 0,
+ 'include_v4l2_video_capture%': 0,
+ }],
], # conditions
@@ -774,7 +828,7 @@ index 9ca9f7c..d5c4ab9 100644
'..','../..',
],
'defines': [
-@@ -174,16 +181,28 @@
+@@ -176,16 +181,28 @@
'defines': [
'WEBRTC_LINUX',
'WEBRTC_THREAD_RR',
@@ -803,68 +857,6 @@ index 9ca9f7c..d5c4ab9 100644
'WEBRTC_CLOCK_TYPE_REALTIME',
],
}],
-diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-index 8457737..4d0f322 100644
---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-@@ -41,21 +41,25 @@
- 'audio_device_utility.h',
- 'audio_device_impl.cc',
- 'audio_device_impl.h',
- 'audio_device_config.h',
- 'dummy/audio_device_dummy.h',
- 'dummy/audio_device_utility_dummy.h',
- ],
- 'conditions': [
-- ['OS=="linux"', {
-+ ['include_alsa_audio==1', {
- 'include_dirs': [
- 'linux',
- ],
-- }], # OS==linux
-+ 'defines': [
-+ # avoiding pointless ifdef churn
-+ 'WEBRTC_LINUX',
-+ ],
-+ }], # include_alsa_audio==1
- ['OS=="mac"', {
- 'include_dirs': [
- 'mac',
- ],
- }], # OS==mac
- ['OS=="win"', {
- 'include_dirs': [
- 'win',
-@@ -111,24 +115,26 @@
- 'link_settings': {
- 'libraries': [
- '-llog',
- '-lOpenSLES',
- ],
- },
- }],
- ['OS=="linux"', {
-- 'defines': [
-- 'LINUX_ALSA',
-- ],
- 'link_settings': {
- 'libraries': [
- '-ldl',
- ],
- },
-+ }],
-+ ['include_alsa_audio==1', {
-+ 'defines': [
-+ 'LINUX_ALSA',
-+ ],
- 'conditions': [
- ['include_pulse_audio==1', {
- 'defines': [
- 'LINUX_PULSE',
- ],
- 'sources': [
- 'linux/audio_device_pulse_linux.cc',
- 'linux/audio_device_pulse_linux.h',
diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
index 203f09a..0b0b70e 100644
--- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
@@ -1341,7 +1333,7 @@ diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_captur
index 0a9765e..8d4bbf4 100644
--- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-@@ -50,17 +50,17 @@
+@@ -55,17 +55,17 @@
['include_internal_video_capture==0', {
'sources': [
'External/device_info_external.cc',
@@ -1360,7 +1352,7 @@ index 0a9765e..8d4bbf4 100644
'Linux/video_capture_linux.h',
'Linux/device_info_linux.cc',
'Linux/video_capture_linux.cc',
-@@ -157,31 +157,35 @@
+@@ -162,31 +162,35 @@
'../interface',
],
'sources': [
@@ -1798,7 +1790,7 @@ index 6334490..852ebaa 100644
namespace webrtc {
extern "C"
-@@ -116,16 +125,28 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
+@@ -116,16 +125,30 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
}
}
@@ -1811,6 +1803,8 @@ index 6334490..852ebaa 100644
+ return _lwp_self();
+#elif defined(__DragonFly__)
+ return lwp_gettid();
++#elif defined(__OpenBSD__)
++ return reinterpret_cast<uintptr_t> (pthread_self());
+#elif defined(__FreeBSD__)
+# if __FreeBSD_version > 900030
+ return pthread_getthreadid_np();
@@ -1827,7 +1821,7 @@ index 6334490..852ebaa 100644
int ThreadPosix::Construct()
{
int result = 0;
-@@ -154,16 +175,17 @@ ThreadPosix::~ThreadPosix()
+@@ -154,16 +177,17 @@ ThreadPosix::~ThreadPosix()
{
pthread_attr_destroy(&_attr);
delete _event;
@@ -1845,7 +1839,7 @@ index 6334490..852ebaa 100644
#endif
{
if (!_runFunction)
-@@ -229,31 +251,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/)
+@@ -229,31 +253,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/)
{
return false;
}
@@ -1887,7 +1881,7 @@ index 6334490..852ebaa 100644
#else
// "Normal" Linux.
const int result = sched_setaffinity(_pid,
-@@ -340,16 +370,20 @@ void ThreadPosix::Run()
+@@ -340,16 +372,20 @@ void ThreadPosix::Run()
#endif
// The event the Start() is waiting for.
_event->Set();
@@ -1908,6 +1902,29 @@ index 6334490..852ebaa 100644
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Thread without name started");
}
+diff --git media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
+index f3a5306..d9c2810 100644
+--- media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
++++ media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
+@@ -52,17 +52,17 @@ WebRtc_Word32 TracePosix::AddTime(char* traceMessage,
+ {
+ struct timeval systemTimeHighRes;
+ if (gettimeofday(&systemTimeHighRes, 0) == -1)
+ {
+ return -1;
+ }
+ struct tm buffer;
+ const struct tm* systemTime =
+- localtime_r(&systemTimeHighRes.tv_sec, &buffer);
++ localtime_r((const time_t *)(&systemTimeHighRes.tv_sec), &buffer);
+
+ const WebRtc_UWord32 ms_time = systemTimeHighRes.tv_usec / 1000;
+ WebRtc_UWord32 prevTickCount = 0;
+ if (level == kTraceApiCall)
+ {
+ prevTickCount = _prevTickCount;
+ _prevTickCount = ms_time;
+ } else {
diff --git media/webrtc/trunk/src/video_engine/vie_defines.h media/webrtc/trunk/src/video_engine/vie_defines.h
index 2cc18cc7..2c042a0 100644
--- media/webrtc/trunk/src/video_engine/vie_defines.h
@@ -1996,7 +2013,7 @@ diff --git media/webrtc/trunk/src/voice_engine/voice_engine_defines.h media/webr
index 7d4c729..4104719 100644
--- media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
+++ media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
-@@ -434,41 +434,44 @@ namespace webrtc
+@@ -437,41 +437,44 @@ namespace webrtc
#else
#define ANDROID_NOT_SUPPORTED(stat)
@@ -2042,7 +2059,7 @@ index 7d4c729..4104719 100644
#define TRUE 1
#define SOCKADDR_IN struct sockaddr_in
#define UINT unsigned int
-@@ -576,13 +579,13 @@ namespace webrtc
+@@ -579,13 +582,13 @@ namespace webrtc
// Defines
// ----------------------------------------------------------------------------
diff --git a/www/firefox/files/patch-bug810716 b/www/firefox/files/patch-bug810716
new file mode 100644
index 000000000000..8c08e9a66986
--- /dev/null
+++ b/www/firefox/files/patch-bug810716
@@ -0,0 +1,68 @@
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- configure.in
++++ configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
+index e828beb..6444246 100644
+--- extensions/auth/nsAuthGSSAPI.cpp
++++ extensions/auth/nsAuthGSSAPI.cpp
+@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
+ #endif
+
+ #if defined(HAVE_RES_NINIT)
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ #endif
+
+diff --git js/src/configure.in js/src/configure.in
+index e25f569..b9722f9 100644
+--- js/src/configure.in
++++ js/src/configure.in
+@@ -2797,14 +2797,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
diff --git a/www/firefox/files/patch-bug817267 b/www/firefox/files/patch-bug817267
deleted file mode 100644
index 84c77f9e8ac5..000000000000
--- a/www/firefox/files/patch-bug817267
+++ /dev/null
@@ -1,36 +0,0 @@
-commit faafeb1
-Author: Jan Beich <jbeich@tormail.org>
-Date: Sat Dec 1 21:25:24 2012 -0500
-
- Bug 817267 - dirfd() is a macro on some BSDs, fix build there. r=yoric
----
- dom/system/OSFileConstants.cpp | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
-index 75a41dc..63fc6b1 100644
---- dom/system/OSFileConstants.cpp
-+++ dom/system/OSFileConstants.cpp
-@@ -41,6 +41,11 @@
- #include "OSFileConstants.h"
- #include "nsIOSFileConstantsService.h"
-
-+#if defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
-+#define __dd_fd dd_fd
-+#endif
-+
- /**
- * This module defines the basic libc constants (error numbers, open modes,
- * etc.) used by OS.File and possibly other OS-bound JavaScript libraries.
-@@ -383,8 +388,8 @@ static dom::ConstantSpec gLibcProperties[] =
- { "OSFILE_OFFSETOF_DIRENT_D_TYPE", INT_TO_JSVAL(offsetof (struct dirent, d_type)) },
- #endif // defined(DT_UNKNOWN)
-
-- // Under MacOS X, |dirfd| is a macro rather than a function, so we
-- // need a little help to get it to work
-+ // Under MacOS X and BSDs, |dirfd| is a macro rather than a
-+ // function, so we need a little help to get it to work
- #if defined(dirfd)
- { "OSFILE_SIZEOF_DIR", INT_TO_JSVAL(sizeof (DIR)) },
-
diff --git a/www/firefox/files/patch-bug817481 b/www/firefox/files/patch-bug817481
deleted file mode 100644
index d2155017b565..000000000000
--- a/www/firefox/files/patch-bug817481
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 93d56d2
-Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
-Date: Mon Dec 3 17:01:16 2012 +0900
-
- Bug 817481 - Build failure on WebRTC unit test with --with-system-libvpx. r=jesup
----
- media/webrtc/signaling/test/Makefile.in | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
-index 81a38ff..e10e869 100644
---- media/webrtc/signaling/test/Makefile.in
-+++ media/webrtc/signaling/test/Makefile.in
-@@ -34,6 +34,12 @@ LIBS += \
- endif
- endif
-
-+ifdef MOZ_NATIVE_LIBVPX
-+LIBS += \
-+ $(MOZ_LIBVPX_LIBS) \
-+ $(NULL)
-+endif
-+
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
- LIBS += \
- $(XLIBS) \
diff --git a/www/firefox/files/patch-bug824317 b/www/firefox/files/patch-bug824317
new file mode 100644
index 000000000000..9568450015d5
--- /dev/null
+++ b/www/firefox/files/patch-bug824317
@@ -0,0 +1,14 @@
+diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm.h
+index fa50194a..c5f5737 100644
+--- xpcom/string/public/nsAlgorithm.h
++++ xpcom/string/public/nsAlgorithm.h
+@@ -42,7 +42,8 @@ NS_MAX( const T& a, const T& b )
+ return a > b ? a : b;
+ }
+
+-#if defined(_MSC_VER) && (_MSC_VER < 1600)
++#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || \
++ (defined(_GLIBCXX_USE_LONG_LONG) && (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC))
+ namespace std {
+ inline
+ long long
diff --git a/www/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985
index 22f98fd20720..e7df887723f7 100644
--- a/www/firefox/files/patch-bug826985
+++ b/www/firefox/files/patch-bug826985
@@ -1,106 +1,83 @@
-commit d18000b
+commit 8024d93
Author: Henrik Gulbrandsen <henrik@gulbra.net>
Date: Fri Jan 4 13:49:22 2013 +0100
Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux.
---
- configure.in | 13 ++++++
- .../main/source/Linux/device_info_linux.cc | 30 ++++++++------
- .../main/source/Linux/video_capture_linux.cc | 47 ++++++++++++----------
- .../video_capture/main/source/video_capture.gypi | 1 +
- toolkit/library/Makefile.in | 3 ++
- 5 files changed, 60 insertions(+), 34 deletions(-)
+ configure.in | 7 +++++++
+ media/webrtc/signaling/test/Makefile.in | 1 +
+ .../modules/video_capture/main/source/Linux/device_info_linux.cc | 17 +++++++++++++++++
+ .../modules/video_capture/main/source/Linux/video_capture_linux.cc | 16 +++++++++++++++-
+ .../webrtc/modules/video_capture/main/source/video_capture.gypi | 11 +++++++++++
+ toolkit/library/Makefile.in | 1 +
+ 6 files changed, 52 insertions(+), 1 deletion(-)
diff --git configure.in configure.in
-index 6d05f9c..297615f 100644
+index 55e4cd1..76567b3 100644
--- configure.in
+++ configure.in
-@@ -5270,6 +5270,17 @@ if test -n "$MOZ_WEBRTC"; then
- MOZ_VP8=1
+@@ -5238,6 +5238,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
-+ dnl use libv4l on Linux to support more cameras
-+ case "$target" in
-+ *-android*|*-linuxandroid*)
-+ ;;
-+ *-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
-+ MOZ_WEBRTC_LIBV4L=1
-+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2, ,
-+ [echo "$MOZ_LIBV4L2_PKG_ERRORS"
-+ AC_MSG_ERROR([WebRTC on Linux needs libv4l2 for video format conversion.])])
-+ ;;
-+ esac
- dnl enable once Signaling lands
- MOZ_WEBRTC_SIGNALING=1
- AC_DEFINE(MOZ_WEBRTC_SIGNALING)
-@@ -5288,6 +5299,7 @@ fi
- AC_SUBST(MOZ_WEBRTC)
- AC_SUBST(MOZ_WEBRTC_SIGNALING)
- AC_SUBST(MOZ_PEERCONNECTION)
-+AC_SUBST(MOZ_WEBRTC_LIBV4L)
- AC_SUBST(MOZ_WEBRTC_IN_LIBXUL)
- AC_SUBST(MOZ_SCTP)
- AC_SUBST(MOZ_SRTP)
+
++ dnl with libv4l2 we can support more cameras
++ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
++
+ dnl OpenSLES is only available in Android 2.3 and later; we'll change this
+ dnl hard dependency to a dynamic load with graceful runtime failure before
+ dnl we make --enable-webrtc on by default in Android (bug 815905)
+@@ -8981,6 +8984,10 @@ elif test "${OS_TARGET}" = "Android"; then
+ fi
+ fi
+
++if test -n "$MOZ_LIBV4L2_LIBS"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D use_libv4l2=1"
++fi
++
+ if test -n "$MOZ_WEBRTC"; then
+ AC_MSG_RESULT("generating WebRTC Makefiles...")
+
+diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
+index b483cd1..f1dd1f0 100644
+--- media/webrtc/signaling/test/Makefile.in
++++ media/webrtc/signaling/test/Makefile.in
+@@ -17,6 +17,7 @@ LIBS = \
+ $(NSPR_LIBS) \
+ $(NSS_LIBS) \
+ $(REALTIME_LIBS) \
++ $(MOZ_LIBV4L2_LIBS) \
+ $(DEPTH)/xpcom/glue/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
+ $(DEPTH)/media/mtransport/standalone/$(LIB_PREFIX)mtransport_s.$(LIB_SUFFIX) \
+ $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-index 653ee16..270f064 100644
+index 239a292..bab496c 100644
--- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-@@ -26,6 +26,7 @@
+@@ -26,11 +26,23 @@
#else
#include <linux/videodev2.h>
#endif
++#ifdef HAVE_LIBV4L2
+#include <libv4l2.h>
++#endif
#include "ref_count.h"
#include "trace.h"
-@@ -68,9 +69,9 @@ WebRtc_UWord32 DeviceInfoLinux::NumberOfDevices()
- for (int n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
-- close(fd);
-+ v4l2_close(fd);
- count++;
- }
- }
-@@ -97,14 +98,14 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
- for (int n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
- if (count == deviceNumber) {
- // Found the device
- found = true;
- break;
- } else {
-- close(fd);
-+ v4l2_close(fd);
- count++;
- }
- }
-@@ -115,21 +116,26 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in querying the device capability for device %s. errno = %d",
- device, errno);
-- close(fd);
-+ v4l2_close(fd);
- return -1;
- }
-- close(fd);
-+ v4l2_close(fd);
-
- char cameraName[64];
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
+ {
+ namespace videocapturemodule
+@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
memset(deviceNameUTF8, 0, deviceNameLength);
memcpy(cameraName, cap.card, sizeof(cap.card));
@@ -112,259 +89,76 @@ index 653ee16..270f064 100644
if (deviceNameLength >= strlen(cameraName))
{
memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
-@@ -181,13 +187,13 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- for (int n = 0; n < 64; ++n)
- {
- sprintf(device, "/dev/video%d", n);
-- fd = open(device, O_RDONLY);
-+ fd = v4l2_open(device, O_RDONLY);
- if (fd == -1)
- continue;
-
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
- {
- if (cap.bus_info[0] != 0)
- {
-@@ -209,7 +215,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- }
- }
- }
-- close(fd); // close since this is not the matching device
-+ v4l2_close(fd); // close since this is not the matching device
- }
-
- if (!found)
-@@ -228,7 +234,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- }
-
- int size = FillCapabilityMap(fd);
-- close(fd);
-+ v4l2_close(fd);
-
- // Store the new used device name
- _lastUsedDeviceNameLength = deviceUniqueIdUTF8Length;
-@@ -282,7 +288,7 @@ WebRtc_Word32 DeviceInfoLinux::FillCapabilityMap(int fd)
- video_fmt.fmt.pix.width = size[i][0];
- video_fmt.fmt.pix.height = size[i][1];
-
-- if (ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0)
-+ if (v4l2_ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0)
- {
- if ((video_fmt.fmt.pix.width == size[i][0])
- && (video_fmt.fmt.pix.height == size[i][1]))
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-index 12df1b3..4ddc9d4 100644
+index 12df1b3..e9863ba 100644
--- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-@@ -25,6 +25,7 @@
+@@ -25,6 +25,9 @@
#else
#include <linux/videodev2.h>
#endif
++#ifdef HAVE_LIBV4L2
+#include <libv4l2.h>
++#endif
#include <new>
-@@ -79,11 +82,11 @@ WebRtc_Word32 VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
- for (n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
- {
- if (cap.bus_info[0] != 0)
- {
-@@ -91,13 +94,13 @@ WebRtc_Word32 VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
- (const char*) deviceUniqueIdUTF8,
- strlen((const char*) deviceUniqueIdUTF8)) == 0) //match with device id
- {
-- close(fd);
-+ v4l2_close(fd);
- found = true;
- break; // fd matches with device unique id supplied
- }
- }
- }
-- close(fd); // close since this is not the matching device
-+ v4l2_close(fd); // close since this is not the matching device
- }
- }
- if (!found)
-@@ -117,7 +120,7 @@ VideoCaptureModuleV4L2::~VideoCaptureModuleV4L2()
- delete _captureCritSect;
- }
- if (_deviceFd != -1)
-- close(_deviceFd);
-+ v4l2_close(_deviceFd);
- }
-
- WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
-@@ -142,7 +145,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- char device[20];
- sprintf(device, "/dev/video%d", (int) _deviceId);
-
-- if ((_deviceFd = open(device, O_RDWR | O_NONBLOCK, 0)) < 0)
-+ if ((_deviceFd = v4l2_open(device, O_RDWR | O_NONBLOCK, 0)) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in opening %s errono = %d", device, errno);
-@@ -175,7 +178,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- for (int i = 0; i < nFormats; i++)
- {
- video_fmt.fmt.pix.pixelformat = fmts[i];
-- if (ioctl(_deviceFd, VIDIOC_TRY_FMT, &video_fmt) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_TRY_FMT, &video_fmt) < 0)
- {
- continue;
- }
-@@ -200,7 +203,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- _captureVideoType = kVideoMJPEG;
-
- //set format and frame size now
-- if (ioctl(_deviceFd, VIDIOC_S_FMT, &video_fmt) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_S_FMT, &video_fmt) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in VIDIOC_S_FMT, errno = %d", errno);
-@@ -217,7 +220,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- struct v4l2_streamparm streamparms;
- memset(&streamparms, 0, sizeof(streamparms));
- streamparms.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_G_PARM, &streamparms) < 0) {
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_G_PARM, &streamparms) < 0) {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in VIDIOC_G_PARM errno = %d", errno);
- driver_framerate_support = false;
-@@ -230,7 +233,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- streamparms.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- streamparms.parm.capture.timeperframe.numerator = 1;
- streamparms.parm.capture.timeperframe.denominator = capability.maxFPS;
-- if (ioctl(_deviceFd, VIDIOC_S_PARM, &streamparms) < 0) {
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_S_PARM, &streamparms) < 0) {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Failed to set the framerate. errno=%d", errno);
- driver_framerate_support = false;
-@@ -268,7 +271,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- // Needed to start UVC camera - from the uvcview application
- enum v4l2_buf_type type;
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Failed to turn on stream");
-@@ -303,7 +306,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StopCapture()
- _captureThread = NULL;
-
- DeAllocateVideoBuffers();
-- close(_deviceFd);
-+ v4l2_close(_deviceFd);
- _deviceFd = -1;
- }
-
-@@ -321,7 +324,7 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers()
- rbuffer.memory = V4L2_MEMORY_MMAP;
- rbuffer.count = kNoOfV4L2Bufffers;
-
-- if (ioctl(_deviceFd, VIDIOC_REQBUFS, &rbuffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_REQBUFS, &rbuffer) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Could not get buffers from device. errno = %d", errno);
-@@ -344,24 +347,24 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers()
- buffer.memory = V4L2_MEMORY_MMAP;
- buffer.index = i;
-
-- if (ioctl(_deviceFd, VIDIOC_QUERYBUF, &buffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QUERYBUF, &buffer) < 0)
- {
- return false;
- }
-
-- _pool[i].start = mmap(NULL, buffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
-+ _pool[i].start = v4l2_mmap(NULL, buffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
- _deviceFd, buffer.m.offset);
-
- if (MAP_FAILED == _pool[i].start)
- {
- for (unsigned int j = 0; j < i; j++)
-- munmap(_pool[j].start, _pool[j].length);
-+ v4l2_munmap(_pool[j].start, _pool[j].length);
- return false;
- }
-
- _pool[i].length = buffer.length;
-
-- if (ioctl(_deviceFd, VIDIOC_QBUF, &buffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QBUF, &buffer) < 0)
- {
- return false;
- }
-@@ -373,14 +376,14 @@ bool VideoCaptureModuleV4L2::DeAllocateVideoBuffers()
+@@ -26,6 +31,15 @@
+ #include "critical_section_wrapper.h"
+ #include "video_capture_linux.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
{
- // unmap buffers
- for (int i = 0; i < _buffersAllocatedByDevice; i++)
-- munmap(_pool[i].start, _pool[i].length);
-+ v4l2_munmap(_pool[i].start, _pool[i].length);
-
- delete[] _pool;
-
- // turn off stream
- enum v4l2_buf_type type;
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_STREAMOFF, &type) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_STREAMOFF, &type) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "VIDIOC_STREAMOFF error. errno: %d", errno);
-@@ -438,7 +441,7 @@ bool VideoCaptureModuleV4L2::CaptureProcess()
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- // dequeue a buffer - repeat until dequeued properly!
-- while (ioctl(_deviceFd, VIDIOC_DQBUF, &buf) < 0)
-+ while (v4l2_ioctl(_deviceFd, VIDIOC_DQBUF, &buf) < 0)
- {
- if (errno != EINTR)
- {
-@@ -457,7 +460,7 @@ bool VideoCaptureModuleV4L2::CaptureProcess()
- IncomingFrame((unsigned char*) _pool[buf.index].start,
- buf.bytesused, frameInfo);
- // enqueue the buffer again
-- if (ioctl(_deviceFd, VIDIOC_QBUF, &buf) == -1)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QBUF, &buf) == -1)
- {
- WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCapture, _id,
- "Failed to enqueue capture buffer");
+ namespace videocapturemodule
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-index 8d38102..3e8f76b 100644
+index d46b5aa..e452223 100644
--- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-@@ -179,6 +179,7 @@
- 'libraries': [
- '-lXext',
- '-lX11',
-+ '-lv4l2',
+@@ -7,6 +7,9 @@
+ # be found in the AUTHORS file in the root of the source tree.
+
+ {
++ 'variables': {
++ 'use_libv4l2%': 0,
++ },
+ 'targets': [
+ {
+ 'target_name': 'video_capture_module',
+@@ -49,6 +52,16 @@
+ }, { # include_internal_video_capture == 1
+ 'conditions': [
+ ['include_v4l2_video_capture==1', {
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
++ ],
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ 'include_dirs': [
+ 'linux',
],
- }],
- ['OS=="linux"', {
diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 0440c26..8f6c735 100644
+index 9c16ffa..1db3794 100644
--- toolkit/library/Makefile.in
+++ toolkit/library/Makefile.in
-@@ -411,6 +411,9 @@ EXTRA_DSO_LDOPTS += \
- $(DEPTH)/media/webrtc/signaling/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+ifdef MOZ_WEBRTC_LIBV4L
+@@ -405,6 +405,7 @@ endif
+ EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
+
+ ifdef MOZ_WEBRTC
+EXTRA_DSO_LDOPTS += $(MOZ_LIBV4L2_LIBS)
-+endif
- ifdef MOZ_WEBRTC_IN_LIBXUL
- include $(topsrcdir)/media/webrtc/shared_libs.mk
- EXTRA_DSO_LDOPTS += $(WEBRTC_LIBS)
+ ifdef MOZ_PEERCONNECTION
+ COMPONENT_LIBS += peerconnection
+ endif
diff --git a/www/firefox/files/patch-bug827521 b/www/firefox/files/patch-bug827521
new file mode 100644
index 000000000000..a9f76176c801
--- /dev/null
+++ b/www/firefox/files/patch-bug827521
@@ -0,0 +1,147 @@
+commit ab46441
+Author: Graeme McCutcheon <graememcc_firefox@graeme-online.co.uk>
+Date: Thu Jan 10 14:37:30 2013 +0000
+
+ Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr
+---
+ .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++---------
+ .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++----
+ content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++----
+ 3 files changed, 24 insertions(+), 17 deletions(-)
+
+diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
+index 6593461..56956b2 100644
+--- content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
++++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
+@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString)
+ {
+ for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) {
+ if (aAlignString.EqualsASCII(sAlignStrings[i])) {
+- return (i + SVG_PRESERVEASPECTRATIO_NONE);
++ return (i + SVG_ALIGN_MIN_VALID);
+ }
+ }
+
+@@ -65,12 +65,11 @@ static void
+ GetAlignString(nsAString& aAlignString, uint16_t aAlign)
+ {
+ NS_ASSERTION(
+- aAlign >= SVG_PRESERVEASPECTRATIO_NONE &&
+- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX,
++ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID,
+ "Unknown align");
+
+ aAlignString.AssignASCII(
+- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]);
++ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]);
+ }
+
+ static uint16_t
+@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice)
+ {
+ for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) {
+ if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) {
+- return (i + SVG_MEETORSLICE_MEET);
++ return (i + SVG_MEETORSLICE_MIN_VALID);
+ }
+ }
+
+@@ -89,12 +88,12 @@ static void
+ GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice)
+ {
+ NS_ASSERTION(
+- aMeetOrSlice >= SVG_MEETORSLICE_MEET &&
+- aMeetOrSlice <= SVG_MEETORSLICE_SLICE,
++ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID &&
++ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID,
+ "Unknown meetOrSlice");
+
+ aMeetOrSliceString.AssignASCII(
+- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]);
++ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]);
+ }
+
+ already_AddRefed<DOMSVGPreserveAspectRatio>
+@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString(
+ GetAlignString(tmpString, mBaseVal.mAlign);
+ aValueAsString.Append(tmpString);
+
+- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) {
++ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) {
+
+ aValueAsString.AppendLiteral(" ");
+ GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice);
+diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
+index 61cfba7..b08fb60 100644
+--- content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
++++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
+@@ -42,8 +42,7 @@ public:
+ void SetBaseValue(const SVGPreserveAspectRatio &aValue,
+ nsSVGElement *aSVGElement);
+ nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) {
+- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
+- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) {
++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
+ return NS_ERROR_FAILURE;
+ }
+ SetBaseValue(SVGPreserveAspectRatio(
+@@ -53,8 +52,8 @@ public:
+ return NS_OK;
+ }
+ nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) {
+- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
+- aMeetOrSlice > SVG_MEETORSLICE_SLICE) {
++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
+ return NS_ERROR_FAILURE;
+ }
+ SetBaseValue(SVGPreserveAspectRatio(
+diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h
+index 066ad52..ebe724e 100644
+--- content/svg/content/src/SVGPreserveAspectRatio.h
++++ content/svg/content/src/SVGPreserveAspectRatio.h
+@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) {
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
+ };
+
++// These constants represent the range of valid enum values for the <align>
++// parameter. They exclude the sentinel _UNKNOWN value.
++const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE;
++const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
++
+ // Meet-or-slice Types
+ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
+ SVG_MEETORSLICE_UNKNOWN = 0,
+@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
+ SVG_MEETORSLICE_SLICE = 2
+ };
+
++// These constants represent the range of valid enum values for the
++// <meetOrSlice> parameter. They exclude the sentinel _UNKNOWN value.
++const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET;
++const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE;
++
+ class SVGAnimatedPreserveAspectRatio;
+
+ class SVGPreserveAspectRatio MOZ_FINAL
+@@ -57,8 +67,7 @@ public:
+ {}
+
+ nsresult SetAlign(uint16_t aAlign) {
+- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
+- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX)
++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID)
+ return NS_ERROR_FAILURE;
+ mAlign = static_cast<uint8_t>(aAlign);
+ return NS_OK;
+@@ -69,8 +78,8 @@ public:
+ }
+
+ nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) {
+- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
+- aMeetOrSlice > SVG_MEETORSLICE_SLICE)
++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID)
+ return NS_ERROR_FAILURE;
+ mMeetOrSlice = static_cast<uint8_t>(aMeetOrSlice);
+ return NS_OK;
diff --git a/www/firefox/files/patch-bug836824 b/www/firefox/files/patch-bug836824
new file mode 100644
index 000000000000..807015baa616
--- /dev/null
+++ b/www/firefox/files/patch-bug836824
@@ -0,0 +1,33 @@
+commit 35107a0 (HEAD)
+Author: Paul Adenot <paul@paul.cx>
+Date: Mon Feb 4 20:21:19 2013 +0100
+
+ Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r=
+---
+ media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++
+ media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp
+index a42008e..7a31aa9 100644
+--- media/libsoundtouch/src/cpu_detect_x86.cpp
++++ media/libsoundtouch/src/cpu_detect_x86.cpp
+@@ -101,7 +101,7 @@ uint detectCPUextensions(void)
+
+ uint res = 0;
+
+-#if defined(__GNUC__)
++#if defined(__GNUC__) && defined(HAVE_CPUID_H)
+ // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support.
+ uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable.
+
+@@ -112,6 +112,9 @@ uint detectCPUextensions(void)
+ if (edx & bit_SSE) res = res | SUPPORT_SSE;
+ if (edx & bit_SSE2) res = res | SUPPORT_SSE2;
+
++#elif defined(__GNUC__)
++ // No cpuid.h --> no cpuid support
++ return 0;
+ #else
+ // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required
+ // for __cpuid intrinsic support.
diff --git a/www/firefox/files/patch-bug844818 b/www/firefox/files/patch-bug844818
new file mode 100644
index 000000000000..cf796b639134
--- /dev/null
+++ b/www/firefox/files/patch-bug844818
@@ -0,0 +1,126 @@
+diff --git configure.in configure.in
+index 7cd6e17..a1dbdf7 100644
+--- configure.in
++++ configure.in
+@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th
+ fi
+ fi
+
++# Keep libcubeb and audio_device backends in sync
++if test -n "$MOZ_ALSA"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1"
++else
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0"
++fi
++if test -n "$MOZ_PULSEAUDIO"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1"
++else
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0"
++fi
++
+ # Don't try to compile sse4.1 code if toolchain doesn't support
+ if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
+diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+index 8457737..dfc83ff 100644
+--- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
++++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+@@ -45,11 +45,15 @@
+ 'dummy/audio_device_utility_dummy.h',
+ ],
+ 'conditions': [
+- ['OS=="linux"', {
++ ['include_alsa_audio==1 or include_pulse_audio==1', {
+ 'include_dirs': [
+ 'linux',
+ ],
+- }], # OS==linux
++ 'defines': [
++ # avoid pointless rename
++ 'WEBRTC_LINUX',
++ ],
++ }], # include_alsa_audio==1 or include_pulse_audio==1
+ ['OS=="mac"', {
+ 'include_dirs': [
+ 'mac',
+@@ -74,14 +78,8 @@
+ }],
+ ['include_internal_audio_device==1', {
+ 'sources': [
+- 'linux/alsasymboltable_linux.cc',
+- 'linux/alsasymboltable_linux.h',
+- 'linux/audio_device_alsa_linux.cc',
+- 'linux/audio_device_alsa_linux.h',
+ 'linux/audio_device_utility_linux.cc',
+ 'linux/audio_device_utility_linux.h',
+- 'linux/audio_mixer_manager_alsa_linux.cc',
+- 'linux/audio_mixer_manager_alsa_linux.h',
+ 'linux/latebindingsymboltable_linux.cc',
+ 'linux/latebindingsymboltable_linux.h',
+ 'mac/audio_device_mac.cc',
+@@ -116,28 +114,36 @@
+ },
+ }],
+ ['OS=="linux"', {
+- 'defines': [
+- 'LINUX_ALSA',
+- ],
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ ],
+ },
+- 'conditions': [
+- ['include_pulse_audio==1', {
+- 'defines': [
+- 'LINUX_PULSE',
+- ],
+- 'sources': [
+- 'linux/audio_device_pulse_linux.cc',
+- 'linux/audio_device_pulse_linux.h',
+- 'linux/audio_mixer_manager_pulse_linux.cc',
+- 'linux/audio_mixer_manager_pulse_linux.h',
+- 'linux/pulseaudiosymboltable_linux.cc',
+- 'linux/pulseaudiosymboltable_linux.h',
+- ],
+- }],
++ }],
++ ['include_alsa_audio==1', {
++ 'defines': [
++ 'LINUX_ALSA',
++ ],
++ 'sources': [
++ 'linux/alsasymboltable_linux.cc',
++ 'linux/alsasymboltable_linux.h',
++ 'linux/audio_device_alsa_linux.cc',
++ 'linux/audio_device_alsa_linux.h',
++ 'linux/audio_mixer_manager_alsa_linux.cc',
++ 'linux/audio_mixer_manager_alsa_linux.h',
++ ],
++ }],
++ ['include_pulse_audio==1', {
++ 'defines': [
++ 'LINUX_PULSE',
++ ],
++ 'sources': [
++ 'linux/audio_device_pulse_linux.cc',
++ 'linux/audio_device_pulse_linux.h',
++ 'linux/audio_mixer_manager_pulse_linux.cc',
++ 'linux/audio_mixer_manager_pulse_linux.h',
++ 'linux/pulseaudiosymboltable_linux.cc',
++ 'linux/pulseaudiosymboltable_linux.h',
+ ],
+ }],
+ ['OS=="mac"', {
+diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi
+index b504d3d..e2eb127 100644
+--- media/webrtc/webrtc_config.gypi
++++ media/webrtc/webrtc_config.gypi
+@@ -9,7 +9,6 @@
+ 'include_internal_video_render': 0,
+ 'clang_use_chrome_plugins': 0,
+ 'enable_protobuf': 0,
+- 'include_pulse_audio': 0,
+ 'include_tests': 0,
+ 'use_system_libjpeg': 1,
+ 'use_system_libvpx': 1,
diff --git a/www/firefox/files/patch-content-media-AudioStream.cpp b/www/firefox/files/patch-content-media-AudioStream.cpp
deleted file mode 100644
index cfb10e53f2a8..000000000000
--- a/www/firefox/files/patch-content-media-AudioStream.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- content/media/AudioStream.cpp~
-+++ content/media/AudioStream.cpp
-@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure)
- gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nullptr));
- }
- } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
--#ifdef MOZ_WIDGET_GONK
-+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097
- bool value = Preferences::GetBool(aPref, false);
- #else
- bool value = Preferences::GetBool(aPref, true);
diff --git a/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h b/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h
deleted file mode 100644
index 306756daa7e0..000000000000
--- a/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h
-index f42822e..1a5a699 100644
---- gfx/ots/include/opentype-sanitiser.h
-+++ gfx/ots/include/opentype-sanitiser.h
-@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t;
- #include <stdint.h>
- #endif
-
-+#ifdef __FreeBSD__
-+# include <osreldate.h>
-+# if __FreeBSD_version < 800067
-+# include <sys/types.h> // for off_t
-+# endif
-+#endif
-+
- #include <algorithm> // for std::min
- #include <cassert>
- #include <cstddef>
diff --git a/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc b/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index a1e2dfb828f8..000000000000
--- a/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc
+++ /dev/null
@@ -1,16 +0,0 @@
---- ipc/chromium/src/base/platform_thread_posix.cc~
-+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -16,7 +16,13 @@
- #include <sys/prctl.h>
- #elif defined(OS_FREEBSD)
- #include <sys/param.h>
-+#if __FreeBSD_version > 802500
- #include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-
- #if !defined(OS_MACOSX)
diff --git a/www/firefox/files/patch-js-src-js-confdefs.h.in b/www/firefox/files/patch-js-src-js-confdefs.h.in
deleted file mode 100644
index cb032237b2cc..000000000000
--- a/www/firefox/files/patch-js-src-js-confdefs.h.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- js/src/js-confdefs.h.in~
-+++ js/src/js-confdefs.h.in
-@@ -12,6 +12,7 @@
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc b/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc
deleted file mode 100644
index 401aedb6ef8f..000000000000
--- a/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc
+++ /dev/null
@@ -1,37 +0,0 @@
---- media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~
-+++ media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc
-@@ -31,6 +31,10 @@
- #include <dlfcn.h>
- #endif
-
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+#endif
-+
- // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead.
- using namespace webrtc;
-
-@@ -38,7 +42,11 @@ namespace webrtc_adm_linux {
-
- inline static const char *GetDllError() {
- #ifdef WEBRTC_LINUX
-+#if __FreeBSD_version < 800505
-+ const char *err = dlerror();
-+#else
- char *err = dlerror();
-+#endif
- if (err) {
- return err;
- } else {
-@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle,
- void **symbol) {
- #ifdef WEBRTC_LINUX
- *symbol = dlsym(handle, symbol_name);
-+#if __FreeBSD_version < 800505
-+ const char *err = dlerror();
-+#else
- char *err = dlerror();
-+#endif
- if (err) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
- "Error loading symbol %s : %d", symbol_name, err);
diff --git a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp b/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
index 922f913334c0..1d76d119c5a2 100644
--- a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
+++ b/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
@@ -3,7 +3,7 @@
@@ -21,6 +21,13 @@ Scott McMurray
#include "constants.hpp"
#include <cstring>
-
+
+#ifdef __FreeBSD__
+# include <osreldate.h>
+# if __FreeBSD_version < 900506
@@ -13,4 +13,4 @@
+
namespace boost {
namespace detail {
- //This only works on unsigned data types
+ //This only works on unsigned data types
diff --git a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc b/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
deleted file mode 100644
index ad54b06424f4..000000000000
--- a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
+++ /dev/null
@@ -1,16 +0,0 @@
---- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~
-+++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
-@@ -62,7 +62,13 @@
- #include <lwp.h>
- #elif defined(__FreeBSD__)
- #include <sys/param.h>
-+#if __FreeBSD_version > 802500
- #include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-
- #if defined(WEBRTC_BSD) && !defined(__NetBSD__)
diff --git a/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c b/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c
deleted file mode 100644
index 3eddeeec9238..000000000000
--- a/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800
-+++ python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800
-@@ -1376,8 +1376,10 @@
- strlcat(opts, ",noclusterr", sizeof(opts));
- if (flags & MNT_NOCLUSTERW)
- strlcat(opts, ",noclusterw", sizeof(opts));
-+#if __FreeBSD_version >= 800000
- if (flags & MNT_NFS4ACLS)
- strlcat(opts, ",nfs4acls", sizeof(opts));
-+#endif
-
- py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device
- fs[i].f_mntonname, // mount point
diff --git a/www/firefox/files/patch-z-bug815916 b/www/firefox/files/patch-z-bug815916
deleted file mode 100644
index 8ca886e2e839..000000000000
--- a/www/firefox/files/patch-z-bug815916
+++ /dev/null
@@ -1,27 +0,0 @@
---- media/webrtc/signaling/test/Makefile.in~
-+++ media/webrtc/signaling/test/Makefile.in
-@@ -34,12 +34,24 @@ LIBS += \
- endif
- endif
-
-+ifdef MOZ_NATIVE_JPEG
-+LIBS += \
-+ $(MOZ_JPEG_LIBS) \
-+ $(NULL)
-+endif
-+
- ifdef MOZ_NATIVE_LIBVPX
- LIBS += \
- $(MOZ_LIBVPX_LIBS) \
- $(NULL)
- endif
-
-+ifndef MOZ_TREE_PIXMAN
-+LIBS += \
-+ $(MOZ_PIXMAN_LIBS) \
-+ $(NULL)
-+endif
-+
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
- LIBS += \
- $(XLIBS) \
diff --git a/www/firefox/pkg-message b/www/firefox/pkg-message
index b282c9ce33a1..33841ae90f29 100644
--- a/www/firefox/pkg-message
+++ b/www/firefox/pkg-message
@@ -17,7 +17,7 @@ The SSH server on remote_host must allow pub key authentication.
Firefox and HTML5
Certain functions used to display HTML5 elements need the sem module
-on 7.x and 8.x releases.
+only on 8.x releases.
If your Firefox crashes with the following message while viewing a
HTML5 page:
diff --git a/www/libxul/Makefile b/www/libxul/Makefile
index f8b263dccbbc..7068f09755be 100644
--- a/www/libxul/Makefile
+++ b/www/libxul/Makefile
@@ -54,17 +54,6 @@ OPTIONS_DEFAULT=GIO
MOZ_PKGCONFIG_FILES+= mozilla-nss
.endif
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if !empty(CXX:M*clang++*) || (${CXX:Mc++} && ${OSVERSION} > 1000023)
CXXFLAGS+= -Wno-return-type-c-linkage
.endif
diff --git a/www/libxul/files/patch-bug753046 b/www/libxul/files/patch-bug753046
index c606ab1f58bc..eba92129f6cf 100644
--- a/www/libxul/files/patch-bug753046
+++ b/www/libxul/files/patch-bug753046
@@ -469,7 +469,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,9 +9,23 @@
+@@ -9,9 +9,17 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -482,13 +482,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
+#include <unistd.h>
+#elif defined(OS_FREEBSD)
+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
+#include <pthread_np.h>
#endif
diff --git a/www/libxul/files/patch-js-src-configure.in b/www/libxul/files/patch-js-src-configure.in
deleted file mode 100644
index fc8e66185a87..000000000000
--- a/www/libxul/files/patch-js-src-configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- js/src/configure.in.orig 2012-01-29 11:24:33.000000000 +0100
-+++ js/src/configure.in 2012-01-30 23:30:02.051087215 +0100
-@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/www/libxul19/Makefile b/www/libxul19/Makefile
index ec4a35eb5315..a719643934c1 100644
--- a/www/libxul19/Makefile
+++ b/www/libxul19/Makefile
@@ -63,17 +63,6 @@ OPTIONS_SINGLE:=${OPTIONS_SINGLE:NTOOLKIT}
MOZ_PKGCONFIG_FILES+= mozilla-nss
.endif
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if ${PORT_OPTIONS:MJAVA}
USE_JAVA= yes
JAVA_VERSION+= 1.5+
diff --git a/www/libxul19/files/patch-bug778078 b/www/libxul19/files/patch-bug778078
index c87fea1f5563..c3d42c391a98 100644
--- a/www/libxul19/files/patch-bug778078
+++ b/www/libxul19/files/patch-bug778078
@@ -1,14 +1,6 @@
--- toolkit/xre/nsAppRunner.cpp~
+++ toolkit/xre/nsAppRunner.cpp
-@@ -640,6 +640,7 @@ class nsXULAppInfo : public nsIXULAppInf
-
- {
- public:
-+ nsXULAppInfo() {}
- NS_DECL_ISUPPORTS_INHERITED
- NS_DECL_NSIXULAPPINFO
- NS_DECL_NSIXULRUNTIME
-@@ -3046,7 +3047,7 @@ XRE_main(int argc, char* argv[], const n
+@@ -3046,7 +3046,7 @@ XRE_main(int argc, char* argv[], const n
QApplication app(gArgc, gArgv);
#endif
#if defined(MOZ_WIDGET_GTK2)
diff --git a/www/linux-firefox/Makefile b/www/linux-firefox/Makefile
index 90ef821336b7..1a53b2a84d32 100644
--- a/www/linux-firefox/Makefile
+++ b/www/linux-firefox/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox
-PORTVERSION= 17.0.4
+PORTVERSION= 17.0.5
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITE_SUBDIR?= firefox/releases/${PORTVERSION}esr/linux-i686/en-US
diff --git a/www/linux-firefox/distinfo b/www/linux-firefox/distinfo
index a6872631b4a9..f6b8abdf8a03 100644
--- a/www/linux-firefox/distinfo
+++ b/www/linux-firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-17.0.4esr.tar.bz2) = a15b51b1f2e1833f7306dc2ba77e4414c07eba6e92e448ead476be6a0d37566a
-SIZE (firefox-17.0.4esr.tar.bz2) = 21290084
+SHA256 (firefox-17.0.5esr.tar.bz2) = 990fd903b08ef33d79a2019284b825e04cf27780526732d5324bc940bb521d21
+SIZE (firefox-17.0.5esr.tar.bz2) = 21393264
diff --git a/www/linux-seamonkey/Makefile b/www/linux-seamonkey/Makefile
index 3e3a9b0a2c0b..6fa3a7f8f90e 100644
--- a/www/linux-seamonkey/Makefile
+++ b/www/linux-seamonkey/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= seamonkey
-PORTVERSION= 2.16
+PORTVERSION= 2.17
CATEGORIES= www
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${PORTVERSION}/linux-i686/en-US
diff --git a/www/linux-seamonkey/distinfo b/www/linux-seamonkey/distinfo
index 987c1f3d5480..b4fec0f5e9c6 100644
--- a/www/linux-seamonkey/distinfo
+++ b/www/linux-seamonkey/distinfo
@@ -1,2 +1,2 @@
-SHA256 (seamonkey-2.16.tar.bz2) = 71748b27d4c27245b8497a9757331d3dba44762f6551b3eb5f26a82575cbe751
-SIZE (seamonkey-2.16.tar.bz2) = 26182862
+SHA256 (seamonkey-2.17.tar.bz2) = 4efb6ff9ce3f4ad1eae881b865e6f4fe55972f5ea450a93dca66d77185426511
+SIZE (seamonkey-2.17.tar.bz2) = 26580709
diff --git a/www/linux-seamonkey/pkg-plist b/www/linux-seamonkey/pkg-plist
index ff7182e36d22..9ce0559c4111 100644
--- a/www/linux-seamonkey/pkg-plist
+++ b/www/linux-seamonkey/pkg-plist
@@ -141,10 +141,11 @@ lib/%%APP_NAME%%/updater.ini
@dirrm lib/%%APP_NAME%%/modules/services-aitc
@dirrm lib/%%APP_NAME%%/modules/services-common
@dirrm lib/%%APP_NAME%%/modules/services-crypto
-@dirrm lib/%%APP_NAME%%/modules/services-notifications
@dirrm lib/%%APP_NAME%%/modules/services-sync/stages
@dirrm lib/%%APP_NAME%%/modules/services-sync/engines
@dirrm lib/%%APP_NAME%%/modules/services-sync
+@dirrm lib/%%APP_NAME%%/modules/services/datareporting
+@dirrm lib/%%APP_NAME%%/modules/services
@dirrm lib/%%APP_NAME%%/modules/identity
@dirrm lib/%%APP_NAME%%/modules/commonjs/promise
@dirrm lib/%%APP_NAME%%/modules/commonjs
diff --git a/www/seamonkey-i18n/Makefile b/www/seamonkey-i18n/Makefile
index 643a30aae2b0..9d08083f722e 100644
--- a/www/seamonkey-i18n/Makefile
+++ b/www/seamonkey-i18n/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= seamonkey-i18n
-PORTVERSION= 2.16.1
+PORTVERSION= 2.17
CATEGORIES= www
MASTER_SITE_SUBDIR= seamonkey/releases/${PORTVERSION}/langpack
PKGNAMEPREFIX=
@@ -18,7 +18,7 @@ PLIST?= ${WRKDIR}/plist
PLISTD?= ${WRKDIR}/plist_dirs
PLISTF?= ${WRKDIR}/plist_files
-USE_SEAMONKEY= 16
+USE_SEAMONKEY= 17
USE_XPI= seamonkey linux-seamonkey
USE_SUBMAKE= yes
@@ -49,7 +49,7 @@ pre-everything::
do-extract:
@${MKDIR} ${WRKSRC}
@for lang in ${SEAMONKEY_I18N_}; do \
- if ! (${EXTRACT_CMD} ${_DISTDIR}/seamonkey-${PORTVERSION}.$$lang.langpack.xpi -d ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org);\
+ if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/seamonkey-${PORTVERSION}.$$lang.langpack.xpi -d ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org);\
then \
exit 1; \
fi; \
diff --git a/www/seamonkey-i18n/distinfo b/www/seamonkey-i18n/distinfo
index 5aeca0cc0101..92aecdd5d326 100644
--- a/www/seamonkey-i18n/distinfo
+++ b/www/seamonkey-i18n/distinfo
@@ -1,46 +1,46 @@
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ca.langpack.xpi) = f2d4803d8a3ca8a34547ee9f1b0771ed01e72b8fe460b9778af42c14d2fa988f
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ca.langpack.xpi) = 777174
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.cs.langpack.xpi) = f76f5146ddeff47cc434217d638cb0af61a669ce425ed02d38a1ec0eee3aa2df
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.cs.langpack.xpi) = 782286
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.de.langpack.xpi) = ad31d64cac7013d3070999df8a9b19ede1bc6d18386033bca7825a46b3b12be4
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.de.langpack.xpi) = 805628
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.en-GB.langpack.xpi) = 2fc0736572e442529a9679c65bf5a7f1bd4a814716d06865034f6579a641995d
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.en-GB.langpack.xpi) = 751440
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.en-US.langpack.xpi) = c100f52dcff20f315edc7969cbaa6cd4d15cf4f8e0c032a769c72c06cd3aa8e5
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.en-US.langpack.xpi) = 752025
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.es-AR.langpack.xpi) = e677778d4d54cad54c10d9b070d5ba21b3864bf1a7884241b207373bf0b9061b
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.es-AR.langpack.xpi) = 824300
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.es-ES.langpack.xpi) = 55dbb09ecd067bc5cbffd96887a2ba3cbab2e0fb791bcf1941efdda9b9101705
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.es-ES.langpack.xpi) = 772621
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.fi.langpack.xpi) = 4b996a66da3cd4e90f8549bcffe09b775bc9644e86f91555553b4cac7bf234f7
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.fi.langpack.xpi) = 771991
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.fr.langpack.xpi) = b3056af35b245fde9ef07cb7a67a6920390f8178a9630736d61c144234884315
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.fr.langpack.xpi) = 781405
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.hu.langpack.xpi) = e9acfc35fb7a26f7da896d3d00eeee06058fd905cb85207d6d7b2ca51d435a4a
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.hu.langpack.xpi) = 816448
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.it.langpack.xpi) = d380309c6fcd5cf84671689d8c93c5003c610b872a2b5882d8ab384154073b04
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.it.langpack.xpi) = 721930
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ja-JP-mac.langpack.xpi) = 6925089871d69e8316798f5d73ab3e9619e4141625be02940f0570bff0546098
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ja-JP-mac.langpack.xpi) = 854853
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ja.langpack.xpi) = 8221cee1d138a028ac4c7042b7b1340404cb6aefee84592c7feebb71bce00ede
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ja.langpack.xpi) = 829871
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.lt.langpack.xpi) = 59e3a5b9a107f148dff8bd1cd5111f57d1b6b2bc93704fe3b3f2b69db946a804
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.lt.langpack.xpi) = 795322
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.nb-NO.langpack.xpi) = 475b4f1eef56614a417b48a1aafc09541b08559db52b4b27f33d5fa11ff38544
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.nb-NO.langpack.xpi) = 769320
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.nl.langpack.xpi) = 2b75210b5e4ac966644d8b9499f8b69c25b67e717b49c59708081d56b348b682
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.nl.langpack.xpi) = 767744
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.pl.langpack.xpi) = b1c80a450a5e6f16dde5108931f04ab2ee771306cd3a9e0a551c0736c5dc1368
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.pl.langpack.xpi) = 813142
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.pt-PT.langpack.xpi) = 628e66cbc64ea9c9628272bf32514b439934fbbdd6475a4c6c58b24231176771
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.pt-PT.langpack.xpi) = 803420
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ru.langpack.xpi) = ec35b3e5f2e0c5b869752b34de67de722f758fb64afcb0d9a24efb6d13670e9b
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.ru.langpack.xpi) = 875920
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.sk.langpack.xpi) = aef94562d31c3eae4cc1b1cc34b7bf74cb73bfb2d9702b65a0f8a534122ba947
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.sk.langpack.xpi) = 808953
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.sv-SE.langpack.xpi) = 04ab6c5728e2fbc2cd3c80b1f9e00957ca0d56deb1b27b88a6f1bde6ec2e8c8b
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.sv-SE.langpack.xpi) = 795026
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.tr.langpack.xpi) = fbf9f407e7cf1854d539e2e0cce69897d854c2926e77280a961e3e0233ed0c44
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.tr.langpack.xpi) = 821202
-SHA256 (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.uk.langpack.xpi) = c0db9838faf949f101298d3f0fce376cd32747d3abee5a15def775587f772533
-SIZE (xpi/seamonkey-i18n-2.16.1/seamonkey-2.16.1.uk.langpack.xpi) = 833355
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ca.langpack.xpi) = 81bba4119a02d368273c6df4e855d5704a8760a5665d976828b0486ad65ff0cb
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ca.langpack.xpi) = 778283
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.cs.langpack.xpi) = 0263ffd452cb328b85e042bcb2d82b1c9173b566b67a8c90f3c8026f38af48cf
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.cs.langpack.xpi) = 783458
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.de.langpack.xpi) = 6b97d854a9167204b98b4aa4a8cbe1cef0bbf67b78a88aedf8705a36a92ef3a0
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.de.langpack.xpi) = 807007
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.en-GB.langpack.xpi) = 5fbb8e8e04cb0f2b52bf19a70ba876eccf8fa90f200d46bfde7688ca1424233c
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.en-GB.langpack.xpi) = 752487
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.en-US.langpack.xpi) = 842b02e42d6d153d03c9b3f6dce9e7c191fede13ae56cff8bf38ec4b95851328
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.en-US.langpack.xpi) = 752986
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.es-AR.langpack.xpi) = 907d8c128add5617f7d02fb494f86a71273f27d1aadc826646251dbc253f6688
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.es-AR.langpack.xpi) = 825530
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.es-ES.langpack.xpi) = 37300cb81dd32cfd04fe46d1d3f82bcd96e12cbf883d903f542f7c78ffcea5de
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.es-ES.langpack.xpi) = 773656
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.fi.langpack.xpi) = eb862a5e24b986dd5b5ee3fe919373c70e6d3cb4105c434419447b029c6f439c
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.fi.langpack.xpi) = 773171
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.fr.langpack.xpi) = 6ad8589243d403b0768c6ccabce85f1cc71ece8c7acbb61a5ed6cba5d95b0e44
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.fr.langpack.xpi) = 782685
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.hu.langpack.xpi) = 1fda8e98c05658015683447f8d87d43d4a5be5474701e026287d95f1d7fb6c95
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.hu.langpack.xpi) = 815704
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.it.langpack.xpi) = 76c00156ae5288772a41411d884bbdcea6813a1a5eca0e0b5bd8a95a62a10b3a
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.it.langpack.xpi) = 722918
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ja-JP-mac.langpack.xpi) = 7e4037739ebc63b8b860868c16680cdae52d89c5822cf70788990ce752d9352d
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ja-JP-mac.langpack.xpi) = 856274
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ja.langpack.xpi) = 2dfdfd0b05d51be7bc04661f4d8faedb4f9a262e58fce59a5b759a7c55cc3fd7
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ja.langpack.xpi) = 831238
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.lt.langpack.xpi) = 6c51e0d04c233fd7e047b98eabd0b8944948793f7fdced20bd73220e97aae00f
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.lt.langpack.xpi) = 796677
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.nb-NO.langpack.xpi) = 7170db51635147e0515adab7eeaa784823875addce0f1db6fac7af5d7e444a47
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.nb-NO.langpack.xpi) = 771628
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.nl.langpack.xpi) = 1b52a5988d3107115730b6b415169484d6794e3c74dfb44ecd3dda6c3fcb4a37
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.nl.langpack.xpi) = 768852
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.pl.langpack.xpi) = 65da1085ccab3c3ab9034c331abd9535ff37b6e9420ec3fb6d7d36412f0f9c89
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.pl.langpack.xpi) = 814402
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.pt-PT.langpack.xpi) = ba3e86ac9747fb87890a8938fea6ebd0e5f44f04e2e2481e813a3bba9bfde07d
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.pt-PT.langpack.xpi) = 807019
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ru.langpack.xpi) = 2d109626d092fe3f357cdcd7f8ffb5539747b80378893a4d85bb21c0a5c22af6
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.ru.langpack.xpi) = 877100
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.sk.langpack.xpi) = 949869c8dd71b2e3968cbc54ca1b187566583e2b7440a3ea4c4fffca7488e77c
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.sk.langpack.xpi) = 810246
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.sv-SE.langpack.xpi) = 9b39d0d170da63e12d25bad32dbabd042363c208b99ff7ce684e960ba9c42334
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.sv-SE.langpack.xpi) = 796145
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.tr.langpack.xpi) = 59d56a9dcf69eb361f0ce2a5c4e0dc7c5e440dcb75080844c964aac1fa9e3697
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.tr.langpack.xpi) = 836221
+SHA256 (xpi/seamonkey-i18n-2.17/seamonkey-2.17.uk.langpack.xpi) = ef9b797d4278ef7c67b5c86e459c1f5f588aabc2d013cd10ce250b157950a377
+SIZE (xpi/seamonkey-i18n-2.17/seamonkey-2.17.uk.langpack.xpi) = 836887
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile
index de105ea68485..0b850dc13af4 100644
--- a/www/seamonkey/Makefile
+++ b/www/seamonkey/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= seamonkey
-DISTVERSION= 2.16.1
+DISTVERSION= 2.17
CATEGORIES?= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source
@@ -13,13 +13,13 @@ MAINTAINER= gecko@FreeBSD.org
COMMENT= The open source, standards compliant web browser
BUILD_DEPENDS= nspr>=4.9.4:${PORTSDIR}/devel/nspr \
- nss>=3.14.1:${PORTSDIR}/security/nss \
+ nss>=3.14.3:${PORTSDIR}/security/nss \
sqlite3>=3.7.14.1:${PORTSDIR}/databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
unzip:${PORTSDIR}/archivers/unzip
EM_VERSION= 1.5.1
-L_VERSION= 2.1b1
+L_VERSION= 2.2b1
USE_AUTOTOOLS= autoconf213:env
USE_PYTHON_BUILD=-2.7
@@ -72,17 +72,6 @@ MOZSRC:= ${WRKSRC}/mozilla
XPI_LIBDIR= ${PREFIX}/lib/xpi
-.if ${ARCH} == amd64
-CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == powerpc64
-.if ${OSVERSION} < 900033
-BROKEN= Needs binutils 2.17.50 to build
-.else
-MOZ_EXPORT+= UNAME_m="powerpc64"
-CFLAGS+= -mminimal-toc
-.endif
-.endif
-
.if ! ${PORT_OPTIONS:MMAILNEWS}
EXTRA_PATCHES+= ${FILESDIR}/extra-mailnews-patch-bridge-bridge.mk \
${FILESDIR}/extra-patch-configure.in
@@ -133,6 +122,7 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+ -e '/^SQLITE_VERSION/s/=.*/=3.7.14.1/' \
${MOZSRC}/configure.in ${WRKSRC}/configure.in
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/suite/app/nsSuiteApp.cpp
@@ -165,18 +155,16 @@ post-build:
-C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
.endif
-pre-install:
+port-pre-install:
${ECHO_CMD} share/applications/${MOZILLA}.desktop >> ${PLIST}
- ${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLIST}
+ ${ECHO_CMD} "@dirrmtry share/applications" >> ${PLISTD}
${ECHO_CMD} 'share/pixmaps/${MOZILLA}.png' >> ${PLIST}
-do-install:
+post-install:
${MKDIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${PREFIX}/share/applications/
${LN} -sf ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default48.png \
${PREFIX}/share/pixmaps/${MOZILLA}.png
-
-post-install:
.if ${PORT_OPTIONS:MLIGHTNING}
@${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/seamonkey
@(cd ${XPI_LIBDIR}/${XPI_ID}; ${TAR} -xf ${XPI_FILE})
diff --git a/www/seamonkey/distinfo b/www/seamonkey/distinfo
index 8c518c6ad9c0..7644cea66d63 100644
--- a/www/seamonkey/distinfo
+++ b/www/seamonkey/distinfo
@@ -1,4 +1,4 @@
-SHA256 (seamonkey-2.16.1.source.tar.bz2) = 3815226c7f7aa8795abb2e0c5bca63c1da2336345b594d81421c1d48c750f617
-SIZE (seamonkey-2.16.1.source.tar.bz2) = 121951701
+SHA256 (seamonkey-2.17.source.tar.bz2) = 686b573b17397a805ed771c79f14e4354ec23c5a205361e8142dee364c76eb86
+SIZE (seamonkey-2.17.source.tar.bz2) = 122785037
SHA256 (enigmail-1.5.1.tar.gz) = 234ca3c8f7c74afb64ebdaa4762e358f35a72c1f8de007b992497fc2db803af0
SIZE (enigmail-1.5.1.tar.gz) = 1213954
diff --git a/www/seamonkey/files/patch-alsapulse b/www/seamonkey/files/patch-alsapulse
deleted file mode 100644
index 9e8899fee93c..000000000000
--- a/www/seamonkey/files/patch-alsapulse
+++ /dev/null
@@ -1,122 +0,0 @@
-diff --git mozilla/configure.in mozilla/configure.in
-index 5980b76..11f5f77 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -5618,11 +5618,25 @@ dnl ========================================================
-
- dnl If using sydneyaudio with Linux, ensure that the alsa library is available
- if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+ MOZ_ALSA=1
-+fi
-+
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[ --enable-alsa Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA=)
-+
-+if test -n "$MOZ_ALSA"; then
-+ AC_DEFINE(MOZ_CUBEB)
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
- [echo "$MOZ_ALSA_PKG_ERRORS"
- AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
- fi
-
-+AC_SUBST(MOZ_ALSA)
-+AC_SUBST(MOZ_ALSA_CFLAGS)
-+AC_SUBST(MOZ_ALSA_LIBS)
-+
- dnl ========================================================
- dnl = Enable PulseAudio
- dnl ========================================================
-@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
- AC_SUBST(MOZ_VP8_ENCODER)
- AC_SUBST(MOZ_VP8)
- AC_SUBST(MOZ_OGG)
--AC_SUBST(MOZ_ALSA_LIBS)
--AC_SUBST(MOZ_ALSA_CFLAGS)
- AC_SUBST(VPX_AS)
- AC_SUBST(VPX_ASFLAGS)
- AC_SUBST(VPX_DASH_C_FLAG)
-diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in
-index 5ab4dd8..c8df26f 100644
---- mozilla/media/libcubeb/src/Makefile.in
-+++ mozilla/media/libcubeb/src/Makefile.in
-@@ -24,10 +24,6 @@ endif
-
- ifeq ($(OS_TARGET),Android)
- # No Android implementation of libcubeb yet.
--else ifeq ($(OS_TARGET),Linux)
--CSRCS = \
-- cubeb_alsa.c \
-- $(NULL)
- endif
-
- ifeq ($(OS_TARGET),Darwin)
-@@ -42,6 +38,12 @@ CSRCS = \
- $(NULL)
- endif
-
-+ifdef MOZ_ALSA
-+CSRCS = \
-+ cubeb_alsa.c \
-+ $(NULL)
-+endif
-+
- ifdef MOZ_PULSEAUDIO
- CSRCS = \
- cubeb_pulse.c \
-diff --git mozilla/media/libsydneyaudio/src/Makefile.in mozilla/media/libsydneyaudio/src/Makefile.in
-index 8dda8ce..b19641d 100644
---- mozilla/media/libsydneyaudio/src/Makefile.in
-+++ mozilla/media/libsydneyaudio/src/Makefile.in
-@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
- CSRCS = \
- sydney_audio_android.c \
- $(NULL)
--else ifeq ($(OS_ARCH),Linux)
--CSRCS = \
-- sydney_audio_alsa.c \
-- $(NULL)
- endif
-
- ifeq ($(OS_ARCH),WINNT)
-@@ -68,6 +64,18 @@ CSRCS = \
- $(NULL)
- endif
-
-+ifdef MOZ_ALSA
-+CSRCS = \
-+ sydney_audio_alsa.c \
-+ $(NULL)
-+endif
-+
-+ifdef MOZ_PULSEAUDIO
-+CSRCS = \
-+ sydney_audio_pulseaudio.c \
-+ $(NULL)
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += winmm.lib
- endif
-diff --git mozilla/toolkit/library/Makefile.in mozilla/toolkit/library/Makefile.in
-index 43384e9..e46a6e3 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
-@@ -370,14 +370,11 @@ endif
-
- EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
-
--ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
-+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
-+ifdef MOZ_ALSA
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
--endif
--
- ifdef MOZ_PULSEAUDIO
--ifdef MOZ_CUBEB
- EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
- endif
- endif
diff --git a/www/seamonkey/files/patch-bug780432 b/www/seamonkey/files/patch-bug780432
new file mode 100644
index 000000000000..21e22a253a4d
--- /dev/null
+++ b/www/seamonkey/files/patch-bug780432
@@ -0,0 +1,17 @@
+diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
+index 8dda8ce..b19641d 100644
+--- mozilla/media/libsydneyaudio/src/Makefile.in
++++ mozilla/media/libsydneyaudio/src/Makefile.in
+@@ -68,6 +68,12 @@ ifdef MOZ_ALSA
+ $(NULL)
+ endif
+
++ifdef MOZ_PULSEAUDIO
++CSRCS = \
++ sydney_audio_pulseaudio.c \
++ $(NULL)
++endif
++
+ ifeq ($(OS_ARCH),WINNT)
+ OS_LIBS += winmm.lib
+ endif
diff --git a/www/seamonkey/files/patch-bug787804 b/www/seamonkey/files/patch-bug787804
deleted file mode 100644
index 517cbd94d7f9..000000000000
--- a/www/seamonkey/files/patch-bug787804
+++ /dev/null
@@ -1,3557 +0,0 @@
-commit 74997f1
-Author: Jan Varga <jan.varga@gmail.com>
-Date: Mon Dec 17 20:25:10 2012 +0100
-
- Bug 787804 - Rewrite quota handling (eliminate test_quota.c). r=bent,asuth,vladan
----
- db/sqlite3/README.MOZILLA | 4 +-
- db/sqlite3/src/sqlite.def | 1 +
- db/sqlite3/src/test_quota.c | 2001 --------------------
- db/sqlite3/src/test_quota.h | 274 ---
- dom/Makefile.in | 1 +
- dom/dom-config.mk | 1 +
- dom/file/FileStreamWrappers.cpp | 11 -
- dom/file/LockedFile.cpp | 8 +-
- dom/file/nsIFileStorage.h | 40 +-
- dom/indexedDB/FileManager.cpp | 33 +-
- dom/indexedDB/FileManager.h | 20 +-
- dom/indexedDB/FileStream.cpp | 321 ----
- dom/indexedDB/FileStream.h | 140 --
- dom/indexedDB/IDBDatabase.cpp | 6 +
- dom/indexedDB/IDBFactory.cpp | 28 +-
- dom/indexedDB/IDBFactory.h | 8 +-
- dom/indexedDB/IDBFileHandle.cpp | 25 +-
- dom/indexedDB/IDBObjectStore.cpp | 10 +-
- dom/indexedDB/IDBTransaction.cpp | 3 +-
- dom/indexedDB/IndexedDatabaseInlines.h | 13 +
- dom/indexedDB/IndexedDatabaseManager.cpp | 162 +-
- dom/indexedDB/IndexedDatabaseManager.h | 11 +-
- dom/indexedDB/Makefile.in | 2 -
- dom/indexedDB/OpenDatabaseHelper.cpp | 104 +-
- dom/indexedDB/OpenDatabaseHelper.h | 12 +-
- dom/indexedDB/nsIStandardFileStream.idl | 60 -
- dom/indexedDB/test/Makefile.in | 2 +
- dom/indexedDB/test/file.js | 21 +-
- dom/indexedDB/test/test_file_quota.html | 14 +-
- dom/indexedDB/test/test_filehandle_quota.html | 5 +-
- dom/quota/FileStreams.cpp | 123 ++
- dom/quota/FileStreams.h | 115 ++
- dom/quota/Makefile.in | 33 +
- dom/quota/QuotaCommon.h | 23 +
- dom/quota/QuotaManager.cpp | 294 +++
- dom/quota/QuotaManager.h | 147 ++
- layout/build/Makefile.in | 1 +
- netwerk/base/src/Makefile.in | 1 +
- netwerk/base/src/nsFileStreams.cpp | 103 +-
- netwerk/base/src/nsFileStreams.h | 12 +-
- storage/public/Makefile.in | 1 -
- storage/public/mozIStorageService.idl | 13 +-
- .../public/mozIStorageServiceQuotaManagement.idl | 99 -
- storage/public/storage.h | 1 -
- storage/src/TelemetryVFS.cpp | 35 +-
- storage/src/mozStorageConnection.cpp | 85 +-
- storage/src/mozStorageConnection.h | 27 +-
- storage/src/mozStorageService.cpp | 168 +-
- storage/src/mozStorageService.h | 3 -
- toolkit/toolkit-makefiles.sh | 1 +
- 50 files changed, 1239 insertions(+), 3387 deletions(-)
-
-diff --git dom/Makefile.in dom/Makefile.in
-index 672e065..47cd253 100644
---- mozilla/dom/Makefile.in
-+++ mozilla/dom/Makefile.in
-@@ -58,6 +58,7 @@ PARALLEL_DIRS += \
- media \
- messages \
- power \
-+ quota \
- settings \
- sms \
- mms \
-diff --git dom/dom-config.mk dom/dom-config.mk
-index d0f46cc..1cf57ed 100644
---- mozilla/dom/dom-config.mk
-+++ mozilla/dom/dom-config.mk
-@@ -8,6 +8,7 @@ DOM_SRCDIRS = \
- dom/encoding \
- dom/file \
- dom/power \
-+ dom/quota \
- dom/media \
- dom/network/src \
- dom/settings \
-diff --git dom/file/FileStreamWrappers.cpp dom/file/FileStreamWrappers.cpp
-index 2283266..c4cf102 100644
---- mozilla/dom/file/FileStreamWrappers.cpp
-+++ mozilla/dom/file/FileStreamWrappers.cpp
-@@ -8,7 +8,6 @@
-
- #include "nsIFileStorage.h"
- #include "nsISeekableStream.h"
--#include "nsIStandardFileStream.h"
- #include "mozilla/Attributes.h"
-
- #include "FileHelper.h"
-@@ -246,16 +245,6 @@ FileOutputStreamWrapper::Close()
- nsresult rv = NS_OK;
-
- if (!mFirstTime) {
-- // We must flush buffers of the stream on the same thread on which we wrote
-- // some data.
-- nsCOMPtr<nsIStandardFileStream> sstream = do_QueryInterface(mFileStream);
-- if (sstream) {
-- rv = sstream->FlushBuffers();
-- if (NS_FAILED(rv)) {
-- NS_WARNING("Failed to flush buffers of the stream!");
-- }
-- }
--
- NS_ASSERTION(PR_GetCurrentThread() == mWriteThread,
- "Unsetting thread locals on wrong thread!");
- mFileHelper->mFileStorage->UnsetThreadLocals();
-diff --git dom/file/LockedFile.cpp dom/file/LockedFile.cpp
-index 0fca730..926df91 100644
---- mozilla/dom/file/LockedFile.cpp
-+++ mozilla/dom/file/LockedFile.cpp
-@@ -953,10 +953,10 @@ FinishHelper::Run()
- }
-
- for (uint32_t index = 0; index < mParallelStreams.Length(); index++) {
-- nsCOMPtr<nsIOutputStream> ostream =
-+ nsCOMPtr<nsIInputStream> stream =
- do_QueryInterface(mParallelStreams[index]);
-
-- if (NS_FAILED(ostream->Close())) {
-+ if (NS_FAILED(stream->Close())) {
- NS_WARNING("Failed to close stream!");
- }
-
-@@ -964,9 +964,9 @@ FinishHelper::Run()
- }
-
- if (mStream) {
-- nsCOMPtr<nsIOutputStream> ostream = do_QueryInterface(mStream);
-+ nsCOMPtr<nsIInputStream> stream = do_QueryInterface(mStream);
-
-- if (NS_FAILED(ostream->Close())) {
-+ if (NS_FAILED(stream->Close())) {
- NS_WARNING("Failed to close stream!");
- }
-
-diff --git dom/file/nsIFileStorage.h dom/file/nsIFileStorage.h
-index 92bb608..e985f0a 100644
---- mozilla/dom/file/nsIFileStorage.h
-+++ mozilla/dom/file/nsIFileStorage.h
-@@ -10,14 +10,17 @@
- #include "nsISupports.h"
-
- #define NS_FILESTORAGE_IID \
-- {0xbba9c2ff, 0x85c9, 0x47c1, \
-- { 0xaf, 0xce, 0x0a, 0x7e, 0x6f, 0x21, 0x50, 0x95 } }
-+ {0xa0801944, 0x2f1c, 0x4203, \
-+ { 0x9c, 0xaa, 0xaa, 0x47, 0xe0, 0x0c, 0x67, 0x92 } }
-
- class nsIFileStorage : public nsISupports
- {
- public:
- NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID)
-
-+ virtual const nsACString&
-+ StorageOrigin() = 0;
-+
- virtual nsISupports*
- StorageId() = 0;
-
-@@ -36,20 +39,23 @@ public:
-
- NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID)
-
--#define NS_DECL_NSIFILESTORAGE \
-- virtual nsISupports* \
-- StorageId(); \
-- \
-- virtual bool \
-- IsStorageInvalidated(); \
-- \
-- virtual bool \
-- IsStorageShuttingDown(); \
-- \
-- virtual void \
-- SetThreadLocals(); \
-- \
-- virtual void \
-- UnsetThreadLocals();
-+#define NS_DECL_NSIFILESTORAGE \
-+ virtual const nsACString& \
-+ StorageOrigin() MOZ_OVERRIDE; \
-+ \
-+ virtual nsISupports* \
-+ StorageId() MOZ_OVERRIDE; \
-+ \
-+ virtual bool \
-+ IsStorageInvalidated() MOZ_OVERRIDE; \
-+ \
-+ virtual bool \
-+ IsStorageShuttingDown() MOZ_OVERRIDE; \
-+ \
-+ virtual void \
-+ SetThreadLocals() MOZ_OVERRIDE; \
-+ \
-+ virtual void \
-+ UnsetThreadLocals() MOZ_OVERRIDE;
-
- #endif // nsIFileStorage_h__
-diff --git dom/indexedDB/FileManager.cpp dom/indexedDB/FileManager.cpp
-index 9db56e8..4ed6e9e 100644
---- mozilla/dom/indexedDB/FileManager.cpp
-+++ mozilla/dom/indexedDB/FileManager.cpp
-@@ -7,8 +7,8 @@
- #include "FileManager.h"
-
- #include "mozIStorageConnection.h"
--#include "mozIStorageServiceQuotaManagement.h"
- #include "mozIStorageStatement.h"
-+#include "nsIInputStream.h"
- #include "nsISimpleEnumerator.h"
-
- #include "mozStorageCID.h"
-@@ -18,6 +18,8 @@
- #include "IndexedDatabaseManager.h"
- #include "OpenDatabaseHelper.h"
-
-+#include "IndexedDatabaseInlines.h"
-+
- #define JOURNAL_DIRECTORY_NAME "journals"
-
- USING_INDEXEDDB_NAMESPACE
-@@ -262,13 +264,11 @@ FileManager::GetFileForId(nsIFile* aDirectory, int64_t aId)
-
- // static
- nsresult
--FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
-- nsIFile* aDirectory,
-+FileManager::InitDirectory(nsIFile* aDirectory,
- nsIFile* aDatabaseFile,
-- FactoryPrivilege aPrivilege)
-+ const nsACString& aOrigin)
- {
- NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-- NS_ASSERTION(aService, "Null service!");
- NS_ASSERTION(aDirectory, "Null directory!");
- NS_ASSERTION(aDatabaseFile, "Null database file!");
-
-@@ -310,8 +310,8 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
-
- if (hasElements) {
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = OpenDatabaseHelper::CreateDatabaseConnection(
-- NullString(), aDatabaseFile, aDirectory, getter_AddRefs(connection));
-+ rv = OpenDatabaseHelper::CreateDatabaseConnection(aDatabaseFile,
-+ aDirectory, NullString(), aOrigin, getter_AddRefs(connection));
- NS_ENSURE_SUCCESS(rv, rv);
-
- mozStorageTransaction transaction(connection, false);
-@@ -377,12 +377,17 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
- }
- }
-
-- if (aPrivilege == Chrome) {
-- return NS_OK;
-- }
-+ return NS_OK;
-+}
-+
-+// static
-+nsresult
-+FileManager::GetUsage(nsIFile* aDirectory, uint64_t* aUsage)
-+{
-+ uint64_t usage = 0;
-
- nsCOMPtr<nsISimpleEnumerator> entries;
-- rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
-+ nsresult rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
- NS_ENSURE_SUCCESS(rv, rv);
-
- bool hasMore;
-@@ -402,9 +407,13 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService,
- continue;
- }
-
-- rv = aService->UpdateQuotaInformationForFile(file);
-+ int64_t fileSize;
-+ rv = file->GetFileSize(&fileSize);
- NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, uint64_t(fileSize));
- }
-
-+ *aUsage = usage;
- return NS_OK;
- }
-diff --git dom/indexedDB/FileManager.h dom/indexedDB/FileManager.h
-index 2c72d0a..370d4a8 100644
---- mozilla/dom/indexedDB/FileManager.h
-+++ mozilla/dom/indexedDB/FileManager.h
-@@ -24,10 +24,10 @@ class FileManager
- friend class FileInfo;
-
- public:
-- FileManager(const nsACString& aOrigin,
-+ FileManager(const nsACString& aOrigin, FactoryPrivilege aPrivilege,
- const nsAString& aDatabaseName)
-- : mOrigin(aOrigin), mDatabaseName(aDatabaseName), mLastFileId(0),
-- mInvalidated(false)
-+ : mOrigin(aOrigin), mPrivilege(aPrivilege), mDatabaseName(aDatabaseName),
-+ mLastFileId(0), mInvalidated(false)
- { }
-
- ~FileManager()
-@@ -40,6 +40,11 @@ public:
- return mOrigin;
- }
-
-+ const FactoryPrivilege& Privilege() const
-+ {
-+ return mPrivilege;
-+ }
-+
- const nsAString& DatabaseName() const
- {
- return mDatabaseName;
-@@ -68,12 +73,15 @@ public:
- static already_AddRefed<nsIFile> GetFileForId(nsIFile* aDirectory,
- int64_t aId);
-
-- static nsresult InitDirectory(mozIStorageServiceQuotaManagement* aService,
-- nsIFile* aDirectory, nsIFile* aDatabaseFile,
-- FactoryPrivilege aPrivilege);
-+ static nsresult InitDirectory(nsIFile* aDirectory,
-+ nsIFile* aDatabaseFile,
-+ const nsACString& aOrigin);
-+
-+ static nsresult GetUsage(nsIFile* aDirectory, uint64_t* aUsage);
-
- private:
- nsCString mOrigin;
-+ FactoryPrivilege mPrivilege;
- nsString mDatabaseName;
-
- nsString mDirectoryPath;
-diff --git dom/indexedDB/FileStream.cpp dom/indexedDB/FileStream.cpp
-deleted file mode 100644
-index dddf5d5..0000000
---- mozilla/dom/indexedDB/FileStream.cpp
-+++ /dev/null
-@@ -1,321 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "FileStream.h"
--
--#include "nsIFile.h"
--
--#include "nsThreadUtils.h"
--#include "test_quota.h"
--
--USING_INDEXEDDB_NAMESPACE
--
--NS_IMPL_THREADSAFE_ADDREF(FileStream)
--NS_IMPL_THREADSAFE_RELEASE(FileStream)
--
--NS_INTERFACE_MAP_BEGIN(FileStream)
-- NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardFileStream)
-- NS_INTERFACE_MAP_ENTRY(nsISeekableStream)
-- NS_INTERFACE_MAP_ENTRY(nsIInputStream)
-- NS_INTERFACE_MAP_ENTRY(nsIOutputStream)
-- NS_INTERFACE_MAP_ENTRY(nsIStandardFileStream)
-- NS_INTERFACE_MAP_ENTRY(nsIFileMetadata)
--NS_INTERFACE_MAP_END
--
--NS_IMETHODIMP
--FileStream::Seek(int32_t aWhence, int64_t aOffset)
--{
-- // TODO: Add support for 64 bit file sizes, bug 752431
-- NS_ENSURE_TRUE(aOffset <= INT32_MAX, NS_ERROR_INVALID_ARG);
--
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- int whence;
-- switch (aWhence) {
-- case nsISeekableStream::NS_SEEK_SET:
-- whence = SEEK_SET;
-- break;
-- case nsISeekableStream::NS_SEEK_CUR:
-- whence = SEEK_CUR;
-- break;
-- case nsISeekableStream::NS_SEEK_END:
-- whence = SEEK_END;
-- break;
-- default:
-- return NS_ERROR_INVALID_ARG;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fseek(mQuotaFile, aOffset, whence);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Tell(int64_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- long rc = sqlite3_quota_ftell(mQuotaFile);
-- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR);
--
-- *aResult = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::SetEOF()
--{
-- int64_t pos;
-- nsresult rv = Tell(&pos);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_ftruncate(mQuotaFile, pos);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--
--NS_IMETHODIMP
--FileStream::Close()
--{
-- CleanUpOpen();
--
-- if (mQuotaFile) {
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fclose(mQuotaFile);
-- mQuotaFile = nullptr;
--
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
-- }
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Available(uint64_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- long rc = sqlite3_quota_file_available(mQuotaFile);
-- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR);
--
-- *aResult = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Read(char* aBuf, uint32_t aCount, uint32_t* aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- size_t bytesRead = sqlite3_quota_fread(aBuf, 1, aCount, mQuotaFile);
-- if (bytesRead < aCount && sqlite3_quota_ferror(mQuotaFile)) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *aResult = bytesRead;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::ReadSegments(nsWriteSegmentFun aWriter, void* aClosure,
-- uint32_t aCount, uint32_t* aResult)
--{
-- NS_NOTREACHED("Don't call me!");
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::IsNonBlocking(bool *aNonBlocking)
--{
-- *aNonBlocking = false;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Write(const char* aBuf, uint32_t aCount, uint32_t *aResult)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- size_t bytesWritten = sqlite3_quota_fwrite(aBuf, 1, aCount, mQuotaFile);
-- if (bytesWritten < aCount) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *aResult = bytesWritten;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::Flush()
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fflush(mQuotaFile, 1);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval)
--{
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval)
--{
-- NS_NOTREACHED("Don't call me!");
-- return NS_ERROR_NOT_IMPLEMENTED;
--}
--
--NS_IMETHODIMP
--FileStream::Init(nsIFile* aFile, const nsAString& aMode, int32_t aFlags)
--{
-- NS_ASSERTION(!mQuotaFile && !mDeferredOpen, "Already initialized!");
--
-- nsresult rv = aFile->GetPath(mFilePath);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- mMode = aMode;
-- mFlags = aFlags;
--
-- if (mFlags & nsIStandardFileStream::FLAGS_DEFER_OPEN) {
-- mDeferredOpen = true;
-- return NS_OK;
-- }
--
-- return DoOpen();
--}
--
--NS_IMETHODIMP
--FileStream::GetSize(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- // TODO: Use sqlite3_quota_file_size() here, bug 760783
-- int64_t rc = sqlite3_quota_file_truesize(mQuotaFile);
--
-- NS_ASSERTION(rc >= 0, "The file is not under quota management!");
--
-- *_retval = rc;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::GetLastModified(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- time_t mtime;
-- int rc = sqlite3_quota_file_mtime(mQuotaFile, &mtime);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- *_retval = mtime * PR_MSEC_PER_SEC;
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--FileStream::FlushBuffers()
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mQuotaFile) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- int rc = sqlite3_quota_fflush(mQuotaFile, 0);
-- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR);
--
-- return NS_OK;
--}
--
--nsresult
--FileStream::DoOpen()
--{
-- NS_ASSERTION(!mFilePath.IsEmpty(), "Must have a file path");
--
-- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!");
--
-- quota_FILE* quotaFile =
-- sqlite3_quota_fopen(NS_ConvertUTF16toUTF8(mFilePath).get(),
-- NS_ConvertUTF16toUTF8(mMode).get());
--
-- CleanUpOpen();
--
-- if (!quotaFile) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- mQuotaFile = quotaFile;
--
-- return NS_OK;
--}
-diff --git dom/indexedDB/FileStream.h dom/indexedDB/FileStream.h
-deleted file mode 100644
-index 09648b1..0000000
---- mozilla/dom/indexedDB/FileStream.h
-+++ /dev/null
-@@ -1,140 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#ifndef mozilla_dom_indexeddb_filestream_h__
--#define mozilla_dom_indexeddb_filestream_h__
--
--#include "IndexedDatabase.h"
--
--#include "nsIFileStreams.h"
--#include "nsIInputStream.h"
--#include "nsIOutputStream.h"
--#include "nsISeekableStream.h"
--#include "nsIStandardFileStream.h"
--
--class nsIFile;
--struct quota_FILE;
--
--BEGIN_INDEXEDDB_NAMESPACE
--
--class FileStream : public nsISeekableStream,
-- public nsIInputStream,
-- public nsIOutputStream,
-- public nsIStandardFileStream,
-- public nsIFileMetadata
--{
--public:
-- FileStream()
-- : mFlags(0),
-- mDeferredOpen(false),
-- mQuotaFile(nullptr)
-- { }
--
-- virtual ~FileStream()
-- {
-- Close();
-- }
--
-- NS_DECL_ISUPPORTS
-- NS_DECL_NSISEEKABLESTREAM
-- NS_DECL_NSISTANDARDFILESTREAM
-- NS_DECL_NSIFILEMETADATA
--
-- // nsIInputStream
-- NS_IMETHOD
-- Close();
--
-- NS_IMETHOD
-- Available(uint64_t* _retval);
--
-- NS_IMETHOD
-- Read(char* aBuf, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, uint32_t aCount,
-- uint32_t* _retval);
--
-- NS_IMETHOD
-- IsNonBlocking(bool* _retval);
--
-- // nsIOutputStream
--
-- // Close() already declared
--
-- NS_IMETHOD
-- Flush();
--
-- NS_IMETHOD
-- Write(const char* aBuf, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- WriteFrom(nsIInputStream* aFromStream, uint32_t aCount, uint32_t* _retval);
--
-- NS_IMETHOD
-- WriteSegments(nsReadSegmentFun aReader, void* aClosure, uint32_t aCount,
-- uint32_t* _retval);
--
-- // IsNonBlocking() already declared
--
--protected:
-- /**
-- * Cleans up data prepared in Init.
-- */
-- void
-- CleanUpOpen()
-- {
-- mFilePath.Truncate();
-- mDeferredOpen = false;
-- }
--
-- /**
-- * Open the file. This is called either from Init
-- * or from DoPendingOpen (if FLAGS_DEFER_OPEN is used when initializing this
-- * stream). The default behavior of DoOpen is to open the file and save the
-- * file descriptor.
-- */
-- virtual nsresult
-- DoOpen();
--
-- /**
-- * If there is a pending open, do it now. It's important for this to be
-- * inlined since we do it in almost every stream API call.
-- */
-- nsresult
-- DoPendingOpen()
-- {
-- if (!mDeferredOpen) {
-- return NS_OK;
-- }
--
-- return DoOpen();
-- }
--
-- /**
-- * Data we need to do an open.
-- */
-- nsString mFilePath;
-- nsString mMode;
--
-- /**
-- * Flags describing our behavior. See the IDL file for possible values.
-- */
-- int32_t mFlags;
--
-- /**
-- * Whether we have a pending open (see FLAGS_DEFER_OPEN in the IDL file).
-- */
-- bool mDeferredOpen;
--
-- /**
-- * File descriptor for opened file.
-- */
-- quota_FILE* mQuotaFile;
--};
--
--END_INDEXEDDB_NAMESPACE
--
--#endif // mozilla_dom_indexeddb_filestream_h__
-diff --git dom/indexedDB/IDBDatabase.cpp dom/indexedDB/IDBDatabase.cpp
-index 63500b0..8842daf 100644
---- mozilla/dom/indexedDB/IDBDatabase.cpp
-+++ mozilla/dom/indexedDB/IDBDatabase.cpp
-@@ -779,6 +779,12 @@ IDBDatabase::Close()
- return NS_OK;
- }
-
-+const nsACString&
-+IDBDatabase::StorageOrigin()
-+{
-+ return Origin();
-+}
-+
- nsISupports*
- IDBDatabase::StorageId()
- {
-diff --git dom/indexedDB/IDBFactory.cpp dom/indexedDB/IDBFactory.cpp
-index 1007df1..c1f573e 100644
---- mozilla/dom/indexedDB/IDBFactory.cpp
-+++ mozilla/dom/indexedDB/IDBFactory.cpp
-@@ -253,8 +253,26 @@ IDBFactory::Create(ContentParent* aContentParent,
- }
-
- // static
-+already_AddRefed<nsIFileURL>
-+IDBFactory::GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin)
-+{
-+ nsCOMPtr<nsIURI> uri;
-+ nsresult rv = NS_NewFileURI(getter_AddRefs(uri), aDatabaseFile);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ nsCOMPtr<nsIFileURL> fileUrl = do_QueryInterface(uri);
-+ NS_ASSERTION(fileUrl, "This should always succeed!");
-+
-+ rv = fileUrl->SetQuery(NS_LITERAL_CSTRING("origin=") + aOrigin);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ return fileUrl.forget();
-+}
-+
-+// static
- already_AddRefed<mozIStorageConnection>
--IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
-+IDBFactory::GetConnection(const nsAString& aDatabaseFilePath,
-+ const nsACString& aOrigin)
- {
- NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
- NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")),
-@@ -271,13 +289,15 @@ IDBFactory::GetConnection(const nsAString& aDatabaseFilePath)
- NS_ENSURE_SUCCESS(rv, nullptr);
- NS_ENSURE_TRUE(exists, nullptr);
-
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-+ nsCOMPtr<nsIFileURL> dbFileUrl = GetDatabaseFileURL(dbFile, aOrigin);
-+ NS_ENSURE_TRUE(dbFileUrl, nullptr);
-+
-+ nsCOMPtr<mozIStorageService> ss =
- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
- NS_ENSURE_TRUE(ss, nullptr);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = ss->OpenDatabaseWithVFS(dbFile, NS_LITERAL_CSTRING("quota"),
-- getter_AddRefs(connection));
-+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- NS_ENSURE_SUCCESS(rv, nullptr);
-
- // Turn on foreign key constraints and recursive triggers.
-diff --git dom/indexedDB/IDBFactory.h dom/indexedDB/IDBFactory.h
-index d5461f7..49dad42 100644
---- mozilla/dom/indexedDB/IDBFactory.h
-+++ mozilla/dom/indexedDB/IDBFactory.h
-@@ -15,6 +15,8 @@
- #include "nsCycleCollectionParticipant.h"
-
- class nsIAtom;
-+class nsIFile;
-+class nsIFileURL;
- class nsPIDOMWindow;
-
- namespace mozilla {
-@@ -75,8 +77,12 @@ public:
- static nsresult Create(ContentParent* aContentParent,
- IDBFactory** aFactory);
-
-+ static already_AddRefed<nsIFileURL>
-+ GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin);
-+
- static already_AddRefed<mozIStorageConnection>
-- GetConnection(const nsAString& aDatabaseFilePath);
-+ GetConnection(const nsAString& aDatabaseFilePath,
-+ const nsACString& aOrigin);
-
- static nsresult
- LoadDatabaseInformation(mozIStorageConnection* aConnection,
-diff --git dom/indexedDB/IDBFileHandle.cpp dom/indexedDB/IDBFileHandle.cpp
-index e0340ff..f71fd56 100644
---- mozilla/dom/indexedDB/IDBFileHandle.cpp
-+++ mozilla/dom/indexedDB/IDBFileHandle.cpp
-@@ -6,15 +6,14 @@
-
- #include "IDBFileHandle.h"
-
--#include "nsIStandardFileStream.h"
--
- #include "mozilla/dom/file/File.h"
-+#include "mozilla/dom/quota/FileStreams.h"
- #include "nsDOMClassInfoID.h"
-
--#include "FileStream.h"
- #include "IDBDatabase.h"
-
- USING_INDEXEDDB_NAMESPACE
-+USING_QUOTA_NAMESPACE
-
- namespace {
-
-@@ -68,22 +67,22 @@ IDBFileHandle::Create(IDBDatabase* aDatabase,
- already_AddRefed<nsISupports>
- IDBFileHandle::CreateStream(nsIFile* aFile, bool aReadOnly)
- {
-- nsRefPtr<FileStream> stream = new FileStream();
-+ const nsACString& origin = mFileStorage->StorageOrigin();
-+
-+ nsCOMPtr<nsISupports> result;
-
-- nsString streamMode;
- if (aReadOnly) {
-- streamMode.AssignLiteral("rb");
-+ nsRefPtr<FileInputStream> stream = FileInputStream::Create(
-+ origin, aFile, -1, -1, nsIFileInputStream::DEFER_OPEN);
-+ result = NS_ISUPPORTS_CAST(nsIFileInputStream*, stream);
- }
- else {
-- streamMode.AssignLiteral("r+b");
-+ nsRefPtr<FileStream> stream = FileStream::Create(
-+ origin, aFile, -1, -1, nsIFileStream::DEFER_OPEN);
-+ result = NS_ISUPPORTS_CAST(nsIFileStream*, stream);
- }
-+ NS_ENSURE_TRUE(result, nullptr);
-
-- nsresult rv = stream->Init(aFile, streamMode,
-- nsIStandardFileStream::FLAGS_DEFER_OPEN);
-- NS_ENSURE_SUCCESS(rv, nullptr);
--
-- nsCOMPtr<nsISupports> result =
-- NS_ISUPPORTS_CAST(nsIStandardFileStream*, stream);
- return result.forget();
- }
-
-diff --git dom/indexedDB/IDBObjectStore.cpp dom/indexedDB/IDBObjectStore.cpp
-index 746d473..1f16d26 100644
---- mozilla/dom/indexedDB/IDBObjectStore.cpp
-+++ mozilla/dom/indexedDB/IDBObjectStore.cpp
-@@ -17,6 +17,7 @@
- #include "mozilla/dom/ContentParent.h"
- #include "mozilla/dom/StructuredCloneTags.h"
- #include "mozilla/dom/ipc/Blob.h"
-+#include "mozilla/dom/quota/FileStreams.h"
- #include "mozilla/storage.h"
- #include "nsContentUtils.h"
- #include "nsDOMClassInfo.h"
-@@ -27,10 +28,8 @@
- #include "nsServiceManagerUtils.h"
- #include "nsThreadUtils.h"
- #include "snappy/snappy.h"
--#include "test_quota.h"
-
- #include "AsyncConnectionHelper.h"
--#include "FileStream.h"
- #include "IDBCursor.h"
- #include "IDBEvents.h"
- #include "IDBFileHandle.h"
-@@ -51,6 +50,7 @@
- USING_INDEXEDDB_NAMESPACE
- using namespace mozilla::dom;
- using namespace mozilla::dom::indexedDB::ipc;
-+using mozilla::dom::quota::FileOutputStream;
-
- namespace {
-
-@@ -2734,9 +2734,9 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- nativeFile = fileManager->GetFileForId(directory, id);
- NS_ENSURE_TRUE(nativeFile, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsRefPtr<FileStream> outputStream = new FileStream();
-- rv = outputStream->Init(nativeFile, NS_LITERAL_STRING("wb"), 0);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ nsRefPtr<FileOutputStream> outputStream = FileOutputStream::Create(
-+ mObjectStore->Transaction()->Database()->Origin(), nativeFile);
-+ NS_ENSURE_TRUE(outputStream, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- rv = CopyData(inputStream, outputStream);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-diff --git dom/indexedDB/IDBTransaction.cpp dom/indexedDB/IDBTransaction.cpp
-index fcef7cc..a5345e2 100644
---- mozilla/dom/indexedDB/IDBTransaction.cpp
-+++ mozilla/dom/indexedDB/IDBTransaction.cpp
-@@ -352,7 +352,8 @@ IDBTransaction::GetOrCreateConnection(mozIStorageConnection** aResult)
-
- if (!mConnection) {
- nsCOMPtr<mozIStorageConnection> connection =
-- IDBFactory::GetConnection(mDatabase->FilePath());
-+ IDBFactory::GetConnection(mDatabase->FilePath(),
-+ mDatabase->Origin());
- NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE);
-
- nsresult rv;
-diff --git dom/indexedDB/IndexedDatabaseInlines.h dom/indexedDB/IndexedDatabaseInlines.h
-index 62e65d6..f27d60c 100644
---- mozilla/dom/indexedDB/IndexedDatabaseInlines.h
-+++ mozilla/dom/indexedDB/IndexedDatabaseInlines.h
-@@ -79,4 +79,17 @@ AppendConditionClause(const nsACString& aColumnName,
- aResult += NS_LITERAL_CSTRING(" :") + aArgName;
- }
-
-+inline void
-+IncrementUsage(uint64_t* aUsage, uint64_t aDelta)
-+{
-+ // Watch for overflow!
-+ if ((UINT64_MAX - *aUsage) < aDelta) {
-+ NS_WARNING("Usage exceeds the maximum!");
-+ *aUsage = UINT64_MAX;
-+ }
-+ else {
-+ *aUsage += aDelta;
-+ }
-+}
-+
- END_INDEXEDDB_NAMESPACE
-diff --git dom/indexedDB/IndexedDatabaseManager.cpp dom/indexedDB/IndexedDatabaseManager.cpp
-index e4ad647..88f09da 100644
---- mozilla/dom/indexedDB/IndexedDatabaseManager.cpp
-+++ mozilla/dom/indexedDB/IndexedDatabaseManager.cpp
-@@ -22,6 +22,7 @@
- #include "nsITimer.h"
-
- #include "mozilla/dom/file/FileService.h"
-+#include "mozilla/dom/quota/QuotaManager.h"
- #include "mozilla/dom/TabContext.h"
- #include "mozilla/LazyIdleThread.h"
- #include "mozilla/Preferences.h"
-@@ -36,7 +37,6 @@
- #include "nsThreadUtils.h"
- #include "nsXPCOM.h"
- #include "nsXPCOMPrivate.h"
--#include "test_quota.h"
- #include "xpcpublic.h"
-
- #include "AsyncConnectionHelper.h"
-@@ -48,6 +48,8 @@
- #include "OpenDatabaseHelper.h"
- #include "TransactionThreadPool.h"
-
-+#include "IndexedDatabaseInlines.h"
-+
- // The amount of time, in milliseconds, that our IO thread will stay alive
- // after the last event it processes.
- #define DEFAULT_THREAD_TIMEOUT_MS 30000
-@@ -70,6 +72,7 @@ using namespace mozilla::services;
- using namespace mozilla::dom;
- using mozilla::Preferences;
- using mozilla::dom::file::FileService;
-+using mozilla::dom::quota::QuotaManager;
-
- static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
-
-@@ -103,29 +106,6 @@ GetDatabaseBaseFilename(const nsAString& aFilename,
- return true;
- }
-
--class QuotaCallback MOZ_FINAL : public mozIStorageQuotaCallback
--{
--public:
-- NS_DECL_ISUPPORTS
--
-- NS_IMETHOD
-- QuotaExceeded(const nsACString& aFilename,
-- int64_t aCurrentSizeLimit,
-- int64_t aCurrentTotalSize,
-- nsISupports* aUserData,
-- int64_t* _retval)
-- {
-- if (IndexedDatabaseManager::QuotaIsLifted()) {
-- *_retval = 0;
-- return NS_OK;
-- }
--
-- return NS_ERROR_FAILURE;
-- }
--};
--
--NS_IMPL_THREADSAFE_ISUPPORTS1(QuotaCallback, mozIStorageQuotaCallback)
--
- // Adds all databases in the hash to the given array.
- template <class T>
- PLDHashOperator
-@@ -440,8 +420,8 @@ IndexedDatabaseManager::GetOrCreate()
- NS_LITERAL_CSTRING("IndexedDB I/O"),
- LazyIdleThread::ManualShutdown);
-
-- // We need one quota callback object to hand to SQLite.
-- instance->mQuotaCallbackSingleton = new QuotaCallback();
-+ // Make sure that the quota manager is up.
-+ NS_ENSURE_TRUE(QuotaManager::GetOrCreate(), nullptr);
-
- // Make a timer here to avoid potential failures later. We don't actually
- // initialize the timer until shutdown.
-@@ -996,37 +976,15 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- return NS_OK;
- }
-
-- // First figure out the filename pattern we'll use.
-- nsCOMPtr<nsIFile> patternFile;
-- rv = directory->Clone(getter_AddRefs(patternFile));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- rv = patternFile->Append(NS_LITERAL_STRING("*"));
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- nsString pattern;
-- rv = patternFile->GetPath(pattern);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- // Now tell SQLite to start tracking this pattern for content.
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE);
--
-- if (aPrivilege != Chrome) {
-- rv = ss->SetQuotaForFilenamePattern(NS_ConvertUTF16toUTF8(pattern),
-- GetIndexedDBQuotaMB() * 1024 * 1024,
-- mQuotaCallbackSingleton, nullptr);
-- NS_ENSURE_SUCCESS(rv, rv);
-- }
--
- // We need to see if there are any files in the directory already. If they
- // are database files then we need to cleanup stored files (if it's needed)
-- // and also tell SQLite about all of them.
-+ // and also initialize the quota.
-
- nsAutoTArray<nsString, 20> subdirsToProcess;
- nsAutoTArray<nsCOMPtr<nsIFile> , 20> unknownFiles;
-
-+ uint64_t usage = 0;
-+
- nsTHashtable<nsStringHashKey> validSubdirs;
- validSubdirs.Init(20);
-
-@@ -1068,20 +1026,28 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- continue;
- }
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = directory->Clone(getter_AddRefs(fileManagerDirectory));
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = directory->Clone(getter_AddRefs(fmDirectory));
- NS_ENSURE_SUCCESS(rv, rv);
-
-- rv = fileManagerDirectory->Append(dbBaseFilename);
-+ rv = fmDirectory->Append(dbBaseFilename);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- rv = FileManager::InitDirectory(ss, fileManagerDirectory, file,
-- aPrivilege);
-+ rv = FileManager::InitDirectory(fmDirectory, file, aOrigin);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (aPrivilege != Chrome) {
-- rv = ss->UpdateQuotaInformationForFile(file);
-+ uint64_t fileUsage;
-+ rv = FileManager::GetUsage(fmDirectory, &fileUsage);
- NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, fileUsage);
-+
-+ int64_t fileSize;
-+ rv = file->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ IncrementUsage(&usage, uint64_t(fileSize));
- }
-
- validSubdirs.PutEntry(dbBaseFilename);
-@@ -1117,12 +1083,39 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin,
- }
- }
-
-+ if (aPrivilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->InitQuotaForOrigin(aOrigin, GetIndexedDBQuotaMB(), usage);
-+ }
-+
- mInitializedOrigins.AppendElement(aOrigin);
-
- NS_ADDREF(*aDirectory = directory);
- return NS_OK;
- }
-
-+void
-+IndexedDatabaseManager::UninitializeOriginsByPattern(
-+ const nsACString& aPattern)
-+{
-+#ifdef DEBUG
-+ {
-+ bool correctThread;
-+ NS_ASSERTION(NS_SUCCEEDED(mIOThread->IsOnCurrentThread(&correctThread)) &&
-+ correctThread,
-+ "Running on the wrong thread!");
-+ }
-+#endif
-+
-+ for (int32_t i = mInitializedOrigins.Length() - 1; i >= 0; i--) {
-+ if (PatternMatchesOrigin(aPattern, mInitializedOrigins[i])) {
-+ mInitializedOrigins.RemoveElementAt(i);
-+ }
-+ }
-+}
-+
- bool
- IndexedDatabaseManager::QuotaIsLiftedInternal()
- {
-@@ -1250,16 +1243,14 @@ IndexedDatabaseManager::GetFileManager(const nsACString& aOrigin,
- }
-
- void
--IndexedDatabaseManager::AddFileManager(const nsACString& aOrigin,
-- const nsAString& aDatabaseName,
-- FileManager* aFileManager)
-+IndexedDatabaseManager::AddFileManager(FileManager* aFileManager)
- {
- NS_ASSERTION(aFileManager, "Null file manager!");
-
- nsTArray<nsRefPtr<FileManager> >* array;
-- if (!mFileManagers.Get(aOrigin, &array)) {
-+ if (!mFileManagers.Get(aFileManager->Origin(), &array)) {
- array = new nsTArray<nsRefPtr<FileManager> >();
-- mFileManagers.Put(aOrigin, array);
-+ mFileManagers.Put(aFileManager->Origin(), array);
- }
-
- array->AppendElement(aFileManager);
-@@ -1783,6 +1774,13 @@ OriginClearRunnable::DeleteFiles(IndexedDatabaseManager* aManager)
- // correctly...
- NS_ERROR("Failed to remove directory!");
- }
-+
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->RemoveQuotaForPattern(mOriginOrPattern);
-+
-+ aManager->UninitializeOriginsByPattern(mOriginOrPattern);
- }
- }
-
-@@ -1880,19 +1878,6 @@ IndexedDatabaseManager::AsyncUsageRunnable::Cancel()
- }
- }
-
--inline void
--IncrementUsage(uint64_t* aUsage, uint64_t aDelta)
--{
-- // Watch for overflow!
-- if ((INT64_MAX - *aUsage) <= aDelta) {
-- NS_WARNING("Database sizes exceed max we can report!");
-- *aUsage = INT64_MAX;
-- }
-- else {
-- *aUsage += aDelta;
-- }
--}
--
- nsresult
- IndexedDatabaseManager::AsyncUsageRunnable::TakeShortcut()
- {
-@@ -2295,25 +2280,22 @@ IndexedDatabaseManager::AsyncDeleteFileRunnable::Run()
- nsCOMPtr<nsIFile> file = mFileManager->GetFileForId(directory, mFileId);
- NS_ENSURE_TRUE(file, NS_ERROR_FAILURE);
-
-- nsString filePath;
-- nsresult rv = file->GetPath(filePath);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsresult rv;
-+ int64_t fileSize;
-
-- int rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(filePath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete stored file!");
-- return NS_ERROR_FAILURE;
-+ if (mFileManager->Privilege() != Chrome) {
-+ rv = file->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
- }
-
-- // sqlite3_quota_remove won't actually remove anything if we're not tracking
-- // the quota here. Manually remove the file if it exists.
-- bool exists;
-- rv = file->Exists(&exists);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ rv = file->Remove(false);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
-
-- if (exists) {
-- rv = file->Remove(false);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ if (mFileManager->Privilege() != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mFileManager->Origin(), fileSize);
- }
-
- directory = mFileManager->GetJournalDirectory();
-diff --git dom/indexedDB/IndexedDatabaseManager.h dom/indexedDB/IndexedDatabaseManager.h
-index f9fbbf2..1ea5425 100644
---- mozilla/dom/indexedDB/IndexedDatabaseManager.h
-+++ mozilla/dom/indexedDB/IndexedDatabaseManager.h
-@@ -23,7 +23,6 @@
-
- #define INDEXEDDB_MANAGER_CONTRACTID "@mozilla.org/dom/indexeddb/manager;1"
-
--class mozIStorageQuotaCallback;
- class nsIAtom;
- class nsIFile;
- class nsITimer;
-@@ -134,6 +133,8 @@ public:
- FactoryPrivilege aPrivilege,
- nsIFile** aDirectory);
-
-+ void UninitializeOriginsByPattern(const nsACString& aPattern);
-+
- // Determine if the quota is lifted for the Window the current thread is
- // using.
- static inline bool
-@@ -172,9 +173,7 @@ public:
- const nsAString& aDatabaseName);
-
- void
-- AddFileManager(const nsACString& aOrigin,
-- const nsAString& aDatabaseName,
-- FileManager* aFileManager);
-+ AddFileManager(FileManager* aFileManager);
-
- void InvalidateFileManagersForPattern(const nsACString& aPattern);
-
-@@ -502,10 +501,6 @@ private:
- // A timer that gets activated at shutdown to ensure we close all databases.
- nsCOMPtr<nsITimer> mShutdownTimer;
-
-- // A single threadsafe instance of our quota callback. Created on the main
-- // thread during GetOrCreate().
-- nsCOMPtr<mozIStorageQuotaCallback> mQuotaCallbackSingleton;
--
- // A list of all successfully initialized origins. This list isn't protected
- // by any mutex but it is only ever touched on the IO thread.
- nsTArray<nsCString> mInitializedOrigins;
-diff --git dom/indexedDB/Makefile.in dom/indexedDB/Makefile.in
-index fef0858..09d4853 100644
---- mozilla/dom/indexedDB/Makefile.in
-+++ mozilla/dom/indexedDB/Makefile.in
-@@ -25,7 +25,6 @@ CPPSRCS = \
- DatabaseInfo.cpp \
- FileInfo.cpp \
- FileManager.cpp \
-- FileStream.cpp \
- IDBCursor.cpp \
- IDBDatabase.cpp \
- IDBEvents.cpp \
-@@ -93,7 +92,6 @@ XPIDLSRCS = \
- nsIIDBVersionChangeEvent.idl \
- nsIIDBOpenDBRequest.idl \
- nsIIndexedDatabaseManager.idl \
-- nsIStandardFileStream.idl \
- $(NULL)
-
- DIRS += ipc
-diff --git dom/indexedDB/OpenDatabaseHelper.cpp dom/indexedDB/OpenDatabaseHelper.cpp
-index e71cad4..4cd7f61 100644
---- mozilla/dom/indexedDB/OpenDatabaseHelper.cpp
-+++ mozilla/dom/indexedDB/OpenDatabaseHelper.cpp
-@@ -8,11 +8,12 @@
-
- #include "nsIFile.h"
-
-+#include "mozilla/dom/quota/QuotaManager.h"
- #include "mozilla/storage.h"
- #include "nsEscape.h"
-+#include "nsNetUtil.h"
- #include "nsThreadUtils.h"
- #include "snappy/snappy.h"
--#include "test_quota.h"
-
- #include "nsIBFCacheEntry.h"
- #include "IDBEvents.h"
-@@ -21,6 +22,7 @@
-
- using namespace mozilla;
- USING_INDEXEDDB_NAMESPACE
-+USING_QUOTA_NAMESPACE
-
- namespace {
-
-@@ -1632,15 +1634,15 @@ OpenDatabaseHelper::DoDatabaseWork()
- rv = dbFile->GetPath(mDatabaseFilePath);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = dbDirectory->Clone(getter_AddRefs(fileManagerDirectory));
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = dbDirectory->Clone(getter_AddRefs(fmDirectory));
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Append(filename);
-+ rv = fmDirectory->Append(filename);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- rv = CreateDatabaseConnection(mName, dbFile, fileManagerDirectory,
-+ rv = CreateDatabaseConnection(dbFile, fmDirectory, mName, mASCIIOrigin,
- getter_AddRefs(connection));
- if (NS_FAILED(rv) &&
- NS_ERROR_GET_MODULE(rv) != NS_ERROR_MODULE_DOM_INDEXEDDB) {
-@@ -1691,12 +1693,12 @@ OpenDatabaseHelper::DoDatabaseWork()
-
- nsRefPtr<FileManager> fileManager = mgr->GetFileManager(mASCIIOrigin, mName);
- if (!fileManager) {
-- fileManager = new FileManager(mASCIIOrigin, mName);
-+ fileManager = new FileManager(mASCIIOrigin, mPrivilege, mName);
-
-- rv = fileManager->Init(fileManagerDirectory, connection);
-+ rv = fileManager->Init(fmDirectory, connection);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- mgr->AddFileManager(mASCIIOrigin, mName, fileManager);
-+ mgr->AddFileManager(fileManager);
- }
-
- mFileManager = fileManager.forget();
-@@ -1707,23 +1709,26 @@ OpenDatabaseHelper::DoDatabaseWork()
- // static
- nsresult
- OpenDatabaseHelper::CreateDatabaseConnection(
-- const nsAString& aName,
- nsIFile* aDBFile,
-- nsIFile* aFileManagerDirectory,
-+ nsIFile* aFMDirectory,
-+ const nsAString& aName,
-+ const nsACString& aOrigin,
- mozIStorageConnection** aConnection)
- {
- NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
- NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-
-- NS_NAMED_LITERAL_CSTRING(quotaVFSName, "quota");
-+ nsCOMPtr<nsIFileURL> dbFileUrl =
-+ IDBFactory::GetDatabaseFileURL(aDBFile, aOrigin);
-+ NS_ENSURE_TRUE(dbFileUrl, NS_ERROR_FAILURE);
-
-- nsCOMPtr<mozIStorageServiceQuotaManagement> ss =
-+ nsCOMPtr<mozIStorageService> ss =
- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE);
-
- nsCOMPtr<mozIStorageConnection> connection;
-- nsresult rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName,
-- getter_AddRefs(connection));
-+ nsresult rv =
-+ ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- if (rv == NS_ERROR_FILE_CORRUPTED) {
- // If we're just opening the database during origin initialization, then
- // we don't want to erase any files. The failure here will fail origin
-@@ -1737,21 +1742,20 @@ OpenDatabaseHelper::CreateDatabaseConnection(
- NS_ENSURE_SUCCESS(rv, rv);
-
- bool exists;
-- rv = aFileManagerDirectory->Exists(&exists);
-+ rv = aFMDirectory->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (exists) {
- bool isDirectory;
-- rv = aFileManagerDirectory->IsDirectory(&isDirectory);
-+ rv = aFMDirectory->IsDirectory(&isDirectory);
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = aFileManagerDirectory->Remove(true);
-+ rv = aFMDirectory->Remove(true);
- NS_ENSURE_SUCCESS(rv, rv);
- }
-
-- rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName,
-- getter_AddRefs(connection));
-+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection));
- }
- NS_ENSURE_SUCCESS(rv, rv);
-
-@@ -2347,6 +2351,8 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- {
- NS_ASSERTION(!aConnection, "How did we get a connection here?");
-
-+ const FactoryPrivilege& privilege = mOpenHelper->Privilege();
-+
- IndexedDatabaseManager* mgr = IndexedDatabaseManager::Get();
- NS_ASSERTION(mgr, "This should never fail!");
-
-@@ -2372,59 +2378,57 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
- rv = dbFile->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- int rc;
--
- if (exists) {
-- nsString dbFilePath;
-- rv = dbFile->GetPath(dbFilePath);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ int64_t fileSize;
-
-- rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(dbFilePath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete db file!");
-- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-+ if (privilege != Chrome) {
-+ rv = dbFile->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
- }
-
-- // sqlite3_quota_remove won't actually remove anything if we're not tracking
-- // the quota here. Manually remove the file if it exists.
-- rv = dbFile->Exists(&exists);
-+ rv = dbFile->Remove(false);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- if (exists) {
-- rv = dbFile->Remove(false);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ if (privilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, fileSize);
- }
- }
-
-- nsCOMPtr<nsIFile> fileManagerDirectory;
-- rv = directory->Clone(getter_AddRefs(fileManagerDirectory));
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsCOMPtr<nsIFile> fmDirectory;
-+ rv = directory->Clone(getter_AddRefs(fmDirectory));
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Append(filename);
-+ rv = fmDirectory->Append(filename);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- rv = fileManagerDirectory->Exists(&exists);
-+ rv = fmDirectory->Exists(&exists);
- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
- if (exists) {
- bool isDirectory;
-- rv = fileManagerDirectory->IsDirectory(&isDirectory);
-+ rv = fmDirectory->IsDirectory(&isDirectory);
- NS_ENSURE_SUCCESS(rv, rv);
- NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-
-- nsString fileManagerDirectoryPath;
-- rv = fileManagerDirectory->GetPath(fileManagerDirectoryPath);
-- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+ uint64_t usage = 0;
-
-- rc = sqlite3_quota_remove(
-- NS_ConvertUTF16toUTF8(fileManagerDirectoryPath).get());
-- if (rc != SQLITE_OK) {
-- NS_WARNING("Failed to delete file directory!");
-- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
-+ if (privilege != Chrome) {
-+ rv = FileManager::GetUsage(fmDirectory, &usage);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
- }
-
-- rv = fileManagerDirectory->Remove(true);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ rv = fmDirectory->Remove(true);
-+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
-+
-+ if (privilege != Chrome) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, usage);
-+ }
- }
-
- return NS_OK;
-diff --git dom/indexedDB/OpenDatabaseHelper.h dom/indexedDB/OpenDatabaseHelper.h
-index 587301b..5a3d987 100644
---- mozilla/dom/indexedDB/OpenDatabaseHelper.h
-+++ mozilla/dom/indexedDB/OpenDatabaseHelper.h
-@@ -77,10 +77,16 @@ public:
- return mDatabase;
- }
-
-+ const FactoryPrivilege& Privilege() const
-+ {
-+ return mPrivilege;
-+ }
-+
- static
-- nsresult CreateDatabaseConnection(const nsAString& aName,
-- nsIFile* aDBFile,
-- nsIFile* aFileManagerDirectory,
-+ nsresult CreateDatabaseConnection(nsIFile* aDBFile,
-+ nsIFile* aFMDirectory,
-+ const nsAString& aName,
-+ const nsACString& aOrigin,
- mozIStorageConnection** aConnection);
-
- protected:
-diff --git dom/indexedDB/nsIStandardFileStream.idl dom/indexedDB/nsIStandardFileStream.idl
-deleted file mode 100644
-index 265c3ed..0000000
---- mozilla/dom/indexedDB/nsIStandardFileStream.idl
-+++ /dev/null
-@@ -1,60 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-- * You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "nsISupports.idl"
--
--interface nsIFile;
--
--/**
-- * A stream that allows you to read from a file or stream to a file
-- * using standard file APIs.
-- */
--[scriptable, uuid(ebbbb779-92a3-4b2a-b7cf-6efbe904c453)]
--interface nsIStandardFileStream : nsISupports
--{
-- /**
-- * If this is set, the file will be opened (i.e., a call to
-- * fopen done) only when we do an actual operation on the stream,
-- * or more specifically, when one of the following is called:
-- * - Seek
-- * - Tell
-- * - SetEOF
-- * - Available
-- * - Read
-- * - Write
-- * - Flush
-- * - GetSize
-- * - GetLastModified
-- * - Sync
-- *
-- * FLAGS_DEFER_OPEN is useful if we use the stream on a background
-- * thread, so that the opening and possible |stat|ing of the file
-- * happens there as well.
-- *
-- * @note Using this flag results in the file not being opened
-- * during the call to Init. This means that any errors that might
-- * happen when this flag is not set would happen during the
-- * first read. Also, the file is not locked when Init is called,
-- * so it might be deleted before we try to read from it.
-- */
-- const long FLAGS_DEFER_OPEN = 1 << 0;
--
-- /**
-- * @param file file to read from or stream to
-- * @param mode file open mode (see fopen documentation)
-- * @param flags flags specifying various behaviors of the class
-- * (see enumerations in the class)
-- */
-- void init(in nsIFile file,
-- in AString mode,
-- in long flags);
--
-- /**
-- * Flush all written content held in memory buffers out to disk.
-- * This is the equivalent of fflush()
-- */
-- void flushBuffers();
--};
-diff --git dom/indexedDB/test/Makefile.in dom/indexedDB/test/Makefile.in
-index 9c79b14..4c9a201 100644
---- mozilla/dom/indexedDB/test/Makefile.in
-+++ mozilla/dom/indexedDB/test/Makefile.in
-@@ -54,11 +54,13 @@ MOCHITEST_FILES = \
- test_file_os_delete.html \
- test_file_put_get_object.html \
- test_file_put_get_values.html \
-+ test_file_quota.html \
- test_file_replace.html \
- test_file_resurrection_delete.html \
- test_file_resurrection_transaction_abort.html \
- test_file_sharing.html \
- test_file_transaction_abort.html \
-+ test_filehandle_quota.html \
- test_filehandle_serialization.html \
- test_filehandle_store_snapshot.html \
- test_getAll.html \
-diff --git dom/indexedDB/test/file.js dom/indexedDB/test/file.js
-index 07bd10a..3c6194a 100644
---- mozilla/dom/indexedDB/test/file.js
-+++ mozilla/dom/indexedDB/test/file.js
-@@ -3,6 +3,8 @@
- * http://creativecommons.org/publicdomain/zero/1.0/
- */
-
-+const DEFAULT_QUOTA = 50 * 1024 * 1024;
-+
- var bufferCache = [];
- var utils = SpecialPowers.getDOMWindowUtils(window);
-
-@@ -184,25 +186,6 @@ function getUsage(usageHandler)
- idbManager.getUsageForURI(uri, callback);
- }
-
--function getUsageSync()
--{
-- let usage;
--
-- getUsage(function(aUsage, aFileUsage) {
-- usage = aUsage;
-- });
--
-- let comp = SpecialPowers.wrap(Components);
-- let thread = comp.classes["@mozilla.org/thread-manager;1"]
-- .getService(comp.interfaces.nsIThreadManager)
-- .currentThread;
-- while (!usage) {
-- thread.processNextEvent(true);
-- }
--
-- return usage;
--}
--
- function scheduleGC()
- {
- SpecialPowers.exactGC(window, continueToNextStep);
-diff --git dom/indexedDB/test/test_file_quota.html dom/indexedDB/test/test_file_quota.html
-index b07880d..9fbc0c0 100644
---- mozilla/dom/indexedDB/test/test_file_quota.html
-+++ mozilla/dom/indexedDB/test/test_file_quota.html
-@@ -13,14 +13,12 @@
- function testSteps()
- {
- const READ_WRITE = IDBTransaction.READ_WRITE;
-- const DEFAULT_QUOTA_MB = 50;
-
- const name = window.location.pathname;
-
- const objectStoreName = "Blobs";
-
-- const testData = { key: 0, value: {} };
-- const fileData = { key: 1, file: null };
-+ const fileData = { key: 1, file: getNullFile("random.bin", DEFAULT_QUOTA) };
-
- let request = indexedDB.open(name, 1);
- request.onerror = errorHandler;
-@@ -32,21 +30,17 @@
-
- let db = event.target.result;
-
-- let objectStore = db.createObjectStore(objectStoreName, { });
-- objectStore.add(testData.value, testData.key);
--
-- let size = (DEFAULT_QUOTA_MB + 1) * 1024 * 1024 - getUsageSync();
-- fileData.file = getNullFile("random.bin", size);
-+ db.createObjectStore(objectStoreName, { });
-
- event = yield;
-
- is(event.type, "success", "Got correct event type");
-
- trans = db.transaction([objectStoreName], READ_WRITE);
-- objectStore = trans.objectStore(objectStoreName);
-+ let objectStore = trans.objectStore(objectStoreName);
-
- request = objectStore.add(fileData.file, fileData.key);
-- request.addEventListener("error", new ExpectError("UnknownError"));
-+ request.addEventListener("error", new ExpectError("UnknownError", true));
- request.onsuccess = unexpectedSuccessHandler;
- event = yield;
-
-diff --git dom/indexedDB/test/test_filehandle_quota.html dom/indexedDB/test/test_filehandle_quota.html
-index addaf01..0506279 100644
---- mozilla/dom/indexedDB/test/test_filehandle_quota.html
-+++ mozilla/dom/indexedDB/test/test_filehandle_quota.html
-@@ -13,7 +13,6 @@
- function testSteps()
- {
- const READ_WRITE = IDBTransaction.READ_WRITE;
-- const DEFAULT_QUOTA_MB = 50;
-
- const name = window.location.pathname;
-
-@@ -39,10 +38,10 @@
-
- let lockedFile = fileHandle.open("readwrite");
-
-- let blob = getNullBlob((50 + 1) * 1024 * 1024 - getUsageSync());
-+ let blob = getNullBlob(DEFAULT_QUOTA);
-
- request = lockedFile.write(blob);
-- request.addEventListener("error", new ExpectError("UnknownError"));
-+ request.addEventListener("error", new ExpectError("UnknownError", true));
- request.onsuccess = unexpectedSuccessHandler;
- event = yield;
-
-diff --git dom/quota/FileStreams.cpp dom/quota/FileStreams.cpp
-new file mode 100644
-index 0000000..9de244f
---- /dev/null
-+++ mozilla/dom/quota/FileStreams.cpp
-@@ -0,0 +1,123 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "FileStreams.h"
-+
-+USING_QUOTA_NAMESPACE
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStream<FileStreamBase>::SetEOF()
-+{
-+ nsresult rv = FileStreamBase::SetEOF();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (mQuotaObject) {
-+ int64_t offset;
-+ nsresult rv = FileStreamBase::Tell(&offset);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mQuotaObject->UpdateSize(offset);
-+ }
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStream<FileStreamBase>::Close()
-+{
-+ nsresult rv = FileStreamBase::Close();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mQuotaObject = nullptr;
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+nsresult
-+FileQuotaStream<FileStreamBase>::DoOpen()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ NS_ASSERTION(!mQuotaObject, "Creating quota object more than once?");
-+ mQuotaObject = quotaManager->GetQuotaObject(mOrigin,
-+ FileStreamBase::mOpenParams.localFile);
-+
-+ nsresult rv = FileStreamBase::DoOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (mQuotaObject && (FileStreamBase::mOpenParams.ioFlags & PR_TRUNCATE)) {
-+ mQuotaObject->UpdateSize(0);
-+ }
-+
-+ return NS_OK;
-+}
-+
-+template <class FileStreamBase>
-+NS_IMETHODIMP
-+FileQuotaStreamWithWrite<FileStreamBase>::Write(const char* aBuf,
-+ uint32_t aCount,
-+ uint32_t* _retval)
-+{
-+ nsresult rv;
-+
-+ if (FileQuotaStreamWithWrite::mQuotaObject) {
-+ int64_t offset;
-+ rv = FileStreamBase::Tell(&offset);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!FileQuotaStreamWithWrite::
-+ mQuotaObject->MaybeAllocateMoreSpace(offset, aCount)) {
-+ return NS_ERROR_FAILURE;
-+ }
-+ }
-+
-+ rv = FileStreamBase::Write(aBuf, aCount, _retval);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ return NS_OK;
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileInputStream, nsFileInputStream)
-+
-+already_AddRefed<FileInputStream>
-+FileInputStream::Create(const nsACString& aOrigin, nsIFile* aFile,
-+ int32_t aIOFlags, int32_t aPerm,
-+ int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileInputStream> stream = new FileInputStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileOutputStream, nsFileOutputStream)
-+
-+already_AddRefed<FileOutputStream>
-+FileOutputStream::Create(const nsACString& aOrigin, nsIFile* aFile,
-+ int32_t aIOFlags, int32_t aPerm,
-+ int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileOutputStream> stream = new FileOutputStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-+
-+NS_IMPL_ISUPPORTS_INHERITED0(FileStream, nsFileStream)
-+
-+already_AddRefed<FileStream>
-+FileStream::Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags,
-+ int32_t aPerm, int32_t aBehaviorFlags)
-+{
-+ nsRefPtr<FileStream> stream = new FileStream(aOrigin);
-+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ return stream.forget();
-+}
-diff --git dom/quota/FileStreams.h dom/quota/FileStreams.h
-new file mode 100644
-index 0000000..77bfad4
---- /dev/null
-+++ mozilla/dom/quota/FileStreams.h
-@@ -0,0 +1,115 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_filestreams_h__
-+#define mozilla_dom_quota_filestreams_h__
-+
-+#include "QuotaCommon.h"
-+
-+#include "nsFileStreams.h"
-+
-+#include "QuotaManager.h"
-+
-+BEGIN_QUOTA_NAMESPACE
-+
-+template <class FileStreamBase>
-+class FileQuotaStream : public FileStreamBase
-+{
-+public:
-+ // nsFileStreamBase override
-+ NS_IMETHOD
-+ SetEOF() MOZ_OVERRIDE;
-+
-+ NS_IMETHOD
-+ Close() MOZ_OVERRIDE;
-+
-+protected:
-+ FileQuotaStream(const nsACString& aOrigin)
-+ : mOrigin(aOrigin)
-+ { }
-+
-+ // nsFileStreamBase override
-+ virtual nsresult
-+ DoOpen() MOZ_OVERRIDE;
-+
-+ nsCString mOrigin;
-+ nsRefPtr<QuotaObject> mQuotaObject;
-+};
-+
-+template <class FileStreamBase>
-+class FileQuotaStreamWithWrite : public FileQuotaStream<FileStreamBase>
-+{
-+public:
-+ // nsFileStreamBase override
-+ NS_IMETHOD
-+ Write(const char* aBuf, uint32_t aCount, uint32_t* _retval) MOZ_OVERRIDE;
-+
-+protected:
-+ FileQuotaStreamWithWrite(const nsACString& aOrigin)
-+ : FileQuotaStream<FileStreamBase>(aOrigin)
-+ { }
-+};
-+
-+class FileInputStream : public FileQuotaStream<nsFileInputStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileInputStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileInputStream(const nsACString& aOrigin)
-+ : FileQuotaStream<nsFileInputStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileInputStream() {
-+ Close();
-+ }
-+};
-+
-+class FileOutputStream : public FileQuotaStreamWithWrite<nsFileOutputStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileOutputStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileOutputStream(const nsACString& aOrigin)
-+ : FileQuotaStreamWithWrite<nsFileOutputStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileOutputStream() {
-+ Close();
-+ }
-+};
-+
-+class FileStream : public FileQuotaStreamWithWrite<nsFileStream>
-+{
-+public:
-+ NS_DECL_ISUPPORTS_INHERITED
-+
-+ static already_AddRefed<FileStream>
-+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1,
-+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0);
-+
-+private:
-+ FileStream(const nsACString& aOrigin)
-+ : FileQuotaStreamWithWrite<nsFileStream>(aOrigin)
-+ { }
-+
-+ virtual ~FileStream() {
-+ Close();
-+ }
-+};
-+
-+END_QUOTA_NAMESPACE
-+
-+#endif /* mozilla_dom_quota_filestreams_h__ */
-diff --git dom/quota/Makefile.in dom/quota/Makefile.in
-new file mode 100644
-index 0000000..49be551
---- /dev/null
-+++ mozilla/dom/quota/Makefile.in
-@@ -0,0 +1,33 @@
-+# This Source Code Form is subject to the terms of the Mozilla Public
-+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+# You can obtain one at http://mozilla.org/MPL/2.0/.
-+
-+DEPTH = ../..
-+topsrcdir = @top_srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-+
-+include $(DEPTH)/config/autoconf.mk
-+
-+MODULE = dom
-+LIBRARY_NAME = domquota_s
-+XPIDL_MODULE = dom_quota
-+LIBXUL_LIBRARY = 1
-+FORCE_STATIC_LIB = 1
-+
-+include $(topsrcdir)/dom/dom-config.mk
-+
-+EXPORTS_NAMESPACES = mozilla/dom/quota
-+
-+CPPSRCS = \
-+ FileStreams.cpp \
-+ QuotaManager.cpp \
-+ $(NULL)
-+
-+EXPORTS_mozilla/dom/quota = \
-+ FileStreams.h \
-+ QuotaCommon.h \
-+ QuotaManager.h \
-+ $(NULL)
-+
-+include $(topsrcdir)/config/rules.mk
-diff --git dom/quota/QuotaCommon.h dom/quota/QuotaCommon.h
-new file mode 100644
-index 0000000..a415d17
---- /dev/null
-+++ mozilla/dom/quota/QuotaCommon.h
-@@ -0,0 +1,23 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_quotacommon_h__
-+#define mozilla_dom_quota_quotacommon_h__
-+
-+#include "nsAutoPtr.h"
-+#include "nsCOMPtr.h"
-+#include "nsDebug.h"
-+#include "nsStringGlue.h"
-+#include "nsTArray.h"
-+
-+#define BEGIN_QUOTA_NAMESPACE \
-+ namespace mozilla { namespace dom { namespace quota {
-+#define END_QUOTA_NAMESPACE \
-+ } /* namespace quota */ } /* namespace dom */ } /* namespace mozilla */
-+#define USING_QUOTA_NAMESPACE \
-+ using namespace mozilla::dom::quota;
-+
-+#endif // mozilla_dom_quota_quotacommon_h__
-diff --git dom/quota/QuotaManager.cpp dom/quota/QuotaManager.cpp
-new file mode 100644
-index 0000000..b251606
---- /dev/null
-+++ mozilla/dom/quota/QuotaManager.cpp
-@@ -0,0 +1,294 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "QuotaManager.h"
-+
-+#include "nsIFile.h"
-+
-+#include "mozilla/ClearOnShutdown.h"
-+#include "nsComponentManagerUtils.h"
-+
-+#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
-+
-+USING_QUOTA_NAMESPACE
-+
-+namespace {
-+
-+nsAutoPtr<QuotaManager> gInstance;
-+
-+PLDHashOperator
-+RemoveQuotaForPatternCallback(const nsACString& aKey,
-+ nsRefPtr<OriginInfo>& aValue,
-+ void* aUserArg)
-+{
-+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!");
-+ NS_ASSERTION(aValue, "Null pointer!");
-+ NS_ASSERTION(aUserArg, "Null pointer!");
-+
-+ const nsACString* pattern =
-+ static_cast<const nsACString*>(aUserArg);
-+
-+ if (StringBeginsWith(aKey, *pattern)) {
-+ return PL_DHASH_REMOVE;
-+ }
-+
-+ return PL_DHASH_NEXT;
-+}
-+
-+} // anonymous namespace
-+
-+void
-+QuotaObject::AddRef()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ if (!quotaManager) {
-+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!");
-+
-+ NS_AtomicIncrementRefcnt(mRefCnt);
-+
-+ return;
-+ }
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ ++mRefCnt;
-+}
-+
-+void
-+QuotaObject::Release()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ if (!quotaManager) {
-+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!");
-+
-+ nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt);
-+ if (count == 0) {
-+ mRefCnt = 1;
-+ delete this;
-+ }
-+
-+ return;
-+ }
-+
-+ {
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ --mRefCnt;
-+
-+ if (mRefCnt > 0) {
-+ return;
-+ }
-+
-+ if (mOriginInfo) {
-+ mOriginInfo->mQuotaObjects.Remove(mPath);
-+ }
-+ }
-+
-+ delete this;
-+}
-+
-+void
-+QuotaObject::UpdateSize(int64_t aSize)
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ if (mOriginInfo) {
-+ mOriginInfo->mUsage -= mSize;
-+ mSize = aSize;
-+ mOriginInfo->mUsage += mSize;
-+ }
-+}
-+
-+bool
-+QuotaObject::MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount)
-+{
-+ int64_t end = aOffset + aCount;
-+
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ MutexAutoLock lock(quotaManager->mQuotaMutex);
-+
-+ if (mSize >= end || !mOriginInfo) {
-+ return true;
-+ }
-+
-+ int64_t newUsage = mOriginInfo->mUsage - mSize + end;
-+ if (newUsage > mOriginInfo->mLimit) {
-+ if (!indexedDB::IndexedDatabaseManager::QuotaIsLifted()) {
-+ return false;
-+ }
-+
-+ nsCString origin = mOriginInfo->mOrigin;
-+
-+ mOriginInfo->LockedClearOriginInfos();
-+ NS_ASSERTION(!mOriginInfo,
-+ "Should have cleared in LockedClearOriginInfos!");
-+
-+ quotaManager->mOriginInfos.Remove(origin);
-+
-+ mSize = end;
-+
-+ return true;
-+ }
-+
-+ mOriginInfo->mUsage = newUsage;
-+ mSize = end;
-+
-+ return true;
-+}
-+
-+#ifdef DEBUG
-+void
-+OriginInfo::LockedClearOriginInfos()
-+{
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ NS_ASSERTION(quotaManager, "Shouldn't be null!");
-+
-+ quotaManager->mQuotaMutex.AssertCurrentThreadOwns();
-+
-+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr);
-+}
-+#endif
-+
-+// static
-+PLDHashOperator
-+OriginInfo::ClearOriginInfoCallback(const nsAString& aKey,
-+ QuotaObject* aValue,
-+ void* aUserArg)
-+{
-+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!");
-+ NS_ASSERTION(aValue, "Null pointer!");
-+
-+ aValue->mOriginInfo = nullptr;
-+
-+ return PL_DHASH_NEXT;
-+}
-+
-+// static
-+QuotaManager*
-+QuotaManager::GetOrCreate()
-+{
-+ if (!gInstance) {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+
-+ gInstance = new QuotaManager();
-+
-+ ClearOnShutdown(&gInstance);
-+ }
-+
-+ return gInstance;
-+}
-+
-+// static
-+QuotaManager*
-+QuotaManager::Get()
-+{
-+ // Does not return an owning reference.
-+ return gInstance;
-+}
-+
-+void
-+QuotaManager::InitQuotaForOrigin(const nsACString& aOrigin,
-+ int64_t aLimit,
-+ int64_t aUsage)
-+{
-+ OriginInfo* info = new OriginInfo(aOrigin, aLimit * 1024 * 1024, aUsage);
-+
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ NS_ASSERTION(!mOriginInfos.GetWeak(aOrigin), "Replacing an existing entry!");
-+ mOriginInfos.Put(aOrigin, info);
-+}
-+
-+void
-+QuotaManager::DecreaseUsageForOrigin(const nsACString& aOrigin,
-+ int64_t aSize)
-+{
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ nsRefPtr<OriginInfo> originInfo;
-+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo));
-+
-+ if (originInfo) {
-+ originInfo->mUsage -= aSize;
-+ }
-+}
-+
-+void
-+QuotaManager::RemoveQuotaForPattern(const nsACString& aPattern)
-+{
-+ NS_ASSERTION(!aPattern.IsEmpty(), "Empty pattern!");
-+
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ mOriginInfos.Enumerate(RemoveQuotaForPatternCallback,
-+ const_cast<nsACString*>(&aPattern));
-+}
-+
-+already_AddRefed<QuotaObject>
-+QuotaManager::GetQuotaObject(const nsACString& aOrigin,
-+ nsIFile* aFile)
-+{
-+ NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
-+
-+ nsString path;
-+ nsresult rv = aFile->GetPath(path);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ int64_t fileSize;
-+
-+ bool exists;
-+ rv = aFile->Exists(&exists);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ if (exists) {
-+ rv = aFile->GetFileSize(&fileSize);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+ }
-+ else {
-+ fileSize = 0;
-+ }
-+
-+ QuotaObject* info = nullptr;
-+ {
-+ MutexAutoLock lock(mQuotaMutex);
-+
-+ nsRefPtr<OriginInfo> originInfo;
-+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo));
-+
-+ if (!originInfo) {
-+ return nullptr;
-+ }
-+
-+ originInfo->mQuotaObjects.Get(path, &info);
-+
-+ if (!info) {
-+ info = new QuotaObject(originInfo, path, fileSize);
-+ originInfo->mQuotaObjects.Put(path, info);
-+ }
-+ }
-+
-+ nsRefPtr<QuotaObject> result = info;
-+ return result.forget();
-+}
-+
-+already_AddRefed<QuotaObject>
-+QuotaManager::GetQuotaObject(const nsACString& aOrigin,
-+ const nsAString& aPath)
-+{
-+ nsresult rv;
-+ nsCOMPtr<nsIFile> file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ rv = file->InitWithPath(aPath);
-+ NS_ENSURE_SUCCESS(rv, nullptr);
-+
-+ return GetQuotaObject(aOrigin, file);
-+}
-diff --git dom/quota/QuotaManager.h dom/quota/QuotaManager.h
-new file mode 100644
-index 0000000..e19acdd
---- /dev/null
-+++ mozilla/dom/quota/QuotaManager.h
-@@ -0,0 +1,147 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* vim: set ts=2 et sw=2 tw=80: */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
-+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_dom_quota_quotamanager_h__
-+#define mozilla_dom_quota_quotamanager_h__
-+
-+#include "QuotaCommon.h"
-+
-+#include "mozilla/Mutex.h"
-+#include "nsDataHashtable.h"
-+#include "nsRefPtrHashtable.h"
-+#include "nsThreadUtils.h"
-+
-+BEGIN_QUOTA_NAMESPACE
-+
-+class OriginInfo;
-+class QuotaManager;
-+
-+class QuotaObject
-+{
-+ friend class OriginInfo;
-+ friend class QuotaManager;
-+
-+public:
-+ void
-+ AddRef();
-+
-+ void
-+ Release();
-+
-+ void
-+ UpdateSize(int64_t aSize);
-+
-+ bool
-+ MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount);
-+
-+private:
-+ QuotaObject(OriginInfo* aOriginInfo, const nsAString& aPath, int64_t aSize)
-+ : mOriginInfo(aOriginInfo), mPath(aPath), mSize(aSize)
-+ { }
-+
-+ virtual ~QuotaObject()
-+ { }
-+
-+ nsAutoRefCnt mRefCnt;
-+
-+ OriginInfo* mOriginInfo;
-+ nsString mPath;
-+ int64_t mSize;
-+};
-+
-+class OriginInfo
-+{
-+ friend class QuotaManager;
-+ friend class QuotaObject;
-+
-+public:
-+ OriginInfo(const nsACString& aOrigin, int64_t aLimit, int64_t aUsage)
-+ : mOrigin(aOrigin), mLimit(aLimit), mUsage(aUsage)
-+ {
-+ mQuotaObjects.Init();
-+ }
-+
-+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OriginInfo)
-+
-+private:
-+ void
-+#ifdef DEBUG
-+ LockedClearOriginInfos();
-+#else
-+ LockedClearOriginInfos()
-+ {
-+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr);
-+ }
-+#endif
-+
-+ static PLDHashOperator
-+ ClearOriginInfoCallback(const nsAString& aKey,
-+ QuotaObject* aValue, void* aUserArg);
-+
-+ nsDataHashtable<nsStringHashKey, QuotaObject*> mQuotaObjects;
-+
-+ nsCString mOrigin;
-+ int64_t mLimit;
-+ int64_t mUsage;
-+};
-+
-+class QuotaManager
-+{
-+ friend class nsAutoPtr<QuotaManager>;
-+ friend class OriginInfo;
-+ friend class QuotaObject;
-+
-+public:
-+ // Returns a non-owning reference.
-+ static QuotaManager*
-+ GetOrCreate();
-+
-+ // Returns a non-owning reference.
-+ static QuotaManager*
-+ Get();
-+
-+ void
-+ InitQuotaForOrigin(const nsACString& aOrigin,
-+ int64_t aLimit,
-+ int64_t aUsage);
-+
-+ void
-+ DecreaseUsageForOrigin(const nsACString& aOrigin,
-+ int64_t aSize);
-+
-+ void
-+ RemoveQuotaForPattern(const nsACString& aPattern);
-+
-+ already_AddRefed<QuotaObject>
-+ GetQuotaObject(const nsACString& aOrigin,
-+ nsIFile* aFile);
-+
-+ already_AddRefed<QuotaObject>
-+ GetQuotaObject(const nsACString& aOrigin,
-+ const nsAString& aPath);
-+
-+private:
-+ QuotaManager()
-+ : mQuotaMutex("QuotaManager.mQuotaMutex")
-+ {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+
-+ mOriginInfos.Init();
-+ }
-+
-+ virtual ~QuotaManager()
-+ {
-+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
-+ }
-+
-+ mozilla::Mutex mQuotaMutex;
-+
-+ nsRefPtrHashtable<nsCStringHashKey, OriginInfo> mOriginInfos;
-+};
-+
-+END_QUOTA_NAMESPACE
-+
-+#endif /* mozilla_dom_quota_quotamanager_h__ */
-diff --git layout/build/Makefile.in layout/build/Makefile.in
-index e6b32da..496b55f 100644
---- mozilla/layout/build/Makefile.in
-+++ mozilla/layout/build/Makefile.in
-@@ -69,6 +69,7 @@ SHARED_LIBRARY_LIBS = \
- $(DEPTH)/dom/encoding/$(LIB_PREFIX)domencoding_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/file/$(LIB_PREFIX)domfile_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/power/$(LIB_PREFIX)dom_power_s.$(LIB_SUFFIX) \
-+ $(DEPTH)/dom/quota/$(LIB_PREFIX)domquota_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/settings/$(LIB_PREFIX)jsdomsettings_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/permission/$(LIB_PREFIX)jsdompermissionsettings_s.$(LIB_SUFFIX) \
- $(DEPTH)/dom/network/src/$(LIB_PREFIX)dom_network_s.$(LIB_SUFFIX) \
-diff --git netwerk/base/src/Makefile.in netwerk/base/src/Makefile.in
-index 0c0d60e..e8cef48 100644
---- mozilla/netwerk/base/src/Makefile.in
-+++ mozilla/netwerk/base/src/Makefile.in
-@@ -19,6 +19,7 @@ LIBXUL_LIBRARY = 1
- EXPORTS = \
- nsMIMEInputStream.h \
- nsURLHelper.h \
-+ nsFileStreams.h \
- $(NULL)
-
- EXPORTS_NAMESPACES = mozilla/net
-diff --git netwerk/base/src/nsFileStreams.cpp netwerk/base/src/nsFileStreams.cpp
-index 2420ffc..ecc26aa 100644
---- mozilla/netwerk/base/src/nsFileStreams.cpp
-+++ mozilla/netwerk/base/src/nsFileStreams.cpp
-@@ -51,7 +51,9 @@ nsFileStreamBase::~nsFileStreamBase()
- Close();
- }
-
--NS_IMPL_THREADSAFE_ISUPPORTS1(nsFileStreamBase, nsISeekableStream)
-+NS_IMPL_THREADSAFE_ISUPPORTS2(nsFileStreamBase,
-+ nsISeekableStream,
-+ nsIFileMetadata)
-
- NS_IMETHODIMP
- nsFileStreamBase::Seek(int32_t whence, int64_t offset)
-@@ -124,6 +126,52 @@ nsFileStreamBase::SetEOF()
- return NS_OK;
- }
-
-+NS_IMETHODIMP
-+nsFileStreamBase::GetSize(int64_t* _retval)
-+{
-+ nsresult rv = DoPendingOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!mFD) {
-+ return NS_BASE_STREAM_CLOSED;
-+ }
-+
-+ PRFileInfo64 info;
-+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-+ return NS_BASE_STREAM_OSERROR;
-+ }
-+
-+ *_retval = int64_t(info.size);
-+
-+ return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+nsFileStreamBase::GetLastModified(int64_t* _retval)
-+{
-+ nsresult rv = DoPendingOpen();
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ if (!mFD) {
-+ return NS_BASE_STREAM_CLOSED;
-+ }
-+
-+ PRFileInfo64 info;
-+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-+ return NS_BASE_STREAM_OSERROR;
-+ }
-+
-+ int64_t modTime = int64_t(info.modifyTime);
-+ if (modTime == 0) {
-+ *_retval = 0;
-+ }
-+ else {
-+ *_retval = modTime / int64_t(PR_USEC_PER_MSEC);
-+ }
-+
-+ return NS_OK;
-+}
-+
- nsresult
- nsFileStreamBase::Close()
- {
-@@ -934,13 +982,12 @@ nsSafeFileOutputStream::Write(const char *buf, uint32_t count, uint32_t *result)
- ////////////////////////////////////////////////////////////////////////////////
- // nsFileStream
-
--NS_IMPL_ISUPPORTS_INHERITED4(nsFileStream,
-+NS_IMPL_ISUPPORTS_INHERITED3(nsFileStream,
- nsFileStreamBase,
- nsIInputStream,
- nsIOutputStream,
-- nsIFileStream,
-- nsIFileMetadata)
--
-+ nsIFileStream)
-+
- NS_IMETHODIMP
- nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm,
- int32_t behaviorFlags)
-@@ -959,50 +1006,4 @@ nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm,
- mBehaviorFlags & nsIFileStream::DEFER_OPEN);
- }
-
--NS_IMETHODIMP
--nsFileStream::GetSize(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mFD) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- PRFileInfo64 info;
-- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- *_retval = int64_t(info.size);
--
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--nsFileStream::GetLastModified(int64_t* _retval)
--{
-- nsresult rv = DoPendingOpen();
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- if (!mFD) {
-- return NS_BASE_STREAM_CLOSED;
-- }
--
-- PRFileInfo64 info;
-- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) {
-- return NS_BASE_STREAM_OSERROR;
-- }
--
-- int64_t modTime = int64_t(info.modifyTime);
-- if (modTime == 0) {
-- *_retval = 0;
-- }
-- else {
-- *_retval = modTime / int64_t(PR_USEC_PER_MSEC);
-- }
--
-- return NS_OK;
--}
--
- ////////////////////////////////////////////////////////////////////////////////
-diff --git netwerk/base/src/nsFileStreams.h netwerk/base/src/nsFileStreams.h
-index 13e5b45..1aa6a82 100644
---- mozilla/netwerk/base/src/nsFileStreams.h
-+++ mozilla/netwerk/base/src/nsFileStreams.h
-@@ -24,11 +24,13 @@
-
- ////////////////////////////////////////////////////////////////////////////////
-
--class nsFileStreamBase : public nsISeekableStream
-+class nsFileStreamBase : public nsISeekableStream,
-+ public nsIFileMetadata
- {
- public:
- NS_DECL_ISUPPORTS
- NS_DECL_NSISEEKABLESTREAM
-+ NS_DECL_NSIFILEMETADATA
-
- nsFileStreamBase();
- virtual ~nsFileStreamBase();
-@@ -124,8 +126,8 @@ public:
- NS_IMETHOD IsNonBlocking(bool* _retval)
- {
- return nsFileStreamBase::IsNonBlocking(_retval);
-- }
--
-+ }
-+
- // Overrided from nsFileStreamBase
- NS_IMETHOD Seek(int32_t aWhence, int64_t aOffset);
-
-@@ -260,13 +262,11 @@ protected:
- class nsFileStream : public nsFileStreamBase,
- public nsIInputStream,
- public nsIOutputStream,
-- public nsIFileStream,
-- public nsIFileMetadata
-+ public nsIFileStream
- {
- public:
- NS_DECL_ISUPPORTS_INHERITED
- NS_DECL_NSIFILESTREAM
-- NS_DECL_NSIFILEMETADATA
- NS_FORWARD_NSIINPUTSTREAM(nsFileStreamBase::)
-
- // Can't use NS_FORWARD_NSIOUTPUTSTREAM due to overlapping methods
-diff --git storage/public/Makefile.in storage/public/Makefile.in
-index c485d4e..c05e6f3 100644
---- mozilla/storage/public/Makefile.in
-+++ mozilla/storage/public/Makefile.in
-@@ -36,7 +36,6 @@ XPIDLSRCS = \
- mozIStorageCompletionCallback.idl \
- mozIStorageBaseStatement.idl \
- mozIStorageAsyncStatement.idl \
-- mozIStorageServiceQuotaManagement.idl \
- mozIStorageVacuumParticipant.idl \
- $(NULL)
- # SEE ABOVE NOTE!
-diff --git storage/public/mozIStorageService.idl storage/public/mozIStorageService.idl
-index 3087a11..483649b 100644
---- mozilla/storage/public/mozIStorageService.idl
-+++ mozilla/storage/public/mozIStorageService.idl
-@@ -7,6 +7,7 @@
-
- interface mozIStorageConnection;
- interface nsIFile;
-+interface nsIFileURL;
-
- /**
- * The mozIStorageService interface is intended to be implemented by
-@@ -15,7 +16,7 @@ interface nsIFile;
- *
- * This is the only way to open a database connection.
- */
--[scriptable, uuid(fe8e95cb-b377-4c8d-bccb-d9198c67542b)]
-+[scriptable, uuid(12bfad34-cca3-40fb-8736-d8bf9db61a27)]
- interface mozIStorageService : nsISupports {
- /**
- * Get a connection to a named special database storage.
-@@ -106,6 +107,16 @@ interface mozIStorageService : nsISupports {
- */
- mozIStorageConnection openUnsharedDatabase(in nsIFile aDatabaseFile);
-
-+ /**
-+ * See openDatabase(). Exactly the same only initialized with a file URL.
-+ * Custom parameters can be passed to SQLite and VFS implementations through
-+ * the query part of the URL.
-+ *
-+ * @param aURL
-+ * A nsIFileURL that represents the database that is to be opened.
-+ */
-+ mozIStorageConnection openDatabaseWithFileURL(in nsIFileURL aFileURL);
-+
- /*
- * Utilities
- */
-diff --git storage/public/mozIStorageServiceQuotaManagement.idl storage/public/mozIStorageServiceQuotaManagement.idl
-deleted file mode 100644
-index ee5086b..0000000
---- mozilla/storage/public/mozIStorageServiceQuotaManagement.idl
-+++ /dev/null
-@@ -1,99 +0,0 @@
--/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
--/* vim: set ts=2 et sw=2 tw=80: */
--/* This Source Code Form is subject to the terms of the Mozilla Public
-- * License, v. 2.0. If a copy of the MPL was not distributed with this
-- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
--
--#include "nsISupports.idl"
--
--interface mozIStorageConnection;
--interface nsIFile;
--
--[scriptable, function, uuid(ae94f0a5-ebdf-48f4-9959-085e13235d8d)]
--interface mozIStorageQuotaCallback : nsISupports
--{
-- /**
-- * Called when the file size quota for a group of databases is exceeded.
-- *
-- * @param aFilename
-- * The filename of the database that has exceeded the quota.
-- *
-- * @param aCurrentSizeLimit
-- * The current size (in bytes) of the quota.
-- *
-- * @param aCurrentTotalSize
-- * The current size of all databases in the quota group.
-- *
-- * @param aUserData
-- * Any additional data that was provided to the
-- * setQuotaForFilenamePattern function.
-- *
-- * @returns A new quota size. A new quota of 0 will disable the quota callback
-- * and any quota value less than aCurrentTotalSize will cause the
-- * database operation to fail with NS_ERROR_FILE_NO_DEVICE_SPACE.
-- */
-- long long quotaExceeded(in ACString aFilename,
-- in long long aCurrentSizeLimit,
-- in long long aCurrentTotalSize,
-- in nsISupports aUserData);
--};
--
--/**
-- * This is a temporary interface that should eventually merge with
-- * mozIStorageService.
-- */
--[scriptable, uuid(4d81faf5-fe01-428b-99b8-c94cba12fd72)]
--interface mozIStorageServiceQuotaManagement : nsISupports
--{
-- /**
-- * See mozIStorageService.openDatabase. Exactly the same only with a custom
-- * SQLite VFS.
-- */
-- mozIStorageConnection openDatabaseWithVFS(in nsIFile aDatabaseFile,
-- in ACString aVFSName);
--
-- /**
-- * Set a file size quota for a group of databases matching the given filename
-- * pattern, optionally specifying a callback when the quota is exceeded.
-- *
-- * @param aPattern
-- * A pattern to match filenames for inclusion in the quota system. May
-- * contain the following special characters:
-- * '*' Matches any sequence of zero or more characters.
-- * '?' Matches exactly one character.
-- * [...] Matches one character from the enclosed list of characters.
-- * [^...] Matches one character not in the enclosed list.
-- *
-- * @param aSizeLimit
-- * The size limit (in bytes) for the quota group.
-- *
-- * @param aCallback
-- * A callback that will be used when the quota is exceeded.
-- *
-- * @param aUserData
-- * Additional information to be passed to the callback.
-- */
-- void setQuotaForFilenamePattern(in ACString aPattern,
-- in long long aSizeLimit,
-- in mozIStorageQuotaCallback aCallback,
-- in nsISupports aUserData);
--
-- /**
-- * Adds, removes, or updates the file size information maintained by the quota
-- * system for files not opened through openDatabaseWithVFS().
-- *
-- * Use this function when you want files to be included in quota calculations
-- * that are either a) not SQLite databases, or b) SQLite databases that have
-- * not been opened.
-- *
-- * This function will have no effect on files that do not match an existing
-- * quota pattern (set previously by setQuotaForFilenamePattern()).
-- *
-- * @param aFile
-- * The file for which quota information should be updated. If the file
-- * exists then its size information will be added or refreshed. If the
-- * file does not exist then the file will be removed from tracking
-- * under the quota system.
-- */
-- void updateQuotaInformationForFile(in nsIFile aFile);
--};
-diff --git storage/public/storage.h storage/public/storage.h
-index 8e571e2..08f39f3 100644
---- mozilla/storage/public/storage.h
-+++ mozilla/storage/public/storage.h
-@@ -24,7 +24,6 @@
- #include "mozIStorageStatementCallback.h"
- #include "mozIStorageBindingParamsArray.h"
- #include "mozIStorageBindingParams.h"
--#include "mozIStorageServiceQuotaManagement.h"
- #include "mozIStorageVacuumParticipant.h"
- #include "mozIStorageCompletionCallback.h"
- #include "mozIStorageAsyncStatement.h"
-diff --git storage/src/TelemetryVFS.cpp storage/src/TelemetryVFS.cpp
-index 60de5c4..e4fce09 100644
---- mozilla/storage/src/TelemetryVFS.cpp
-+++ mozilla/storage/src/TelemetryVFS.cpp
-@@ -10,6 +10,7 @@
- #include "sqlite3.h"
- #include "nsThreadUtils.h"
- #include "mozilla/Util.h"
-+#include "mozilla/dom/quota/QuotaManager.h"
-
- /**
- * This preference is a workaround to allow users/sysadmins to identify
-@@ -24,6 +25,7 @@
- namespace {
-
- using namespace mozilla;
-+using namespace mozilla::dom::quota;
-
- struct Histograms {
- const char *name;
-@@ -82,9 +84,17 @@ private:
- };
-
- struct telemetry_file {
-- sqlite3_file base; // Base class. Must be first
-- Histograms *histograms; // histograms pertaining to this file
-- sqlite3_file pReal[1]; // This contains the vfs that actually does work
-+ // Base class. Must be first
-+ sqlite3_file base;
-+
-+ // histograms pertaining to this file
-+ Histograms *histograms;
-+
-+ // quota object for this file
-+ nsRefPtr<QuotaObject> quotaObject;
-+
-+ // This contains the vfs that actually does work
-+ sqlite3_file pReal[1];
- };
-
- /*
-@@ -99,6 +109,7 @@ xClose(sqlite3_file *pFile)
- if( rc==SQLITE_OK ){
- delete p->base.pMethods;
- p->base.pMethods = NULL;
-+ p->quotaObject = nullptr;
- }
- return rc;
- }
-@@ -126,6 +137,9 @@ int
- xWrite(sqlite3_file *pFile, const void *zBuf, int iAmt, sqlite_int64 iOfst)
- {
- telemetry_file *p = (telemetry_file *)pFile;
-+ if (p->quotaObject && !p->quotaObject->MaybeAllocateMoreSpace(iOfst, iAmt)) {
-+ return SQLITE_FULL;
-+ }
- IOThreadAutoTimer ioTimer(p->histograms->writeMS);
- int rc;
- rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst);
-@@ -144,6 +158,9 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size)
- int rc;
- Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_TRUNCATE_MS> timer;
- rc = p->pReal->pMethods->xTruncate(p->pReal, size);
-+ if (rc == SQLITE_OK && p->quotaObject) {
-+ p->quotaObject->UpdateSize(size);
-+ }
- return rc;
- }
-
-@@ -300,6 +317,18 @@ xOpen(sqlite3_vfs* vfs, const char *zName, sqlite3_file* pFile,
- break;
- }
- p->histograms = h;
-+
-+ const char* origin;
-+ if ((flags & SQLITE_OPEN_URI) &&
-+ (origin = sqlite3_uri_parameter(zName, "origin"))) {
-+ QuotaManager* quotaManager = QuotaManager::Get();
-+ MOZ_ASSERT(quotaManager);
-+
-+ p->quotaObject = quotaManager->GetQuotaObject(nsDependentCString(origin),
-+ NS_ConvertUTF8toUTF16(zName));
-+
-+ }
-+
- rc = orig_vfs->xOpen(orig_vfs, zName, p->pReal, flags, pOutFlags);
- if( rc != SQLITE_OK )
- return rc;
-diff --git storage/src/mozStorageConnection.cpp storage/src/mozStorageConnection.cpp
-index 3afd3e1b..430824a 100644
---- mozilla/storage/src/mozStorageConnection.cpp
-+++ mozilla/storage/src/mozStorageConnection.cpp
-@@ -12,6 +12,7 @@
- #include "nsIMemoryReporter.h"
- #include "nsThreadUtils.h"
- #include "nsIFile.h"
-+#include "nsIFileURL.h"
- #include "mozilla/Telemetry.h"
- #include "mozilla/Mutex.h"
- #include "mozilla/CondVar.h"
-@@ -471,34 +472,83 @@ Connection::getAsyncExecutionTarget()
- }
-
- nsresult
--Connection::initialize(nsIFile *aDatabaseFile,
-- const char* aVFSName)
-+Connection::initialize()
- {
- NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
- SAMPLE_LABEL("storage", "Connection::initialize");
-
-- int srv;
-- nsresult rv;
-+ // in memory database requested, sqlite uses a magic file name
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, NULL);
-+ if (srv != SQLITE_OK) {
-+ mDBConn = nullptr;
-+ return convertResultCode(srv);
-+ }
-+
-+ return initializeInternal(nullptr);
-+}
-+
-+nsresult
-+Connection::initialize(nsIFile *aDatabaseFile)
-+{
-+ NS_ASSERTION (aDatabaseFile, "Passed null file!");
-+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
-+ SAMPLE_LABEL("storage", "Connection::initialize");
-
- mDatabaseFile = aDatabaseFile;
-
-- if (aDatabaseFile) {
-- nsAutoString path;
-- rv = aDatabaseFile->GetPath(path);
-- NS_ENSURE_SUCCESS(rv, rv);
-+ nsAutoString path;
-+ nsresult rv = aDatabaseFile->GetPath(path);
-+ NS_ENSURE_SUCCESS(rv, rv);
-
-- srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, mFlags,
-- aVFSName);
-- }
-- else {
-- // in memory database requested, sqlite uses a magic file name
-- srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, aVFSName);
-+ int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
-+ mFlags, NULL);
-+ if (srv != SQLITE_OK) {
-+ mDBConn = nullptr;
-+ return convertResultCode(srv);
- }
-+
-+ rv = initializeInternal(aDatabaseFile);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mDatabaseFile = aDatabaseFile;
-+
-+ return NS_OK;
-+}
-+
-+nsresult
-+Connection::initialize(nsIFileURL *aFileURL)
-+{
-+ NS_ASSERTION (aFileURL, "Passed null file URL!");
-+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!");
-+ SAMPLE_LABEL("storage", "Connection::initialize");
-+
-+ nsCOMPtr<nsIFile> databaseFile;
-+ nsresult rv = aFileURL->GetFile(getter_AddRefs(databaseFile));
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ nsAutoCString spec;
-+ rv = aFileURL->GetSpec(spec);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, NULL);
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
- }
-
-+ rv = initializeInternal(databaseFile);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ mFileURL = aFileURL;
-+ mDatabaseFile = databaseFile;
-+
-+ return NS_OK;
-+}
-+
-+
-+nsresult
-+Connection::initializeInternal(nsIFile* aDatabaseFile)
-+{
- // Properly wrap the database handle's mutex.
- sharedDBMutex.initWithMutex(sqlite3_db_mutex(mDBConn));
-
-@@ -522,14 +572,14 @@ Connection::initialize(nsIFile *aDatabaseFile,
- nsAutoCString pageSizeQuery(MOZ_STORAGE_UNIQUIFY_QUERY_STR
- "PRAGMA page_size = ");
- pageSizeQuery.AppendInt(pageSize);
-- rv = ExecuteSimpleSQL(pageSizeQuery);
-+ nsresult rv = ExecuteSimpleSQL(pageSizeQuery);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Get the current page_size, since it may differ from the specified value.
- sqlite3_stmt *stmt;
- NS_NAMED_LITERAL_CSTRING(pragma_page_size,
- MOZ_STORAGE_UNIQUIFY_QUERY_STR "PRAGMA page_size");
-- srv = prepareStatement(pragma_page_size, &stmt);
-+ int srv = prepareStatement(pragma_page_size, &stmt);
- if (srv == SQLITE_OK) {
- if (SQLITE_ROW == stepStatement(stmt)) {
- pageSize = ::sqlite3_column_int64(stmt, 0);
-@@ -962,7 +1012,8 @@ Connection::Clone(bool aReadOnly,
- nsRefPtr<Connection> clone = new Connection(mStorageService, flags);
- NS_ENSURE_TRUE(clone, NS_ERROR_OUT_OF_MEMORY);
-
-- nsresult rv = clone->initialize(mDatabaseFile);
-+ nsresult rv = mFileURL ? clone->initialize(mFileURL)
-+ : clone->initialize(mDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // Copy over pragmas from the original connection.
-diff --git storage/src/mozStorageConnection.h storage/src/mozStorageConnection.h
-index b71f5db..97f5cf8 100644
---- mozilla/storage/src/mozStorageConnection.h
-+++ mozilla/storage/src/mozStorageConnection.h
-@@ -25,6 +25,7 @@
-
- struct PRLock;
- class nsIFile;
-+class nsIFileURL;
- class nsIEventTarget;
- class nsIThread;
-
-@@ -63,18 +64,27 @@ public:
- Connection(Service *aService, int aFlags);
-
- /**
-+ * Creates the connection to an in-memory database.
-+ */
-+ nsresult initialize();
-+
-+ /**
- * Creates the connection to the database.
- *
- * @param aDatabaseFile
- * The nsIFile of the location of the database to open, or create if it
-- * does not exist. Passing in nullptr here creates an in-memory
-- * database.
-- * @param aVFSName
-- * The VFS that SQLite will use when opening this database. NULL means
-- * "default".
-+ * does not exist.
- */
-- nsresult initialize(nsIFile *aDatabaseFile,
-- const char* aVFSName = NULL);
-+ nsresult initialize(nsIFile *aDatabaseFile);
-+
-+ /**
-+ * Creates the connection to the database.
-+ *
-+ * @param aFileURL
-+ * The nsIFileURL of the location of the database to open, or create if it
-+ * does not exist.
-+ */
-+ nsresult initialize(nsIFileURL *aFileURL);
-
- // fetch the native handle
- sqlite3 *GetNativeConnection() { return mDBConn; }
-@@ -155,6 +165,8 @@ public:
- private:
- ~Connection();
-
-+ nsresult initializeInternal(nsIFile *aDatabaseFile);
-+
- /**
- * Sets the database into a closed state so no further actions can be
- * performed.
-@@ -206,6 +218,7 @@ private:
- int progressHandler();
-
- sqlite3 *mDBConn;
-+ nsCOMPtr<nsIFileURL> mFileURL;
- nsCOMPtr<nsIFile> mDatabaseFile;
-
- /**
-diff --git storage/src/mozStorageService.cpp storage/src/mozStorageService.cpp
-index 00661d6..862a7da 100644
---- mozilla/storage/src/mozStorageService.cpp
-+++ mozilla/storage/src/mozStorageService.cpp
-@@ -24,8 +24,6 @@
- #include "mozilla/Preferences.h"
-
- #include "sqlite3.h"
--#include "test_quota.h"
--#include "test_quota.c"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -35,61 +33,6 @@
- #include "nsIPromptService.h"
- #include "nsIMemoryReporter.h"
-
--namespace {
--
--class QuotaCallbackData
--{
--public:
-- QuotaCallbackData(mozIStorageQuotaCallback *aCallback,
-- nsISupports *aUserData)
-- : callback(aCallback), userData(aUserData)
-- {
-- MOZ_COUNT_CTOR(QuotaCallbackData);
-- }
--
-- ~QuotaCallbackData()
-- {
-- MOZ_COUNT_DTOR(QuotaCallbackData);
-- }
--
-- static void Callback(const char *zFilename,
-- sqlite3_int64 *piLimit,
-- sqlite3_int64 iSize,
-- void *pArg)
-- {
-- NS_ASSERTION(zFilename && strlen(zFilename), "Null or empty filename!");
-- NS_ASSERTION(piLimit, "Null pointer!");
--
-- QuotaCallbackData *data = static_cast<QuotaCallbackData*>(pArg);
-- if (!data) {
-- // No callback specified, return immediately.
-- return;
-- }
--
-- NS_ASSERTION(data->callback, "Should never have a null callback!");
--
-- nsDependentCString filename(zFilename);
--
-- int64_t newLimit;
-- if (NS_SUCCEEDED(data->callback->QuotaExceeded(filename, *piLimit,
-- iSize, data->userData,
-- &newLimit))) {
-- *piLimit = newLimit;
-- }
-- }
--
-- static void Destroy(void *aUserData)
-- {
-- delete static_cast<QuotaCallbackData*>(aUserData);
-- }
--
--private:
-- nsCOMPtr<mozIStorageQuotaCallback> callback;
-- nsCOMPtr<nsISupports> userData;
--};
--
--} // anonymous namespace
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -345,11 +288,10 @@ private:
- ////////////////////////////////////////////////////////////////////////////////
- //// Service
-
--NS_IMPL_THREADSAFE_ISUPPORTS3(
-+NS_IMPL_THREADSAFE_ISUPPORTS2(
- Service,
- mozIStorageService,
-- nsIObserver,
-- mozIStorageServiceQuotaManagement
-+ nsIObserver
- )
-
- Service *Service::gService = nullptr;
-@@ -438,10 +380,6 @@ Service::~Service()
-
- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_quota_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- rc = ::sqlite3_shutdown();
- if (rc != SQLITE_OK)
- NS_WARNING("sqlite3 did not shutdown cleanly.");
-@@ -636,9 +574,6 @@ Service::initialize()
- } else {
- NS_WARNING("Failed to register telemetry VFS");
- }
-- rc = ::sqlite3_quota_initialize("telemetry-vfs", 0);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
-
- // Set the default value for the toolkit.storage.synchronous pref. It will be
- // updated with the user preference on the main thread.
-@@ -739,28 +674,24 @@ Service::OpenSpecialDatabase(const char *aStorageKey,
- // connection to use a memory DB.
- }
- else if (::strcmp(aStorageKey, "profile") == 0) {
--
- rv = NS_GetSpecialDirectory(NS_APP_STORAGE_50_FILE,
- getter_AddRefs(storageFile));
- NS_ENSURE_SUCCESS(rv, rv);
-
-- nsString filename;
-- storageFile->GetPath(filename);
-- nsCString filename8 = NS_ConvertUTF16toUTF8(filename.get());
- // fall through to DB initialization
- }
- else {
- return NS_ERROR_INVALID_ARG;
- }
-
-- Connection *msc = new Connection(this, SQLITE_OPEN_READWRITE);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-+ nsRefPtr<Connection> msc = new Connection(this, SQLITE_OPEN_READWRITE);
-
-- rv = msc->initialize(storageFile);
-+ rv = storageFile ? msc->initialize(storageFile) : msc->initialize();
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
- return NS_OK;
-+
- }
-
- NS_IMETHODIMP
-@@ -774,12 +705,11 @@ Service::OpenDatabase(nsIFile *aDatabaseFile,
- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
- SQLITE_OPEN_CREATE;
- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-
- nsresult rv = msc->initialize(aDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
- return NS_OK;
- }
-
-@@ -794,12 +724,30 @@ Service::OpenUnsharedDatabase(nsIFile *aDatabaseFile,
- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_PRIVATECACHE |
- SQLITE_OPEN_CREATE;
- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
-
- nsresult rv = msc->initialize(aDatabaseFile);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- NS_ADDREF(*_connection = msc);
-+ msc.forget(_connection);
-+ return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+Service::OpenDatabaseWithFileURL(nsIFileURL *aFileURL,
-+ mozIStorageConnection **_connection)
-+{
-+ NS_ENSURE_ARG(aFileURL);
-+
-+ // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility
-+ // reasons.
-+ int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
-+ SQLITE_OPEN_CREATE | SQLITE_OPEN_URI;
-+ nsRefPtr<Connection> msc = new Connection(this, flags);
-+
-+ nsresult rv = msc->initialize(aFileURL);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ msc.forget(_connection);
- return NS_OK;
- }
-
-@@ -885,67 +833,5 @@ Service::Observe(nsISupports *, const char *aTopic, const PRUnichar *)
- return NS_OK;
- }
-
--////////////////////////////////////////////////////////////////////////////////
--//// mozIStorageServiceQuotaManagement
--
--NS_IMETHODIMP
--Service::OpenDatabaseWithVFS(nsIFile *aDatabaseFile,
-- const nsACString &aVFSName,
-- mozIStorageConnection **_connection)
--{
-- NS_ENSURE_ARG(aDatabaseFile);
--
-- // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility
-- // reasons.
-- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE |
-- SQLITE_OPEN_CREATE;
-- nsRefPtr<Connection> msc = new Connection(this, flags);
-- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY);
--
-- nsresult rv = msc->initialize(aDatabaseFile,
-- PromiseFlatCString(aVFSName).get());
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- NS_ADDREF(*_connection = msc);
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--Service::SetQuotaForFilenamePattern(const nsACString &aPattern,
-- int64_t aSizeLimit,
-- mozIStorageQuotaCallback *aCallback,
-- nsISupports *aUserData)
--{
-- NS_ENSURE_FALSE(aPattern.IsEmpty(), NS_ERROR_INVALID_ARG);
--
-- nsAutoPtr<QuotaCallbackData> data;
-- if (aSizeLimit && aCallback) {
-- data = new QuotaCallbackData(aCallback, aUserData);
-- }
--
-- int rc = ::sqlite3_quota_set(PromiseFlatCString(aPattern).get(),
-- aSizeLimit, QuotaCallbackData::Callback,
-- data, QuotaCallbackData::Destroy);
-- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc));
--
-- data.forget();
-- return NS_OK;
--}
--
--NS_IMETHODIMP
--Service::UpdateQuotaInformationForFile(nsIFile *aFile)
--{
-- NS_ENSURE_ARG_POINTER(aFile);
--
-- nsString path;
-- nsresult rv = aFile->GetPath(path);
-- NS_ENSURE_SUCCESS(rv, rv);
--
-- int rc = ::sqlite3_quota_file(NS_ConvertUTF16toUTF8(path).get());
-- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc));
--
-- return NS_OK;
--}
--
- } // namespace storage
- } // namespace mozilla
-diff --git storage/src/mozStorageService.h storage/src/mozStorageService.h
-index 21c1ff8..3f5a546 100644
---- mozilla/storage/src/mozStorageService.h
-+++ mozilla/storage/src/mozStorageService.h
-@@ -15,7 +15,6 @@
- #include "mozilla/Mutex.h"
-
- #include "mozIStorageService.h"
--#include "mozIStorageServiceQuotaManagement.h"
-
- class nsIMemoryReporter;
- class nsIMemoryMultiReporter;
-@@ -28,7 +27,6 @@ namespace storage {
- class Connection;
- class Service : public mozIStorageService
- , public nsIObserver
-- , public mozIStorageServiceQuotaManagement
- {
- public:
- /**
-@@ -58,7 +56,6 @@ public:
- NS_DECL_ISUPPORTS
- NS_DECL_MOZISTORAGESERVICE
- NS_DECL_NSIOBSERVER
-- NS_DECL_MOZISTORAGESERVICEQUOTAMANAGEMENT
-
- /**
- * Obtains an already AddRefed pointer to XPConnect. This is used by
-diff --git toolkit/toolkit-makefiles.sh toolkit/toolkit-makefiles.sh
-index 6a7d714..8f1bbe0 100644
---- mozilla/toolkit/toolkit-makefiles.sh
-+++ mozilla/toolkit/toolkit-makefiles.sh
-@@ -68,6 +68,7 @@ MAKEFILES_dom="
- dom/plugins/base/Makefile
- dom/plugins/ipc/Makefile
- dom/power/Makefile
-+ dom/quota/Makefile
- dom/settings/Makefile
- dom/sms/Makefile
- dom/sms/interfaces/Makefile
diff --git a/www/seamonkey/files/patch-bug803480 b/www/seamonkey/files/patch-bug803480
new file mode 100644
index 000000000000..7ccbe5181a10
--- /dev/null
+++ b/www/seamonkey/files/patch-bug803480
@@ -0,0 +1,82 @@
+diff --git configure.in configure.in
+index fa283d0..936b6e0 100644
+--- configure.in
++++ configure.in
+@@ -8229,16 +8229,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
+ NECKO_WIFI=,
+ NECKO_WIFI=1)
+
+-if test "$OS_ARCH" = "OS2"; then
+- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
+- NECKO_WIFI=
+-fi
+-if test "$NECKO_WIFI" -a \
+- "$OS_ARCH" != "Linux" -a \
+- "$OS_ARCH" != "Darwin" -a \
+- "$OS_ARCH" != "SunOS" -a \
+- "$OS_ARCH" != "WINNT"; then
+- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
++if test "$NECKO_WIFI"; then
++ case "$OS_TARGET" in
++ Android)
++ ;;
++ Darwin)
++ ;;
++ SunOS)
++ ;;
++ WINNT)
++ ;;
++ OS2)
++ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
++ NECKO_WIFI=
++ ;;
++ *)
++ if test -z "$MOZ_ENABLE_DBUS"; then
++ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
++ fi
++ ;;
++ esac
+ fi
+
+ if test "$NECKO_WIFI"; then
+diff --git configure.in configure.in
+index fa283d0..936b6e0 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -8229,16 +8229,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
+ NECKO_WIFI=,
+ NECKO_WIFI=1)
+
+-if test "$OS_ARCH" = "OS2"; then
+- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
+- NECKO_WIFI=
+-fi
+-if test "$NECKO_WIFI" -a \
+- "$OS_ARCH" != "Linux" -a \
+- "$OS_ARCH" != "Darwin" -a \
+- "$OS_ARCH" != "SunOS" -a \
+- "$OS_ARCH" != "WINNT"; then
+- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
++if test "$NECKO_WIFI"; then
++ case "$OS_TARGET" in
++ Android)
++ ;;
++ Darwin)
++ ;;
++ SunOS)
++ ;;
++ WINNT)
++ ;;
++ OS2)
++ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
++ NECKO_WIFI=
++ ;;
++ *)
++ if test -z "$MOZ_ENABLE_DBUS"; then
++ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
++ fi
++ ;;
++ esac
+ fi
+
+ if test "$NECKO_WIFI"; then
diff --git a/www/seamonkey/files/patch-bug807492 b/www/seamonkey/files/patch-bug807492
index d6b26d7cc46e..2900fe9724a4 100644
--- a/www/seamonkey/files/patch-bug807492
+++ b/www/seamonkey/files/patch-bug807492
@@ -2,7 +2,7 @@ diff --git config/system-headers config/system-headers
index 9bd1efa..1095a01 100644
--- mozilla/config/system-headers
+++ mozilla/config/system-headers
-@@ -1066,8 +1066,10 @@ gst/app/gstappsink.h
+@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
@@ -17,7 +17,7 @@ diff --git configure.in configure.in
index c167461..8346c11 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then
+@@ -1449,16 +1449,27 @@ if test "$GNU_CC"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mssse3"
AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
@@ -45,7 +45,7 @@ index c167461..8346c11 100644
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
-@@ -5232,17 +5243,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow
+@@ -5259,17 +5270,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow
dnl --enable-webrtc to override. Can disable for everything in
dnl the master list above.
if test -n "$MOZ_WEBRTC"; then
@@ -64,13 +64,13 @@ index c167461..8346c11 100644
;;
esac
fi
-@@ -8909,16 +8920,21 @@ if test "${OS_TARGET}" = "WINNT"; then
- if test "$HAVE_64BIT_OS"; then
- OS_BITS=64
+@@ -9065,16 +9076,21 @@ elif test "${OS_TARGET}" = "Android"; then
+ EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android "
+ if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
+ EXTRA_GYP_DEFINES+=" -D armv7=0 "
else
- OS_BITS=32
+ EXTRA_GYP_DEFINES+=" -D armv7=1 "
fi
- EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}"
fi
+# Don't try to compile sse4.1 code if toolchain doesn't support
@@ -85,12 +85,12 @@ index c167461..8346c11 100644
dnl so that regeneration via dependencies works correctly
WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
- GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
+ GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
diff --git js/src/config/system-headers js/src/config/system-headers
index 9bd1efa..1095a01 100644
--- mozilla/js/src/config/system-headers
+++ mozilla/js/src/config/system-headers
-@@ -1066,8 +1066,10 @@ gst/app/gstappsink.h
+@@ -1121,8 +1121,10 @@ gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
sys/msg.h
@@ -114,20 +114,20 @@ index f1fc85f..141e8ca 100644
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \
$(NULL)
--ifeq ($(OS_ARCH), Darwin)
+-ifeq ($(OS_TARGET), Darwin)
+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LOCAL_INCLUDES += \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
$(NULL)
-+ifeq ($(OS_ARCH), Darwin)
++ifeq ($(OS_TARGET), Darwin)
DEFINES += -DDARWIN
+else
+DEFINES += -DBSD
+endif
endif
- ifeq ($(OS_ARCH), Linux)
+ ifeq ($(OS_TARGET), Linux)
LOCAL_INCLUDES += \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
@@ -146,7 +146,7 @@ index c1d5bf4..2ecf2c7 100644
endif
endif
--ifeq ($(OS_ARCH), Darwin)
+-ifeq ($(OS_TARGET), Darwin)
+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include
+ifeq ($(OS_TARGET), Darwin)
@@ -156,13 +156,13 @@ index c1d5bf4..2ecf2c7 100644
endif
+endif
- ifeq ($(OS_ARCH), Linux)
+ ifeq ($(OS_TARGET), Linux)
LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include
endif
- ifneq ($(OS_TARGET),WINNT)
- CPP_UNIT_TESTS = \
- ice_unittest.cpp \
+ ifeq ($(OS_TARGET), Android)
+ LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include
+
diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_party/nICEr/nicer.gyp
index 0e1f8b4..9a4b995 100644
--- mozilla/media/mtransport/third_party/nICEr/nicer.gyp
@@ -210,7 +210,27 @@ diff --git media/mtransport/third_party/nICEr/src/stun/addrs.c media/mtransport/
index b0b66b2..04fea94 100644
--- mozilla/media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ mozilla/media/mtransport/third_party/nICEr/src/stun/addrs.c
-@@ -69,17 +69,17 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
+@@ -50,17 +50,19 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
+ #else
+ #include <syslog.h>
+ /* Work around an Android NDK < r8c bug */
+ #undef __unused
+ #include <linux/sysctl.h>
+ #endif
+ #include <net/if.h>
+ #ifndef LINUX
++#if !defined(__OpenBSD__) && !defined(__NetBSD__)
+ #include <net/if_var.h>
++#endif
+ #include <net/if_dl.h>
+ #include <net/if_types.h>
+ #include <sys/sockio.h>
+ #else
+ #include <linux/if.h>
+ #endif
+ #include <net/route.h>
+
+@@ -75,17 +77,17 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
#include <netdb.h>
#endif /* UNIX */
@@ -229,7 +249,7 @@ index b0b66b2..04fea94 100644
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
-@@ -675,17 +675,17 @@ nr_stun_remove_duplicate_addrs(nr_transport_addr addrs[], int remove_loopback, i
+@@ -685,17 +687,17 @@ nr_stun_remove_duplicate_addrs(nr_transport_addr addrs[], int remove_loopback, i
}
int
@@ -252,12 +272,18 @@ diff --git media/mtransport/third_party/nICEr/src/stun/stun.h media/mtransport/t
index a3c51f9..eb65ac8 100644
--- mozilla/media/mtransport/third_party/nICEr/src/stun/stun.h
+++ mozilla/media/mtransport/third_party/nICEr/src/stun/stun.h
-@@ -40,17 +40,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@@ -36,21 +36,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #ifdef WIN32
+ #include <winsock2.h>
+ #else
#include <sys/param.h>
#include <sys/socket.h>
#include <net/if.h>
#ifndef LINUX
++#if !defined(__OpenBSD__) && !defined(__NetBSD__)
#include <net/if_var.h>
++#endif
#include <net/if_dl.h>
#include <net/if_types.h>
#endif
@@ -341,13 +367,13 @@ index cc260b7..66af2d7 100644
if (!(my_locale = r_strdup(setlocale(LC_CTYPE, 0))))
ABORT(R_NO_MEMORY);
-@@ -91,28 +99,28 @@ mbslen(const char *s, size_t *ncharsp)
- if (!strstr(my_locale, "UTF-8"))
- ABORT(R_NOT_FOUND);
+@@ -93,28 +101,28 @@ mbslen(const char *s, size_t *ncharsp)
#else
- /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
- if (! strcasestr(setlocale(LC_CTYPE, 0), "UTF-8"))
- ABORT(R_NOT_FOUND);
+ /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
+ /* null-checking setlocale is required because Android */
+ char *locale = setlocale(LC_CTYPE, 0);
+ if (!locale || !strcasestr(locale, "UTF-8"))
+ ABORT(R_NOT_FOUND);
#endif
-#ifdef DARWIN
@@ -416,6 +442,28 @@ index 3cc8e1c..74016c6 100644
'NEW_STDIO'
'RETSIGTYPE=void',
'TIME_WITH_SYS_TIME_H=1',
+diff --git media/mtransport/third_party/nrappkit/src/log/r_log.c media/mtransport/third_party/nrappkit/src/log/r_log.c
+index b25d5c2..b207b8c 100644
+--- mozilla/media/mtransport/third_party/nrappkit/src/log/r_log.c
++++ mozilla/media/mtransport/third_party/nrappkit/src/log/r_log.c
+@@ -43,16 +43,17 @@ static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adam
+ #ifdef LINUX
+ #define _BSD_SOURCE
+ #endif
+
+ #include "r_log.h"
+ #include "hex.h"
+
+ #include <string.h>
++#include <errno.h>
+ #ifndef _MSC_VER
+ #include <strings.h>
+ #include <syslog.h>
+ #endif
+ #include <registry.h>
+ #include <time.h>
+
+
diff --git media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
index 15452e3..2c9651a 100644
--- mozilla/media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
@@ -446,20 +494,20 @@ diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/qu
index bcb1ec0..bb73591 100644
--- mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
+++ mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-@@ -33,5 +33,5 @@
- #define _SYS_QUEUE_H_
-
+@@ -33,7 +33,7 @@
+ #ifndef _SYS_QUEUE_H_
+ #define _SYS_QUEUE_H_
+
-#ifndef DARWIN
-+#if !defined(BSD) && !defined(DARWIN)
++#if !defined(__FreeBSD__) && !defined(DARWIN)
#include <stddef.h>
#define __offsetof offsetof
#endif
-
diff --git media/mtransport/third_party/nrappkit/src/util/util.c media/mtransport/third_party/nrappkit/src/util/util.c
index 3aced8b..be020bb 100644
--- mozilla/media/mtransport/third_party/nrappkit/src/util/util.c
+++ mozilla/media/mtransport/third_party/nrappkit/src/util/util.c
-@@ -36,16 +36,19 @@
+@@ -36,20 +36,24 @@
ekr@rtfm.com Wed Dec 26 17:19:36 2001
*/
@@ -475,11 +523,16 @@ index 3aced8b..be020bb 100644
#include <dirent.h>
#endif
#include <string.h>
++#include <errno.h>
#include <ctype.h>
#include <sys/stat.h>
#ifdef OPENSSL
#include <openssl/evp.h>
-@@ -431,17 +434,17 @@ int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_
+ #endif
+ #include "nr_common.h"
+ #include "r_common.h"
+ #include "registry.h"
+@@ -431,17 +435,17 @@ int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_
abort:
if(die && _status){
r_log(log_fac,LOG_CRIT,"Exiting due to invalid configuration (key '%s')",key);
@@ -499,15 +552,15 @@ index 3aced8b..be020bb 100644
if (! buf)
diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp
-index f0cbf870..ba0f801 100644
+index 2a91e3d..31de641 100644
--- mozilla/media/webrtc/signaling/signaling.gyp
+++ mozilla/media/webrtc/signaling/signaling.gyp
-@@ -208,16 +208,29 @@
+@@ -212,16 +212,29 @@
'SIPCC_BUILD',
'HAVE_WINSOCK2_H',
'CPR_STDINT_INCLUDE=\\"mozilla/StandardInteger.h\\"'
],
-
+
'cflags_mozilla': [
],
}],
@@ -529,34 +582,34 @@ index f0cbf870..ba0f801 100644
],
'defines': [
'SIP_OS_OSX',
- 'OSX',
+ 'OSX',
'_FORTIFY_SOURCE=2',
],
-@@ -701,17 +714,17 @@
+@@ -747,17 +760,17 @@
'EXTERNAL_TICK_REQUIRED',
'GIPS_VER=3480',
],
-
+
'cflags_mozilla': [
],
-
+
}],
- ['OS=="mac"', {
+ ['OS=="mac" or os_bsd==1', {
'include_dirs': [
],
-
+
'sources': [
# SIPSTACK
'./src/sipcc/core/sipstack/sip_platform_task.c',
-
-@@ -746,24 +759,23 @@
+
+@@ -792,24 +805,23 @@
'./src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c',
'./src/sipcc/cpr/darwin/cpr_darwin_tst.h',
'./src/sipcc/cpr/darwin/cpr_darwin_types.h',
],
-
+
'defines' : [
'SIP_OS_OSX',
@@ -571,12 +624,12 @@ index f0cbf870..ba0f801 100644
- '_DARWIN_C_SOURCE',
'NO_NSPR_10_SUPPORT',
],
-
+
'cflags_mozilla': [
],
}],
],
-
+
diff --git media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
index a7c47e1..4f191de 100644
--- mozilla/media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
@@ -611,7 +664,7 @@ diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/M
index a30e330..cfbd8a3 100644
--- mozilla/media/webrtc/signaling/test/Makefile.in
+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -22,32 +22,32 @@ LIBS = \
+@@ -22,17 +22,17 @@ LIBS = \
$(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
$(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
$(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \
@@ -620,7 +673,7 @@ index a30e330..cfbd8a3 100644
$(NULL)
ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
+-ifeq ($(OS_TARGET),Linux)
+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LIBS += \
$(MOZ_ALSA_LIBS) \
@@ -628,22 +681,25 @@ index a30e330..cfbd8a3 100644
endif
endif
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
+ ifeq ($(OS_TARGET),Android)
+ LIBS += \
+@@ -76,17 +76,17 @@ endif
+ ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
LIBS += \
$(XLIBS) \
- $(MOZ_GTK2_LIBS) \
- -lgthread-2.0 \
+ $(TK_LIBS) \
+ $(MOZ_PANGO_LIBS) \
$(NULL)
endif
--ifeq ($(OS_ARCH),Linux)
+-ifeq ($(OS_TARGET),Linux)
+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LIBS += \
$(MOZ_CAIRO_OSLIBS) \
$(NULL)
endif
- ifeq ($(OS_ARCH),Darwin)
+ ifeq ($(OS_TARGET),Darwin)
LIBS += \
-framework AudioToolbox \
diff --git media/webrtc/trunk/build/common.gypi media/webrtc/trunk/build/common.gypi
@@ -750,7 +806,7 @@ diff --git media/webrtc/trunk/src/build/common.gypi media/webrtc/trunk/src/build
index 9ca9f7c..d5c4ab9 100644
--- mozilla/media/webrtc/trunk/src/build/common.gypi
+++ mozilla/media/webrtc/trunk/src/build/common.gypi
-@@ -101,16 +101,23 @@
+@@ -101,16 +101,21 @@
'enable_protobuf%': 1,
'include_tests%': 1,
@@ -760,10 +816,8 @@ index 9ca9f7c..d5c4ab9 100644
'clang_use_chrome_plugins%': 0,
}],
+ ['OS=="linux" or OS=="solaris" or os_bsd==1', {
-+ 'include_alsa_audio%': 1,
+ 'include_v4l2_video_capture%': 1,
+ }, {
-+ 'include_alsa_audio%': 0,
+ 'include_v4l2_video_capture%': 0,
+ }],
], # conditions
@@ -774,7 +828,7 @@ index 9ca9f7c..d5c4ab9 100644
'..','../..',
],
'defines': [
-@@ -174,16 +181,28 @@
+@@ -176,16 +181,28 @@
'defines': [
'WEBRTC_LINUX',
'WEBRTC_THREAD_RR',
@@ -803,68 +857,6 @@ index 9ca9f7c..d5c4ab9 100644
'WEBRTC_CLOCK_TYPE_REALTIME',
],
}],
-diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-index 8457737..4d0f322 100644
---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-@@ -41,21 +41,25 @@
- 'audio_device_utility.h',
- 'audio_device_impl.cc',
- 'audio_device_impl.h',
- 'audio_device_config.h',
- 'dummy/audio_device_dummy.h',
- 'dummy/audio_device_utility_dummy.h',
- ],
- 'conditions': [
-- ['OS=="linux"', {
-+ ['include_alsa_audio==1', {
- 'include_dirs': [
- 'linux',
- ],
-- }], # OS==linux
-+ 'defines': [
-+ # avoiding pointless ifdef churn
-+ 'WEBRTC_LINUX',
-+ ],
-+ }], # include_alsa_audio==1
- ['OS=="mac"', {
- 'include_dirs': [
- 'mac',
- ],
- }], # OS==mac
- ['OS=="win"', {
- 'include_dirs': [
- 'win',
-@@ -111,24 +115,26 @@
- 'link_settings': {
- 'libraries': [
- '-llog',
- '-lOpenSLES',
- ],
- },
- }],
- ['OS=="linux"', {
-- 'defines': [
-- 'LINUX_ALSA',
-- ],
- 'link_settings': {
- 'libraries': [
- '-ldl',
- ],
- },
-+ }],
-+ ['include_alsa_audio==1', {
-+ 'defines': [
-+ 'LINUX_ALSA',
-+ ],
- 'conditions': [
- ['include_pulse_audio==1', {
- 'defines': [
- 'LINUX_PULSE',
- ],
- 'sources': [
- 'linux/audio_device_pulse_linux.cc',
- 'linux/audio_device_pulse_linux.h',
diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
index 203f09a..0b0b70e 100644
--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
@@ -1341,7 +1333,7 @@ diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_captur
index 0a9765e..8d4bbf4 100644
--- mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+++ mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-@@ -50,17 +50,17 @@
+@@ -55,17 +55,17 @@
['include_internal_video_capture==0', {
'sources': [
'External/device_info_external.cc',
@@ -1360,7 +1352,7 @@ index 0a9765e..8d4bbf4 100644
'Linux/video_capture_linux.h',
'Linux/device_info_linux.cc',
'Linux/video_capture_linux.cc',
-@@ -157,31 +157,35 @@
+@@ -162,31 +162,35 @@
'../interface',
],
'sources': [
@@ -1798,7 +1790,7 @@ index 6334490..852ebaa 100644
namespace webrtc {
extern "C"
-@@ -116,16 +125,28 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
+@@ -116,16 +125,30 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
}
}
@@ -1811,6 +1803,8 @@ index 6334490..852ebaa 100644
+ return _lwp_self();
+#elif defined(__DragonFly__)
+ return lwp_gettid();
++#elif defined(__OpenBSD__)
++ return reinterpret_cast<uintptr_t> (pthread_self());
+#elif defined(__FreeBSD__)
+# if __FreeBSD_version > 900030
+ return pthread_getthreadid_np();
@@ -1827,7 +1821,7 @@ index 6334490..852ebaa 100644
int ThreadPosix::Construct()
{
int result = 0;
-@@ -154,16 +175,17 @@ ThreadPosix::~ThreadPosix()
+@@ -154,16 +177,17 @@ ThreadPosix::~ThreadPosix()
{
pthread_attr_destroy(&_attr);
delete _event;
@@ -1845,7 +1839,7 @@ index 6334490..852ebaa 100644
#endif
{
if (!_runFunction)
-@@ -229,31 +251,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/)
+@@ -229,31 +253,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/)
{
return false;
}
@@ -1887,7 +1881,7 @@ index 6334490..852ebaa 100644
#else
// "Normal" Linux.
const int result = sched_setaffinity(_pid,
-@@ -340,16 +370,20 @@ void ThreadPosix::Run()
+@@ -340,16 +372,20 @@ void ThreadPosix::Run()
#endif
// The event the Start() is waiting for.
_event->Set();
@@ -1908,6 +1902,29 @@ index 6334490..852ebaa 100644
WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
"Thread without name started");
}
+diff --git media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
+index f3a5306..d9c2810 100644
+--- mozilla/media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
++++ mozilla/media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
+@@ -52,17 +52,17 @@ WebRtc_Word32 TracePosix::AddTime(char* traceMessage,
+ {
+ struct timeval systemTimeHighRes;
+ if (gettimeofday(&systemTimeHighRes, 0) == -1)
+ {
+ return -1;
+ }
+ struct tm buffer;
+ const struct tm* systemTime =
+- localtime_r(&systemTimeHighRes.tv_sec, &buffer);
++ localtime_r((const time_t *)(&systemTimeHighRes.tv_sec), &buffer);
+
+ const WebRtc_UWord32 ms_time = systemTimeHighRes.tv_usec / 1000;
+ WebRtc_UWord32 prevTickCount = 0;
+ if (level == kTraceApiCall)
+ {
+ prevTickCount = _prevTickCount;
+ _prevTickCount = ms_time;
+ } else {
diff --git media/webrtc/trunk/src/video_engine/vie_defines.h media/webrtc/trunk/src/video_engine/vie_defines.h
index 2cc18cc7..2c042a0 100644
--- mozilla/media/webrtc/trunk/src/video_engine/vie_defines.h
@@ -1996,7 +2013,7 @@ diff --git media/webrtc/trunk/src/voice_engine/voice_engine_defines.h media/webr
index 7d4c729..4104719 100644
--- mozilla/media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
+++ mozilla/media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
-@@ -434,41 +434,44 @@ namespace webrtc
+@@ -437,41 +437,44 @@ namespace webrtc
#else
#define ANDROID_NOT_SUPPORTED(stat)
@@ -2042,7 +2059,7 @@ index 7d4c729..4104719 100644
#define TRUE 1
#define SOCKADDR_IN struct sockaddr_in
#define UINT unsigned int
-@@ -576,13 +579,13 @@ namespace webrtc
+@@ -579,13 +582,13 @@ namespace webrtc
// Defines
// ----------------------------------------------------------------------------
diff --git a/www/seamonkey/files/patch-bug810716 b/www/seamonkey/files/patch-bug810716
new file mode 100644
index 000000000000..93e59a2d7929
--- /dev/null
+++ b/www/seamonkey/files/patch-bug810716
@@ -0,0 +1,95 @@
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- configure.in
++++ configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git configure.in configure.in
+index 2084be9..eb6eeb2 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -3369,14 +3369,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
+diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
+index e828beb..6444246 100644
+--- mozilla/extensions/auth/nsAuthGSSAPI.cpp
++++ mozilla/extensions/auth/nsAuthGSSAPI.cpp
+@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
+ #endif
+
+ #if defined(HAVE_RES_NINIT)
++#include <sys/types.h>
++#include <netinet/in.h>
++#include <arpa/nameser.h>
+ #include <resolv.h>
+ #endif
+
+diff --git js/src/configure.in js/src/configure.in
+index e25f569..b9722f9 100644
+--- mozilla/js/src/configure.in
++++ mozilla/js/src/configure.in
+@@ -2797,14 +2797,19 @@ fi
+ AC_CACHE_CHECK(
+ [for res_ninit()],
+ ac_cv_func_res_ninit,
+- [AC_TRY_LINK([
++ [AC_TRY_RUN([
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #include <sys/types.h>
++ #include <netinet/in.h>
++ #include <arpa/nameser.h>
+ #include <resolv.h>
+- ],
+- [int foo = res_ninit(&_res);],
++ int main(int argc, char **argv){
++ int foo = res_ninit(&_res);
++ }],
+ [ac_cv_func_res_ninit=yes],
++ [ac_cv_func_res_ninit=no],
+ [ac_cv_func_res_ninit=no])
+ ])
+
diff --git a/www/seamonkey/files/patch-bug817267 b/www/seamonkey/files/patch-bug817267
deleted file mode 100644
index 549e5022b7eb..000000000000
--- a/www/seamonkey/files/patch-bug817267
+++ /dev/null
@@ -1,36 +0,0 @@
-commit faafeb1
-Author: Jan Beich <jbeich@tormail.org>
-Date: Sat Dec 1 21:25:24 2012 -0500
-
- Bug 817267 - dirfd() is a macro on some BSDs, fix build there. r=yoric
----
- dom/system/OSFileConstants.cpp | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
-index 75a41dc..63fc6b1 100644
---- mozilla/dom/system/OSFileConstants.cpp
-+++ mozilla/dom/system/OSFileConstants.cpp
-@@ -41,6 +41,11 @@
- #include "OSFileConstants.h"
- #include "nsIOSFileConstantsService.h"
-
-+#if defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
-+#define __dd_fd dd_fd
-+#endif
-+
- /**
- * This module defines the basic libc constants (error numbers, open modes,
- * etc.) used by OS.File and possibly other OS-bound JavaScript libraries.
-@@ -383,8 +388,8 @@ static dom::ConstantSpec gLibcProperties[] =
- { "OSFILE_OFFSETOF_DIRENT_D_TYPE", INT_TO_JSVAL(offsetof (struct dirent, d_type)) },
- #endif // defined(DT_UNKNOWN)
-
-- // Under MacOS X, |dirfd| is a macro rather than a function, so we
-- // need a little help to get it to work
-+ // Under MacOS X and BSDs, |dirfd| is a macro rather than a
-+ // function, so we need a little help to get it to work
- #if defined(dirfd)
- { "OSFILE_SIZEOF_DIR", INT_TO_JSVAL(sizeof (DIR)) },
-
diff --git a/www/seamonkey/files/patch-bug817481 b/www/seamonkey/files/patch-bug817481
deleted file mode 100644
index 691ae70e31aa..000000000000
--- a/www/seamonkey/files/patch-bug817481
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 93d56d2
-Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
-Date: Mon Dec 3 17:01:16 2012 +0900
-
- Bug 817481 - Build failure on WebRTC unit test with --with-system-libvpx. r=jesup
----
- media/webrtc/signaling/test/Makefile.in | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
-index 81a38ff..e10e869 100644
---- mozilla/media/webrtc/signaling/test/Makefile.in
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -34,6 +34,12 @@ LIBS += \
- endif
- endif
-
-+ifdef MOZ_NATIVE_LIBVPX
-+LIBS += \
-+ $(MOZ_LIBVPX_LIBS) \
-+ $(NULL)
-+endif
-+
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
- LIBS += \
- $(XLIBS) \
diff --git a/www/seamonkey/files/patch-bug824317 b/www/seamonkey/files/patch-bug824317
new file mode 100644
index 000000000000..83c1b4d56029
--- /dev/null
+++ b/www/seamonkey/files/patch-bug824317
@@ -0,0 +1,14 @@
+diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm.h
+index fa50194a..c5f5737 100644
+--- mozilla/xpcom/string/public/nsAlgorithm.h
++++ mozilla/xpcom/string/public/nsAlgorithm.h
+@@ -42,7 +42,8 @@ NS_MAX( const T& a, const T& b )
+ return a > b ? a : b;
+ }
+
+-#if defined(_MSC_VER) && (_MSC_VER < 1600)
++#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || \
++ (defined(_GLIBCXX_USE_LONG_LONG) && (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC))
+ namespace std {
+ inline
+ long long
diff --git a/www/seamonkey/files/patch-bug826985 b/www/seamonkey/files/patch-bug826985
index 0a906f3be981..ebd63b2b5610 100644
--- a/www/seamonkey/files/patch-bug826985
+++ b/www/seamonkey/files/patch-bug826985
@@ -1,106 +1,83 @@
-commit d18000b
+commit 8024d93
Author: Henrik Gulbrandsen <henrik@gulbra.net>
Date: Fri Jan 4 13:49:22 2013 +0100
Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux.
---
- configure.in | 13 ++++++
- .../main/source/Linux/device_info_linux.cc | 30 ++++++++------
- .../main/source/Linux/video_capture_linux.cc | 47 ++++++++++++----------
- .../video_capture/main/source/video_capture.gypi | 1 +
- toolkit/library/Makefile.in | 3 ++
- 5 files changed, 60 insertions(+), 34 deletions(-)
+ configure.in | 7 +++++++
+ media/webrtc/signaling/test/Makefile.in | 1 +
+ .../modules/video_capture/main/source/Linux/device_info_linux.cc | 17 +++++++++++++++++
+ .../modules/video_capture/main/source/Linux/video_capture_linux.cc | 16 +++++++++++++++-
+ .../webrtc/modules/video_capture/main/source/video_capture.gypi | 11 +++++++++++
+ toolkit/library/Makefile.in | 1 +
+ 6 files changed, 52 insertions(+), 1 deletion(-)
diff --git configure.in configure.in
-index 6d05f9c..297615f 100644
+index 55e4cd1..76567b3 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -5270,6 +5270,17 @@ if test -n "$MOZ_WEBRTC"; then
- MOZ_VP8=1
+@@ -5238,6 +5238,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
-+ dnl use libv4l on Linux to support more cameras
-+ case "$target" in
-+ *-android*|*-linuxandroid*)
-+ ;;
-+ *-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
-+ MOZ_WEBRTC_LIBV4L=1
-+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2, ,
-+ [echo "$MOZ_LIBV4L2_PKG_ERRORS"
-+ AC_MSG_ERROR([WebRTC on Linux needs libv4l2 for video format conversion.])])
-+ ;;
-+ esac
- dnl enable once Signaling lands
- MOZ_WEBRTC_SIGNALING=1
- AC_DEFINE(MOZ_WEBRTC_SIGNALING)
-@@ -5288,6 +5299,7 @@ fi
- AC_SUBST(MOZ_WEBRTC)
- AC_SUBST(MOZ_WEBRTC_SIGNALING)
- AC_SUBST(MOZ_PEERCONNECTION)
-+AC_SUBST(MOZ_WEBRTC_LIBV4L)
- AC_SUBST(MOZ_WEBRTC_IN_LIBXUL)
- AC_SUBST(MOZ_SCTP)
- AC_SUBST(MOZ_SRTP)
+
++ dnl with libv4l2 we can support more cameras
++ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
++
+ dnl OpenSLES is only available in Android 2.3 and later; we'll change this
+ dnl hard dependency to a dynamic load with graceful runtime failure before
+ dnl we make --enable-webrtc on by default in Android (bug 815905)
+@@ -8981,6 +8984,10 @@ elif test "${OS_TARGET}" = "Android"; then
+ fi
+ fi
+
++if test -n "$MOZ_LIBV4L2_LIBS"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D use_libv4l2=1"
++fi
++
+ if test -n "$MOZ_WEBRTC"; then
+ AC_MSG_RESULT("generating WebRTC Makefiles...")
+
+diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
+index b483cd1..f1dd1f0 100644
+--- mozilla/media/webrtc/signaling/test/Makefile.in
++++ mozilla/media/webrtc/signaling/test/Makefile.in
+@@ -17,6 +17,7 @@ LIBS = \
+ $(NSPR_LIBS) \
+ $(NSS_LIBS) \
+ $(REALTIME_LIBS) \
++ $(MOZ_LIBV4L2_LIBS) \
+ $(DEPTH)/xpcom/glue/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
+ $(DEPTH)/media/mtransport/standalone/$(LIB_PREFIX)mtransport_s.$(LIB_SUFFIX) \
+ $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-index 653ee16..270f064 100644
+index 239a292..bab496c 100644
--- mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+++ mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-@@ -26,6 +26,7 @@
+@@ -26,11 +26,23 @@
#else
#include <linux/videodev2.h>
#endif
++#ifdef HAVE_LIBV4L2
+#include <libv4l2.h>
++#endif
#include "ref_count.h"
#include "trace.h"
-@@ -68,9 +69,9 @@ WebRtc_UWord32 DeviceInfoLinux::NumberOfDevices()
- for (int n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
-- close(fd);
-+ v4l2_close(fd);
- count++;
- }
- }
-@@ -97,14 +98,14 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
- for (int n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
- if (count == deviceNumber) {
- // Found the device
- found = true;
- break;
- } else {
-- close(fd);
-+ v4l2_close(fd);
- count++;
- }
- }
-@@ -115,21 +116,26 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in querying the device capability for device %s. errno = %d",
- device, errno);
-- close(fd);
-+ v4l2_close(fd);
- return -1;
- }
-- close(fd);
-+ v4l2_close(fd);
-
- char cameraName[64];
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
+ {
+ namespace videocapturemodule
+@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
memset(deviceNameUTF8, 0, deviceNameLength);
memcpy(cameraName, cap.card, sizeof(cap.card));
@@ -112,259 +89,76 @@ index 653ee16..270f064 100644
if (deviceNameLength >= strlen(cameraName))
{
memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
-@@ -181,13 +187,13 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- for (int n = 0; n < 64; ++n)
- {
- sprintf(device, "/dev/video%d", n);
-- fd = open(device, O_RDONLY);
-+ fd = v4l2_open(device, O_RDONLY);
- if (fd == -1)
- continue;
-
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
- {
- if (cap.bus_info[0] != 0)
- {
-@@ -209,7 +215,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- }
- }
- }
-- close(fd); // close since this is not the matching device
-+ v4l2_close(fd); // close since this is not the matching device
- }
-
- if (!found)
-@@ -228,7 +234,7 @@ WebRtc_Word32 DeviceInfoLinux::CreateCapabilityMap(
- }
-
- int size = FillCapabilityMap(fd);
-- close(fd);
-+ v4l2_close(fd);
-
- // Store the new used device name
- _lastUsedDeviceNameLength = deviceUniqueIdUTF8Length;
-@@ -282,7 +288,7 @@ WebRtc_Word32 DeviceInfoLinux::FillCapabilityMap(int fd)
- video_fmt.fmt.pix.width = size[i][0];
- video_fmt.fmt.pix.height = size[i][1];
-
-- if (ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0)
-+ if (v4l2_ioctl(fd, VIDIOC_TRY_FMT, &video_fmt) >= 0)
- {
- if ((video_fmt.fmt.pix.width == size[i][0])
- && (video_fmt.fmt.pix.height == size[i][1]))
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-index 12df1b3..4ddc9d4 100644
+index 12df1b3..e9863ba 100644
--- mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+++ mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-@@ -25,6 +25,7 @@
+@@ -25,6 +25,9 @@
#else
#include <linux/videodev2.h>
#endif
++#ifdef HAVE_LIBV4L2
+#include <libv4l2.h>
++#endif
#include <new>
-@@ -79,11 +82,11 @@ WebRtc_Word32 VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
- for (n = 0; n < 64; n++)
- {
- sprintf(device, "/dev/video%d", n);
-- if ((fd = open(device, O_RDONLY)) != -1)
-+ if ((fd = v4l2_open(device, O_RDONLY)) != -1)
- {
- // query device capabilities
- struct v4l2_capability cap;
-- if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
-+ if (v4l2_ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0)
- {
- if (cap.bus_info[0] != 0)
- {
-@@ -91,13 +94,13 @@ WebRtc_Word32 VideoCaptureModuleV4L2::Init(const char* deviceUniqueIdUTF8)
- (const char*) deviceUniqueIdUTF8,
- strlen((const char*) deviceUniqueIdUTF8)) == 0) //match with device id
- {
-- close(fd);
-+ v4l2_close(fd);
- found = true;
- break; // fd matches with device unique id supplied
- }
- }
- }
-- close(fd); // close since this is not the matching device
-+ v4l2_close(fd); // close since this is not the matching device
- }
- }
- if (!found)
-@@ -117,7 +120,7 @@ VideoCaptureModuleV4L2::~VideoCaptureModuleV4L2()
- delete _captureCritSect;
- }
- if (_deviceFd != -1)
-- close(_deviceFd);
-+ v4l2_close(_deviceFd);
- }
-
- WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
-@@ -142,7 +145,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- char device[20];
- sprintf(device, "/dev/video%d", (int) _deviceId);
-
-- if ((_deviceFd = open(device, O_RDWR | O_NONBLOCK, 0)) < 0)
-+ if ((_deviceFd = v4l2_open(device, O_RDWR | O_NONBLOCK, 0)) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in opening %s errono = %d", device, errno);
-@@ -175,7 +178,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- for (int i = 0; i < nFormats; i++)
- {
- video_fmt.fmt.pix.pixelformat = fmts[i];
-- if (ioctl(_deviceFd, VIDIOC_TRY_FMT, &video_fmt) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_TRY_FMT, &video_fmt) < 0)
- {
- continue;
- }
-@@ -200,7 +203,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- _captureVideoType = kVideoMJPEG;
-
- //set format and frame size now
-- if (ioctl(_deviceFd, VIDIOC_S_FMT, &video_fmt) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_S_FMT, &video_fmt) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in VIDIOC_S_FMT, errno = %d", errno);
-@@ -217,7 +220,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- struct v4l2_streamparm streamparms;
- memset(&streamparms, 0, sizeof(streamparms));
- streamparms.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_G_PARM, &streamparms) < 0) {
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_G_PARM, &streamparms) < 0) {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "error in VIDIOC_G_PARM errno = %d", errno);
- driver_framerate_support = false;
-@@ -230,7 +233,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- streamparms.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- streamparms.parm.capture.timeperframe.numerator = 1;
- streamparms.parm.capture.timeperframe.denominator = capability.maxFPS;
-- if (ioctl(_deviceFd, VIDIOC_S_PARM, &streamparms) < 0) {
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_S_PARM, &streamparms) < 0) {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Failed to set the framerate. errno=%d", errno);
- driver_framerate_support = false;
-@@ -268,7 +271,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StartCapture(
- // Needed to start UVC camera - from the uvcview application
- enum v4l2_buf_type type;
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_STREAMON, &type) == -1)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Failed to turn on stream");
-@@ -303,7 +306,7 @@ WebRtc_Word32 VideoCaptureModuleV4L2::StopCapture()
- _captureThread = NULL;
-
- DeAllocateVideoBuffers();
-- close(_deviceFd);
-+ v4l2_close(_deviceFd);
- _deviceFd = -1;
- }
-
-@@ -321,7 +324,7 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers()
- rbuffer.memory = V4L2_MEMORY_MMAP;
- rbuffer.count = kNoOfV4L2Bufffers;
-
-- if (ioctl(_deviceFd, VIDIOC_REQBUFS, &rbuffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_REQBUFS, &rbuffer) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "Could not get buffers from device. errno = %d", errno);
-@@ -344,24 +347,24 @@ bool VideoCaptureModuleV4L2::AllocateVideoBuffers()
- buffer.memory = V4L2_MEMORY_MMAP;
- buffer.index = i;
-
-- if (ioctl(_deviceFd, VIDIOC_QUERYBUF, &buffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QUERYBUF, &buffer) < 0)
- {
- return false;
- }
-
-- _pool[i].start = mmap(NULL, buffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
-+ _pool[i].start = v4l2_mmap(NULL, buffer.length, PROT_READ | PROT_WRITE, MAP_SHARED,
- _deviceFd, buffer.m.offset);
-
- if (MAP_FAILED == _pool[i].start)
- {
- for (unsigned int j = 0; j < i; j++)
-- munmap(_pool[j].start, _pool[j].length);
-+ v4l2_munmap(_pool[j].start, _pool[j].length);
- return false;
- }
-
- _pool[i].length = buffer.length;
-
-- if (ioctl(_deviceFd, VIDIOC_QBUF, &buffer) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QBUF, &buffer) < 0)
- {
- return false;
- }
-@@ -373,14 +376,14 @@ bool VideoCaptureModuleV4L2::DeAllocateVideoBuffers()
+@@ -26,6 +31,15 @@
+ #include "critical_section_wrapper.h"
+ #include "video_capture_linux.h"
+
++#ifdef HAVE_LIBV4L2
++#define open v4l2_open
++#define close v4l2_close
++#define dup v4l2_dup
++#define ioctl v4l2_ioctl
++#define mmap v4l2_mmap
++#define munmap v4l2_munmap
++#endif
++
+ namespace webrtc
{
- // unmap buffers
- for (int i = 0; i < _buffersAllocatedByDevice; i++)
-- munmap(_pool[i].start, _pool[i].length);
-+ v4l2_munmap(_pool[i].start, _pool[i].length);
-
- delete[] _pool;
-
- // turn off stream
- enum v4l2_buf_type type;
- type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-- if (ioctl(_deviceFd, VIDIOC_STREAMOFF, &type) < 0)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_STREAMOFF, &type) < 0)
- {
- WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id,
- "VIDIOC_STREAMOFF error. errno: %d", errno);
-@@ -438,7 +441,7 @@ bool VideoCaptureModuleV4L2::CaptureProcess()
- buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- buf.memory = V4L2_MEMORY_MMAP;
- // dequeue a buffer - repeat until dequeued properly!
-- while (ioctl(_deviceFd, VIDIOC_DQBUF, &buf) < 0)
-+ while (v4l2_ioctl(_deviceFd, VIDIOC_DQBUF, &buf) < 0)
- {
- if (errno != EINTR)
- {
-@@ -457,7 +460,7 @@ bool VideoCaptureModuleV4L2::CaptureProcess()
- IncomingFrame((unsigned char*) _pool[buf.index].start,
- buf.bytesused, frameInfo);
- // enqueue the buffer again
-- if (ioctl(_deviceFd, VIDIOC_QBUF, &buf) == -1)
-+ if (v4l2_ioctl(_deviceFd, VIDIOC_QBUF, &buf) == -1)
- {
- WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCapture, _id,
- "Failed to enqueue capture buffer");
+ namespace videocapturemodule
diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-index 8d38102..3e8f76b 100644
+index d46b5aa..e452223 100644
--- mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+++ mozilla/media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-@@ -179,6 +179,7 @@
- 'libraries': [
- '-lXext',
- '-lX11',
-+ '-lv4l2',
+@@ -7,6 +7,9 @@
+ # be found in the AUTHORS file in the root of the source tree.
+
+ {
++ 'variables': {
++ 'use_libv4l2%': 0,
++ },
+ 'targets': [
+ {
+ 'target_name': 'video_capture_module',
+@@ -49,6 +52,16 @@
+ }, { # include_internal_video_capture == 1
+ 'conditions': [
+ ['include_v4l2_video_capture==1', {
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
++ ],
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ 'include_dirs': [
+ 'linux',
],
- }],
- ['OS=="linux"', {
diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 0440c26..8f6c735 100644
+index 9c16ffa..1db3794 100644
--- mozilla/toolkit/library/Makefile.in
+++ mozilla/toolkit/library/Makefile.in
-@@ -411,6 +411,9 @@ EXTRA_DSO_LDOPTS += \
- $(DEPTH)/media/webrtc/signaling/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+ifdef MOZ_WEBRTC_LIBV4L
+@@ -405,6 +405,7 @@ endif
+ EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
+
+ ifdef MOZ_WEBRTC
+EXTRA_DSO_LDOPTS += $(MOZ_LIBV4L2_LIBS)
-+endif
- ifdef MOZ_WEBRTC_IN_LIBXUL
- include $(topsrcdir)/media/webrtc/shared_libs.mk
- EXTRA_DSO_LDOPTS += $(WEBRTC_LIBS)
+ ifdef MOZ_PEERCONNECTION
+ COMPONENT_LIBS += peerconnection
+ endif
diff --git a/www/seamonkey/files/patch-bug827521 b/www/seamonkey/files/patch-bug827521
new file mode 100644
index 000000000000..8205af74693e
--- /dev/null
+++ b/www/seamonkey/files/patch-bug827521
@@ -0,0 +1,147 @@
+commit ab46441
+Author: Graeme McCutcheon <graememcc_firefox@graeme-online.co.uk>
+Date: Thu Jan 10 14:37:30 2013 +0000
+
+ Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr
+---
+ .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++---------
+ .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++----
+ content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++----
+ 3 files changed, 24 insertions(+), 17 deletions(-)
+
+diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
+index 6593461..56956b2 100644
+--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
+@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString)
+ {
+ for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) {
+ if (aAlignString.EqualsASCII(sAlignStrings[i])) {
+- return (i + SVG_PRESERVEASPECTRATIO_NONE);
++ return (i + SVG_ALIGN_MIN_VALID);
+ }
+ }
+
+@@ -65,12 +65,11 @@ static void
+ GetAlignString(nsAString& aAlignString, uint16_t aAlign)
+ {
+ NS_ASSERTION(
+- aAlign >= SVG_PRESERVEASPECTRATIO_NONE &&
+- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX,
++ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID,
+ "Unknown align");
+
+ aAlignString.AssignASCII(
+- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]);
++ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]);
+ }
+
+ static uint16_t
+@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice)
+ {
+ for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) {
+ if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) {
+- return (i + SVG_MEETORSLICE_MEET);
++ return (i + SVG_MEETORSLICE_MIN_VALID);
+ }
+ }
+
+@@ -89,12 +88,12 @@ static void
+ GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice)
+ {
+ NS_ASSERTION(
+- aMeetOrSlice >= SVG_MEETORSLICE_MEET &&
+- aMeetOrSlice <= SVG_MEETORSLICE_SLICE,
++ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID &&
++ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID,
+ "Unknown meetOrSlice");
+
+ aMeetOrSliceString.AssignASCII(
+- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]);
++ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]);
+ }
+
+ already_AddRefed<DOMSVGPreserveAspectRatio>
+@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString(
+ GetAlignString(tmpString, mBaseVal.mAlign);
+ aValueAsString.Append(tmpString);
+
+- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) {
++ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) {
+
+ aValueAsString.AppendLiteral(" ");
+ GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice);
+diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
+index 61cfba7..b08fb60 100644
+--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
+@@ -42,8 +42,7 @@ public:
+ void SetBaseValue(const SVGPreserveAspectRatio &aValue,
+ nsSVGElement *aSVGElement);
+ nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) {
+- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
+- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) {
++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
+ return NS_ERROR_FAILURE;
+ }
+ SetBaseValue(SVGPreserveAspectRatio(
+@@ -53,8 +52,8 @@ public:
+ return NS_OK;
+ }
+ nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) {
+- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
+- aMeetOrSlice > SVG_MEETORSLICE_SLICE) {
++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
+ return NS_ERROR_FAILURE;
+ }
+ SetBaseValue(SVGPreserveAspectRatio(
+diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h
+index 066ad52..ebe724e 100644
+--- mozilla/content/svg/content/src/SVGPreserveAspectRatio.h
++++ mozilla/content/svg/content/src/SVGPreserveAspectRatio.h
+@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) {
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
+ };
+
++// These constants represent the range of valid enum values for the <align>
++// parameter. They exclude the sentinel _UNKNOWN value.
++const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE;
++const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
++
+ // Meet-or-slice Types
+ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
+ SVG_MEETORSLICE_UNKNOWN = 0,
+@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
+ SVG_MEETORSLICE_SLICE = 2
+ };
+
++// These constants represent the range of valid enum values for the
++// <meetOrSlice> parameter. They exclude the sentinel _UNKNOWN value.
++const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET;
++const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE;
++
+ class SVGAnimatedPreserveAspectRatio;
+
+ class SVGPreserveAspectRatio MOZ_FINAL
+@@ -57,8 +67,7 @@ public:
+ {}
+
+ nsresult SetAlign(uint16_t aAlign) {
+- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
+- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX)
++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID)
+ return NS_ERROR_FAILURE;
+ mAlign = static_cast<uint8_t>(aAlign);
+ return NS_OK;
+@@ -69,8 +78,8 @@ public:
+ }
+
+ nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) {
+- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
+- aMeetOrSlice > SVG_MEETORSLICE_SLICE)
++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID)
+ return NS_ERROR_FAILURE;
+ mMeetOrSlice = static_cast<uint8_t>(aMeetOrSlice);
+ return NS_OK;
diff --git a/www/seamonkey/files/patch-bug836824 b/www/seamonkey/files/patch-bug836824
new file mode 100644
index 000000000000..314bc00167a1
--- /dev/null
+++ b/www/seamonkey/files/patch-bug836824
@@ -0,0 +1,33 @@
+commit 35107a0 (HEAD)
+Author: Paul Adenot <paul@paul.cx>
+Date: Mon Feb 4 20:21:19 2013 +0100
+
+ Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r=
+---
+ media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++
+ media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++-
+ 2 files changed, 28 insertions(+), 1 deletion(-)
+
+diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp
+index a42008e..7a31aa9 100644
+--- mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp
++++ mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp
+@@ -101,7 +101,7 @@ uint detectCPUextensions(void)
+
+ uint res = 0;
+
+-#if defined(__GNUC__)
++#if defined(__GNUC__) && defined(HAVE_CPUID_H)
+ // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support.
+ uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable.
+
+@@ -112,6 +112,9 @@ uint detectCPUextensions(void)
+ if (edx & bit_SSE) res = res | SUPPORT_SSE;
+ if (edx & bit_SSE2) res = res | SUPPORT_SSE2;
+
++#elif defined(__GNUC__)
++ // No cpuid.h --> no cpuid support
++ return 0;
+ #else
+ // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required
+ // for __cpuid intrinsic support.
diff --git a/www/seamonkey/files/patch-bug844818 b/www/seamonkey/files/patch-bug844818
new file mode 100644
index 000000000000..a923caad7b38
--- /dev/null
+++ b/www/seamonkey/files/patch-bug844818
@@ -0,0 +1,126 @@
+diff --git configure.in configure.in
+index 7cd6e17..a1dbdf7 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th
+ fi
+ fi
+
++# Keep libcubeb and audio_device backends in sync
++if test -n "$MOZ_ALSA"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1"
++else
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0"
++fi
++if test -n "$MOZ_PULSEAUDIO"; then
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1"
++else
++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0"
++fi
++
+ # Don't try to compile sse4.1 code if toolchain doesn't support
+ if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
+diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+index 8457737..dfc83ff 100644
+--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
++++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+@@ -45,11 +45,15 @@
+ 'dummy/audio_device_utility_dummy.h',
+ ],
+ 'conditions': [
+- ['OS=="linux"', {
++ ['include_alsa_audio==1 or include_pulse_audio==1', {
+ 'include_dirs': [
+ 'linux',
+ ],
+- }], # OS==linux
++ 'defines': [
++ # avoid pointless rename
++ 'WEBRTC_LINUX',
++ ],
++ }], # include_alsa_audio==1 or include_pulse_audio==1
+ ['OS=="mac"', {
+ 'include_dirs': [
+ 'mac',
+@@ -74,14 +78,8 @@
+ }],
+ ['include_internal_audio_device==1', {
+ 'sources': [
+- 'linux/alsasymboltable_linux.cc',
+- 'linux/alsasymboltable_linux.h',
+- 'linux/audio_device_alsa_linux.cc',
+- 'linux/audio_device_alsa_linux.h',
+ 'linux/audio_device_utility_linux.cc',
+ 'linux/audio_device_utility_linux.h',
+- 'linux/audio_mixer_manager_alsa_linux.cc',
+- 'linux/audio_mixer_manager_alsa_linux.h',
+ 'linux/latebindingsymboltable_linux.cc',
+ 'linux/latebindingsymboltable_linux.h',
+ 'mac/audio_device_mac.cc',
+@@ -116,28 +114,36 @@
+ },
+ }],
+ ['OS=="linux"', {
+- 'defines': [
+- 'LINUX_ALSA',
+- ],
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ ],
+ },
+- 'conditions': [
+- ['include_pulse_audio==1', {
+- 'defines': [
+- 'LINUX_PULSE',
+- ],
+- 'sources': [
+- 'linux/audio_device_pulse_linux.cc',
+- 'linux/audio_device_pulse_linux.h',
+- 'linux/audio_mixer_manager_pulse_linux.cc',
+- 'linux/audio_mixer_manager_pulse_linux.h',
+- 'linux/pulseaudiosymboltable_linux.cc',
+- 'linux/pulseaudiosymboltable_linux.h',
+- ],
+- }],
++ }],
++ ['include_alsa_audio==1', {
++ 'defines': [
++ 'LINUX_ALSA',
++ ],
++ 'sources': [
++ 'linux/alsasymboltable_linux.cc',
++ 'linux/alsasymboltable_linux.h',
++ 'linux/audio_device_alsa_linux.cc',
++ 'linux/audio_device_alsa_linux.h',
++ 'linux/audio_mixer_manager_alsa_linux.cc',
++ 'linux/audio_mixer_manager_alsa_linux.h',
++ ],
++ }],
++ ['include_pulse_audio==1', {
++ 'defines': [
++ 'LINUX_PULSE',
++ ],
++ 'sources': [
++ 'linux/audio_device_pulse_linux.cc',
++ 'linux/audio_device_pulse_linux.h',
++ 'linux/audio_mixer_manager_pulse_linux.cc',
++ 'linux/audio_mixer_manager_pulse_linux.h',
++ 'linux/pulseaudiosymboltable_linux.cc',
++ 'linux/pulseaudiosymboltable_linux.h',
+ ],
+ }],
+ ['OS=="mac"', {
+diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi
+index b504d3d..e2eb127 100644
+--- mozilla/media/webrtc/webrtc_config.gypi
++++ mozilla/media/webrtc/webrtc_config.gypi
+@@ -9,7 +9,6 @@
+ 'include_internal_video_render': 0,
+ 'clang_use_chrome_plugins': 0,
+ 'enable_protobuf': 0,
+- 'include_pulse_audio': 0,
+ 'include_tests': 0,
+ 'use_system_libjpeg': 1,
+ 'use_system_libvpx': 1,
diff --git a/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp b/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp
deleted file mode 100644
index 3df70bd290f8..000000000000
--- a/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/content/media/AudioStream.cpp~
-+++ mozilla/content/media/AudioStream.cpp
-@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure)
- gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nullptr));
- }
- } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
--#ifdef MOZ_WIDGET_GONK
-+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097
- bool value = Preferences::GetBool(aPref, false);
- #else
- bool value = Preferences::GetBool(aPref, true);
diff --git a/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h b/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h
deleted file mode 100644
index 13720f6af320..000000000000
--- a/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h
-index f42822e..1a5a699 100644
---- mozilla/gfx/ots/include/opentype-sanitiser.h
-+++ mozilla/gfx/ots/include/opentype-sanitiser.h
-@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t;
- #include <stdint.h>
- #endif
-
-+#ifdef __FreeBSD__
-+# include <osreldate.h>
-+# if __FreeBSD_version < 800067
-+# include <sys/types.h> // for off_t
-+# endif
-+#endif
-+
- #include <algorithm> // for std::min
- #include <cassert>
- #include <cstddef>
diff --git a/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc b/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
deleted file mode 100644
index 52c2d67db402..000000000000
--- a/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
+++ /dev/null
@@ -1,16 +0,0 @@
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc~
-+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -16,7 +16,13 @@
- #include <sys/prctl.h>
- #elif defined(OS_FREEBSD)
- #include <sys/param.h>
-+#if __FreeBSD_version > 802500
- #include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-
- #if !defined(OS_MACOSX)
diff --git a/www/seamonkey/files/patch-mozilla-js-src-configure.in b/www/seamonkey/files/patch-mozilla-js-src-configure.in
deleted file mode 100644
index 6d7fa6c39ca6..000000000000
--- a/www/seamonkey/files/patch-mozilla-js-src-configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/js/src/js-confdefs.h.in~
-+++ mozilla/js/src/js-confdefs.h.in
-@@ -12,6 +12,7 @@
- * C++ implementations should define these macros only when __STDC_LIMIT_MACROS
- * is defined before <stdint.h> is included. */
- #define __STDC_LIMIT_MACROS
-+#define __STDC_CONSTANT_MACROS
-
- #endif /* _JS_CONFDEFS_H_ */
-
diff --git a/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc b/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc
deleted file mode 100644
index 0cc297136b66..000000000000
--- a/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc
+++ /dev/null
@@ -1,37 +0,0 @@
---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~
-+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc
-@@ -31,6 +31,10 @@
- #include <dlfcn.h>
- #endif
-
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+#endif
-+
- // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead.
- using namespace webrtc;
-
-@@ -38,7 +42,11 @@ namespace webrtc_adm_linux {
-
- inline static const char *GetDllError() {
- #ifdef WEBRTC_LINUX
-+#if __FreeBSD_version < 800505
-+ const char *err = dlerror();
-+#else
- char *err = dlerror();
-+#endif
- if (err) {
- return err;
- } else {
-@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle,
- void **symbol) {
- #ifdef WEBRTC_LINUX
- *symbol = dlsym(handle, symbol_name);
-+#if __FreeBSD_version < 800505
-+ const char *err = dlerror();
-+#else
- char *err = dlerror();
-+#endif
- if (err) {
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
- "Error loading symbol %s : %d", symbol_name, err);
diff --git a/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc b/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
deleted file mode 100644
index d68cad2e5c6a..000000000000
--- a/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
+++ /dev/null
@@ -1,16 +0,0 @@
---- mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~
-+++ mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
-@@ -62,7 +62,13 @@
- #include <lwp.h>
- #elif defined(__FreeBSD__)
- #include <sys/param.h>
-+#if __FreeBSD_version > 802500
- #include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-
- #if defined(WEBRTC_BSD) && !defined(__NetBSD__)
diff --git a/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c b/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c
deleted file mode 100644
index ae5b0b98ec84..000000000000
--- a/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- mozilla/python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800
-+++ mozilla/python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800
-@@ -1376,8 +1376,10 @@
- strlcat(opts, ",noclusterr", sizeof(opts));
- if (flags & MNT_NOCLUSTERW)
- strlcat(opts, ",noclusterw", sizeof(opts));
-+#if __FreeBSD_version >= 800000
- if (flags & MNT_NFS4ACLS)
- strlcat(opts, ",nfs4acls", sizeof(opts));
-+#endif
-
- py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device
- fs[i].f_mntonname, // mount point
diff --git a/www/seamonkey/files/patch-z-bug815916 b/www/seamonkey/files/patch-z-bug815916
deleted file mode 100644
index 2e3ecabbe6ab..000000000000
--- a/www/seamonkey/files/patch-z-bug815916
+++ /dev/null
@@ -1,27 +0,0 @@
---- mozilla/media/webrtc/signaling/test/Makefile.in~
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -34,12 +34,24 @@ LIBS += \
- endif
- endif
-
-+ifdef MOZ_NATIVE_JPEG
-+LIBS += \
-+ $(MOZ_JPEG_LIBS) \
-+ $(NULL)
-+endif
-+
- ifdef MOZ_NATIVE_LIBVPX
- LIBS += \
- $(MOZ_LIBVPX_LIBS) \
- $(NULL)
- endif
-
-+ifndef MOZ_TREE_PIXMAN
-+LIBS += \
-+ $(MOZ_PIXMAN_LIBS) \
-+ $(NULL)
-+endif
-+
- ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
- LIBS += \
- $(XLIBS) \