summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/Uses/gecko.mk6
-rw-r--r--mail/linux-thunderbird/Makefile2
-rw-r--r--mail/linux-thunderbird/distinfo4
-rw-r--r--mail/linux-thunderbird/pkg-plist93
-rw-r--r--mail/thunderbird-i18n/Makefile2
-rw-r--r--mail/thunderbird-i18n/Makefile.lang18
-rw-r--r--mail/thunderbird-i18n/Makefile.option6
-rw-r--r--mail/thunderbird-i18n/distinfo226
-rw-r--r--mail/thunderbird/Makefile20
-rw-r--r--mail/thunderbird/distinfo4
-rw-r--r--mail/thunderbird/files/patch-bug101367588
-rw-r--r--mail/thunderbird/files/patch-bug101554795
-rw-r--r--mail/thunderbird/files/patch-bug1021171193
-rw-r--r--mail/thunderbird/files/patch-bug1021761129
-rw-r--r--mail/thunderbird/files/patch-bug102682820
-rw-r--r--mail/thunderbird/files/patch-bug104126826
-rw-r--r--mail/thunderbird/files/patch-bug104179548
-rw-r--r--mail/thunderbird/files/patch-bug104622426
-rw-r--r--mail/thunderbird/files/patch-bug106737778
-rw-r--r--mail/thunderbird/files/patch-bug1073117877
-rw-r--r--mail/thunderbird/files/patch-bug107370918
-rw-r--r--mail/thunderbird/files/patch-bug108219926
-rw-r--r--mail/thunderbird/files/patch-bug110385842
-rw-r--r--mail/thunderbird/files/patch-bug112557914
-rw-r--r--mail/thunderbird/files/patch-bug112558011
-rw-r--r--mail/thunderbird/files/patch-bug113015523
-rw-r--r--mail/thunderbird/files/patch-bug1138845134
-rw-r--r--mail/thunderbird/files/patch-bug114368646
-rw-r--r--mail/thunderbird/files/patch-bug114464333
-rw-r--r--mail/thunderbird/files/patch-bug70217934
-rw-r--r--mail/thunderbird/files/patch-bug77971326
-rw-r--r--mail/thunderbird/files/patch-bug82698578
-rw-r--r--mail/thunderbird/files/patch-bug847568204
-rw-r--r--mail/thunderbird/files/patch-bug858919391
-rw-r--r--mail/thunderbird/files/patch-bug961264266
-rw-r--r--mail/thunderbird/files/patch-config-baseconfig.mk10
-rw-r--r--mail/thunderbird/files/patch-ijg-libjpeg58
-rw-r--r--mail/thunderbird/files/patch-mail-app-nsMailApp.cpp8
-rw-r--r--mail/thunderbird/files/patch-media-libstagefright-foundation-AString.cpp16
-rw-r--r--mail/thunderbird/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c (renamed from mail/thunderbird/files/patch-mozilla-media-mtransport-third_party-nICEr-src-util-mbslen.c)0
-rw-r--r--mail/thunderbird/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp (renamed from mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp)4
-rw-r--r--mail/thunderbird/files/patch-memory-jemalloc-Makefile.in (renamed from mail/thunderbird/files/patch-mozilla-memory-jemalloc-Makefile.in)0
-rw-r--r--mail/thunderbird/files/patch-system-openh264239
-rw-r--r--mail/thunderbird/files/patch-toolkit_mozapps_installer_packager_mk (renamed from mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk)0
-rw-r--r--mail/thunderbird/files/patch-z-bug517422508
45 files changed, 2224 insertions, 1926 deletions
diff --git a/Mk/Uses/gecko.mk b/Mk/Uses/gecko.mk
index 45af2be93ee3..e21db282b789 100644
--- a/Mk/Uses/gecko.mk
+++ b/Mk/Uses/gecko.mk
@@ -65,8 +65,8 @@ _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9]*:C/[0-9].([0-9][0-9]).*/\1/
.elif ${gecko_ARGS:Mthunderbird}
-_GECKO_DEFAULT_VERSION= 31
-_GECKO_VERSIONS= 31
+_GECKO_DEFAULT_VERSION= 38
+_GECKO_VERSIONS= 38
_GECKO_TYPE= thunderbird
.if exists(${LOCALBASE}/bin/thunderbird)
@@ -75,7 +75,7 @@ _GECKO_INSTALLED_VER:= ${_GECKO_INSTALLED_VER:M[0-9][0-9]*:C/([0-9][0-9]).*/\1/g
.endif
# Dependence lines for different Thunderbird versions
-31_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird
+38_DEPENDS= ${LOCALBASE}/lib/thunderbird/thunderbird:${PORTSDIR}/mail/thunderbird
.else
IGNORE= Unknown type of gecko dependency you may specify either libxul, firefox, seamonkey or thunderbird
diff --git a/mail/linux-thunderbird/Makefile b/mail/linux-thunderbird/Makefile
index 65208b5eb3a9..9ddc56b2058d 100644
--- a/mail/linux-thunderbird/Makefile
+++ b/mail/linux-thunderbird/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird
-DISTVERSION= 31.7.0
+DISTVERSION= 38.1.0
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/linux-i686/en-US \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/linux-i686/en-US
diff --git a/mail/linux-thunderbird/distinfo b/mail/linux-thunderbird/distinfo
index 5e0fe67f8a00..a55d7ec6c0e5 100644
--- a/mail/linux-thunderbird/distinfo
+++ b/mail/linux-thunderbird/distinfo
@@ -1,5 +1,5 @@
-SHA256 (thunderbird-31.7.0.tar.bz2) = 0a9b17c479e9673130d03bb38371013f2caa987690ca36318d32b934d54a5fb0
-SIZE (thunderbird-31.7.0.tar.bz2) = 36880203
+SHA256 (thunderbird-38.1.0.tar.bz2) = 3ef348d181d5a8ef35dd2781ac468e365878139e67a9c34fa817055928b95b3c
+SIZE (thunderbird-38.1.0.tar.bz2) = 41827825
SHA256 (glib2-2.22.2-2.fc12.i686.rpm) = e3b459c245ec14e7248e9de4b506963a4773407f3e58835db5070d0ed02ecc99
SIZE (glib2-2.22.2-2.fc12.i686.rpm) = 1162908
SHA256 (gtk2-2.18.3-19.fc12.i686.rpm) = aea9cf7ffe9c8dae0faa2bf3d2aa1b2117c55dce03da72dcce8c268279ec0a4b
diff --git a/mail/linux-thunderbird/pkg-plist b/mail/linux-thunderbird/pkg-plist
index 0a609912cd98..c126367b313d 100644
--- a/mail/linux-thunderbird/pkg-plist
+++ b/mail/linux-thunderbird/pkg-plist
@@ -21,9 +21,99 @@ lib/%%APP_NAME%%/defaults/pref/channel-prefs.js
lib/%%APP_NAME%%/dependentlibs.list
lib/%%APP_NAME%%/dictionaries/en-US.aff
lib/%%APP_NAME%%/dictionaries/en-US.dic
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/application.ini
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calAlarm.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calAlarmMonitor.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calAlarmService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calAttachment.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calAttendee.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calCachedCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calCalendarManager.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calCalendarSearchService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calDateTime.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calDateTimeFormatter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calDavRequestHandlers.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calDeletedItems.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calDuration.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calEvent.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calFilter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calFreeBusyService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calHtmlExport.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calICSService-worker.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calICSService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calIcsImportExport.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calIcsParser.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calIcsSerializer.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calItemBase.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calItipItem.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calListFormatter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calMonthGridPrinter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calOutlookCSVImportExport.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calPeriod.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calProtocolHandler.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calRecurrenceDate.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calRecurrenceInfo.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calRecurrenceRule.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calRelation.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calStartupService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calTimezone.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calTodo.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calTransactionManager.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calUtils.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapCalendarItems.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapErrors.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapRequest.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapSession.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWcapUtils.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWeekInfoService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calWeekPrinter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.jar
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calBackendLoader.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calCompositeCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calDavCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calDefaultACLManager.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calICALJSComponents.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calICSCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calImportExportModule.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calItemModule.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calItipEmailTransport.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calItipProtocolHandler.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calMemoryCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calSleepMonitor.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calStorageCalendar.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calTimezoneService.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/calWcapCalendarModule.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.manifest
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/icaljs-manifest
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/interfaces.xpt
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libcalbasecomps.so
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/libical-manifest
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/lightningTextCalendarConverter.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults/preferences/lightning.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calAlarmUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calAsyncUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calAuthUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calExtract.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calHashedArray.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calItemUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calIteratorUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calItipUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calPrintUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calProviderUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calRecurrenceUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calStorageHelpers.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calStorageUpgrade.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calViewUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/calXMLUtils.jsm
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules/ical.js
+lib/%%APP_NAME%%/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones/zones.json
lib/%%APP_NAME%%/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
+lib/%%APP_NAME%%/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon64.png
lib/%%APP_NAME%%/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
-lib/%%APP_NAME%%/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/preview.png
lib/%%APP_NAME%%/icons/updater.png
lib/%%APP_NAME%%/isp/Bogofilter.sfd
lib/%%APP_NAME%%/isp/DSPAM.sfd
@@ -56,7 +146,6 @@ lib/%%APP_NAME%%/libsoftokn3.chk
lib/%%APP_NAME%%/libsoftokn3.so
lib/%%APP_NAME%%/libssl3.so
lib/%%APP_NAME%%/libxul.so
-lib/%%APP_NAME%%/mozilla-xremote-client
lib/%%APP_NAME%%/omni.ja
lib/%%APP_NAME%%/platform.ini
lib/%%APP_NAME%%/plugin-container
diff --git a/mail/thunderbird-i18n/Makefile b/mail/thunderbird-i18n/Makefile
index 97ac6cd20db8..c5dd6c0dab81 100644
--- a/mail/thunderbird-i18n/Makefile
+++ b/mail/thunderbird-i18n/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird-i18n
-PORTVERSION= 31.7.0
+PORTVERSION= 38.1.0
CATEGORIES= mail news net-im
MASTER_SITES= MOZILLA/${PORTNAME:S|-i18n||}/releases/${DISTVERSION}/linux-i686/xpi \
MOZILLA/${PORTNAME:S|-i18n||}/candidates/${DISTVERSION}-candidates/build1/linux-i686/xpi
diff --git a/mail/thunderbird-i18n/Makefile.lang b/mail/thunderbird-i18n/Makefile.lang
index ca063020a381..ed4021a2a0d6 100644
--- a/mail/thunderbird-i18n/Makefile.lang
+++ b/mail/thunderbird-i18n/Makefile.lang
@@ -1,9 +1,10 @@
# $FreeBSD$
-THUNDERBIRD_I18N_ALL_= ar ast be bg bn-BD br ca cs da de el en-GB en-US es-AR \
- es-ES et eu fi fr fy-NL ga-IE gd gl he hr hu hy-AM id \
- is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR pt-PT rm \
- ro ru si sk sl sq sr sv-SE ta-LK tr uk vi zh-CN zh-TW
+THUNDERBIRD_I18N_ALL_= ar ast be bg bn-BD br ca cs cy da de dsb el en-GB \
+ en-US es-AR es-ES et eu fi fr fy-NL ga-IE gd gl he \
+ hr hsb hu hy-AM id is it ja ko lt nb-NO nl nn-NO \
+ pa-IN pl pt-BR pt-PT rm ro ru si sk sl sq sr sv-SE \
+ ta-LK tr uk vi zh-CN zh-TW
.if defined(THUNDERBIRD_I18N_ALL) || defined(PACKAGE_BUILDING) || target(package)
THUNDERBIRD_I18N= ${THUNDERBIRD_I18N_ALL_}
@@ -32,12 +33,18 @@ THUNDERBIRD_I18N+= ca
.if ${PORT_OPTIONS:MLANG_CS}
THUNDERBIRD_I18N+= cs
.endif
+.if ${PORT_OPTIONS:MLANG_CY}
+THUNDERBIRD_I18N+= cy
+.endif
.if ${PORT_OPTIONS:MLANG_DA}
THUNDERBIRD_I18N+= da
.endif
.if ${PORT_OPTIONS:MLANG_DE}
THUNDERBIRD_I18N+= de
.endif
+.if ${PORT_OPTIONS:MLANG_DSB}
+THUNDERBIRD_I18N+= dsb
+.endif
.if ${PORT_OPTIONS:MLANG_EL}
THUNDERBIRD_I18N+= el
.endif
@@ -86,6 +93,9 @@ THUNDERBIRD_I18N+= hr
.if ${PORT_OPTIONS:MLANG_HU}
THUNDERBIRD_I18N+= hu
.endif
+.if ${PORT_OPTIONS:MLANG_HSB}
+THUNDERBIRD_I18N+= hsb
+.endif
.if ${PORT_OPTIONS:MLANG_AM}
THUNDERBIRD_I18N+= hy-AM
.endif
diff --git a/mail/thunderbird-i18n/Makefile.option b/mail/thunderbird-i18n/Makefile.option
index f36be988dcdc..02c32f0a9f32 100644
--- a/mail/thunderbird-i18n/Makefile.option
+++ b/mail/thunderbird-i18n/Makefile.option
@@ -9,8 +9,10 @@ OPTIONS_DEFINE= LANG_AR \
LANG_CA \
LANG_CN \
LANG_CS \
+ LANG_CY \
LANG_DA \
LANG_DE \
+ LANG_DSB \
LANG_EL \
LANG_GB \
LANG_US \
@@ -25,6 +27,7 @@ OPTIONS_DEFINE= LANG_AR \
LANG_GD \
LANG_GL \
LANG_HE \
+ LANG_HSB \
LANG_HU \
LANG_AM \
LANG_ID \
@@ -59,3 +62,6 @@ OPTIONS_DEFINE= LANG_AR \
OPTIONS_DEFAULT=LANG_CN LANG_ES LANG_PBR LANG_RU LANG_JA LANG_DE LANG_FR \
LANG_KO LANG_IT LANG_PA
+
+LANG_DSB_DESC?= Lower Sorbian language support
+LANG_HSB_DESC?= Upper Sorbian language support
diff --git a/mail/thunderbird-i18n/distinfo b/mail/thunderbird-i18n/distinfo
index 4ee5cdb314d6..f56e59da5453 100644
--- a/mail/thunderbird-i18n/distinfo
+++ b/mail/thunderbird-i18n/distinfo
@@ -1,110 +1,116 @@
-SHA256 (xpi/thunderbird-i18n-31.7.0/ar.xpi) = fac353e1067852ccac7bc23a958c54fdebd2aad30ad9551a07deb23811046d79
-SIZE (xpi/thunderbird-i18n-31.7.0/ar.xpi) = 472812
-SHA256 (xpi/thunderbird-i18n-31.7.0/ast.xpi) = 4e39fb7792c7fe787bb9d9f3a03ac57da15e9b353a51f1602afcffc3e0e0ffa8
-SIZE (xpi/thunderbird-i18n-31.7.0/ast.xpi) = 393049
-SHA256 (xpi/thunderbird-i18n-31.7.0/be.xpi) = 8be5b81c0a747d89ff9f586d726706718711a01ffd70ecbed9fe00352fb795dd
-SIZE (xpi/thunderbird-i18n-31.7.0/be.xpi) = 427488
-SHA256 (xpi/thunderbird-i18n-31.7.0/bg.xpi) = 7ab3641502204c37108430f5be2f78a161b1aa5a63561c8edcf0186a7f509df6
-SIZE (xpi/thunderbird-i18n-31.7.0/bg.xpi) = 493734
-SHA256 (xpi/thunderbird-i18n-31.7.0/bn-BD.xpi) = 51cf109e8416775e656a1431630f3f4a6b0bde3e44744449283d0666284698bf
-SIZE (xpi/thunderbird-i18n-31.7.0/bn-BD.xpi) = 555613
-SHA256 (xpi/thunderbird-i18n-31.7.0/br.xpi) = 97bbaea547340a56f528d8675b04a596369fb9b63245e20acd76d74211f7a668
-SIZE (xpi/thunderbird-i18n-31.7.0/br.xpi) = 441445
-SHA256 (xpi/thunderbird-i18n-31.7.0/ca.xpi) = 49d3df068e9edcf17ed99754bd45c7d00c50f4bacd7a5484ab86018197258523
-SIZE (xpi/thunderbird-i18n-31.7.0/ca.xpi) = 441713
-SHA256 (xpi/thunderbird-i18n-31.7.0/cs.xpi) = d491ebf429f56ad21632bc476f9364857ee838a330ff1b966cae2e8ec5a944e8
-SIZE (xpi/thunderbird-i18n-31.7.0/cs.xpi) = 444701
-SHA256 (xpi/thunderbird-i18n-31.7.0/da.xpi) = c95a6ce7d22eca56f365f05805393a1b52a5427af02a447f9dba1cd1559dd7c7
-SIZE (xpi/thunderbird-i18n-31.7.0/da.xpi) = 422052
-SHA256 (xpi/thunderbird-i18n-31.7.0/de.xpi) = 0debd56af6d8872d525e62ae8fd609620c3a66a425817dec83d701346fd766ba
-SIZE (xpi/thunderbird-i18n-31.7.0/de.xpi) = 424665
-SHA256 (xpi/thunderbird-i18n-31.7.0/el.xpi) = 9b3ca0a7df6b8bc91274b2b757dfb909beb04815cf51b377b22755114776b536
-SIZE (xpi/thunderbird-i18n-31.7.0/el.xpi) = 484855
-SHA256 (xpi/thunderbird-i18n-31.7.0/en-GB.xpi) = d8d4dc74889792dc9b434f11a8934d5363dafb07aada75068809f1d3ceba7d66
-SIZE (xpi/thunderbird-i18n-31.7.0/en-GB.xpi) = 412515
-SHA256 (xpi/thunderbird-i18n-31.7.0/en-US.xpi) = c4e5def480042a55d8532129f3bd5226004b98f5dd3991eeb429a35152f4391e
-SIZE (xpi/thunderbird-i18n-31.7.0/en-US.xpi) = 413660
-SHA256 (xpi/thunderbird-i18n-31.7.0/es-AR.xpi) = e0bf50d99447934d0f9865329469559308ab54c32d2d64321a9742b3aa4be063
-SIZE (xpi/thunderbird-i18n-31.7.0/es-AR.xpi) = 438531
-SHA256 (xpi/thunderbird-i18n-31.7.0/es-ES.xpi) = 162a5c3879bb4d826b8cfea0dd68cf13f29d417bac79cc2482dd78d76cc0a8f7
-SIZE (xpi/thunderbird-i18n-31.7.0/es-ES.xpi) = 374979
-SHA256 (xpi/thunderbird-i18n-31.7.0/et.xpi) = 9f5846d2147eeb8a834a282abc80ef1cd58389faaf4a0dfedfc4e91cd28faaf5
-SIZE (xpi/thunderbird-i18n-31.7.0/et.xpi) = 434364
-SHA256 (xpi/thunderbird-i18n-31.7.0/eu.xpi) = bba78265515862435a7aa19345460c0bdd192be207550f6a9ac0cdb7de535ac8
-SIZE (xpi/thunderbird-i18n-31.7.0/eu.xpi) = 431449
-SHA256 (xpi/thunderbird-i18n-31.7.0/fi.xpi) = bdf3d4bf05bc66951c9d861af635c791fd3513f578fe32a9ccc150aa81ba6304
-SIZE (xpi/thunderbird-i18n-31.7.0/fi.xpi) = 435632
-SHA256 (xpi/thunderbird-i18n-31.7.0/fr.xpi) = 5700997d79942d74db684fddb255ee1e5a1b10b0c7c0df875b917dbba91f9607
-SIZE (xpi/thunderbird-i18n-31.7.0/fr.xpi) = 444144
-SHA256 (xpi/thunderbird-i18n-31.7.0/fy-NL.xpi) = ed3f3e4bbba12218a0025747257cdaefceb4f37ce65fbf8e3ec1746cacf62d62
-SIZE (xpi/thunderbird-i18n-31.7.0/fy-NL.xpi) = 438544
-SHA256 (xpi/thunderbird-i18n-31.7.0/ga-IE.xpi) = 788127820d6404540b698794a9008990f77005056ec1f15da05785087729c178
-SIZE (xpi/thunderbird-i18n-31.7.0/ga-IE.xpi) = 449362
-SHA256 (xpi/thunderbird-i18n-31.7.0/gd.xpi) = f688f29b6e4032d6f6fd9b3e7ae20d2f94f7ae34e977bcb1ea1e9b4393ac9f4d
-SIZE (xpi/thunderbird-i18n-31.7.0/gd.xpi) = 453172
-SHA256 (xpi/thunderbird-i18n-31.7.0/gl.xpi) = 52ba67336de4d8d19ac1d29d22df362af9e8b43a2cb800a0303b51e0b6d4c4fb
-SIZE (xpi/thunderbird-i18n-31.7.0/gl.xpi) = 446788
-SHA256 (xpi/thunderbird-i18n-31.7.0/he.xpi) = 39519209cf6c19208e8c677439b3cad194d9d14f7ff3814c189890d6285b7af7
-SIZE (xpi/thunderbird-i18n-31.7.0/he.xpi) = 476111
-SHA256 (xpi/thunderbird-i18n-31.7.0/hr.xpi) = 7abab0668491b42dff80e8b656407b9489f8a133a58f0ca42f8c83a1973efd77
-SIZE (xpi/thunderbird-i18n-31.7.0/hr.xpi) = 436980
-SHA256 (xpi/thunderbird-i18n-31.7.0/hu.xpi) = ec4d3c63698bc825fee4a2dedde66a7796fef0efee8df307d8f233f382ba784a
-SIZE (xpi/thunderbird-i18n-31.7.0/hu.xpi) = 454542
-SHA256 (xpi/thunderbird-i18n-31.7.0/hy-AM.xpi) = f22b7f8a56d6b92448d4b1cf471fdad56cef13e8668a472e833a8efc8400b53f
-SIZE (xpi/thunderbird-i18n-31.7.0/hy-AM.xpi) = 492766
-SHA256 (xpi/thunderbird-i18n-31.7.0/id.xpi) = 40c62742c10f08f1b93e68b026b48b849dcf323f99987720be19c0bc0f4fbb7f
-SIZE (xpi/thunderbird-i18n-31.7.0/id.xpi) = 475876
-SHA256 (xpi/thunderbird-i18n-31.7.0/is.xpi) = 1007cd1f3f72deecdbfbb3ec54837955f53235de4b39405158eec9dd74750246
-SIZE (xpi/thunderbird-i18n-31.7.0/is.xpi) = 437959
-SHA256 (xpi/thunderbird-i18n-31.7.0/it.xpi) = 6de47224c4342a1fc1c81d8ec0bab90cdacb4b4e54709e9590c2bd341fbfbae7
-SIZE (xpi/thunderbird-i18n-31.7.0/it.xpi) = 368001
-SHA256 (xpi/thunderbird-i18n-31.7.0/ja.xpi) = 4e3f6637cccafab04d665bb66b2d808797384c3b322a4375efcb9a3be480fe7f
-SIZE (xpi/thunderbird-i18n-31.7.0/ja.xpi) = 489267
-SHA256 (xpi/thunderbird-i18n-31.7.0/ko.xpi) = 6c962ee2ce9051223897ace9fa6d7c60ffb7e95b103a52bad0f17803efcfeaf2
-SIZE (xpi/thunderbird-i18n-31.7.0/ko.xpi) = 448920
-SHA256 (xpi/thunderbird-i18n-31.7.0/lt.xpi) = 9dbde5ddc20a9512320490318f5f6278d5626357f3b17401482a439a4f6be654
-SIZE (xpi/thunderbird-i18n-31.7.0/lt.xpi) = 456352
-SHA256 (xpi/thunderbird-i18n-31.7.0/nb-NO.xpi) = 51a38f39dfc18d945a0985a23d0b7770f8fe3cebf8a28f22fd92bb288345a9b0
-SIZE (xpi/thunderbird-i18n-31.7.0/nb-NO.xpi) = 430942
-SHA256 (xpi/thunderbird-i18n-31.7.0/nl.xpi) = 784ba5505afef70f492a85651c632da974c01bf1c5a945ff132df40b077304d7
-SIZE (xpi/thunderbird-i18n-31.7.0/nl.xpi) = 431888
-SHA256 (xpi/thunderbird-i18n-31.7.0/nn-NO.xpi) = cfd312de7632a96facd36acdc00a04bc571101d655c5c8f70300d3f982b58366
-SIZE (xpi/thunderbird-i18n-31.7.0/nn-NO.xpi) = 433198
-SHA256 (xpi/thunderbird-i18n-31.7.0/pa-IN.xpi) = e444889660a60b44a3e5e6fc94972e2b8a2b97e0fa8959b41bcacacfc8be931d
-SIZE (xpi/thunderbird-i18n-31.7.0/pa-IN.xpi) = 525323
-SHA256 (xpi/thunderbird-i18n-31.7.0/pl.xpi) = 3ef71ff4f72e28f15ea76764be9179cefdbf92a2270e87dad557cbf6d6c44f36
-SIZE (xpi/thunderbird-i18n-31.7.0/pl.xpi) = 410873
-SHA256 (xpi/thunderbird-i18n-31.7.0/pt-BR.xpi) = 298f9a4a205a77e471f96e38d12dbba00b6fb9ddf89b496e8b5eb106d1f33c97
-SIZE (xpi/thunderbird-i18n-31.7.0/pt-BR.xpi) = 450477
-SHA256 (xpi/thunderbird-i18n-31.7.0/pt-PT.xpi) = e01d684612fd224536e9cb21f44ace5cab81bf8fd15e8e5265847df1b2407a59
-SIZE (xpi/thunderbird-i18n-31.7.0/pt-PT.xpi) = 439603
-SHA256 (xpi/thunderbird-i18n-31.7.0/rm.xpi) = 0d2606836428595232daf0aedbafea4935e641658712fd99e34668e686c0d2e7
-SIZE (xpi/thunderbird-i18n-31.7.0/rm.xpi) = 439185
-SHA256 (xpi/thunderbird-i18n-31.7.0/ro.xpi) = 7de4b8e3ffcf3ac7ced5aeae0ca84d1e9c8603646e54473665505e1f1ac66925
-SIZE (xpi/thunderbird-i18n-31.7.0/ro.xpi) = 479749
-SHA256 (xpi/thunderbird-i18n-31.7.0/ru.xpi) = 38b372432b02c42703e3f425946cee6a42918d574f7bff7df5f9997ddb076f64
-SIZE (xpi/thunderbird-i18n-31.7.0/ru.xpi) = 436156
-SHA256 (xpi/thunderbird-i18n-31.7.0/si.xpi) = 3441d57aeedf15c5a29800e8f544b8571d41e5ed5a381d8bb2087cda97074970
-SIZE (xpi/thunderbird-i18n-31.7.0/si.xpi) = 528812
-SHA256 (xpi/thunderbird-i18n-31.7.0/sk.xpi) = dcd56d713daa7b6fb03d64219797e159eab8bef2e7eb9bd7999c0b285a24d153
-SIZE (xpi/thunderbird-i18n-31.7.0/sk.xpi) = 452995
-SHA256 (xpi/thunderbird-i18n-31.7.0/sl.xpi) = 7e7fb8287b9255aa8988bf63677e0bed8ae30c0da5ac7d83ba1300ba2bca41d3
-SIZE (xpi/thunderbird-i18n-31.7.0/sl.xpi) = 433874
-SHA256 (xpi/thunderbird-i18n-31.7.0/sq.xpi) = b9270889a4905233e450be25d61e4a1359a057bc6c021d5aba23a941cde56123
-SIZE (xpi/thunderbird-i18n-31.7.0/sq.xpi) = 454695
-SHA256 (xpi/thunderbird-i18n-31.7.0/sr.xpi) = 0ef471cf54c052214d5169189a72efc0e8d65801e482aeff413ffc7c822c1651
-SIZE (xpi/thunderbird-i18n-31.7.0/sr.xpi) = 537335
-SHA256 (xpi/thunderbird-i18n-31.7.0/sv-SE.xpi) = 803529203aded6bf1194a6d5d575f5e16f8a4a249a68878650c5469e92512923
-SIZE (xpi/thunderbird-i18n-31.7.0/sv-SE.xpi) = 436106
-SHA256 (xpi/thunderbird-i18n-31.7.0/ta-LK.xpi) = 3529d8a55ea5458edf24059d55178b6c4935aa82b604bc1c46e4b4bffb88234b
-SIZE (xpi/thunderbird-i18n-31.7.0/ta-LK.xpi) = 553509
-SHA256 (xpi/thunderbird-i18n-31.7.0/tr.xpi) = e83e64f528b12b1550efb28ba4dea51e7912ab2af470c1382d78e01d9dc3a3ff
-SIZE (xpi/thunderbird-i18n-31.7.0/tr.xpi) = 457360
-SHA256 (xpi/thunderbird-i18n-31.7.0/uk.xpi) = 12c2001834af439d1a0f95ed3f416788672d41c5b02481d26e54f66e721c83a6
-SIZE (xpi/thunderbird-i18n-31.7.0/uk.xpi) = 499656
-SHA256 (xpi/thunderbird-i18n-31.7.0/vi.xpi) = 7a20d9842117105f4ac641d602977cf20d4149564593adba0f3415976fd7b52d
-SIZE (xpi/thunderbird-i18n-31.7.0/vi.xpi) = 513835
-SHA256 (xpi/thunderbird-i18n-31.7.0/zh-CN.xpi) = f582fac503f385ceb59761134ed24170ded9f65861106ff77219040b169e6a37
-SIZE (xpi/thunderbird-i18n-31.7.0/zh-CN.xpi) = 462668
-SHA256 (xpi/thunderbird-i18n-31.7.0/zh-TW.xpi) = 3b60993a3c85f61ef57b02334d3a71d864e9e6609ec29f398c1f60094cad43a3
-SIZE (xpi/thunderbird-i18n-31.7.0/zh-TW.xpi) = 463408
+SHA256 (xpi/thunderbird-i18n-38.1.0/ar.xpi) = 8bc4384ede05efcb02e67a8888651a81f22cbaea3bbf6072e156d707e2a9ad49
+SIZE (xpi/thunderbird-i18n-38.1.0/ar.xpi) = 475295
+SHA256 (xpi/thunderbird-i18n-38.1.0/ast.xpi) = 2a8b35fb65014cc2789e38a396a9c153b8726f5cc5c50ec042e29d9c7972b4fb
+SIZE (xpi/thunderbird-i18n-38.1.0/ast.xpi) = 405893
+SHA256 (xpi/thunderbird-i18n-38.1.0/be.xpi) = 0bd3e4dcc65e44d62127fb1832803f75a0bad4cd179135375460327363e81864
+SIZE (xpi/thunderbird-i18n-38.1.0/be.xpi) = 442473
+SHA256 (xpi/thunderbird-i18n-38.1.0/bg.xpi) = 806a7f2d151db0f5334b2791dbd708b3f631b2ec214b2f6edfa7aa95abe0b59a
+SIZE (xpi/thunderbird-i18n-38.1.0/bg.xpi) = 506149
+SHA256 (xpi/thunderbird-i18n-38.1.0/bn-BD.xpi) = 5f16873ea47e84fb01a263f7ab59a90188ad6c5b57ab13b90c925b4a8d0bf06a
+SIZE (xpi/thunderbird-i18n-38.1.0/bn-BD.xpi) = 560648
+SHA256 (xpi/thunderbird-i18n-38.1.0/br.xpi) = c976d2fdb520e178df568a5824f4416b043f9ebbe436ddbfb81ef5b5f972d6e9
+SIZE (xpi/thunderbird-i18n-38.1.0/br.xpi) = 449788
+SHA256 (xpi/thunderbird-i18n-38.1.0/ca.xpi) = 82a2eef48fefe335f1f8d53d21861a45f7b73b4ad8b65c912f9820bf69273309
+SIZE (xpi/thunderbird-i18n-38.1.0/ca.xpi) = 450347
+SHA256 (xpi/thunderbird-i18n-38.1.0/cs.xpi) = a1e0b882b599705e1150a66139fee97dc009be2a8e64e6a7c2b1158373bfd3ca
+SIZE (xpi/thunderbird-i18n-38.1.0/cs.xpi) = 448723
+SHA256 (xpi/thunderbird-i18n-38.1.0/cy.xpi) = 877cbe5d9dba3f90c2754788baaa137fb45bf9e2d071a50df69e970f341a6365
+SIZE (xpi/thunderbird-i18n-38.1.0/cy.xpi) = 434848
+SHA256 (xpi/thunderbird-i18n-38.1.0/da.xpi) = fad0fc825311a1b546eb117c8cc838f542485ff87cb71c5a656c449366a71526
+SIZE (xpi/thunderbird-i18n-38.1.0/da.xpi) = 425828
+SHA256 (xpi/thunderbird-i18n-38.1.0/de.xpi) = bc900b8f0f2db4c0e5527780db826789d61bf5b265ccf62033909fbb4f21e12e
+SIZE (xpi/thunderbird-i18n-38.1.0/de.xpi) = 429876
+SHA256 (xpi/thunderbird-i18n-38.1.0/dsb.xpi) = 06ebda860118ac5833c6d8884a4e94bab7265622a48978c0e1b472055f784314
+SIZE (xpi/thunderbird-i18n-38.1.0/dsb.xpi) = 458486
+SHA256 (xpi/thunderbird-i18n-38.1.0/el.xpi) = d6df1e34d17723f2b52aecea1fab9af964bd936816f51e5dc0f335bbf59a9a6c
+SIZE (xpi/thunderbird-i18n-38.1.0/el.xpi) = 493511
+SHA256 (xpi/thunderbird-i18n-38.1.0/en-GB.xpi) = 07e443159860c85c82f01dbc57e0c83904fa7788dd69fb234970ef0484afdc81
+SIZE (xpi/thunderbird-i18n-38.1.0/en-GB.xpi) = 416571
+SHA256 (xpi/thunderbird-i18n-38.1.0/en-US.xpi) = ef68841d061f743ab199e087ab45c12a2f1c4b481d2017f535bcadab2e8902ad
+SIZE (xpi/thunderbird-i18n-38.1.0/en-US.xpi) = 416640
+SHA256 (xpi/thunderbird-i18n-38.1.0/es-AR.xpi) = c5b0d927e51ef06414cc14a64ab84d0d4e3b86f2833dd0bc1211a056507d425d
+SIZE (xpi/thunderbird-i18n-38.1.0/es-AR.xpi) = 442640
+SHA256 (xpi/thunderbird-i18n-38.1.0/es-ES.xpi) = 79bb32e02108f6f8971c6504adc39ff45a202cb91b6e7daca286a3b0aaa6e1b0
+SIZE (xpi/thunderbird-i18n-38.1.0/es-ES.xpi) = 376066
+SHA256 (xpi/thunderbird-i18n-38.1.0/et.xpi) = 9fe401fa441232dd29fee49d26fcb65af34ccffc2666bf2fb09546a947d91e9d
+SIZE (xpi/thunderbird-i18n-38.1.0/et.xpi) = 438262
+SHA256 (xpi/thunderbird-i18n-38.1.0/eu.xpi) = 0d54de9beec9e2f232a016d93d0b626bf8be86a1966ad6fb02c8d1cfe531a3f0
+SIZE (xpi/thunderbird-i18n-38.1.0/eu.xpi) = 434837
+SHA256 (xpi/thunderbird-i18n-38.1.0/fi.xpi) = cc7bf6325bf7d4c914cb7958687c776db8e2444cd969ac16e91d6a67be0ab729
+SIZE (xpi/thunderbird-i18n-38.1.0/fi.xpi) = 438889
+SHA256 (xpi/thunderbird-i18n-38.1.0/fr.xpi) = 56dbffbc5e1286f71eeb33961e209a6c6a9dd3916c4b3432733baf8f10c10e77
+SIZE (xpi/thunderbird-i18n-38.1.0/fr.xpi) = 448227
+SHA256 (xpi/thunderbird-i18n-38.1.0/fy-NL.xpi) = 00ec21c0bab139981ab81902051d7c59a5fa3a6ae7865e9613ebd95c0fe1bf87
+SIZE (xpi/thunderbird-i18n-38.1.0/fy-NL.xpi) = 442161
+SHA256 (xpi/thunderbird-i18n-38.1.0/ga-IE.xpi) = 76384620c71115c8ebb3afcc4b30de9de45d1230e44983b4bd3d1473bb9c144e
+SIZE (xpi/thunderbird-i18n-38.1.0/ga-IE.xpi) = 457412
+SHA256 (xpi/thunderbird-i18n-38.1.0/gd.xpi) = 1da8565cafbb009abb0b0424fc15e0dc2bcf2c3048e14f7e1cf5e62bb5618835
+SIZE (xpi/thunderbird-i18n-38.1.0/gd.xpi) = 456317
+SHA256 (xpi/thunderbird-i18n-38.1.0/gl.xpi) = ff3d29d1a050b74e64e0a4450b65edb247a5eb36a1b8df6b57dc3851b1658fd3
+SIZE (xpi/thunderbird-i18n-38.1.0/gl.xpi) = 457860
+SHA256 (xpi/thunderbird-i18n-38.1.0/he.xpi) = aab3240dca233f9e6ec9077be40a3d0033d75ccbd196a9ccce2726261c9d4c41
+SIZE (xpi/thunderbird-i18n-38.1.0/he.xpi) = 485888
+SHA256 (xpi/thunderbird-i18n-38.1.0/hr.xpi) = f368ccd53d7d405c07149b351f56d391142b40e8774d9d7fa623ff3318428b6a
+SIZE (xpi/thunderbird-i18n-38.1.0/hr.xpi) = 440419
+SHA256 (xpi/thunderbird-i18n-38.1.0/hsb.xpi) = f47a8a2ff662acef03541ead6caf3e900706ce348b7577cd656222e9dcc2c47a
+SIZE (xpi/thunderbird-i18n-38.1.0/hsb.xpi) = 456454
+SHA256 (xpi/thunderbird-i18n-38.1.0/hu.xpi) = c8393cb2f5c8aab62fec71e53f19791e7ce4d3acc37814a4796e7b390a4e1fcf
+SIZE (xpi/thunderbird-i18n-38.1.0/hu.xpi) = 457987
+SHA256 (xpi/thunderbird-i18n-38.1.0/hy-AM.xpi) = 56454db77528fd2bc02abd4f4ecde69adbe278cbe807842e3e92d709d5df526c
+SIZE (xpi/thunderbird-i18n-38.1.0/hy-AM.xpi) = 500379
+SHA256 (xpi/thunderbird-i18n-38.1.0/id.xpi) = 913db42b7530f55a8f3836d4dd493cf45df86509c77cfc64aca28c4bf60c6321
+SIZE (xpi/thunderbird-i18n-38.1.0/id.xpi) = 483209
+SHA256 (xpi/thunderbird-i18n-38.1.0/is.xpi) = 0a0194046282ea36e3c48238f08bfa9ffff07531d473b9a800628b6fb22b4970
+SIZE (xpi/thunderbird-i18n-38.1.0/is.xpi) = 443008
+SHA256 (xpi/thunderbird-i18n-38.1.0/it.xpi) = 2b7659c9a0c57e608d05f64bff90b3f6e631ce089ed1135465e89a133482fca7
+SIZE (xpi/thunderbird-i18n-38.1.0/it.xpi) = 369023
+SHA256 (xpi/thunderbird-i18n-38.1.0/ja.xpi) = c790816d9a735d0ff3e3d82516b6c10076a94c6e278fdea05f04d52615984257
+SIZE (xpi/thunderbird-i18n-38.1.0/ja.xpi) = 492860
+SHA256 (xpi/thunderbird-i18n-38.1.0/ko.xpi) = 42a147ac06a0cd7995a78f014259464db2e51391aec4ea16a548e0d5f156d951
+SIZE (xpi/thunderbird-i18n-38.1.0/ko.xpi) = 454852
+SHA256 (xpi/thunderbird-i18n-38.1.0/lt.xpi) = bbdb182ae21c8b8da1175b5a936e8563250838e538004a45b7847d27a0b192ad
+SIZE (xpi/thunderbird-i18n-38.1.0/lt.xpi) = 454571
+SHA256 (xpi/thunderbird-i18n-38.1.0/nb-NO.xpi) = e4b10c9cfd80c6f9b683880e454cc3dcd2e9eb01acdc0090e73b6c6b6b71a7d3
+SIZE (xpi/thunderbird-i18n-38.1.0/nb-NO.xpi) = 434340
+SHA256 (xpi/thunderbird-i18n-38.1.0/nl.xpi) = 032f473e1fce313d8d9cdcc49cdaf390711c266069c45df4dbee2e9c81e19b0d
+SIZE (xpi/thunderbird-i18n-38.1.0/nl.xpi) = 435107
+SHA256 (xpi/thunderbird-i18n-38.1.0/nn-NO.xpi) = 361710679e3229b98aa5785b1cf36afa493e5ded84353a69574e4cbe7f5bbe29
+SIZE (xpi/thunderbird-i18n-38.1.0/nn-NO.xpi) = 436622
+SHA256 (xpi/thunderbird-i18n-38.1.0/pa-IN.xpi) = 53afb6a6ff09df13b97ffc88f95a527d860e751fd79e873a78be2e7bd977a15e
+SIZE (xpi/thunderbird-i18n-38.1.0/pa-IN.xpi) = 530483
+SHA256 (xpi/thunderbird-i18n-38.1.0/pl.xpi) = d9c770408d6b8cc52df4113ccfeb339fc7e34ca45a62df49ee5f24e70a5e3503
+SIZE (xpi/thunderbird-i18n-38.1.0/pl.xpi) = 411508
+SHA256 (xpi/thunderbird-i18n-38.1.0/pt-BR.xpi) = 8160379e9ff6319939e7a9e2d37c0a7f66f436796f16c0c3ef8a70f1a2e17ea0
+SIZE (xpi/thunderbird-i18n-38.1.0/pt-BR.xpi) = 443773
+SHA256 (xpi/thunderbird-i18n-38.1.0/pt-PT.xpi) = d6354d745df58c48d15792c35aa8f4874d11bff0980df6b567de58f659357efe
+SIZE (xpi/thunderbird-i18n-38.1.0/pt-PT.xpi) = 442063
+SHA256 (xpi/thunderbird-i18n-38.1.0/rm.xpi) = fbc4bb3603cd5927c98e82ca83e830bd0c0807cc63ee0215f60e1cea66cc4400
+SIZE (xpi/thunderbird-i18n-38.1.0/rm.xpi) = 442112
+SHA256 (xpi/thunderbird-i18n-38.1.0/ro.xpi) = 2e768e1a2e9ae04bafea1948c19b2b6e83f436f3a2841a94550f95bde7b30b42
+SIZE (xpi/thunderbird-i18n-38.1.0/ro.xpi) = 448347
+SHA256 (xpi/thunderbird-i18n-38.1.0/ru.xpi) = 85ab5454186b1a35c1268a8854b2407f1a260857a092de2cdc1c0fb84e278104
+SIZE (xpi/thunderbird-i18n-38.1.0/ru.xpi) = 437591
+SHA256 (xpi/thunderbird-i18n-38.1.0/si.xpi) = 8df4c4ca6dbb901f419b69b37da8b0762483e080513b6cebe0d4424444f6ce25
+SIZE (xpi/thunderbird-i18n-38.1.0/si.xpi) = 535362
+SHA256 (xpi/thunderbird-i18n-38.1.0/sk.xpi) = 8b34d932a49e56cc47b9dae57f7a515b40bcc1ae4efa50f1dd275855abb30659
+SIZE (xpi/thunderbird-i18n-38.1.0/sk.xpi) = 456606
+SHA256 (xpi/thunderbird-i18n-38.1.0/sl.xpi) = 7d2bbe2b04052165bde61b4e24f2c928460f914a57c8bec36d3496de67d5dd66
+SIZE (xpi/thunderbird-i18n-38.1.0/sl.xpi) = 437847
+SHA256 (xpi/thunderbird-i18n-38.1.0/sq.xpi) = 0e41b9ab3ec7853e3c8d19ad6380598ccc4d04884426f64be577a045f876cdd6
+SIZE (xpi/thunderbird-i18n-38.1.0/sq.xpi) = 446896
+SHA256 (xpi/thunderbird-i18n-38.1.0/sr.xpi) = c2d6d4a751580f2107aaeec7f23584ca7a8803cd15289fbf863d124a1801ffee
+SIZE (xpi/thunderbird-i18n-38.1.0/sr.xpi) = 543336
+SHA256 (xpi/thunderbird-i18n-38.1.0/sv-SE.xpi) = 59cfe9b9ee411b92e288d0050ba3baddd5bc7bb779ed4fbff7681ae252053133
+SIZE (xpi/thunderbird-i18n-38.1.0/sv-SE.xpi) = 439633
+SHA256 (xpi/thunderbird-i18n-38.1.0/ta-LK.xpi) = 891b12e9f7722c570189c0c47a814e96ac3ef9e16b2d50625a4766085649d16f
+SIZE (xpi/thunderbird-i18n-38.1.0/ta-LK.xpi) = 558759
+SHA256 (xpi/thunderbird-i18n-38.1.0/tr.xpi) = 5b42a203b0a6938a9967ce982fb800bd4db8ef0d2def1b9966e1352e843729fc
+SIZE (xpi/thunderbird-i18n-38.1.0/tr.xpi) = 447799
+SHA256 (xpi/thunderbird-i18n-38.1.0/uk.xpi) = e32214709147900c4336af83dce5445614b72d4059dad67b6f703a0853ec2ad1
+SIZE (xpi/thunderbird-i18n-38.1.0/uk.xpi) = 509621
+SHA256 (xpi/thunderbird-i18n-38.1.0/vi.xpi) = 6d9b056f1d13e7dd95b79780c65e202c5c428f87e206370a5264644579a41626
+SIZE (xpi/thunderbird-i18n-38.1.0/vi.xpi) = 519864
+SHA256 (xpi/thunderbird-i18n-38.1.0/zh-CN.xpi) = 9d00bbc2f01c6974877923f9d770e16112b5e859788a728a7244052361f1ea7b
+SIZE (xpi/thunderbird-i18n-38.1.0/zh-CN.xpi) = 466411
+SHA256 (xpi/thunderbird-i18n-38.1.0/zh-TW.xpi) = 65dd33db3a18a4f8eeb54b953650a3a592a8821765e44888849f15531bcf88ca
+SIZE (xpi/thunderbird-i18n-38.1.0/zh-TW.xpi) = 466660
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index ca53e3b40f20..47bdd1b38e9b 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= thunderbird
-DISTVERSION= 31.7.0
-PORTREVISION= 1
+DISTVERSION= 38.1.0
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
@@ -13,31 +12,32 @@ EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX}
MAINTAINER= gecko@FreeBSD.org
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
-BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
- nss>=3.16.2.3:${PORTSDIR}/security/nss \
+BUILD_DEPENDS= nspr>=4.10.8:${PORTSDIR}/devel/nspr \
+ nss>=3.19.2:${PORTSDIR}/security/nss \
libevent2>=2.0.21_2:${PORTSDIR}/devel/libevent2 \
cairo>=1.12.16_1,2:${PORTSDIR}/graphics/cairo \
soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \
- harfbuzz>=0.9.25:${PORTSDIR}/print/harfbuzz \
+ harfbuzz>=0.9.34:${PORTSDIR}/print/harfbuzz \
graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \
libvorbis>=1.3.5:${PORTSDIR}/audio/libvorbis \
opus>=1.1:${PORTSDIR}/audio/opus \
libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
- sqlite3>=3.8.4.2:${PORTSDIR}/databases/sqlite3 \
+ sqlite3>=3.8.9:${PORTSDIR}/databases/sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
autoconf-2.13:${PORTSDIR}/devel/autoconf213 \
zip:${PORTSDIR}/archivers/zip \
unzip:${PORTSDIR}/archivers/unzip
+# opus>=1.1:${PORTSDIR}/audio/opus \
LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
EM_VERSION= 1.8.2
-L_VERSION= 3.3.7
+L_VERSION= 4.0.1
SSP_UNSAFE= yes
USE_GECKO= gecko
-USE_MOZILLA= # empty
+USE_MOZILLA= -opus
USE_QT5= # empty
QT_NONSTANDARD= yes
@@ -67,7 +67,7 @@ OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/GSTREAMER//}
.include <bsd.port.pre.mk>
-WRKSRC= ${WRKDIR}/comm-esr31
+WRKSRC= ${WRKDIR}/comm-esr38
MOZSRC:= ${WRKSRC}/mozilla
XPI_LIBDIR= ${PREFIX}/lib/xpi
@@ -103,7 +103,7 @@ EM_ID_RFILES= ${XPI_LIBDIR}/${EM_ID}/install.rdf \
MOZ_OPTIONS+= --enable-calendar
MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar
LIGHTNING_DIR= share/lightning
-XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/xpi-stage/lightning-${L_VERSION}.en-US.${OPSYS:tl}${OSREL}-${ARCH:S/amd64/x86_64/}.xpi
+XPI_FILE= ${MOZ_OBJDIR}/dist/xpi-stage/lightning-${L_VERSION}.en-US.${OPSYS:tl}${OSREL}-${ARCH:S/amd64/x86_64/}.xpi
XPI_ORIG_ID= {e2fda1a4-762b-4020-b5ad-a41df1933103}
XPI_ID= lightning@thunderbird.mozilla.org
.else
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 52f748788dd1..814d48df8607 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,4 +1,4 @@
-SHA256 (thunderbird-31.7.0.source.tar.bz2) = dc3a6afaab486ba09745898f55986f98cc9bf7647cd992849f9c7ead563479b7
-SIZE (thunderbird-31.7.0.source.tar.bz2) = 171059989
+SHA256 (thunderbird-38.1.0.source.tar.bz2) = ddf1fd6048f07370bb0375eac76e687c19d29100c19e9f86fc04bb88d4409787
+SIZE (thunderbird-38.1.0.source.tar.bz2) = 204161689
SHA256 (enigmail-1.8.2.tar.gz) = 1d2700799bc52aaa8e8c9f7a0f5111281ff9fbdffc093cdff070657d574eb2a6
SIZE (enigmail-1.8.2.tar.gz) = 1604159
diff --git a/mail/thunderbird/files/patch-bug1013675 b/mail/thunderbird/files/patch-bug1013675
deleted file mode 100644
index c8b0a6bf02d0..000000000000
--- a/mail/thunderbird/files/patch-bug1013675
+++ /dev/null
@@ -1,88 +0,0 @@
-diff --git xpcom/base/nsDebugImpl.cpp xpcom/base/nsDebugImpl.cpp
-index 13a286f..293bd73 100644
---- mozilla/xpcom/base/nsDebugImpl.cpp
-+++ mozilla/xpcom/base/nsDebugImpl.cpp
-@@ -45,12 +45,43 @@
- #endif
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
- #include <stdbool.h>
- #include <unistd.h>
-+#include <sys/param.h>
- #include <sys/sysctl.h>
- #endif
-
-+#if defined(__OpenBSD__)
-+#include <sys/proc.h>
-+#endif
-+
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
-+#endif
-+
-+#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_FLAGS kp_proc.p_flag
-+#elif defined(__DragonFly__)
-+#define KP_FLAGS kp_flags
-+#elif defined(__FreeBSD__)
-+#define KP_FLAGS ki_flag
-+#elif defined(__OpenBSD__) && !defined(_P_TRACED)
-+#define KP_FLAGS p_psflags
-+#define P_TRACED PS_TRACED
-+#else
-+#define KP_FLAGS p_flag
-+#endif
-+
- #include "mozilla/mozalloc_abort.h"
-
- static void
-@@ -144,16 +175,22 @@ nsDebugImpl::GetIsDebuggerAttached(bool* aResult)
-
- #if defined(XP_WIN)
- *aResult = ::IsDebuggerPresent();
--#elif defined(XP_MACOSX)
-+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+ || defined(__NetBSD__) || defined(__OpenBSD__)
- // Specify the info we're looking for
-- int mib[4];
-- mib[0] = CTL_KERN;
-- mib[1] = KERN_PROC;
-- mib[2] = KERN_PROC_PID;
-- mib[3] = getpid();
-+ int mib[] = {
-+ CTL_KERN,
-+ KERN_PROC,
-+ KERN_PROC_PID,
-+ getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+ sizeof(KINFO_PROC),
-+ 1,
-+#endif
-+ };
- size_t mibSize = sizeof(mib) / sizeof(int);
-
-- struct kinfo_proc info;
-+ KINFO_PROC info;
- size_t infoSize = sizeof(info);
- memset(&info, 0, infoSize);
-
-@@ -163,7 +200,7 @@ nsDebugImpl::GetIsDebuggerAttached(bool* aResult)
- return NS_OK;
- }
-
-- if (info.kp_proc.p_flag & P_TRACED) {
-+ if (info.KP_FLAGS & P_TRACED) {
- *aResult = true;
- }
- #endif
diff --git a/mail/thunderbird/files/patch-bug1015547 b/mail/thunderbird/files/patch-bug1015547
deleted file mode 100644
index 8e6189444b50..000000000000
--- a/mail/thunderbird/files/patch-bug1015547
+++ /dev/null
@@ -1,95 +0,0 @@
-diff --git configure.in configure.in
-index 7bed45f..053de17 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -2950,7 +2950,7 @@ dnl Checks for library functions.
- dnl ========================================================
- AC_PROG_GCC_TRADITIONAL
- AC_FUNC_MEMCMP
--AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r)
-+AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r arc4random arc4random_buf)
-
- dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
- AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
-diff --git xpcom/base/nsUUIDGenerator.cpp xpcom/base/nsUUIDGenerator.cpp
-index 0687344..ca3ff8b 100644
---- mozilla/xpcom/base/nsUUIDGenerator.cpp
-+++ mozilla/xpcom/base/nsUUIDGenerator.cpp
-@@ -15,6 +15,10 @@
-
- #include "nsUUIDGenerator.h"
-
-+#ifdef ANDROID
-+extern "C" NS_EXPORT void arc4random_buf(void *, size_t);
-+#endif
-+
- using namespace mozilla;
-
- NS_IMPL_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator)
-@@ -34,7 +38,7 @@ nsUUIDGenerator::Init()
- // We're a service, so we're guaranteed that Init() is not going
- // to be reentered while we're inside Init().
-
--#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
-+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
- /* initialize random number generator using NSPR random noise */
- unsigned int seed;
-
-@@ -67,7 +71,7 @@ nsUUIDGenerator::Init()
- return NS_ERROR_FAILURE;
- #endif
-
--#endif /* non XP_WIN and non XP_MACOSX */
-+#endif /* non XP_WIN and non XP_MACOSX and non ARC4RANDOM */
-
- return NS_OK;
- }
-@@ -114,13 +118,16 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id)
- * back to it; instead, we use the value returned when we called
- * initstate, since older glibc's have broken setstate() return values
- */
--#ifndef ANDROID
-+#ifndef HAVE_ARC4RANDOM
- setstate(mState);
- #endif
-
-+#ifdef HAVE_ARC4RANDOM_BUF
-+ arc4random_buf(id, sizeof(nsID));
-+#else /* HAVE_ARC4RANDOM_BUF */
- size_t bytesLeft = sizeof(nsID);
- while (bytesLeft > 0) {
--#ifdef ANDROID
-+#ifdef HAVE_ARC4RANDOM
- long rval = arc4random();
- const size_t mRBytes = 4;
- #else
-@@ -141,6 +148,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id)
-
- bytesLeft -= toWrite;
- }
-+#endif /* HAVE_ARC4RANDOM_BUF */
-
- /* Put in the version */
- id->m2 &= 0x0fff;
-@@ -150,7 +158,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* id)
- id->m3[0] &= 0x3f;
- id->m3[0] |= 0x80;
-
--#ifndef ANDROID
-+#ifndef HAVE_ARC4RANDOM
- /* Restore the previous RNG state */
- setstate(mSavedState);
- #endif
-diff --git xpcom/base/nsUUIDGenerator.h xpcom/base/nsUUIDGenerator.h
-index 6a24212..68ed6f2 100644
---- mozilla/xpcom/base/nsUUIDGenerator.h
-+++ mozilla/xpcom/base/nsUUIDGenerator.h
-@@ -27,7 +27,7 @@ private:
- protected:
-
- mozilla::Mutex mLock;
--#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
-+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
- char mState[128];
- char *mSavedState;
- uint8_t mRBytes;
diff --git a/mail/thunderbird/files/patch-bug1021171 b/mail/thunderbird/files/patch-bug1021171
deleted file mode 100644
index 19335ab57bc4..000000000000
--- a/mail/thunderbird/files/patch-bug1021171
+++ /dev/null
@@ -1,193 +0,0 @@
-commit dd19f59
-Author: Trevor Saunders <trev.saunders@gmail.com>
-Date: Fri Jun 6 15:31:30 2014 -0400
-
- bug 1021171 - don't return nulllptr in functions returning bool r=bz,waldo
----
- js/src/builtin/TypedObject.cpp | 32 ++++++++++++++++----------------
- js/src/frontend/BytecodeCompiler.cpp | 2 +-
- js/xpconnect/wrappers/XrayWrapper.cpp | 2 +-
- netwerk/ipc/NeckoParent.cpp | 2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git js/src/builtin/TypedObject.cpp js/src/builtin/TypedObject.cpp
-index 9e284b9..7a0a7fc 100644
---- mozilla/js/src/builtin/TypedObject.cpp
-+++ mozilla/js/src/builtin/TypedObject.cpp
-@@ -710,12 +710,12 @@ ArrayMetaTypeDescr::construct(JSContext *cx, unsigned argc, Value *vp)
- contents.append(")");
- RootedAtom stringRepr(cx, contents.finishAtom());
- if (!stringRepr)
-- return nullptr;
-+ return false;
-
- // Extract ArrayType.prototype
- RootedObject arrayTypePrototype(cx, GetPrototype(cx, arrayTypeGlobal));
- if (!arrayTypePrototype)
-- return nullptr;
-+ return false;
-
- // Create the instance of ArrayType
- Rooted<UnsizedArrayTypeDescr *> obj(cx);
-@@ -728,7 +728,7 @@ ArrayMetaTypeDescr::construct(JSContext *cx, unsigned argc, Value *vp)
- if (!JSObject::defineProperty(cx, obj, cx->names().length,
- UndefinedHandleValue, nullptr, nullptr,
- JSPROP_READONLY | JSPROP_PERMANENT))
-- return nullptr;
-+ return false;
-
- args.rval().setObject(*obj);
- return true;
-@@ -762,7 +762,7 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp)
- if (!size.isValid()) {
- JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
- JSMSG_TYPEDOBJECT_TOO_BIG);
-- return nullptr;
-+ return false;
- }
-
- // Construct a canonical string `new ArrayType(<elementType>).dimension(N)`:
-@@ -775,7 +775,7 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp)
- contents.append(")");
- RootedAtom stringRepr(cx, contents.finishAtom());
- if (!stringRepr)
-- return nullptr;
-+ return false;
-
- // Create the sized type object.
- Rooted<SizedArrayTypeDescr*> obj(cx);
-@@ -793,7 +793,7 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp)
- if (!JSObject::defineProperty(cx, obj, cx->names().length,
- lengthVal, nullptr, nullptr,
- JSPROP_READONLY | JSPROP_PERMANENT))
-- return nullptr;
-+ return false;
-
- // Add `unsized` property, which is a link from the sized
- // array to the unsized array.
-@@ -801,7 +801,7 @@ UnsizedArrayTypeDescr::dimension(JSContext *cx, unsigned int argc, jsval *vp)
- if (!JSObject::defineProperty(cx, obj, cx->names().unsized,
- unsizedTypeDescrValue, nullptr, nullptr,
- JSPROP_READONLY | JSPROP_PERMANENT))
-- return nullptr;
-+ return false;
-
- args.rval().setObject(*obj);
- return true;
-@@ -1253,7 +1253,7 @@ DefineSimpleTypeDescr(JSContext *cx,
- Rooted<TypedProto*> proto(cx);
- proto = NewObjectWithProto<TypedProto>(cx, objProto, nullptr, TenuredObject);
- if (!proto)
-- return nullptr;
-+ return false;
- proto->initTypeDescrSlot(*descr);
- descr->initReservedSlot(JS_DESCR_SLOT_TYPROTO, ObjectValue(*proto));
-
-@@ -1358,14 +1358,14 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global)
- #define BINARYDATA_SCALAR_DEFINE(constant_, type_, name_) \
- if (!DefineSimpleTypeDescr<ScalarTypeDescr>(cx, global, module, constant_, \
- cx->names().name_)) \
-- return nullptr;
-+ return false;
- JS_FOR_EACH_SCALAR_TYPE_REPR(BINARYDATA_SCALAR_DEFINE)
- #undef BINARYDATA_SCALAR_DEFINE
-
- #define BINARYDATA_REFERENCE_DEFINE(constant_, type_, name_) \
- if (!DefineSimpleTypeDescr<ReferenceTypeDescr>(cx, global, module, constant_, \
- cx->names().name_)) \
-- return nullptr;
-+ return false;
- JS_FOR_EACH_REFERENCE_TYPE_REPR(BINARYDATA_REFERENCE_DEFINE)
- #undef BINARYDATA_REFERENCE_DEFINE
-
-@@ -1375,14 +1375,14 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global)
- arrayType = DefineMetaTypeDescr<ArrayMetaTypeDescr>(
- cx, global, module, TypedObjectModuleObject::ArrayTypePrototype);
- if (!arrayType)
-- return nullptr;
-+ return false;
-
- RootedValue arrayTypeValue(cx, ObjectValue(*arrayType));
- if (!JSObject::defineProperty(cx, module, cx->names().ArrayType,
- arrayTypeValue,
- nullptr, nullptr,
- JSPROP_READONLY | JSPROP_PERMANENT))
-- return nullptr;
-+ return false;
-
- // StructType.
-
-@@ -1390,14 +1390,14 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global)
- structType = DefineMetaTypeDescr<StructMetaTypeDescr>(
- cx, global, module, TypedObjectModuleObject::StructTypePrototype);
- if (!structType)
-- return nullptr;
-+ return false;
-
- RootedValue structTypeValue(cx, ObjectValue(*structType));
- if (!JSObject::defineProperty(cx, module, cx->names().StructType,
- structTypeValue,
- nullptr, nullptr,
- JSPROP_READONLY | JSPROP_PERMANENT))
-- return nullptr;
-+ return false;
-
- // Everything is setup, install module on the global object:
- RootedValue moduleValue(cx, ObjectValue(*module));
-@@ -1407,7 +1407,7 @@ GlobalObject::initTypedObjectModule(JSContext *cx, Handle<GlobalObject*> global)
- nullptr, nullptr,
- 0))
- {
-- return nullptr;
-+ return false;
- }
-
- return module;
-@@ -2449,7 +2449,7 @@ TypedObject::constructUnsized(JSContext *cx, unsigned int argc, Value *vp)
- if (length < 0) {
- JS_ReportErrorNumber(cx, js_GetErrorMessage,
- nullptr, JSMSG_TYPEDOBJECT_BAD_ARGS);
-- return nullptr;
-+ return false;
- }
- Rooted<TypedObject*> obj(cx, createZeroed(cx, callee, length));
- if (!obj)
-diff --git js/src/frontend/BytecodeCompiler.cpp js/src/frontend/BytecodeCompiler.cpp
-index 5aacc23..aed45ca 100644
---- mozilla/js/src/frontend/BytecodeCompiler.cpp
-+++ mozilla/js/src/frontend/BytecodeCompiler.cpp
-@@ -544,7 +544,7 @@ CompileFunctionBody(JSContext *cx, MutableHandleFunction fun, const ReadOnlyComp
-
- RootedScriptSource sourceObject(cx, CreateScriptSourceObject(cx, options));
- if (!sourceObject)
-- return nullptr;
-+ return false;
- ScriptSource* ss = sourceObject->source();
-
- SourceCompressionTask sct(cx);
-diff --git js/xpconnect/wrappers/XrayWrapper.cpp js/xpconnect/wrappers/XrayWrapper.cpp
-index fd6458b..ab48770 100644
---- mozilla/js/xpconnect/wrappers/XrayWrapper.cpp
-+++ mozilla/js/xpconnect/wrappers/XrayWrapper.cpp
-@@ -363,7 +363,7 @@ public:
- {
- JSAutoCompartment ac(cx, target);
- if (!JS_GetClassPrototype(cx, key, protop))
-- return nullptr;
-+ return false;
- }
- return JS_WrapObject(cx, protop);
- }
-diff --git netwerk/ipc/NeckoParent.cpp netwerk/ipc/NeckoParent.cpp
-index 96dbb1d..ef3293b 100644
---- mozilla/netwerk/ipc/NeckoParent.cpp
-+++ mozilla/netwerk/ipc/NeckoParent.cpp
-@@ -365,7 +365,7 @@ NeckoParent::RecvPRtspChannelConstructor(
- RtspChannelParent* p = static_cast<RtspChannelParent*>(aActor);
- return p->Init(aConnectArgs);
- #else
-- return nullptr;
-+ return false;
- #endif
- }
-
diff --git a/mail/thunderbird/files/patch-bug1021761 b/mail/thunderbird/files/patch-bug1021761
index b071d087570c..87cfc43aa825 100644
--- a/mail/thunderbird/files/patch-bug1021761
+++ b/mail/thunderbird/files/patch-bug1021761
@@ -218,12 +218,12 @@ index a962553..1f780f4 100644
assert(p);
pthread_mutex_unlock(&stm->mutex);
-@@ -313,10 +360,10 @@ alsa_refill_stream(cubeb_stream * stm)
- return ERROR;
- }
- if (got > 0) {
-- snd_pcm_sframes_t wrote = snd_pcm_writei(stm->pcm, p, got);
-+ snd_pcm_sframes_t wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+@@ -327,10 +374,10 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = snd_pcm_writei(stm->pcm, p, got);
++ wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
if (wrote == -EPIPE) {
- snd_pcm_recover(stm->pcm, wrote, 1);
- wrote = snd_pcm_writei(stm->pcm, p, got);
@@ -533,42 +533,51 @@ index a962553..1f780f4 100644
assert((nfds_t) r == stm->nfds);
r = pthread_cond_init(&stm->cond, NULL);
-@@ -937,12 +1043,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
+@@ -895,7 +1001,7 @@ alsa_stream_destroy(cubeb_stream * stm)
+ pthread_mutex_lock(&stm->mutex);
+ if (stm->pcm) {
+ if (stm->state == DRAINING) {
+- snd_pcm_drain(stm->pcm);
++ WRAP(snd_pcm_drain)(stm->pcm);
+ }
+ alsa_locked_pcm_close(stm->pcm);
+ stm->pcm = NULL;
+@@ -938,12 +1044,12 @@ alsa_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
return CUBEB_ERROR;
}
-- rv = snd_pcm_hw_params_any(stm->pcm, hw_params);
-+ rv = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
- if (rv < 0) {
+- r = snd_pcm_hw_params_any(stm->pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(stm->pcm, hw_params);
+ if (r < 0) {
return CUBEB_ERROR;
}
-- rv = snd_pcm_hw_params_get_channels_max(hw_params, max_channels);
-+ rv = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels);
- if (rv < 0) {
+- r = snd_pcm_hw_params_get_channels_max(hw_params, max_channels);
++ r = WRAP(snd_pcm_hw_params_get_channels_max)(hw_params, max_channels);
+ if (r < 0) {
return CUBEB_ERROR;
}
-@@ -962,34 +1068,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
+@@ -963,34 +1069,34 @@ alsa_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate) {
/* get a pcm, disabling resampling, so we get a rate the
* hardware/dmix/pulse/etc. supports. */
-- rv = snd_pcm_open(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
-+ rv = WRAP(snd_pcm_open)(&pcm, "", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
- if (rv < 0) {
+- r = snd_pcm_open(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
++ r = WRAP(snd_pcm_open)(&pcm, "default", SND_PCM_STREAM_PLAYBACK | SND_PCM_NO_AUTO_RESAMPLE, 0);
+ if (r < 0) {
return CUBEB_ERROR;
}
-- rv = snd_pcm_hw_params_any(pcm, hw_params);
-+ rv = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
- if (rv < 0) {
+- r = snd_pcm_hw_params_any(pcm, hw_params);
++ r = WRAP(snd_pcm_hw_params_any)(pcm, hw_params);
+ if (r < 0) {
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_ERROR;
}
-- rv = snd_pcm_hw_params_get_rate(hw_params, rate, &dir);
-+ rv = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
- if (rv >= 0) {
+- r = snd_pcm_hw_params_get_rate(hw_params, rate, &dir);
++ r = WRAP(snd_pcm_hw_params_get_rate)(hw_params, rate, &dir);
+ if (r >= 0) {
/* There is a default rate: use it. */
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
@@ -578,9 +587,9 @@ index a962553..1f780f4 100644
/* Use a common rate, alsa may adjust it based on hw/etc. capabilities. */
*rate = 44100;
-- rv = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL);
-+ rv = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
- if (rv < 0) {
+- r = snd_pcm_hw_params_set_rate_near(pcm, hw_params, rate, NULL);
++ r = WRAP(snd_pcm_hw_params_set_rate_near)(pcm, hw_params, rate, NULL);
+ if (r < 0) {
- snd_pcm_close(pcm);
+ WRAP(snd_pcm_close)(pcm);
return CUBEB_ERROR;
@@ -634,7 +643,7 @@ new file mode 100644
index 0000000..5e38e27
--- /dev/null
+++ mozilla/media/libcubeb/src/cubeb_oss.c
-@@ -0,0 +1,397 @@
+@@ -0,0 +1,402 @@
+/*
+ * Copyright © 2014 Mozilla Foundation
+ *
@@ -1030,7 +1039,12 @@ index 0000000..5e38e27
+ .stream_start = oss_stream_start,
+ .stream_stop = oss_stream_stop,
+ .stream_get_position = oss_stream_get_position,
-+ .stream_get_latency = oss_stream_get_latency
++ .stream_get_latency = oss_stream_get_latency,
++ .stream_set_volume = oss_stream_set_volume,
++ .stream_set_panning = oss_stream_set_panning,
++ .stream_get_current_device = NULL,
++ .stream_device_destroy = NULL,
++ .stream_register_device_changed_callback = NULL
+};
diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
index 8b7a0dd..31212ce 100644
@@ -1056,36 +1070,33 @@ index 8b7a0dd..31212ce 100644
+CFLAGS += CONFIG['MOZ_OSS_CFLAGS']
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
index 991f03f..3d99eb5 100644
---- mozilla/media/webrtc/signaling/test/Makefile.in
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -26,9 +26,9 @@ ifdef JS_SHARED_LIBRARY
- LIBS += $(MOZ_JS_LIBS)
- endif
-
--ifdef MOZ_ALSA
-+ifdef MOZ_OSS
- LIBS += \
-- $(MOZ_ALSA_LIBS) \
-+ $(MOZ_OSS_LIBS) \
- $(NULL)
- endif
-
-diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
+--- mozilla/media/webrtc/signaling/test/moz.build
++++ mozilla/media/webrtc/signaling/test/moz.build
+@@ -112,8 +112,8 @@ if CONFIG['JS_SHARED_LIBRARY']:
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+diff --git toolkit/library/moz.build toolkit/library/moz.build
index e191f13..4fb268a 100644
---- mozilla/toolkit/library/libxul.mk
-+++ mozilla/toolkit/library/libxul.mk
-@@ -146,9 +146,9 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32
- endif
- endif
-
--ifdef MOZ_ALSA
--EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
--endif
-+ifdef MOZ_OSS
-+EXTRA_DSO_LDOPTS += $(MOZ_OSS_LIBS)
-+endif
-
- ifdef HAVE_CLOCK_MONOTONIC
- EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
+--- mozilla/toolkit/library/moz.build
++++ mozilla/toolkit/library/moz.build
+@@ -234,8 +234,8 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
+
+-if CONFIG['MOZ_ALSA']:
+- OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
++if CONFIG['MOZ_OSS']:
++ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
+ if CONFIG['HAVE_CLOCK_MONOTONIC']:
+ OS_LIBS += CONFIG['REALTIME_LIBS']
diff --git a/mail/thunderbird/files/patch-bug1026828 b/mail/thunderbird/files/patch-bug1026828
deleted file mode 100644
index b52dcd4e9788..000000000000
--- a/mail/thunderbird/files/patch-bug1026828
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git storage/src/moz.build storage/src/moz.build
-index 4cd2551..5c40536 100644
---- mozilla/storage/src/moz.build
-+++ mozilla/storage/src/moz.build
-@@ -50,11 +50,14 @@ FINAL_LIBRARY = 'storagecomps'
- # (such as NSS) might trigger an initialization of sqlite and allocation
- # of memory using the default allocator, prior to the storage service
- # registering its allocator, causing memory management failures (bug 938730).
-+# However, this is not an issue if both the jemalloc allocator and the default
-+# allocator are the same thing.
- #
- # Note: On Windows our sqlite build assumes we use jemalloc. If you disable
- # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
- # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
--if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_NATIVE_SQLITE']:
-+if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
-+ or CONFIG['MOZ_NATIVE_JEMALLOC']):
- if CONFIG['OS_TARGET'] != 'Android':
- DEFINES['MOZ_STORAGE_MEMORY'] = True
-
diff --git a/mail/thunderbird/files/patch-bug1041268 b/mail/thunderbird/files/patch-bug1041268
new file mode 100644
index 000000000000..39ddbbdb490f
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1041268
@@ -0,0 +1,26 @@
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+index 97f69d3..77a50b3 100644
+--- mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
++++ mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.cc
+@@ -18,7 +18,7 @@ ScreenCapturer* ScreenCapturer::Create() {
+ return Create(DesktopCaptureOptions::CreateDefault());
+ }
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ ScreenCapturer* ScreenCapturer::CreateWithXDamage(
+ bool use_update_notifications) {
+ DesktopCaptureOptions options;
+diff --git media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+index a8d40a7..177a6c1 100644
+--- mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
++++ mozilla/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer.h
+@@ -74,7 +74,7 @@ class ScreenCapturer : public DesktopCapturer {
+ static ScreenCapturer* Create(const DesktopCaptureOptions& options);
+ static ScreenCapturer* Create();
+
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ // Creates platform-specific capturer and instructs it whether it should use
+ // X DAMAGE support.
+ static ScreenCapturer* CreateWithXDamage(bool use_x_damage);
diff --git a/mail/thunderbird/files/patch-bug1041795 b/mail/thunderbird/files/patch-bug1041795
deleted file mode 100644
index 5164776bdde7..000000000000
--- a/mail/thunderbird/files/patch-bug1041795
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git config/rules.mk config/rules.mk
-index 4d67eda..783942f 100644
---- mozilla/config/rules.mk
-+++ mozilla/config/rules.mk
-@@ -858,7 +858,7 @@ ifdef DTRACE_PROBE_OBJ
- ifndef DTRACE_LIB_DEPENDENT
- NON_DTRACE_OBJS := $(filter-out $(DTRACE_PROBE_OBJ),$(OBJS))
- $(DTRACE_PROBE_OBJ): $(NON_DTRACE_OBJS)
-- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS)
-+ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS)
- endif
- endif
- endif
-@@ -876,7 +876,7 @@ ifndef INCREMENTAL_LINKER
- endif
- ifdef DTRACE_LIB_DEPENDENT
- ifndef XP_MACOSX
-- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
-+ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
- endif
- $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
- @$(RM) $(DTRACE_PROBE_OBJ)
-diff --git js/src/Makefile.in js/src/Makefile.in
-index 28ca5e8..96793d7 100644
---- mozilla/js/src/Makefile.in
-+++ mozilla/js/src/Makefile.in
-@@ -342,7 +342,7 @@ endif
-
- ifdef HAVE_DTRACE
- $(CURDIR)/javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
-- dtrace -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
-+ dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
- sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
- -e '/const/!s/char \*/const char */g' \
- javascript-trace.h.in > javascript-trace.h
-diff --git probes/Makefile.in probes/Makefile.in
-index 6d18f34..deec83f 100644
---- mozilla/probes/Makefile.in
-+++ mozilla/probes/Makefile.in
-@@ -7,7 +7,7 @@ export:: $(DIST)/include/mozilla-trace.h
-
- # Replace _DTRACE_VERSION with INCLUDE_MOZILLA_DTRACE
- $(DIST)/include/mozilla-trace.h: mozilla-trace.d Makefile
-- dtrace -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp
-+ dtrace -x nolibs -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp
- sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
- mozilla-trace.h.tmp > $(DIST)/include/mozilla-trace.h
- rm mozilla-trace.h.tmp
diff --git a/mail/thunderbird/files/patch-bug1046224 b/mail/thunderbird/files/patch-bug1046224
deleted file mode 100644
index 86c675584859..000000000000
--- a/mail/thunderbird/files/patch-bug1046224
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git configure.in configure.in
-index 1853029..559bd45 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -2651,7 +2651,7 @@ if test "$ac_cv_sockaddr_sa_len" = true ; then
- AC_DEFINE(HAVE_SA_LEN)
- fi
-
--AC_ARG_ENABLE(dtrace,
-+MOZ_ARG_ENABLE_BOOL(dtrace,
- [ --enable-dtrace build with dtrace support if available (default=no)],
- [enable_dtrace="yes"],)
- if test "x$enable_dtrace" = "xyes"; then
-diff --git js/src/configure.in js/src/configure.in
-index 134dfd3..682c1fb 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -2153,7 +2153,7 @@ dnl Quota support
- MOZ_CHECK_HEADERS(sys/quota.h)
- MOZ_CHECK_HEADERS(linux/quota.h)
-
--AC_ARG_ENABLE(dtrace,
-+MOZ_ARG_ENABLE_BOOL(dtrace,
- [ --enable-dtrace build with dtrace support if available (default=no)],
- [enable_dtrace="yes"],)
- if test "x$enable_dtrace" = "xyes"; then
diff --git a/mail/thunderbird/files/patch-bug1067377 b/mail/thunderbird/files/patch-bug1067377
deleted file mode 100644
index 258dd8b2255d..000000000000
--- a/mail/thunderbird/files/patch-bug1067377
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git content/media/encoder/VP8TrackEncoder.cpp content/media/encoder/VP8TrackEncoder.cpp
-index 452821c..ede21c5 100644
---- mozilla/content/media/encoder/VP8TrackEncoder.cpp
-+++ mozilla/content/media/encoder/VP8TrackEncoder.cpp
-@@ -84,7 +84,7 @@ VP8TrackEncoder::Init(int32_t aWidth, int32_t aHeight, int32_t aDisplayWidth,
- // Creating a wrapper to the image - setting image data to NULL. Actual
- // pointer will be set in encode. Setting align to 1, as it is meaningless
- // (actual memory is not allocated).
-- vpx_img_wrap(mVPXImageWrapper, IMG_FMT_I420,
-+ vpx_img_wrap(mVPXImageWrapper, VPX_IMG_FMT_I420,
- mFrameWidth, mFrameHeight, 1, nullptr);
-
- config.g_w = mFrameWidth;
-@@ -239,9 +239,9 @@ void VP8TrackEncoder::PrepareMutedFrame()
- uint8_t *cb = mMuteFrame.Elements() + yPlaneSize;
- uint8_t *cr = mMuteFrame.Elements() + yPlaneSize + uvPlaneSize;
-
-- mVPXImageWrapper->planes[PLANE_Y] = y;
-- mVPXImageWrapper->planes[PLANE_U] = cb;
-- mVPXImageWrapper->planes[PLANE_V] = cr;
-+ mVPXImageWrapper->planes[VPX_PLANE_Y] = y;
-+ mVPXImageWrapper->planes[VPX_PLANE_U] = cb;
-+ mVPXImageWrapper->planes[VPX_PLANE_V] = cr;
- mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth;
- mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth;
- mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth;
-@@ -297,9 +297,9 @@ nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk)
- const PlanarYCbCrImage::Data *data = yuv->GetData();
-
- if (isYUV420(data) && !data->mCbSkip) { // 420 planar
-- mVPXImageWrapper->planes[PLANE_Y] = data->mYChannel;
-- mVPXImageWrapper->planes[PLANE_U] = data->mCbChannel;
-- mVPXImageWrapper->planes[PLANE_V] = data->mCrChannel;
-+ mVPXImageWrapper->planes[VPX_PLANE_Y] = data->mYChannel;
-+ mVPXImageWrapper->planes[VPX_PLANE_U] = data->mCbChannel;
-+ mVPXImageWrapper->planes[VPX_PLANE_V] = data->mCrChannel;
- mVPXImageWrapper->stride[VPX_PLANE_Y] = data->mYStride;
- mVPXImageWrapper->stride[VPX_PLANE_U] = data->mCbCrStride;
- mVPXImageWrapper->stride[VPX_PLANE_V] = data->mCbCrStride;
-@@ -355,9 +355,9 @@ nsresult VP8TrackEncoder::PrepareRawFrame(VideoChunk &aChunk)
- return NS_ERROR_NOT_IMPLEMENTED;
- }
-
-- mVPXImageWrapper->planes[PLANE_Y] = y;
-- mVPXImageWrapper->planes[PLANE_U] = cb;
-- mVPXImageWrapper->planes[PLANE_V] = cr;
-+ mVPXImageWrapper->planes[VPX_PLANE_Y] = y;
-+ mVPXImageWrapper->planes[VPX_PLANE_U] = cb;
-+ mVPXImageWrapper->planes[VPX_PLANE_V] = cr;
- mVPXImageWrapper->stride[VPX_PLANE_Y] = mFrameWidth;
- mVPXImageWrapper->stride[VPX_PLANE_U] = halfWidth;
- mVPXImageWrapper->stride[VPX_PLANE_V] = halfWidth;
-diff --git media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
-index d9c3a22..75195ae 100644
---- mozilla/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
-+++ mozilla/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
-@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
- // Creating a wrapper to the image - setting image data to NULL. Actual
- // pointer will be set in encode. Setting align to 1, as it is meaningless
- // (actual memory is not allocated).
-- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height,
-+ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height,
- 1, NULL);
- // populate encoder configuration with default values
- if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) {
-@@ -349,9 +349,9 @@ int VP8EncoderImpl::Encode(const I420VideoFrame& input_image,
- }
- // Image in vpx_image_t format.
- // Input image is const. VP8's raw image is not defined as const.
-- raw_->planes[PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane));
-- raw_->planes[PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
-- raw_->planes[PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
-+ raw_->planes[VPX_PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane));
-+ raw_->planes[VPX_PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
-+ raw_->planes[VPX_PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
- // TODO(mikhal): Stride should be set in initialization.
- raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
- raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane);
diff --git a/mail/thunderbird/files/patch-bug1073117 b/mail/thunderbird/files/patch-bug1073117
new file mode 100644
index 000000000000..6281c0bd78a4
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1073117
@@ -0,0 +1,877 @@
+diff --git widget/gtk/gtk2drawing.c widget/gtk/gtk2drawing.c
+index 34f22af..1b950ab 100644
+--- mozilla/widget/gtk/gtk2drawing.c
++++ mozilla/widget/gtk/gtk2drawing.c
+@@ -831,7 +831,7 @@ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
++static gint
+ moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+ gint* focus_width, gint* focus_pad)
+ {
+@@ -928,7 +928,7 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
++static gint
+ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border)
+ {
+ static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
+index 08a58d6..7fef6fa 100644
+--- mozilla/widget/gtk/gtk3drawing.c
++++ mozilla/widget/gtk/gtk3drawing.c
+@@ -65,6 +65,7 @@ static GtkWidget* gScrolledWindowWidget;
+ static style_prop_t style_prop_func;
+ static gboolean have_arrow_scaling;
+ static gboolean checkbox_check_state;
++static gboolean notebook_has_tab_gap;
+ static gboolean is_initialized;
+
+ #define ARROW_UP 0
+@@ -725,6 +726,14 @@ moz_gtk_init()
+ else
+ checkbox_check_state = GTK_STATE_FLAG_ACTIVE;
+
++ if(!gtk_check_version(3, 12, 0)) {
++ ensure_tab_widget();
++ gtk_widget_style_get(gTabWidget, "has-tab-gap", &notebook_has_tab_gap, NULL);
++ }
++ else {
++ notebook_has_tab_gap = TRUE;
++ }
++
+ /* Add style property to GtkEntry.
+ * Adding the style property to the normal GtkEntry class means that it
+ * will work without issues inside GtkComboBox and for Spinbuttons. */
+@@ -762,37 +771,17 @@ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing)
+ gint
+ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width)
+ {
+- gboolean interior_focus;
+- gint focus_width = 0;
++ GtkBorder border;
++ GtkBorder padding;
++ GtkStyleContext *style;
+
+ ensure_entry_widget();
+- gtk_widget_style_get(gEntryWidget,
+- "interior-focus", &interior_focus,
+- "focus-line-width", &focus_width,
+- NULL);
+- if (interior_focus) {
+- GtkBorder border;
+- GtkStyleContext *style = gtk_widget_get_style_context(gEntryWidget);
+- gtk_style_context_get_border(style, 0, &border);
+- *focus_h_width = border.left + focus_width;
+- *focus_v_width = border.top + focus_width;
+- } else {
+- *focus_h_width = focus_width;
+- *focus_v_width = focus_width;
+- }
+- return MOZ_GTK_SUCCESS;
+-}
+-
+-gint
+-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+- gint* focus_width, gint* focus_pad)
+-{
+- gtk_widget_style_get (widget,
+- "interior-focus", interior_focus,
+- "focus-line-width", focus_width,
+- "focus-padding", focus_pad,
+- NULL);
++ style = gtk_widget_get_style_context(gEntryWidget);
+
++ gtk_style_context_get_border(style, 0, &border);
++ gtk_style_context_get_padding(style, 0, &padding);
++ *focus_h_width = border.left + padding.left;
++ *focus_v_width = border.top + padding.top;
+ return MOZ_GTK_SUCCESS;
+ }
+
+@@ -880,24 +860,6 @@ moz_gtk_splitter_get_metrics(gint orientation, gint* size)
+ return MOZ_GTK_SUCCESS;
+ }
+
+-gint
+-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border)
+-{
+- static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+- GtkBorder *tmp_border;
+-
+- gtk_widget_style_get (widget, "inner-border", &tmp_border, NULL);
+-
+- if (tmp_border) {
+- *inner_border = *tmp_border;
+- gtk_border_free(tmp_border);
+- }
+- else
+- *inner_border = default_inner_border;
+-
+- return MOZ_GTK_SUCCESS;
+-}
+-
+ static gint
+ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkWidgetState* state,
+@@ -908,19 +870,8 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkStyleContext* style = gtk_widget_get_style_context(widget);
+ gint x = rect->x, y=rect->y, width=rect->width, height=rect->height;
+
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad);
+ gtk_widget_set_direction(widget, direction);
+-
+- if (!interior_focus && state->focused) {
+- x += focus_width + focus_pad;
+- y += focus_width + focus_pad;
+- width -= 2 * (focus_width + focus_pad);
+- height -= 2 * (focus_width + focus_pad);
+- }
+-
++
+ gtk_style_context_save(style);
+ gtk_style_context_set_state(style, state_flags);
+
+@@ -953,20 +904,12 @@ moz_gtk_button_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+
+ if (state->focused) {
+- if (interior_focus) {
+- GtkBorder border;
+- gtk_style_context_get_border(style, state_flags, &border);
+- x += border.left + focus_pad;
+- y += border.top + focus_pad;
+- width -= 2 * (border.left + focus_pad);
+- height -= 2 * (border.top + focus_pad);
+- } else {
+- x -= focus_width + focus_pad;
+- y -= focus_width + focus_pad;
+- width += 2 * (focus_width + focus_pad);
+- height += 2 * (focus_width + focus_pad);
+- }
+-
++ GtkBorder border;
++ gtk_style_context_get_border(style, state_flags, &border);
++ x += border.left;
++ y += border.top;
++ width -= (border.left + border.right);
++ height -= (border.top + border.bottom);
+ gtk_render_focus(style, cr, x, y, width, height);
+ }
+ gtk_style_context_restore(style);
+@@ -1056,33 +999,23 @@ calculate_button_inner_rect(GtkWidget* button, GdkRectangle* rect,
+ GtkTextDirection direction,
+ gboolean ignore_focus)
+ {
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+ GtkStyleContext* style;
+ GtkBorder border;
++ GtkBorder padding = {0, 0, 0, 0};
+
+ style = gtk_widget_get_style_context(button);
+
+ /* This mirrors gtkbutton's child positioning */
+- moz_gtk_button_get_inner_border(button, &inner_border);
+- moz_gtk_widget_get_focus(button, &interior_focus,
+- &focus_width, &focus_pad);
+-
+- if (ignore_focus)
+- focus_width = focus_pad = 0;
+-
+ gtk_style_context_get_border(style, 0, &border);
++ if (!ignore_focus)
++ gtk_style_context_get_padding(style, 0, &padding);
+
+- inner_rect->x = rect->x + border.left + focus_width + focus_pad;
+- inner_rect->x += direction == GTK_TEXT_DIR_LTR ?
+- inner_border.left : inner_border.right;
+- inner_rect->y = rect->y + inner_border.top + border.top +
+- focus_width + focus_pad;
+- inner_rect->width = MAX(1, rect->width - inner_border.left -
+- inner_border.right - (border.left + focus_pad + focus_width) * 2);
+- inner_rect->height = MAX(1, rect->height - inner_border.top -
+- inner_border.bottom - (border.top + focus_pad + focus_width) * 2);
++ inner_rect->x = rect->x + border.left + padding.left;
++ inner_rect->y = rect->y + padding.top + border.top;
++ inner_rect->width = MAX(1, rect->width - padding.left -
++ padding.right - border.left * 2);
++ inner_rect->height = MAX(1, rect->height - padding.top -
++ padding.bottom - border.top * 2);
+
+ return MOZ_GTK_SUCCESS;
+ }
+@@ -1457,19 +1390,12 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ {
+ gint x = rect->x, y = rect->y, width = rect->width, height = rect->height;
+ GtkStyleContext* style;
+- gboolean interior_focus;
+- gint focus_width;
+ int draw_focus_outline_only = state->depressed; // NS_THEME_FOCUS_OUTLINE
+
+ gtk_widget_set_direction(widget, direction);
+
+ style = gtk_widget_get_style_context(widget);
+
+- gtk_widget_style_get(widget,
+- "interior-focus", &interior_focus,
+- "focus-line-width", &focus_width,
+- NULL);
+-
+ if (draw_focus_outline_only) {
+ // Inflate the given 'rect' with the focus outline size.
+ gint h, v;
+@@ -1501,14 +1427,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ /* This will get us the lit borders that focused textboxes enjoy on
+ * some themes. */
+ gtk_style_context_set_state(style, GTK_STATE_FLAG_FOCUSED);
+- if (!interior_focus) {
+- /* Indent the border a little bit if we have exterior focus
+- (this is what GTK does to draw native entries) */
+- x += focus_width;
+- y += focus_width;
+- width -= 2 * focus_width;
+- height -= 2 * focus_width;
+- }
+ }
+
+ if (state->disabled) {
+@@ -1520,11 +1438,6 @@ moz_gtk_entry_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+ gtk_render_frame(style, cr, x, y, width, height);
+
+- if (state->focused && !state->disabled) {
+- if (!interior_focus) {
+- gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height);
+- }
+- }
+ gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+@@ -1829,8 +1742,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+ GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
+ GtkStyleContext* style;
+ GtkWidget *widget;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+
+ if (isradio) {
+ ensure_radiobutton_widget();
+@@ -1843,7 +1754,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+
+ style = gtk_widget_get_style_context(widget);
+ gtk_style_context_save(style);
+- moz_gtk_widget_get_focus(widget, &interior_focus, &focus_width, &focus_pad);
+ gtk_style_context_set_state(style, state_flags);
+
+ /* this is for drawing a prelight box */
+@@ -1852,10 +1762,6 @@ moz_gtk_container_paint(cairo_t *cr, GdkRectangle* rect,
+ rect->x, rect->y, rect->width, rect->height);
+ }
+
+- if (state->focused && !interior_focus) {
+- gtk_render_focus(style, cr,
+- rect->x, rect->y, rect->width, rect->height);
+- }
+ gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+@@ -1868,7 +1774,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect,
+ {
+ GtkStyleContext *style;
+ GtkWidget *widget;
+- gboolean interior_focus;
+
+ if (!state->focused)
+ return MOZ_GTK_SUCCESS;
+@@ -1889,10 +1794,6 @@ moz_gtk_toggle_label_paint(cairo_t *cr, GdkRectangle* rect,
+ }
+ gtk_widget_set_direction(widget, direction);
+
+- gtk_widget_style_get(widget, "interior-focus", &interior_focus, NULL);
+- if (!interior_focus)
+- return MOZ_GTK_SUCCESS;
+-
+ gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state));
+ gtk_render_focus(style, cr,
+ rect->x, rect->y, rect->width, rect->height);
+@@ -2105,6 +2015,9 @@ moz_gtk_get_tab_thickness(void)
+ GtkStyleContext * style;
+
+ ensure_tab_widget();
++ if (!notebook_has_tab_gap)
++ return 0; /* tabs do not overdraw the tabpanel border with "no gap" style */
++
+ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_NOTEBOOK);
+ gtk_style_context_get_border(style, 0, &border);
+@@ -2150,7 +2063,7 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+ ensure_tab_widget();
+ gtk_widget_set_direction(gTabWidget, direction);
+
+- style = gtk_widget_get_style_context(gTabWidget);
++ style = gtk_widget_get_style_context(gTabWidget);
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+@@ -2167,143 +2080,155 @@ moz_gtk_tab_paint(cairo_t *cr, GdkRectangle* rect,
+
+ focusRect = backRect = tabRect;
+
+- if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
+- /* Only draw the tab */
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width, tabRect.height,
+- (flags & MOZ_GTK_TAB_BOTTOM) ?
+- GTK_POS_TOP : GTK_POS_BOTTOM );
+- } else {
+- /* Draw the tab and the gap
+- * We want the gap to be positioned exactly on the tabpanel top
+- * border; since tabbox.css may set a negative margin so that the tab
+- * frame rect already overlaps the tabpanel frame rect, we need to take
+- * that into account when drawing. To that effect, nsNativeThemeGTK
+- * passes us this negative margin (bmargin in the graphic below) in the
+- * lowest bits of |flags|. We use it to set gap_voffset, the distance
+- * between the top of the gap and the bottom of the tab (resp. the
+- * bottom of the gap and the top of the tab when we draw a bottom tab),
+- * while ensuring that the gap always touches the border of the tab,
+- * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
+- * with big negative or positive margins.
+- * Here is a graphical explanation in the case of top tabs:
+- * ___________________________
+- * / \
+- * | T A B |
+- * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
+- * : ^ bmargin : ^
+- * : | (-negative margin, : |
+- * bottom : v passed in flags) : | gap_height
+- * of -> :.............................: | (the size of the
+- * the tab . part of the gap . | tabpanel top border)
+- * . outside of the tab . v
+- * ----------------------------------------------
+- *
+- * To draw the gap, we use gtk_paint_box_gap(), see comment in
+- * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
+- * which should suffice to ensure that the only visible border is the
+- * pierced one. If the tab is in the middle, we make the box_gap begin
+- * a bit to the left of the tab and end a bit to the right, adjusting
+- * the gap position so it still is under the tab, because we want the
+- * rendering of a gap in the middle of a tabpanel. This is the role of
+- * the gints gap_{l,r}_offset. On the contrary, if the tab is the
+- * first, we align the start border of the box_gap with the start
+- * border of the tab (left if LTR, right if RTL), by setting the
+- * appropriate offset to 0.*/
+- gint gap_loffset, gap_roffset, gap_voffset, gap_height;
+-
+- /* Get height needed by the gap */
+- gap_height = moz_gtk_get_tab_thickness();
+-
+- /* Extract gap_voffset from the first bits of flags */
+- gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
+- if (gap_voffset > gap_height)
+- gap_voffset = gap_height;
+-
+- /* Set gap_{l,r}_offset to appropriate values */
+- gap_loffset = gap_roffset = 20; /* should be enough */
+- if (flags & MOZ_GTK_TAB_FIRST) {
+- if (direction == GTK_TEXT_DIR_RTL)
+- gap_roffset = initial_gap;
+- else
+- gap_loffset = initial_gap;
+- }
+-
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- /* Draw the tab on bottom */
+- focusRect.y += gap_voffset;
+- focusRect.height -= gap_voffset;
+-
++ if (notebook_has_tab_gap) {
++ if ((flags & MOZ_GTK_TAB_SELECTED) == 0) {
++ /* Only draw the tab */
+ gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y + gap_voffset, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_TOP);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (gap_voffset - gap_height);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + gap_voffset - 3 * gap_height,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_BOTTOM,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ tabRect.x, tabRect.y, tabRect.width, tabRect.height,
++ (flags & MOZ_GTK_TAB_BOTTOM) ?
++ GTK_POS_TOP : GTK_POS_BOTTOM );
+ } else {
+- /* Draw the tab on top */
+- focusRect.height -= gap_voffset;
+- gtk_render_extension(style, cr,
+- tabRect.x, tabRect.y, tabRect.width,
+- tabRect.height - gap_voffset, GTK_POS_BOTTOM);
+-
+- gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
+-
+- backRect.y += (tabRect.height - gap_voffset);
+- backRect.height = gap_height;
+-
+- /* Draw the gap; erase with background color before painting in
+- * case theme does not */
+- gtk_render_background(style, cr, backRect.x, backRect.y,
+- backRect.width, backRect.height);
+-
+- cairo_save(cr);
+- cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
+- cairo_clip(cr);
+-
+- gtk_render_frame_gap(style, cr,
+- tabRect.x - gap_loffset,
+- tabRect.y + tabRect.height - gap_voffset,
+- tabRect.width + gap_loffset + gap_roffset,
+- 3 * gap_height, GTK_POS_TOP,
+- gap_loffset, gap_loffset + tabRect.width);
+- cairo_restore(cr);
++ /* Draw the tab and the gap
++ * We want the gap to be positioned exactly on the tabpanel top
++ * border; since tabbox.css may set a negative margin so that the tab
++ * frame rect already overlaps the tabpanel frame rect, we need to take
++ * that into account when drawing. To that effect, nsNativeThemeGTK
++ * passes us this negative margin (bmargin in the graphic below) in the
++ * lowest bits of |flags|. We use it to set gap_voffset, the distance
++ * between the top of the gap and the bottom of the tab (resp. the
++ * bottom of the gap and the top of the tab when we draw a bottom tab),
++ * while ensuring that the gap always touches the border of the tab,
++ * i.e. 0 <= gap_voffset <= gap_height, to avoid surprinsing results
++ * with big negative or positive margins.
++ * Here is a graphical explanation in the case of top tabs:
++ * ___________________________
++ * / \
++ * | T A B |
++ * ----------|. . . . . . . . . . . . . . .|----- top of tabpanel
++ * : ^ bmargin : ^
++ * : | (-negative margin, : |
++ * bottom : v passed in flags) : | gap_height
++ * of -> :.............................: | (the size of the
++ * the tab . part of the gap . | tabpanel top border)
++ * . outside of the tab . v
++ * ----------------------------------------------
++ *
++ * To draw the gap, we use gtk_paint_box_gap(), see comment in
++ * moz_gtk_tabpanels_paint(). This box_gap is made 3 * gap_height tall,
++ * which should suffice to ensure that the only visible border is the
++ * pierced one. If the tab is in the middle, we make the box_gap begin
++ * a bit to the left of the tab and end a bit to the right, adjusting
++ * the gap position so it still is under the tab, because we want the
++ * rendering of a gap in the middle of a tabpanel. This is the role of
++ * the gints gap_{l,r}_offset. On the contrary, if the tab is the
++ * first, we align the start border of the box_gap with the start
++ * border of the tab (left if LTR, right if RTL), by setting the
++ * appropriate offset to 0.*/
++ gint gap_loffset, gap_roffset, gap_voffset, gap_height;
++
++ /* Get height needed by the gap */
++ gap_height = moz_gtk_get_tab_thickness();
++
++ /* Extract gap_voffset from the first bits of flags */
++ gap_voffset = flags & MOZ_GTK_TAB_MARGIN_MASK;
++ if (gap_voffset > gap_height)
++ gap_voffset = gap_height;
++
++ /* Set gap_{l,r}_offset to appropriate values */
++ gap_loffset = gap_roffset = 20; /* should be enough */
++ if (flags & MOZ_GTK_TAB_FIRST) {
++ if (direction == GTK_TEXT_DIR_RTL)
++ gap_roffset = initial_gap;
++ else
++ gap_loffset = initial_gap;
++ }
++
++ if (flags & MOZ_GTK_TAB_BOTTOM) {
++ /* Draw the tab on bottom */
++ focusRect.y += gap_voffset;
++ focusRect.height -= gap_voffset;
++
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y + gap_voffset, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_TOP);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (gap_voffset - gap_height);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + gap_voffset - 3 * gap_height,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_BOTTOM,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ } else {
++ /* Draw the tab on top */
++ focusRect.height -= gap_voffset;
++ gtk_render_extension(style, cr,
++ tabRect.x, tabRect.y, tabRect.width,
++ tabRect.height - gap_voffset, GTK_POS_BOTTOM);
++
++ gtk_style_context_remove_region(style, GTK_STYLE_REGION_TAB);
++
++ backRect.y += (tabRect.height - gap_voffset);
++ backRect.height = gap_height;
++
++ /* Draw the gap; erase with background color before painting in
++ * case theme does not */
++ gtk_render_background(style, cr, backRect.x, backRect.y,
++ backRect.width, backRect.height);
++
++ cairo_save(cr);
++ cairo_rectangle(cr, backRect.x, backRect.y, backRect.width, backRect.height);
++ cairo_clip(cr);
++
++ gtk_render_frame_gap(style, cr,
++ tabRect.x - gap_loffset,
++ tabRect.y + tabRect.height - gap_voffset,
++ tabRect.width + gap_loffset + gap_roffset,
++ 3 * gap_height, GTK_POS_TOP,
++ gap_loffset, gap_loffset + tabRect.width);
++ cairo_restore(cr);
++ }
+ }
++ } else {
++ gtk_render_background(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
++ gtk_render_frame(style, cr, tabRect.x, tabRect.y, tabRect.width, tabRect.height);
+ }
+
++ gtk_style_context_restore(style);
++
+ if (state->focused) {
+ /* Paint the focus ring */
+- GtkBorder border;
+- gtk_style_context_get_border(style, GetStateFlagsFromGtkWidgetState(state), &border);
++ GtkBorder padding;
++
++ gtk_style_context_save(style);
++ moz_gtk_tab_prepare_style_context(style, flags);
+
+- focusRect.x += border.left;
+- focusRect.width -= (border.left + border.right);
+- focusRect.y += border.top;
+- focusRect.height -= (border.top + border.bottom);
++ gtk_style_context_get_padding(style, GetStateFlagsFromGtkWidgetState(state), &padding);
++
++ focusRect.x += padding.left;
++ focusRect.width -= (padding.left + padding.right);
++ focusRect.y += padding.top;
++ focusRect.height -= (padding.top + padding.bottom);
+
+ gtk_render_focus(style, cr,
+ focusRect.x, focusRect.y, focusRect.width, focusRect.height);
++
++ gtk_style_context_restore(style);
+ }
+
+- gtk_style_context_restore(style);
+
+ return MOZ_GTK_SUCCESS;
+ }
+@@ -2684,26 +2609,18 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ switch (widget) {
+ case MOZ_GTK_BUTTON:
+ {
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+ ensure_button_widget();
++ style = gtk_widget_get_style_context(gButtonWidget);
++
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gButtonWidget));
+
+ /* Don't add this padding in HTML, otherwise the buttons will
+ become too big and stuff the layout. */
+ if (!inhtml) {
+- moz_gtk_widget_get_focus(gButtonWidget, &interior_focus, &focus_width, &focus_pad);
+- moz_gtk_button_get_inner_border(gButtonWidget, &inner_border);
+- *left += focus_width + focus_pad + inner_border.left;
+- *right += focus_width + focus_pad + inner_border.right;
+- *top += focus_width + focus_pad + inner_border.top;
+- *bottom += focus_width + focus_pad + inner_border.bottom;
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ }
+
+- moz_gtk_add_style_border(gtk_widget_get_style_context(gButtonWidget),
+- left, top, right, bottom);
++ moz_gtk_add_style_border(style, left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_ENTRY:
+@@ -2717,7 +2610,13 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ ensure_entry_widget();
+ style = gtk_widget_get_style_context(gEntryWidget);
+ moz_gtk_add_style_border(style, left, top, right, bottom);
+- moz_gtk_add_style_padding(style, left, top, right, bottom);
++
++ /* Use the document padding in HTML
++ and GTK style padding in XUL. */
++ if (!inhtml) {
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
++ }
++
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_TREEVIEW:
+@@ -2737,23 +2636,15 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ * assigned.
+ * That is why the following code is the same as for MOZ_GTK_BUTTON.
+ * */
+-
+- GtkBorder inner_border;
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
++ GtkStyleContext *style;
+
+ ensure_tree_header_cell_widget();
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(gTreeHeaderCellWidget));
+
+- moz_gtk_widget_get_focus(gTreeHeaderCellWidget, &interior_focus, &focus_width, &focus_pad);
+- moz_gtk_button_get_inner_border(gTreeHeaderCellWidget, &inner_border);
+- *left += focus_width + focus_pad + inner_border.left;
+- *right += focus_width + focus_pad + inner_border.right;
+- *top += focus_width + focus_pad + inner_border.top;
+- *bottom += focus_width + focus_pad + inner_border.bottom;
+-
+- moz_gtk_add_style_border(gtk_widget_get_style_context(gTreeHeaderCellWidget),
+- left, top, right, bottom);
++ style = gtk_widget_get_style_context(gTreeHeaderCellWidget);
++
++ moz_gtk_add_style_border(style, left, top, right, bottom);
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_TREE_HEADER_SORTARROW:
+@@ -2773,29 +2664,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ /* We need to account for the arrow on the dropdown, so text
+ * doesn't come too close to the arrow, or in some cases spill
+ * into the arrow. */
+- gboolean ignored_interior_focus, wide_separators;
+- gint focus_width, focus_pad, separator_width;
++ gboolean wide_separators;
++ gint separator_width;
+ GtkRequisition arrow_req;
+ GtkBorder border;
+
+ ensure_combo_box_widgets();
+
+- *left = gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget));
++ *left = *top = *right = *bottom =
++ gtk_container_get_border_width(GTK_CONTAINER(gComboBoxButtonWidget));
++
++ style = gtk_widget_get_style_context(gComboBoxButtonWidget);
+
+ if (!inhtml) {
+- moz_gtk_widget_get_focus(gComboBoxButtonWidget,
+- &ignored_interior_focus,
+- &focus_width, &focus_pad);
+- *left += focus_width + focus_pad;
++ moz_gtk_add_style_padding(style, left, top, right, bottom);
+ }
+
+- style = gtk_widget_get_style_context(gComboBoxButtonWidget);
+- gtk_style_context_get_border(style, 0, &border);
+-
+- *top = *left + border.top;
+- *left += border.left;
+-
+- *right = *left; *bottom = *top;
++ moz_gtk_add_style_border(style, left, top, right, bottom);
+
+ /* If there is no separator, don't try to count its width. */
+ separator_width = 0;
+@@ -2847,60 +2732,23 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ ensure_frame_widget();
+ w = gFrameWidget;
+ break;
+- case MOZ_GTK_CHECKBUTTON_LABEL:
+- case MOZ_GTK_RADIOBUTTON_LABEL:
+- {
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- /* If the focus is interior, then the label has a border of
+- (focus_width + focus_pad). */
+- if (widget == MOZ_GTK_CHECKBUTTON_LABEL) {
+- ensure_checkbox_widget();
+- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+- &focus_width, &focus_pad);
+- }
+- else {
+- ensure_radiobutton_widget();
+- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+- &focus_width, &focus_pad);
+- }
+-
+- if (interior_focus)
+- *left = *top = *right = *bottom = (focus_width + focus_pad);
+-
+- return MOZ_GTK_SUCCESS;
+- }
+-
+ case MOZ_GTK_CHECKBUTTON_CONTAINER:
+ case MOZ_GTK_RADIOBUTTON_CONTAINER:
+ {
+- gboolean interior_focus;
+- gint focus_width, focus_pad;
+-
+- /* If the focus is _not_ interior, then the container has a border
+- of (focus_width + focus_pad). */
+ if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) {
+ ensure_checkbox_widget();
+- moz_gtk_widget_get_focus(gCheckboxWidget, &interior_focus,
+- &focus_width, &focus_pad);
+ w = gCheckboxWidget;
+ } else {
+ ensure_radiobutton_widget();
+- moz_gtk_widget_get_focus(gRadiobuttonWidget, &interior_focus,
+- &focus_width, &focus_pad);
+ w = gRadiobuttonWidget;
+ }
++ style = gtk_widget_get_style_context(w);
+
+ *left = *top = *right = *bottom = gtk_container_get_border_width(GTK_CONTAINER(w));
+-
+- if (!interior_focus) {
+- *left += (focus_width + focus_pad);
+- *right += (focus_width + focus_pad);
+- *top += (focus_width + focus_pad);
+- *bottom += (focus_width + focus_pad);
+- }
+-
++ moz_gtk_add_style_border(style,
++ left, top, right, bottom);
++ moz_gtk_add_style_padding(style,
++ left, top, right, bottom);
+ return MOZ_GTK_SUCCESS;
+ }
+ case MOZ_GTK_MENUPOPUP:
+@@ -2927,6 +2775,8 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
+ return MOZ_GTK_SUCCESS;
+ }
+ /* These widgets have no borders, since they are not containers. */
++ case MOZ_GTK_CHECKBUTTON_LABEL:
++ case MOZ_GTK_RADIOBUTTON_LABEL:
+ case MOZ_GTK_SPLITTER_HORIZONTAL:
+ case MOZ_GTK_SPLITTER_VERTICAL:
+ case MOZ_GTK_CHECKBUTTON:
+@@ -2975,11 +2849,7 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ gtk_style_context_save(style);
+ moz_gtk_tab_prepare_style_context(style, flags);
+
+- // TODO add_style_border() should be replaced
+- // with focus-line-width and focus-padding
+- // see Bug 877605
+ *left = *top = *right = *bottom = 0;
+- moz_gtk_add_style_border(style, left, top, right, bottom);
+ moz_gtk_add_style_padding(style, left, top, right, bottom);
+
+ gtk_widget_style_get (gTabWidget, "tab-curvature", &tab_curvature, NULL);
+@@ -2990,16 +2860,9 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
+ int initial_gap;
+ gtk_widget_style_get (gTabWidget, "initial-gap", &initial_gap, NULL);
+ if (direction == GTK_TEXT_DIR_RTL)
+- *right += initial_gap;
++ *right += initial_gap;
+ else
+- *left += initial_gap;
+- }
+-
+- // Top tabs have no bottom border, bottom tabs have no top border
+- if (flags & MOZ_GTK_TAB_BOTTOM) {
+- *top = 0;
+- } else {
+- *bottom = 0;
++ *left += initial_gap;
+ }
+
+ gtk_style_context_restore(style);
+diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h
+index 1938e8f..5f71cfd 100644
+--- mozilla/widget/gtk/gtkdrawing.h
++++ mozilla/widget/gtk/gtkdrawing.h
+@@ -293,16 +293,6 @@ moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing);
+ gint
+ moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing);
+
+-/**
+- * Get the inner-border value for a GtkButton widget (button or tree header)
+- * widget: [IN] the widget to get the border value for
+- * inner_border: [OUT] the inner border
+- *
+- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
+- */
+-gint
+-moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border);
+-
+ /** Get the extra size for the focus ring for outline:auto.
+ * widget: [IN] the widget to get the focus metrics for
+ * focus_h_width: [OUT] the horizontal width
+@@ -313,19 +303,6 @@ moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border);
+ gint
+ moz_gtk_get_focus_outline_size(gint* focus_h_width, gint* focus_v_width);
+
+-/** Get the focus metrics for a treeheadercell, button, checkbox, or radio button.
+- * widget: [IN] the widget to get the focus metrics for
+- * interior_focus: [OUT] whether the focus is drawn around the
+- * label (TRUE) or around the whole container (FALSE)
+- * focus_width: [OUT] the width of the focus line
+- * focus_pad: [OUT] the padding between the focus line and children
+- *
+- * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise
+- */
+-gint
+-moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus,
+- gint* focus_width, gint* focus_pad);
+-
+ /** Get the horizontal padding for the menuitem widget or checkmenuitem widget.
+ * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem
+ *
+diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index e5e1867..76d28e3 100644
+--- mozilla/widget/gtk/nsNativeThemeGTK.cpp
++++ mozilla/widget/gtk/nsNativeThemeGTK.cpp
+@@ -761,6 +761,8 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType,
+ return false;
+
+ gint gap_height = moz_gtk_get_tab_thickness();
++ if (!gap_height)
++ return false;
+
+ int32_t extra = gap_height - GetTabMarginPixels(aFrame);
+ if (extra <= 0)
diff --git a/mail/thunderbird/files/patch-bug1073709 b/mail/thunderbird/files/patch-bug1073709
deleted file mode 100644
index 054ed2725747..000000000000
--- a/mail/thunderbird/files/patch-bug1073709
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git mfbt/Atomics.h mfbt/Atomics.h
-index 495a9d3..c7f7601 100644
---- mozilla/mfbt/Atomics.h
-+++ mozilla/mfbt/Atomics.h
-@@ -34,10 +34,12 @@
- * loose typing of the atomic builtins. GCC 4.5 and 4.6 lacks inline
- * definitions for unspecialized std::atomic and causes linking errors.
- * Therefore, we require at least 4.7.0 for using libstdc++.
-+ *
-+ * libc++ <atomic> is only functional with clang.
- */
- # if MOZ_USING_LIBSTDCXX && MOZ_LIBSTDCXX_VERSION_AT_LEAST(4, 7, 0)
- # define MOZ_HAVE_CXX11_ATOMICS
--# elif MOZ_USING_LIBCXX
-+# elif MOZ_USING_LIBCXX && defined(__clang__)
- # define MOZ_HAVE_CXX11_ATOMICS
- # endif
- /*
diff --git a/mail/thunderbird/files/patch-bug1082199 b/mail/thunderbird/files/patch-bug1082199
deleted file mode 100644
index e24fe4726c2c..000000000000
--- a/mail/thunderbird/files/patch-bug1082199
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 258ec90
-Author: Guilherme Goncalves <guilherme.p.gonc@gmail.com>
-Date: Fri Oct 17 15:55:00 2014 +0200
-
- Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium
----
- memory/build/mozjemalloc_compat.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
-index 78bb13a..70265a7 100644
---- mozilla/memory/build/mozjemalloc_compat.c
-+++ mozilla/memory/build/mozjemalloc_compat.c
-@@ -68,6 +68,12 @@ jemalloc_stats_impl(jemalloc_stats_t *stats)
- size_t active, allocated, mapped, page, pdirty;
- size_t lg_chunk;
-
-+ // Refresh jemalloc's stats by updating its epoch, see ctl_refresh in
-+ // src/ctl.c
-+ uint64_t epoch = 0;
-+ size_t esz = sizeof(epoch);
-+ int ret = je_(mallctl)("epoch", &epoch, &esz, &epoch, esz);
-+
- CTL_GET("arenas.narenas", narenas);
- CTL_GET("arenas.page", page);
- CTL_GET("stats.active", active);
diff --git a/mail/thunderbird/files/patch-bug1103858 b/mail/thunderbird/files/patch-bug1103858
deleted file mode 100644
index 71ce13eb116e..000000000000
--- a/mail/thunderbird/files/patch-bug1103858
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git configure.in configure.in
-index b2b45e7..dcfdfb7 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -8346,7 +8346,7 @@ case "$OS_TARGET" in
- NECKO_WIFI=1
- fi
- ;;
-- Darwin|FreeBSD|SunOS|WINNT)
-+ Darwin|DragonFly|FreeBSD|SunOS|WINNT)
- NECKO_WIFI=1
- ;;
- Linux)
-diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build
-index d4de063..3949380 100644
---- mozilla/netwerk/wifi/moz.build
-+++ mozilla/netwerk/wifi/moz.build
-@@ -35,7 +35,7 @@ if CONFIG['OS_ARCH'] == 'Darwin':
- UNIFIED_SOURCES += [
- 'osx_corewlan.mm',
- ]
--elif CONFIG['OS_ARCH'] == 'FreeBSD':
-+elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'):
- UNIFIED_SOURCES += [
- 'nsWifiScannerFreeBSD.cpp',
- ]
-diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp
-index bdf171e..4185d69 100644
---- mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-+++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -13,7 +13,11 @@
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/if_media.h>
-+#ifdef __DragonFly__
-+#include <netproto/802_11/ieee80211_ioctl.h>
-+#else
- #include <net80211/ieee80211_ioctl.h>
-+#endif
-
- #include <ifaddrs.h>
- #include <string.h>
diff --git a/mail/thunderbird/files/patch-bug1125579 b/mail/thunderbird/files/patch-bug1125579
deleted file mode 100644
index 970ae39eb184..000000000000
--- a/mail/thunderbird/files/patch-bug1125579
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/js/src/assembler/jit/ExecutableAllocator.h~
-+++ mozilla/js/src/assembler/jit/ExecutableAllocator.h
-@@ -454,6 +454,11 @@ public:
- {
- User::IMB_Range(code, static_cast<char*>(code) + size);
- }
-+#elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_FREEBSD || WTF_OS_NETBSD)
-+ static void cacheFlush(void* code, size_t size)
-+ {
-+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
-+ }
- #elif WTF_CPU_ARM_TRADITIONAL && WTF_OS_LINUX && WTF_COMPILER_RVCT
- static __asm void cacheFlush(void* code, size_t size);
- #elif WTF_CPU_ARM_TRADITIONAL && (WTF_OS_LINUX || WTF_OS_ANDROID) && WTF_COMPILER_GCC
diff --git a/mail/thunderbird/files/patch-bug1125580 b/mail/thunderbird/files/patch-bug1125580
deleted file mode 100644
index c1d9c563cc43..000000000000
--- a/mail/thunderbird/files/patch-bug1125580
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/js/src/jit/arm/Architecture-arm.cpp~
-+++ mozilla/js/src/jit/arm/Architecture-arm.cpp
-@@ -17,7 +17,7 @@
-
- #define HWCAP_USE_HARDFP_ABI (1 << 28)
-
--#if !(defined(ANDROID) || defined(MOZ_B2G)) && !defined(JS_ARM_SIMULATOR)
-+#if defined(__linux__) && !defined(ANDROID) && !defined(MOZ_B2G) && !defined(JS_ARM_SIMULATOR)
- #define HWCAP_ARMv7 (1 << 29)
- #include <asm/hwcap.h>
- #else
diff --git a/mail/thunderbird/files/patch-bug1130155 b/mail/thunderbird/files/patch-bug1130155
index ea5b87c9c727..31cf4f166fe8 100644
--- a/mail/thunderbird/files/patch-bug1130155
+++ b/mail/thunderbird/files/patch-bug1130155
@@ -82,7 +82,7 @@ index 9bbc129..e72944a 100644
/* This should never happen. */
if ((unsigned int) avail > stm->buffer_size) {
-@@ -355,17 +361,67 @@ alsa_refill_stream(cubeb_stream * stm)
+@@ -359,10 +365,11 @@ alsa_refill_stream(cubeb_stream * stm)
if (got < 0) {
pthread_mutex_unlock(&stm->mutex);
stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_ERROR);
@@ -90,15 +90,19 @@ index 9bbc129..e72944a 100644
return ERROR;
}
if (got > 0) {
-- snd_pcm_sframes_t wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
+- snd_pcm_sframes_t wrote;
++ snd_pcm_sframes_t wrote, towrite = got;
+
+ if (stm->params.format == CUBEB_SAMPLE_FLOAT32NE) {
+ float * b = (float *) p;
+@@ -375,14 +382,62 @@ alsa_refill_stream(cubeb_stream * stm)
+ b[i] *= stm->volume;
+ }
+ }
+- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
- if (wrote == -EPIPE) {
- WRAP(snd_pcm_recover)(stm->pcm, wrote, 1);
- wrote = WRAP(snd_pcm_writei)(stm->pcm, p, got);
-- }
-- assert(wrote >= 0 && wrote == got);
-- stm->write_position += wrote;
-- gettimeofday(&stm->last_activity, NULL);
-+ snd_pcm_sframes_t wrote, towrite = got;
+ for (;;) {
+ wrote = WRAP(snd_pcm_writei)(stm->pcm, p,
+ towrite > avail ? avail : towrite);
@@ -154,7 +158,10 @@ index 9bbc129..e72944a 100644
+ if (towrite == wrote)
+ break;
+ towrite -= wrote;
-+ }
+ }
+- assert(wrote >= 0 && wrote == got);
+- stm->write_position += wrote;
+- gettimeofday(&stm->last_activity, NULL);
}
if (got != avail) {
long buffer_fill = stm->buffer_size - (avail - got);
diff --git a/mail/thunderbird/files/patch-bug1138845 b/mail/thunderbird/files/patch-bug1138845
new file mode 100644
index 000000000000..b89897f8c9e5
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1138845
@@ -0,0 +1,134 @@
+commit 4b5b332
+Author: Mike Hommey <mh+mozilla@glandium.org>
+Date: Tue Mar 3 18:41:13 2015 +0900
+
+ Bug 1138845 - Don't require atk-bridge for gtk+3 builds. r=tbsaunde
+---
+ accessible/atk/Platform.cpp | 29 +++++++++++++++++++----------
+ config/system-headers | 1 -
+ configure.in | 2 +-
+ 3 files changed, 20 insertions(+), 12 deletions(-)
+
+diff --git accessible/atk/Platform.cpp accessible/atk/Platform.cpp
+index a2afd96..2ed5e0b 100644
+--- mozilla/accessible/atk/Platform.cpp
++++ mozilla/accessible/atk/Platform.cpp
+@@ -18,8 +18,9 @@
+ #include <dbus/dbus.h>
+ #endif
+ #include <gtk/gtk.h>
++
+ #if (MOZ_WIDGET_GTK == 3)
+-#include <atk-bridge.h>
++extern "C" __attribute__((weak,visibility("default"))) int atk_bridge_adaptor_init(int*, char **[]);
+ #endif
+
+ using namespace mozilla;
+@@ -46,7 +47,6 @@ static gulong sToplevel_hide_hook = 0;
+
+ GType g_atk_hyperlink_impl_type = G_TYPE_INVALID;
+
+-#if (MOZ_WIDGET_GTK == 2)
+ struct GnomeAccessibilityModule
+ {
+ const char *libName;
+@@ -67,11 +67,13 @@ static GnomeAccessibilityModule sAtkBridge = {
+ "gnome_accessibility_module_shutdown", nullptr
+ };
+
++#if (MOZ_WIDGET_GTK == 2)
+ static GnomeAccessibilityModule sGail = {
+ "libgail.so", nullptr,
+ "gnome_accessibility_module_init", nullptr,
+ "gnome_accessibility_module_shutdown", nullptr
+ };
++#endif
+
+ static nsresult
+ LoadGtkModule(GnomeAccessibilityModule& aModule)
+@@ -98,7 +100,11 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
+ else
+ subLen = loc2 - loc1;
+ nsAutoCString sub(Substring(libPath, loc1, subLen));
++#if (MOZ_WIDGET_GTK == 2)
+ sub.AppendLiteral("/gtk-2.0/modules/");
++#else
++ sub.AppendLiteral("/gtk-3.0/modules/");
++#endif
+ sub.Append(aModule.libName);
+ aModule.lib = PR_LoadLibrary(sub.get());
+ if (aModule.lib)
+@@ -123,7 +129,6 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
+ }
+ return NS_OK;
+ }
+-#endif // (MOZ_WIDGET_GTK == 2)
+
+ void
+ a11y::PlatformInit()
+@@ -175,14 +180,17 @@ a11y::PlatformInit()
+
+ // Init atk-bridge now
+ PR_SetEnv("NO_AT_BRIDGE=0");
+-#if (MOZ_WIDGET_GTK == 2)
+- rv = LoadGtkModule(sAtkBridge);
+- if (NS_SUCCEEDED(rv)) {
+- (*sAtkBridge.init)();
+- }
+-#else
+- atk_bridge_adaptor_init(nullptr, nullptr);
++#if (MOZ_WIDGET_GTK == 3)
++ if (atk_bridge_adaptor_init) {
++ atk_bridge_adaptor_init(nullptr, nullptr);
++ } else
+ #endif
++ {
++ nsresult rv = LoadGtkModule(sAtkBridge);
++ if (NS_SUCCEEDED(rv)) {
++ (*sAtkBridge.init)();
++ }
++ }
+
+ if (!sToplevel_event_hook_added) {
+ sToplevel_event_hook_added = true;
+@@ -210,7 +218,6 @@ a11y::PlatformShutdown()
+ sToplevel_hide_hook);
+ }
+
+-#if (MOZ_WIDGET_GTK == 2)
+ if (sAtkBridge.lib) {
+ // Do not shutdown/unload atk-bridge,
+ // an exit function registered will take care of it
+@@ -221,6 +228,7 @@ a11y::PlatformShutdown()
+ sAtkBridge.init = nullptr;
+ sAtkBridge.shutdown = nullptr;
+ }
++#if (MOZ_WIDGET_GTK == 2)
+ if (sGail.lib) {
+ // Do not shutdown gail because
+ // 1) Maybe it's not init-ed by us. e.g. GtkEmbed
+diff --git config/system-headers config/system-headers
+index 2c94a7d..cf01775 100644
+--- mozilla/config/system-headers
++++ mozilla/config/system-headers
+@@ -189,7 +189,6 @@ asm/signal.h
+ ASRegistry.h
+ assert.h
+ atk/atk.h
+-atk-bridge.h
+ atlcom.h
+ atlconv.h
+ atlctl.cpp
+diff --git configure.in configure.in
+index 0bd1eb7..f3b3365 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -4408,7 +4408,7 @@ fi
+
+ if test "$COMPILE_ENVIRONMENT"; then
+ if test "$MOZ_ENABLE_GTK3"; then
+- PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 atk-bridge-2.0 $GDK_PACKAGES)
++ PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES)
+ MOZ_GTK3_CFLAGS="-I${_topsrcdir}/widget/gtk/compat-gtk3 $MOZ_GTK3_CFLAGS"
+ dnl Contrary to MOZ_GTK2_LIBS, MOZ_GTK3_LIBS needs to be literally added to TK_LIBS instead
+ dnl of a make reference because of how TK_LIBS is mangled in toolkit/library/moz.build
diff --git a/mail/thunderbird/files/patch-bug1143686 b/mail/thunderbird/files/patch-bug1143686
new file mode 100644
index 000000000000..5ef6a842ae0f
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1143686
@@ -0,0 +1,46 @@
+commit e50e738
+Author: Martin Stransky <stransky@redhat.com>
+Date: Mon Mar 16 08:00:00 2015 -0400
+
+ Bug 1143686 - Gtk3 - Render scrollbar thumb with margin. r=karlt
+---
+ widget/gtk/gtk3drawing.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git widget/gtk/gtk3drawing.c widget/gtk/gtk3drawing.c
+index 17f46ab..08a58d6 100644
+--- mozilla/widget/gtk/gtk3drawing.c
++++ mozilla/widget/gtk/gtk3drawing.c
+@@ -1230,6 +1230,7 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
+ GtkStyleContext* style;
+ GtkScrollbar *scrollbar;
+ GtkAdjustment *adj;
++ GtkBorder margin;
+
+ ensure_scrollbar_widget();
+
+@@ -1239,15 +1240,20 @@ moz_gtk_scrollbar_thumb_paint(GtkThemeWidgetType widget,
+ scrollbar = GTK_SCROLLBAR(gVertScrollbarWidget);
+
+ gtk_widget_set_direction(GTK_WIDGET(scrollbar), direction);
+-
++
+ style = gtk_widget_get_style_context(GTK_WIDGET(scrollbar));
+ gtk_style_context_save(style);
+-
++
+ gtk_style_context_add_class(style, GTK_STYLE_CLASS_SLIDER);
+ gtk_style_context_set_state(style, state_flags);
+
+- gtk_render_slider(style, cr, rect->x, rect->y,
+- rect->width, rect->height,
++ gtk_style_context_get_margin (style, state_flags, &margin);
++
++ gtk_render_slider(style, cr,
++ rect->x + margin.left,
++ rect->y + margin.top,
++ rect->width - margin.left - margin.right,
++ rect->height - margin.top - margin.bottom,
+ (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL) ?
+ GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
+
diff --git a/mail/thunderbird/files/patch-bug1144643 b/mail/thunderbird/files/patch-bug1144643
new file mode 100644
index 000000000000..02e868712194
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1144643
@@ -0,0 +1,33 @@
+commit a0ccc19
+Author: Martin Stransky <stransky@redhat.com>
+Date: Wed Mar 18 07:14:00 2015 -0400
+
+ Bug 1144643 - Render tooltips as transparent on Gtk3. r=karlt
+
+ --HG--
+ extra : rebase_source : 23085532b27350ca71cbe18db071628388003f33
+---
+ widget/gtk/nsNativeThemeGTK.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp
+index e5e1867..26d13a5 100644
+--- mozilla/widget/gtk/nsNativeThemeGTK.cpp
++++ mozilla/widget/gtk/nsNativeThemeGTK.cpp
+@@ -1528,9 +1528,15 @@ nsNativeThemeGTK::GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType)
+ case NS_THEME_MENUPOPUP:
+ case NS_THEME_WINDOW:
+ case NS_THEME_DIALOG:
+- // Tooltips use gtk_paint_flat_box().
++ return eOpaque;
++ // Tooltips use gtk_paint_flat_box() on Gtk2
++ // but are shaped on Gtk3
+ case NS_THEME_TOOLTIP:
++#if (MOZ_WIDGET_GTK == 2)
+ return eOpaque;
++#else
++ return eTransparent;
++#endif
+ }
+
+ return eUnknownTransparency;
diff --git a/mail/thunderbird/files/patch-bug702179 b/mail/thunderbird/files/patch-bug702179
index 9f6977c5225e..c447cddef219 100644
--- a/mail/thunderbird/files/patch-bug702179
+++ b/mail/thunderbird/files/patch-bug702179
@@ -4,33 +4,21 @@ Date: Wed Nov 30 07:23:46 2011 +0800
Bug 702179 dtrace probes are not installed on Solaris with static js lib r=glandium
---
- configure.in | 2 +-
- js/src/Makefile.in | 2 --
- 2 files changed, 1 insertion(+), 3 deletions(-)
+ js/src/Makefile.in | 3 ---
+ toolkit/library/moz.build | 5 -----
+ 2 files changed, 8 deletions(-)
-diff --git configure.in configure.in
-index 66549c1..75b848d 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -966,7 +966,7 @@ MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)'
- MOZ_PNG_CFLAGS="-I$_objdir/dist/include" # needed for freetype compilation
- MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
-
--MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
-+MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(DEPTH)/js/src)'
- MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
- MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
- XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/bin)'
diff --git js/src/Makefile.in js/src/Makefile.in
-index e28160a..28ca5e8 100644
+index 62bbfa0..90400cb 100644
--- mozilla/js/src/Makefile.in
+++ mozilla/js/src/Makefile.in
-@@ -18,8 +18,6 @@ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
- STATIC_LIBRARY_NAME = js_static
- LIBS = $(NSPR_LIBS)
+@@ -17,9 +17,6 @@ TOPLEVEL_BUILD := 1
+ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
+ EXTRA_LIBS += $(NSPR_LIBS)
-DIST_INSTALL = 1
+-NO_EXPAND_LIBS = 1
-
- ifdef JS_STANDALONE
- SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
- ifndef MOZ_NATIVE_ZLIB
+ ifdef JS_HAS_CTYPES
+ ifdef MOZ_NATIVE_FFI
+ LOCAL_INCLUDES = $(MOZ_FFI_CFLAGS)
diff --git a/mail/thunderbird/files/patch-bug779713 b/mail/thunderbird/files/patch-bug779713
index 5137460a022c..aa2882a9a41c 100644
--- a/mail/thunderbird/files/patch-bug779713
+++ b/mail/thunderbird/files/patch-bug779713
@@ -1,3 +1,5 @@
+diff --git mfbt/Alignment.h mfbt/Alignment.h
+index e0843ca..353ec36 100644
--- mozilla/mfbt/Alignment.h
+++ mozilla/mfbt/Alignment.h
@@ -9,11 +9,20 @@
@@ -45,7 +47,15 @@ diff --git mfbt/Attributes.h mfbt/Attributes.h
index d317766..ddb13da 100644
--- mozilla/mfbt/Attributes.h
+++ mozilla/mfbt/Attributes.h
-@@ -54,6 +54,9 @@
+@@ -50,6 +50,7 @@
+ * don't indicate support for them here, due to
+ * http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug
+ */
++# define MOZ_HAVE_CXX11_ALIGNAS
+ # define MOZ_HAVE_NEVER_INLINE __declspec(noinline)
+ # define MOZ_HAVE_NORETURN __declspec(noreturn)
+ # ifdef __clang__
+@@ -70,6 +71,9 @@
# ifndef __has_extension
# define __has_extension __has_feature /* compatibility, for older versions of clang */
# endif
@@ -55,21 +65,13 @@ index d317766..ddb13da 100644
# if __has_extension(cxx_constexpr)
# define MOZ_HAVE_CXX11_CONSTEXPR
# endif
-@@ -75,6 +78,9 @@
+@@ -84,6 +88,9 @@
# endif
#elif defined(__GNUC__)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
+# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
+# define MOZ_HAVE_CXX11_ALIGNAS
+# endif
- # if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
- # define MOZ_HAVE_CXX11_OVERRIDE
- # define MOZ_HAVE_CXX11_FINAL final
-@@ -96,6 +102,7 @@
- # define MOZ_HAVE_NORETURN __attribute__((noreturn))
- #elif defined(_MSC_VER)
- # if _MSC_VER >= 1800
-+# define MOZ_HAVE_CXX11_ALIGNAS
- # define MOZ_HAVE_CXX11_DELETE
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # define MOZ_HAVE_EXPLICIT_CONVERSION
# endif
- # if _MSC_VER >= 1700
diff --git a/mail/thunderbird/files/patch-bug826985 b/mail/thunderbird/files/patch-bug826985
index e835451598aa..17f156b95ad7 100644
--- a/mail/thunderbird/files/patch-bug826985
+++ b/mail/thunderbird/files/patch-bug826985
@@ -51,18 +51,18 @@ index b483cd1..f1dd1f0 100644
# basic stuff for everything
'include_internal_video_render': 0,
'clang_use_chrome_plugins': 0,
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
index b483cd1..f1dd1f0 100644
---- mozilla/media/webrtc/signaling/test/Makefile.in
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -7,6 +7,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) \
+--- mozilla/media/webrtc/signaling/test/moz.build
++++ mozilla/media/webrtc/signaling/test/moz.build
+@@ -122,6 +122,7 @@ if CONFIG['JS_SHARED_LIBRARY']:
+ 'js',
+ ]
+
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+
diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
index 239a292..bab496c 100644
--- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
@@ -145,35 +145,35 @@ index d46b5aa..e452223 100644
'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',
-+ ],
-+ }],
+@@ -69,6 +72,19 @@
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+ ],
++ 'conditions': [
++ ['use_libv4l2==1', {
++ 'defines': [
++ 'HAVE_LIBV4L2',
++ ],
++ 'cflags_mozilla': [
++ '$(MOZ_LIBV4L2_CFLAGS)',
+ ],
- 'include_dirs': [
- 'linux',
- ],
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
++ 'libraries': [
++ '-lv4l2',
++ ],
++ }],
++ ],
+ }], # linux
+ ['OS=="mac"', {
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
index 9c16ffa..1db3794 100644
---- mozilla/toolkit/library/libxul.mk
-+++ mozilla/toolkit/library/libxul.mk
-@@ -182,6 +182,10 @@ endif
+--- mozilla/toolkit/library/moz.build
++++ mozilla/toolkit/library/moz.build
+@@ -163,6 +163,7 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF
+ ]
- EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
+ OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS']
++OS_LIBS += CONFIG['MOZ_LIBV4L2_LIBS']
+ OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
+ OS_LIBS += CONFIG['MOZ_APP_EXTRA_LIBS']
-+ifdef MOZ_LIBV4L2_LIBS
-+EXTRA_DSO_LDOPTS += $(MOZ_LIBV4L2_LIBS)
-+endif
-+
- ifdef MOZ_WEBRTC
- ifeq (WINNT,$(OS_TARGET))
- EXTRA_DSO_LDOPTS += \
diff --git a/mail/thunderbird/files/patch-bug847568 b/mail/thunderbird/files/patch-bug847568
index 2eb54438a5b6..411d21636663 100644
--- a/mail/thunderbird/files/patch-bug847568
+++ b/mail/thunderbird/files/patch-bug847568
@@ -4,7 +4,7 @@ diff --git config/Makefile.in config/Makefile.in
index 14bfc0d..5383399 100644
--- mozilla/config/Makefile.in
+++ mozilla/config/Makefile.in
-@@ -77,6 +77,8 @@ export:: $(export-preqs)
+@@ -75,6 +75,8 @@ export:: $(export-preqs)
-DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
@@ -17,7 +17,7 @@ diff --git config/system-headers config/system-headers
index 18e8703..bdc5f82 100644
--- mozilla/config/system-headers
+++ mozilla/config/system-headers
-@@ -1145,3 +1145,11 @@ unicode/utypes.h
+@@ -1357,3 +1357,11 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
@@ -33,7 +33,7 @@ diff --git configure.in configure.in
index ac38f40..87536b7 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -8032,6 +8032,52 @@ if test "$USE_FC_FREETYPE"; then
+@@ -7986,6 +7986,49 @@ if test "$USE_FC_FREETYPE"; then
fi
dnl ========================================================
@@ -46,16 +46,15 @@ index ac38f40..87536b7 100644
+MOZ_NATIVE_HARFBUZZ=)
+
+if test -n "$MOZ_NATIVE_HARFBUZZ"; then
-+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.25)
++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34)
+fi
+
+AC_SUBST(MOZ_NATIVE_HARFBUZZ)
-+AC_SUBST(MOZ_HARFBUZZ_CFLAGS)
-+AC_SUBST(MOZ_HARFBUZZ_LIBS)
+
+dnl ========================================================
+dnl Check for graphite2
+dnl ========================================================
++
+MOZ_ARG_WITH_BOOL(system-graphite2,
+[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
+MOZ_NATIVE_GRAPHITE2=1,
@@ -79,27 +78,58 @@ index ac38f40..87536b7 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_GRAPHITE2)
-+AC_SUBST(MOZ_GRAPHITE2_CFLAGS)
-+AC_SUBST(MOZ_GRAPHITE2_LIBS)
+
+dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
-diff --git content/base/src/moz.build content/base/src/moz.build
-index d4f6380..0ee55df 100644
---- mozilla/content/base/src/moz.build
-+++ mozilla/content/base/src/moz.build
-@@ -179,6 +179,9 @@ SOURCES += [
+diff --git dom/base/moz.build dom/base/moz.build
+index a660ba4..6b2f602 100644
+--- mozilla/dom/base/moz.build
++++ mozilla/dom/base/moz.build
+@@ -196,6 +196,9 @@ SOURCES += [
'nsObjectLoadingContent.cpp',
]
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
-+ SOURCES['nsContentUtils.cpp'].flags += [CONFIG['MOZ_HARFBUZZ_CFLAGS']]
++ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+
EXTRA_COMPONENTS += [
'contentAreaDropListener.js',
'contentAreaDropListener.manifest',
+diff --git gfx/graphite2/moz-gr-update.sh gfx/graphite2/moz-gr-update.sh
+index f3d76ea..a9e7fb6 100644
+--- mozilla/gfx/graphite2/moz-gr-update.sh
++++ mozilla/gfx/graphite2/moz-gr-update.sh
+@@ -23,8 +23,14 @@ echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla
+ find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+ find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
+
++# closest tag/release to require for system version
++TAG=$(cd ../graphitedev/ && hg parents --template {latesttag})
++
++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$TAG/ and tr/./,/ \
++ if /GR2_VERSION_REQUIRE/" configure.in
++
+ # summarize what's been touched
+-echo Updated to $CHANGESET.
++echo Updated to $CHANGESET \($TAG for --with-system-graphite2\)
+ echo Here is what changed in the gfx/graphite2 directory:
+ echo
+
+diff --git gfx/harfbuzz/README-mozilla gfx/harfbuzz/README-mozilla
+index ca57d16..1ce21fe 100644
+--- mozilla/gfx/harfbuzz/README-mozilla
++++ mozilla/gfx/harfbuzz/README-mozilla
+@@ -21,3 +21,8 @@ In addition, the src/Makefile.in file here is NOT from upstream, nor is it
+ generated from src/Makefile.am (the original harfbuzz version); it is a mozilla-
+ specific makefile that is maintained by hand. It should only need updating when
+ new source files or exported headers are added in harfbuzz.
++
++The in-tree copy may be omitted during build by --with-system-harfbuzz.
++Make sure to keep pkg-config version check within configure.in in sync
++with checkout version or increment latest tag by one if it's not based
++on upstream release.
diff --git gfx/moz.build gfx/moz.build
index 519aa46..6929751 100644
--- mozilla/gfx/moz.build
@@ -126,83 +156,87 @@ index 519aa46..6929751 100644
'ots/src',
'thebes',
'ipc',
-diff --git gfx/skia/Makefile.in gfx/skia/Makefile.in
-index ee0efb2..98e169d6f 100644
---- mozilla/gfx/skia/Makefile.in
-+++ mozilla/gfx/skia/Makefile.in
-@@ -15,6 +15,10 @@ ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
- OS_CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PANGO_CFLAGS) $(CAIRO_FT_CFLAGS)
- endif
+diff --git gfx/skia/generate_mozbuild.py gfx/skia/generate_mozbuild.py
+index 28fa6b5..240dced 100755
+--- mozilla/gfx/skia/generate_mozbuild.py
++++ mozilla/gfx/skia/generate_mozbuild.py
+@@ -140,6 +140,9 @@ if CONFIG['GNU_CXX']:
+ if not CONFIG['CLANG_CXX']:
+ CXXFLAGS += ['-Wno-logical-op']
-+ifdef MOZ_NATIVE_HARFBUZZ
-+OS_CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS)
-+endif
-+
- include $(topsrcdir)/config/rules.mk
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/skia/moz.build gfx/skia/moz.build
+index 1d0c2f9..adb8941 100644
+--- mozilla/gfx/skia/moz.build
++++ mozilla/gfx/skia/moz.build
+@@ -968,6 +968,9 @@ if CONFIG['GNU_CXX']:
+ if not CONFIG['CLANG_CXX']:
+ CXXFLAGS += ['-Wno-logical-op']
- ifeq ($(CPU_ARCH)_$(GNU_CC),arm_1)
-diff --git gfx/thebes/Makefile.in gfx/thebes/Makefile.in
-index 45c36ae..79d32cf 100644
---- mozilla/gfx/thebes/Makefile.in
-+++ mozilla/gfx/thebes/Makefile.in
-@@ -13,6 +13,14 @@ DEFINES := $(filter-out -DUNICODE,$(DEFINES))
- CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
- CFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+diff --git gfx/thebes/moz.build gfx/thebes/moz.build
+index d5852fa..aeeab25 100644
+--- mozilla/gfx/thebes/moz.build
++++ mozilla/gfx/thebes/moz.build
+@@ -278,6 +278,12 @@ CXXFLAGS += CONFIG['TK_CFLAGS']
+ CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
+ CFLAGS += CONFIG['TK_CFLAGS']
-+ifdef MOZ_NATIVE_GRAPHITE2
-+CXXFLAGS += $(MOZ_GRAPHITE2_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_HARFBUZZ
-+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS)
-+endif
-+
- ifeq ($(MOZ_WIDGET_TOOLKIT),android)
- CXXFLAGS += $(CAIRO_FT_CFLAGS)
- endif
-diff --git intl/unicharutil/util/Makefile.in intl/unicharutil/util/Makefile.in
-index f6b9f7c..60863f4 100644
---- mozilla/intl/unicharutil/util/Makefile.in
-+++ mozilla/intl/unicharutil/util/Makefile.in
-@@ -21,3 +21,7 @@ ifdef _MSC_VER
- OS_COMPILE_CXXFLAGS += -Zl
- OS_COMPILE_CFLAGS += -Zl
- endif
-+
-+ifdef MOZ_NATIVE_HARFBUZZ
-+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS)
-+endif
-diff --git netwerk/dns/Makefile.in netwerk/dns/Makefile.in
-index 1cacbd7..f5d72bb 100644
---- mozilla/netwerk/dns/Makefile.in
-+++ mozilla/netwerk/dns/Makefile.in
-@@ -5,6 +5,10 @@
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'qt'):
+ CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
- include $(topsrcdir)/config/rules.mk
+diff --git intl/unicharutil/util/moz.build intl/unicharutil/util/moz.build
+index d736943..41a931f 100644
+--- mozilla/intl/unicharutil/util/moz.build
++++ mozilla/intl/unicharutil/util/moz.build
+@@ -37,3 +37,6 @@ if CONFIG['_MSC_VER']:
-+ifdef MOZ_NATIVE_HARFBUZZ
-+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS)
-+endif
-+
- # Generate the include file containing compact, static definitions
- # for effective TLD data.
- etld_data.inc: $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat
-diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
+ if CONFIG['ENABLE_INTL_API']:
+ CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+diff --git netwerk/dns/moz.build netwerk/dns/moz.build
+index 0b0717a..2e665c9 100644
+--- mozilla/netwerk/dns/moz.build
++++ mozilla/netwerk/dns/moz.build
+@@ -64,3 +64,6 @@ GENERATED_FILES = [
+ LOCAL_INCLUDES += [
+ '/netwerk/base',
+ ]
++
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
+diff --git toolkit/library/moz.build toolkit/library/moz.build
index 67f0db9..d42137a 100644
---- mozilla/toolkit/library/libxul.mk
-+++ mozilla/toolkit/library/libxul.mk
-@@ -89,6 +89,14 @@ ifndef MOZ_TREE_PIXMAN
- EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS)
- endif
+--- mozilla/toolkit/library/moz.build
++++ mozilla/toolkit/library/moz.build
+@@ -187,6 +187,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_TREE_PIXMAN']:
+ OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
-+ifdef MOZ_NATIVE_GRAPHITE2
-+EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE2_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_GRAPHITE2']:
++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
+
-+ifdef MOZ_NATIVE_HARFBUZZ
-+EXTRA_DSO_LDOPTS += $(MOZ_HARFBUZZ_LIBS)
-+endif
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
+
- ifdef MOZ_DMD
- EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,dmd,$(DIST)/lib)
- endif
+ if CONFIG['MOZ_OSS']:
+ OS_LIBS += CONFIG['MOZ_OSS_LIBS']
+
diff --git a/mail/thunderbird/files/patch-bug858919 b/mail/thunderbird/files/patch-bug858919
deleted file mode 100644
index 04dd48deee22..000000000000
--- a/mail/thunderbird/files/patch-bug858919
+++ /dev/null
@@ -1,391 +0,0 @@
-commit a33d4f7
-Author: Martin Stransky <stransky@redhat.com>
-Date: Fri Nov 14 04:04:00 2014 +0100
-
- Bug 858919 - Add support for libnotify calls which was removed for new notification API. r=karlt
----
- toolkit/components/alerts/nsAlertsService.cpp | 10 +--
- toolkit/system/gnome/moz.build | 2 +
- toolkit/system/gnome/nsAlertsIconListener.cpp | 64 ++++++++++++------
- toolkit/system/gnome/nsAlertsIconListener.h | 89 ++++++++++++++++++++++++++
- toolkit/system/gnome/nsGnomeModule.cpp | 5 ++
- toolkit/system/gnome/nsSystemAlertsService.cpp | 54 ++++++++++++++++
- toolkit/system/gnome/nsSystemAlertsService.h | 27 ++++++++
- 7 files changed, 226 insertions(+), 25 deletions(-)
-
-diff --git toolkit/components/alerts/nsAlertsService.cpp toolkit/components/alerts/nsAlertsService.cpp
-index 93f4536..f8b5e07 100644
---- mozilla/toolkit/components/alerts/nsAlertsService.cpp
-+++ mozilla/toolkit/components/alerts/nsAlertsService.cpp
-@@ -100,9 +100,11 @@ NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl
- nsCOMPtr<nsIAlertsService> sysAlerts(do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID));
- nsresult rv;
- if (sysAlerts) {
-- return sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
-- aAlertCookie, aAlertListener, aAlertName,
-- aBidi, aLang, IPC::Principal(aPrincipal));
-+ rv = sysAlerts->ShowAlertNotification(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
-+ aAlertCookie, aAlertListener, aAlertName,
-+ aBidi, aLang, IPC::Principal(aPrincipal));
-+ if (NS_SUCCEEDED(rv))
-+ return NS_OK;
- }
-
- if (!ShouldShowAlert()) {
-diff --git toolkit/system/gnome/moz.build toolkit/system/gnome/moz.build
-index c033f8b..9242209 100644
---- mozilla/toolkit/system/gnome/moz.build
-+++ mozilla/toolkit/system/gnome/moz.build
-@@ -5,7 +5,9 @@
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- SOURCES += [
-+ 'nsAlertsIconListener.cpp',
- 'nsGnomeModule.cpp',
-+ 'nsSystemAlertsService.cpp',
- ]
-
- if CONFIG['MOZ_ENABLE_GCONF']:
-diff --git toolkit/system/gnome/nsAlertsIconListener.cpp toolkit/system/gnome/nsAlertsIconListener.cpp
-index f39335e..55f4356 100644
---- mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
-+++ mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
-@@ -51,6 +51,21 @@ static void notify_closed_marshal(GClosure* closure,
- NS_RELEASE(alert);
- }
-
-+static GdkPixbuf*
-+GetPixbufFromImgRequest(imgIRequest* aRequest)
-+{
-+ nsCOMPtr<imgIContainer> image;
-+ nsresult rv = aRequest->GetImage(getter_AddRefs(image));
-+ if (NS_FAILED(rv)) {
-+ return nullptr;
-+ }
-+
-+ nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
-+ do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");
-+
-+ return imgToPixbuf->ConvertImageToPixbuf(image);
-+}
-+
- NS_IMPL_ISUPPORTS(nsAlertsIconListener, imgINotificationObserver,
- nsIObserver, nsISupportsWeakReference)
-
-@@ -106,47 +121,45 @@ nsAlertsIconListener::Notify(imgIRequest *aRequest, int32_t aType, const nsIntRe
- nsresult
- nsAlertsIconListener::OnStopRequest(imgIRequest* aRequest)
- {
-+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!");
-+
- uint32_t imgStatus = imgIRequest::STATUS_ERROR;
- nsresult rv = aRequest->GetImageStatus(&imgStatus);
- NS_ENSURE_SUCCESS(rv, rv);
- if (imgStatus == imgIRequest::STATUS_ERROR && !mLoadedFrame) {
- // We have an error getting the image. Display the notification with no icon.
- ShowAlert(nullptr);
-- }
-
-- if (mIconRequest) {
-+ // Cancel any pending request
- mIconRequest->Cancel(NS_BINDING_ABORTED);
- mIconRequest = nullptr;
- }
-+
- return NS_OK;
- }
-
- nsresult
- nsAlertsIconListener::OnStopFrame(imgIRequest* aRequest)
- {
-- if (aRequest != mIconRequest)
-- return NS_ERROR_FAILURE;
-+ NS_ASSERTION(mIconRequest == aRequest, "aRequest does not match!");
-
- if (mLoadedFrame)
- return NS_OK; // only use one frame
-
-- nsCOMPtr<imgIContainer> image;
-- nsresult rv = aRequest->GetImage(getter_AddRefs(image));
-- if (NS_FAILED(rv))
-- return rv;
--
-- nsCOMPtr<nsIImageToPixbuf> imgToPixbuf =
-- do_GetService("@mozilla.org/widget/image-to-gdk-pixbuf;1");
--
-- GdkPixbuf* imagePixbuf = imgToPixbuf->ConvertImageToPixbuf(image);
-- if (!imagePixbuf)
-- return NS_ERROR_FAILURE;
-+ GdkPixbuf* imagePixbuf = GetPixbufFromImgRequest(aRequest);
-+ if (!imagePixbuf) {
-+ ShowAlert(nullptr);
-+ } else {
-+ ShowAlert(imagePixbuf);
-+ g_object_unref(imagePixbuf);
-+ }
-
-- ShowAlert(imagePixbuf);
-+ mLoadedFrame = true;
-
-- g_object_unref(imagePixbuf);
-+ // Cancel any pending request (multipart image loading/decoding for instance)
-+ mIconRequest->Cancel(NS_BINDING_ABORTED);
-+ mIconRequest = nullptr;
-
-- mLoadedFrame = true;
- return NS_OK;
- }
-
-@@ -180,6 +193,9 @@ nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf)
- mClosureHandler = g_signal_connect_closure(mNotification, "closed", closure, FALSE);
- gboolean result = notify_notification_show(mNotification, nullptr);
-
-+ if (result && mAlertListener)
-+ mAlertListener->Observe(nullptr, "alertshow", mAlertCookie.get());
-+
- return result ? NS_OK : NS_ERROR_FAILURE;
- }
-
-@@ -201,9 +217,15 @@ nsAlertsIconListener::StartRequest(const nsAString & aImageUrl)
- if (!il)
- return ShowAlert(nullptr);
-
-- return il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr,
-- this, nullptr, nsIRequest::LOAD_NORMAL, nullptr,
-- nullptr, getter_AddRefs(mIconRequest));
-+ nsresult rv = il->LoadImageXPCOM(imageUri, nullptr, nullptr, nullptr, nullptr,
-+ this, nullptr, nsIRequest::LOAD_NORMAL, nullptr,
-+ 0 /* use default */, getter_AddRefs(mIconRequest));
-+ if (NS_FAILED(rv))
-+ return rv;
-+
-+ mIconRequest->StartDecoding();
-+
-+ return NS_OK;
- }
-
- void
-diff --git toolkit/system/gnome/nsAlertsIconListener.h toolkit/system/gnome/nsAlertsIconListener.h
-new file mode 100644
-index 0000000..ac96db9
---- /dev/null
-+++ mozilla/toolkit/system/gnome/nsAlertsIconListener.h
-@@ -0,0 +1,89 @@
-+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* 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 nsAlertsIconListener_h__
-+#define nsAlertsIconListener_h__
-+
-+#include "nsCOMPtr.h"
-+#include "imgINotificationObserver.h"
-+#include "nsStringAPI.h"
-+#include "nsIObserver.h"
-+#include "nsWeakReference.h"
-+
-+#include <gdk-pixbuf/gdk-pixbuf.h>
-+
-+class imgIRequest;
-+
-+struct NotifyNotification;
-+
-+class nsAlertsIconListener : public imgINotificationObserver,
-+ public nsIObserver,
-+ public nsSupportsWeakReference
-+{
-+public:
-+ NS_DECL_ISUPPORTS
-+ NS_DECL_IMGINOTIFICATIONOBSERVER
-+ NS_DECL_NSIOBSERVER
-+
-+ nsAlertsIconListener();
-+
-+ nsresult InitAlertAsync(const nsAString & aImageUrl,
-+ const nsAString & aAlertTitle,
-+ const nsAString & aAlertText,
-+ bool aAlertTextClickable,
-+ const nsAString & aAlertCookie,
-+ nsIObserver * aAlertListener);
-+
-+ void SendCallback();
-+ void SendClosed();
-+
-+protected:
-+ virtual ~nsAlertsIconListener();
-+
-+ nsresult OnStopRequest(imgIRequest* aRequest);
-+ nsresult OnStopFrame(imgIRequest* aRequest);
-+
-+ /**
-+ * The only difference between libnotify.so.4 and libnotify.so.1 for these symbols
-+ * is that notify_notification_new takes three arguments in libnotify.so.4 and
-+ * four in libnotify.so.1.
-+ * Passing the fourth argument as NULL is binary compatible.
-+ */
-+ typedef void (*NotifyActionCallback)(NotifyNotification*, char*, gpointer);
-+ typedef bool (*notify_is_initted_t)(void);
-+ typedef bool (*notify_init_t)(const char*);
-+ typedef GList* (*notify_get_server_caps_t)(void);
-+ typedef NotifyNotification* (*notify_notification_new_t)(const char*, const char*, const char*, const char*);
-+ typedef bool (*notify_notification_show_t)(void*, char*);
-+ typedef void (*notify_notification_set_icon_from_pixbuf_t)(void*, GdkPixbuf*);
-+ typedef void (*notify_notification_add_action_t)(void*, const char*, const char*, NotifyActionCallback, gpointer, GFreeFunc);
-+
-+ nsCOMPtr<imgIRequest> mIconRequest;
-+ nsCString mAlertTitle;
-+ nsCString mAlertText;
-+
-+ nsCOMPtr<nsIObserver> mAlertListener;
-+ nsString mAlertCookie;
-+
-+ bool mLoadedFrame;
-+ bool mAlertHasAction;
-+
-+ static void* libNotifyHandle;
-+ static bool libNotifyNotAvail;
-+ static notify_is_initted_t notify_is_initted;
-+ static notify_init_t notify_init;
-+ static notify_get_server_caps_t notify_get_server_caps;
-+ static notify_notification_new_t notify_notification_new;
-+ static notify_notification_show_t notify_notification_show;
-+ static notify_notification_set_icon_from_pixbuf_t notify_notification_set_icon_from_pixbuf;
-+ static notify_notification_add_action_t notify_notification_add_action;
-+ NotifyNotification* mNotification;
-+ gulong mClosureHandler;
-+
-+ nsresult StartRequest(const nsAString & aImageUrl);
-+ nsresult ShowAlert(GdkPixbuf* aPixbuf);
-+};
-+
-+#endif
-diff --git toolkit/system/gnome/nsGnomeModule.cpp toolkit/system/gnome/nsGnomeModule.cpp
-index 5ccc8e5..f893893 100644
---- mozilla/toolkit/system/gnome/nsGnomeModule.cpp
-+++ mozilla/toolkit/system/gnome/nsGnomeModule.cpp
-@@ -22,6 +22,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGnomeVFSService, Init)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsGIOService)
- NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGSettingsService, Init)
- #endif
-+#include "nsSystemAlertsService.h"
-+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSystemAlertsService, Init)
-
- #ifdef MOZ_ENABLE_GCONF
- NS_DEFINE_NAMED_CID(NS_GCONFSERVICE_CID);
-@@ -33,6 +35,7 @@ NS_DEFINE_NAMED_CID(NS_GNOMEVFSSERVICE_CID);
- NS_DEFINE_NAMED_CID(NS_GIOSERVICE_CID);
- NS_DEFINE_NAMED_CID(NS_GSETTINGSSERVICE_CID);
- #endif
-+NS_DEFINE_NAMED_CID(NS_SYSTEMALERTSSERVICE_CID);
-
- static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
- #ifdef MOZ_ENABLE_GCONF
-@@ -45,6 +48,7 @@ static const mozilla::Module::CIDEntry kGnomeCIDs[] = {
- { &kNS_GIOSERVICE_CID, false, nullptr, nsGIOServiceConstructor },
- { &kNS_GSETTINGSSERVICE_CID, false, nullptr, nsGSettingsServiceConstructor },
- #endif
-+ { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, nsSystemAlertsServiceConstructor },
- { nullptr }
- };
-
-@@ -59,6 +63,7 @@ static const mozilla::Module::ContractIDEntry kGnomeContracts[] = {
- { NS_GIOSERVICE_CONTRACTID, &kNS_GIOSERVICE_CID },
- { NS_GSETTINGSSERVICE_CONTRACTID, &kNS_GSETTINGSSERVICE_CID },
- #endif
-+ { NS_SYSTEMALERTSERVICE_CONTRACTID, &kNS_SYSTEMALERTSSERVICE_CID },
- { nullptr }
- };
-
-diff --git toolkit/system/gnome/nsSystemAlertsService.cpp toolkit/system/gnome/nsSystemAlertsService.cpp
-new file mode 100644
-index 0000000..b91b402
---- /dev/null
-+++ mozilla/toolkit/system/gnome/nsSystemAlertsService.cpp
-@@ -0,0 +1,53 @@
-+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
-+/* 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 "nsXULAppAPI.h"
-+#include "nsSystemAlertsService.h"
-+#include "nsAlertsIconListener.h"
-+#include "nsAutoPtr.h"
-+
-+NS_IMPL_ADDREF(nsSystemAlertsService)
-+NS_IMPL_RELEASE(nsSystemAlertsService)
-+
-+NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService)
-+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService)
-+ NS_INTERFACE_MAP_ENTRY(nsIAlertsService)
-+NS_INTERFACE_MAP_END_THREADSAFE
-+
-+nsSystemAlertsService::nsSystemAlertsService()
-+{
-+}
-+
-+nsSystemAlertsService::~nsSystemAlertsService()
-+{}
-+
-+nsresult
-+nsSystemAlertsService::Init()
-+{
-+ return NS_OK;
-+}
-+
-+NS_IMETHODIMP nsSystemAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle,
-+ const nsAString & aAlertText, bool aAlertTextClickable,
-+ const nsAString & aAlertCookie,
-+ nsIObserver * aAlertListener,
-+ const nsAString & aAlertName,
-+ const nsAString & aBidi,
-+ const nsAString & aLang,
-+ nsIPrincipal * aPrincipal)
-+{
-+ nsRefPtr<nsAlertsIconListener> alertListener = new nsAlertsIconListener();
-+ if (!alertListener)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ return alertListener->InitAlertAsync(aImageUrl, aAlertTitle, aAlertText, aAlertTextClickable,
-+ aAlertCookie, aAlertListener);
-+}
-+
-+NS_IMETHODIMP nsSystemAlertsService::CloseAlert(const nsAString& aAlertName,
-+ nsIPrincipal* aPrincipal)
-+{
-+ return NS_ERROR_NOT_IMPLEMENTED;
-+}
-diff --git toolkit/system/gnome/nsSystemAlertsService.h toolkit/system/gnome/nsSystemAlertsService.h
-new file mode 100644
-index 0000000..b0bd625
---- /dev/null
-+++ mozilla/toolkit/system/gnome/nsSystemAlertsService.h
-@@ -0,0 +1,27 @@
-+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* 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 nsSystemAlertsService_h__
-+#define nsSystemAlertsService_h__
-+
-+#include "nsIAlertsService.h"
-+#include "nsCOMPtr.h"
-+
-+class nsSystemAlertsService : public nsIAlertsService
-+{
-+public:
-+ NS_DECL_NSIALERTSSERVICE
-+ NS_DECL_ISUPPORTS
-+
-+ nsSystemAlertsService();
-+
-+ nsresult Init();
-+
-+protected:
-+ virtual ~nsSystemAlertsService();
-+
-+};
-+
-+#endif /* nsSystemAlertsService_h__ */
diff --git a/mail/thunderbird/files/patch-bug961264 b/mail/thunderbird/files/patch-bug961264
deleted file mode 100644
index 1a4cd035ab7f..000000000000
--- a/mail/thunderbird/files/patch-bug961264
+++ /dev/null
@@ -1,266 +0,0 @@
-commit d099acd
-Author: Trevor Saunders <trev.saunders@gmail.com>
-Date: Fri Jan 17 15:08:00 2014 -0800
-
- Bug 961264 - Remove obsolete checks for gcc visibility stuff.
----
- configure.in | 115 +++-------------------------------------------------
- js/src/configure.in | 111 ++------------------------------------------------
- 2 files changed, 8 insertions(+), 218 deletions(-)
-
-diff --git configure.in configure.in
-index dfb8193..33d71b3 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -2507,118 +2507,15 @@ MOZ_CXX11
-
- AC_LANG_C
-
--dnl Check for .hidden assembler directive and visibility attribute.
--dnl Borrowed from glibc configure.in
-+dnl Setup default hidden visibility and wrapped system headers.
- dnl ===============================================================
- if test "$GNU_CC"; then
-- AC_CACHE_CHECK(for visibility(hidden) attribute,
-- ac_cv_visibility_hidden,
-- [cat > conftest.c <<EOF
-- int foo __attribute__ ((visibility ("hidden"))) = 1;
--EOF
-- ac_cv_visibility_hidden=no
-- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
-- ac_cv_visibility_hidden=yes
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_hidden" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
--
-- AC_CACHE_CHECK(for visibility(default) attribute,
-- ac_cv_visibility_default,
-- [cat > conftest.c <<EOF
-- int foo __attribute__ ((visibility ("default"))) = 1;
--EOF
-- ac_cv_visibility_default=no
-- if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
-- ac_cv_visibility_default=yes
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_default" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
--
-- AC_CACHE_CHECK(for visibility pragma support,
-- ac_cv_visibility_pragma,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
-- int foo_hidden = 1;
--#pragma GCC visibility push(default)
-- int foo_default = 1;
--EOF
-- ac_cv_visibility_pragma=no
-- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then
-- if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then
-- ac_cv_visibility_pragma=yes
-- fi
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_pragma" = "yes"; then
-- AC_CACHE_CHECK(For gcc visibility bug with class-level attributes (GCC bug 26905),
-- ac_cv_have_visibility_class_bug,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
--struct __attribute__ ((visibility ("default"))) TestStruct {
-- static void Init();
--};
--__attribute__ ((visibility ("default"))) void TestFunc() {
-- TestStruct::Init();
--}
--EOF
-- ac_cv_have_visibility_class_bug=no
-- if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
-- ac_cv_have_visibility_class_bug=yes
-- else
-- if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
-- ac_cv_have_visibility_class_bug=yes
-- fi
-- fi
-- rm -rf conftest.{c,S}
-- ])
--
-- AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297),
-- ac_cv_have_visibility_builtin_bug,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
--#pragma GCC visibility push(default)
--#include <string.h>
--#pragma GCC visibility pop
--
--__attribute__ ((visibility ("default"))) void Func() {
-- char c[[100]];
-- memset(c, 0, sizeof(c));
--}
--EOF
-- ac_cv_have_visibility_builtin_bug=no
-- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
-- ac_cv_have_visibility_builtin_bug=yes
-- else
-- if test `grep -c "@PLT" conftest.S` = 0; then
-- ac_cv_visibility_builtin_bug=yes
-- fi
-- fi
-- rm -f conftest.{c,S}
-- ])
-- if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
-- "$ac_cv_have_visibility_class_bug" = "no"; then
-- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-- WRAP_SYSTEM_INCLUDES=1
-- STL_FLAGS='-I$(DIST)/stl_wrappers'
-- WRAP_STL_INCLUDES=1
-- else
-- VISIBILITY_FLAGS='-fvisibility=hidden'
-- fi # have visibility pragma bug
-- fi # have visibility pragma
-- fi # have visibility(default) attribute
-- fi # have visibility(hidden) attribute
-+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
-+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-+ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-+ WRAP_SYSTEM_INCLUDES=1
-+ STL_FLAGS='-I$(DIST)/stl_wrappers'
-+ WRAP_STL_INCLUDES=1
- fi # GNU_CC
-
- # visibility hidden flag for Sun Studio on Solaris
-diff --git js/src/configure.in js/src/configure.in
-index bddd46d..d4b522e 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -2077,116 +2077,13 @@ AC_LANG_CPLUSPLUS
-
- MOZ_CXX11
-
--dnl Check for .hidden assembler directive and visibility attribute.
--dnl Borrowed from glibc configure.in
-+dnl Setup default hidden visibility and wrapped system headers.
- dnl ===============================================================
- if test "$GNU_CC"; then
-- AC_CACHE_CHECK(for visibility(hidden) attribute,
-- ac_cv_visibility_hidden,
-- [cat > conftest.c <<EOF
-- int foo __attribute__ ((visibility ("hidden"))) = 1;
--EOF
-- ac_cv_visibility_hidden=no
-- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
-- ac_cv_visibility_hidden=yes
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_hidden" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
--
-- AC_CACHE_CHECK(for visibility(default) attribute,
-- ac_cv_visibility_default,
-- [cat > conftest.c <<EOF
-- int foo __attribute__ ((visibility ("default"))) = 1;
--EOF
-- ac_cv_visibility_default=no
-- if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if ! egrep '\.(hidden|private_extern).*foo' conftest.s >/dev/null; then
-- ac_cv_visibility_default=yes
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_default" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
--
-- AC_CACHE_CHECK(for visibility pragma support,
-- ac_cv_visibility_pragma,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
-- int foo_hidden = 1;
--#pragma GCC visibility push(default)
-- int foo_default = 1;
--EOF
-- ac_cv_visibility_pragma=no
-- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-- if egrep '\.(hidden|private_extern).*foo_hidden' conftest.s >/dev/null; then
-- if ! egrep '\.(hidden|private_extern).*foo_default' conftest.s > /dev/null; then
-- ac_cv_visibility_pragma=yes
-- fi
-- fi
-- fi
-- rm -f conftest.[cs]
-- ])
-- if test "$ac_cv_visibility_pragma" = "yes"; then
-- AC_CACHE_CHECK(For gcc visibility bug with class-level attributes (GCC bug 26905),
-- ac_cv_have_visibility_class_bug,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
--struct __attribute__ ((visibility ("default"))) TestStruct {
-- static void Init();
--};
--__attribute__ ((visibility ("default"))) void TestFunc() {
-- TestStruct::Init();
--}
--EOF
-- ac_cv_have_visibility_class_bug=no
-- if ! ${CXX-g++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
-- ac_cv_have_visibility_class_bug=yes
-- else
-- if test `egrep -c '@PLT|\\$stub' conftest.S` = 0; then
-- ac_cv_have_visibility_class_bug=yes
-- fi
-- fi
-- rm -rf conftest.{c,S}
-- ])
--
-- AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297),
-- ac_cv_have_visibility_builtin_bug,
-- [cat > conftest.c <<EOF
--#pragma GCC visibility push(hidden)
--#pragma GCC visibility push(default)
--#include <string.h>
--#pragma GCC visibility pop
--
--__attribute__ ((visibility ("default"))) void Func() {
-- char c[[100]];
-- memset(c, 0, sizeof(c));
--}
--EOF
-- ac_cv_have_visibility_builtin_bug=no
-- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
-- ac_cv_have_visibility_builtin_bug=yes
-- else
-- if test `grep -c "@PLT" conftest.S` = 0; then
-- ac_cv_visibility_builtin_bug=yes
-- fi
-- fi
-- rm -f conftest.{c,S}
-- ])
-- if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
-- "$ac_cv_have_visibility_class_bug" = "no"; then
-- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-- WRAP_SYSTEM_INCLUDES=1
-- else
-- VISIBILITY_FLAGS='-fvisibility=hidden'
-- fi # have visibility pragma bug
-- fi # have visibility pragma
-- fi # have visibility(default) attribute
-- fi # have visibility(hidden) attribute
-+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
-+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-+ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-+ WRAP_SYSTEM_INCLUDES=1
- fi # GNU_CC
-
- # visibility hidden flag for Sun Studio on Solaris
diff --git a/mail/thunderbird/files/patch-config-baseconfig.mk b/mail/thunderbird/files/patch-config-baseconfig.mk
index fedf7c5d8a8e..21c5eb9a1a20 100644
--- a/mail/thunderbird/files/patch-config-baseconfig.mk
+++ b/mail/thunderbird/files/patch-config-baseconfig.mk
@@ -1,5 +1,5 @@
---- config/baseconfig.mk~
-+++ config/baseconfig.mk
+--- mozilla/config/baseconfig.mk~
++++ mozilla/config/baseconfig.mk
@@ -1,7 +1,7 @@
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
@@ -9,6 +9,6 @@
+idldir = $(datadir)/idl/%%MOZILLA%%
+installdir = $(libdir)/%%MOZILLA%%
+sdkdir = $(libdir)/%%MOZILLA%%
- MOZILLA_SRCDIR = $(topsrcdir)/mozilla
- MOZDEPTH = $(DEPTH)/mozilla
- DIST = $(MOZDEPTH)/dist
+ ifndef TOP_DIST
+ TOP_DIST = dist
+ endif
diff --git a/mail/thunderbird/files/patch-ijg-libjpeg b/mail/thunderbird/files/patch-ijg-libjpeg
index 06e9099ba36c..7ffd8a74ebc3 100644
--- a/mail/thunderbird/files/patch-ijg-libjpeg
+++ b/mail/thunderbird/files/patch-ijg-libjpeg
@@ -17,7 +17,7 @@ index f0aeb5d..1c01010 100644
MOZ_NATIVE_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
-diff --git mozilla/image/decoders/nsJPEGDecoder.cpp mozilla/image/decoders/nsJPEGDecoder.cpp
+diff --git image/decoders/nsJPEGDecoder.cpp image/decoders/nsJPEGDecoder.cpp
index 8fa8200..1d2a259 100644
--- mozilla/image/decoders/nsJPEGDecoder.cpp
+++ mozilla/image/decoders/nsJPEGDecoder.cpp
@@ -28,7 +28,7 @@ index 8fa8200..1d2a259 100644
-}
+#ifdef JCS_EXTENSIONS
- #if defined(IS_BIG_ENDIAN)
+ #if MOZ_BIG_ENDIAN
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
#else
#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
@@ -51,26 +51,26 @@ index 8fa8200..1d2a259 100644
static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
-@@ -324,6 +340,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
- case JCS_GRAYSCALE:
- case JCS_RGB:
- case JCS_YCbCr:
+@@ -367,6 +382,7 @@ nsJPEGDecoder::WriteInternal(const char*
+ 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) {
-@@ -332,6 +349,9 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
- } else {
- mInfo.out_color_space = JCS_RGB;
- }
+ // if we're not color managing we can decode directly to
+ // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
+ if (mCMSMode != eCMSMode_All) {
+@@ -375,6 +391,9 @@ nsJPEGDecoder::WriteInternal(const char*
+ } else {
+ mInfo.out_color_space = JCS_RGB;
+ }
+#else
-+ mInfo.out_color_space = JCS_RGB;
++ mInfo.out_color_space = JCS_RGB;
+#endif
- break;
- case JCS_CMYK:
- case JCS_YCCK:
-@@ -399,6 +419,15 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
- return; /* I/O suspension */
+ break;
+ case JCS_CMYK:
+ case JCS_YCCK:
+@@ -433,6 +452,15 @@ nsJPEGDecoder::WriteInternal(const char*
+ return; // I/O suspension
}
+#ifndef JCS_EXTENSIONS
@@ -83,10 +83,10 @@ index 8fa8200..1d2a259 100644
+ }
+#endif
- /* If this is a progressive JPEG ... */
- mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
-@@ -544,7 +573,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
- uint32_t *imageRow = ((uint32_t*)mImageData) +
+ // If this is a progressive JPEG ...
+ mState = mInfo.buffered_image ?
+@@ -605,7 +633,11 @@ nsJPEGDecoder::OutputScanlines(bool* sus
+ uint32_t* imageRow = ((uint32_t*)mImageData) +
(mInfo.output_scanline * mInfo.output_width);
+#ifdef JCS_EXTENSIONS
@@ -94,10 +94,10 @@ index 8fa8200..1d2a259 100644
+#else
+ if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
+#endif
- /* Special case: scanline will be directly converted into packed ARGB */
+ // Special case: scanline will be directly converted into packed ARGB
if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
- *suspend = true; /* suspend */
-@@ -854,6 +887,282 @@ term_source (j_decompress_ptr jd)
+ *suspend = true; // suspend
+@@ -920,6 +952,282 @@ term_source (j_decompress_ptr jd)
} // namespace mozilla
@@ -377,6 +377,6 @@ index 8fa8200..1d2a259 100644
+#endif
+
+
- /**************** Inverted CMYK -> RGB conversion **************/
- /*
- * Input is (Inverted) CMYK stored as 4 bytes per pixel.
+ ///*************** Inverted CMYK -> RGB conversion *************************
+ /// Input is (Inverted) CMYK stored as 4 bytes per pixel.
+ /// Output is RGB stored as 3 bytes per pixel.
diff --git a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
index bb337cec0bda..3d3c7d044585 100644
--- a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
+++ b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
@@ -1,10 +1,10 @@
--- mail/app/nsMailApp.cpp~
+++ mail/app/nsMailApp.cpp
-@@ -154,6 +154,7 @@ int main(int argc, char* argv[])
+@@ -320,6 +320,7 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 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/mail/thunderbird/files/patch-media-libstagefright-foundation-AString.cpp b/mail/thunderbird/files/patch-media-libstagefright-foundation-AString.cpp
new file mode 100644
index 000000000000..063cc52226d3
--- /dev/null
+++ b/mail/thunderbird/files/patch-media-libstagefright-foundation-AString.cpp
@@ -0,0 +1,16 @@
+--- mozilla/media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp~
++++ mozilla/media/libstagefright/frameworks/av/media/libstagefright/foundation/AString.cpp
+@@ -23,6 +23,13 @@
+ #include "ADebug.h"
+ #include "AString.h"
+
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 900506
++# undef tolower
++# endif
++#endif
++
+ namespace stagefright {
+
+ // static
diff --git a/mail/thunderbird/files/patch-mozilla-media-mtransport-third_party-nICEr-src-util-mbslen.c b/mail/thunderbird/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
index 149bf0b40182..149bf0b40182 100644
--- a/mail/thunderbird/files/patch-mozilla-media-mtransport-third_party-nICEr-src-util-mbslen.c
+++ b/mail/thunderbird/files/patch-media-mtransport-third_party-nICEr-src-util-mbslen.c
diff --git a/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp b/mail/thunderbird/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
index 31f7a8cff08a..65a568c22ddf 100644
--- a/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
+++ b/mail/thunderbird/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/mail/thunderbird/files/patch-mozilla-memory-jemalloc-Makefile.in b/mail/thunderbird/files/patch-memory-jemalloc-Makefile.in
index eb7ba7283a2e..eb7ba7283a2e 100644
--- a/mail/thunderbird/files/patch-mozilla-memory-jemalloc-Makefile.in
+++ b/mail/thunderbird/files/patch-memory-jemalloc-Makefile.in
diff --git a/mail/thunderbird/files/patch-system-openh264 b/mail/thunderbird/files/patch-system-openh264
new file mode 100644
index 000000000000..0da1175a2e06
--- /dev/null
+++ b/mail/thunderbird/files/patch-system-openh264
@@ -0,0 +1,239 @@
+# Revert bug 1045209 to allow using absolute path
+
+diff --git dom/media/gmp/GMPChild.cpp dom/media/gmp/GMPChild.cpp
+index 1dde3ac..12c88cf 100644
+--- mozilla/dom/media/gmp/GMPChild.cpp
++++ mozilla/dom/media/gmp/GMPChild.cpp
+@@ -76,21 +76,14 @@ GetFileBase(const std::string& aPluginPa
+ }
+ #endif
+
+- nsCOMPtr<nsIFile> parent;
+- rv = aFileBase->GetParent(getter_AddRefs(parent));
+- if (NS_FAILED(rv)) {
+- return false;
+- }
+-
+- nsAutoString parentLeafName;
+- rv = parent->GetLeafName(parentLeafName);
+- if (NS_FAILED(rv)) {
++ nsAutoString leafName;
++ if (NS_FAILED(aFileBase->GetLeafName(leafName))) {
+ return false;
+ }
+
+- aBaseName = Substring(parentLeafName,
++ aBaseName = Substring(leafName,
+ 4,
+- parentLeafName.Length() - 1);
++ leafName.Length() - 1);
+ return true;
+ }
+
+diff --git dom/media/gmp/GMPParent.cpp dom/media/gmp/GMPParent.cpp
+index aa60acf..90878ca 100644
+--- mozilla/dom/media/gmp/GMPParent.cpp
++++ mozilla/dom/media/gmp/GMPParent.cpp
+@@ -90,23 +90,16 @@
+ mService = aService;
+ mDirectory = aPluginDir;
+
+- // aPluginDir is <profile-dir>/<gmp-plugin-id>/<version>
+- // where <gmp-plugin-id> should be gmp-gmpopenh264
+- nsCOMPtr<nsIFile> parent;
+- nsresult rv = aPluginDir->GetParent(getter_AddRefs(parent));
+- if (NS_FAILED(rv)) {
+- return rv;
+- }
+- nsAutoString parentLeafName;
+- rv = parent->GetLeafName(parentLeafName);
++ nsAutoString leafname;
++ nsresult rv = aPluginDir->GetLeafName(leafname);
+ if (NS_FAILED(rv)) {
+ return rv;
+ }
+ LOGD(("%s::%s: %p for %s", __CLASS__, __FUNCTION__, this,
+- NS_LossyConvertUTF16toASCII(parentLeafName).get()));
++ NS_LossyConvertUTF16toASCII(leafname).get()));
+
+- MOZ_ASSERT(parentLeafName.Length() > 4);
+- mName = Substring(parentLeafName, 4);
++ MOZ_ASSERT(leafname.Length() > 4);
++ mName = Substring(leafname, 4);
+
+ return ReadGMPMetaData();
+ }
+diff --git toolkit/modules/GMPInstallManager.jsm toolkit/modules/GMPInstallManager.jsm
+index 9593492..470384b 100644
+--- mozilla/toolkit/modules/GMPInstallManager.jsm
++++ mozilla/toolkit/modules/GMPInstallManager.jsm
+@@ -888,9 +889,7 @@
+ let gmpAddon = this._gmpAddon;
+ let installToDirPath = Cc["@mozilla.org/file/local;1"].
+ createInstance(Ci.nsIFile);
+- let path = OS.Path.join(OS.Constants.Path.profileDir,
+- gmpAddon.id,
+- gmpAddon.version);
++ let path = OS.Path.join(OS.Constants.Path.profileDir, gmpAddon.id);
+ installToDirPath.initWithPath(path);
+ log.info("install to directory path: " + installToDirPath.path);
+ let gmpInstaller = new GMPExtractor(zipPath, installToDirPath.path);
+@@ -885,10 +883,12 @@
+ // Success, set the prefs
+ let now = Math.round(Date.now() / 1000);
+ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_LAST_UPDATE, now, gmpAddon.id);
+- // Setting the version pref signals installation completion to consumers,
+- // if you need to set other prefs etc. do it before this.
++ // Setting the path pref signals installation completion to consumers,
++ // so set the version and potential other information they use first.
+ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_VERSION, gmpAddon.version,
+ gmpAddon.id);
++ GMPPrefs.set(GMPPrefs.KEY_PLUGIN_PATH,
++ installToDirPath.path, gmpAddon.id);
+ this._deferred.resolve(extractedPaths);
+ }, err => {
+ this._deferred.reject(err);
+diff --git toolkit/modules/GMPUtils.jsm toolkit/modules/GMPUtils.jsm
+index 1f3a0b1..93517be 100644
+--- mozilla/toolkit/modules/GMPUtils.jsm
++++ mozilla/toolkit/modules/GMPUtils.jsm
+@@ -70,6 +70,7 @@ this.GMPPrefs = {
+ KEY_EME_ENABLED: "media.eme.enabled",
+ KEY_PLUGIN_ENABLED: "media.{0}.enabled",
+ KEY_PLUGIN_LAST_UPDATE: "media.{0}.lastUpdate",
++ KEY_PLUGIN_PATH: "media.{0}.path",
+ KEY_PLUGIN_VERSION: "media.{0}.version",
+ KEY_PLUGIN_AUTOUPDATE: "media.{0}.autoupdate",
+ KEY_PLUGIN_FORCEVISIBLE: "media.{0}.forcevisible",
+diff --git toolkit/mozapps/extensions/internal/GMPProvider.jsm toolkit/mozapps/extensions/internal/GMPProvider.jsm
+index 1f3a0b1..93517be 100644
+--- mozilla/toolkit/mozapps/extensions/internal/GMPProvider.jsm
++++ mozilla/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+@@ -100,12 +100,11 @@
+ Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP",
+ "GMPWrapper(" +
+ this._plugin.id + ") ");
+- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED,
+- this._plugin.id),
++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, this._plugin.id),
+ this.onPrefEnabledChanged, this);
+- Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
++ Preferences.observe(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH,
+ this._plugin.id),
+- this.onPrefVersionChanged, this);
++ this.onPrefPathChanged, this);
+ if (this._plugin.isEME) {
+ Preferences.observe(GMPPrefs.KEY_EME_ENABLED,
+ this.onPrefEMEGlobalEnabledChanged, this);
+@@ -120,17 +119,14 @@
+ optionsType: AddonManager.OPTIONS_TYPE_INLINE,
+ get optionsURL() { return this._plugin.optionsURL; },
+
++
+ set gmpPath(aPath) { this._gmpPath = aPath; },
+ get gmpPath() {
+- if (!this._gmpPath && this.isInstalled) {
+- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir,
+- this._plugin.id,
+- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION,
+- null, this._plugin.id));
++ if (!this._gmpPath) {
++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
+ }
+ return this._gmpPath;
+ },
+-
+ get id() { return this._plugin.id; },
+ get type() { return "plugin"; },
+ get isGMPlugin() { return true; },
+@@ -141,8 +137,13 @@
+ get description() { return this._plugin.description; },
+ get fullDescription() { return this._plugin.fullDescription; },
+
+- get version() { return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
+- this._plugin.id); },
++ get version() {
++ if (this.isInstalled) {
++ return GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION, null,
++ this._plugin.id);
++ }
++ return null;
++ },
+
+ get isActive() { return !this.appDisabled && !this.userDisabled; },
+ get appDisabled() {
+@@ -289,24 +290,17 @@
+
+ get pluginMimeTypes() { return []; },
+ get pluginLibraries() {
+- if (this.isInstalled) {
+- let path = this.version;
+- return [path];
+- }
+- return [];
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
++ return path && path.length ? [OS.Path.basename(path)] : [];
+ },
+ get pluginFullpath() {
+- if (this.isInstalled) {
+- let path = OS.Path.join(OS.Constants.Path.profileDir,
+- this._plugin.id,
+- this.version);
+- return [path];
+- }
+- return [];
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
++ return path && path.length ? [path] : [];
+ },
+
+ get isInstalled() {
+- return this.version && this.version.length > 0;
++ let path = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH, null, this._plugin.id);
++ return path && path.length > 0;
+ },
+
+ _handleEnabledChanged: function() {
+@@ -362,10 +356,10 @@
+ }
+ },
+
+- onPrefVersionChanged: function() {
++ onPrefPathChanged: function() {
+ AddonManagerPrivate.callAddonListeners("onUninstalling", this, false);
+ if (this._gmpPath) {
+- this._log.info("onPrefVersionChanged() - unregistering gmp directory " +
++ this._log.info("onPrefPathChanged() - unregistering gmp directory " +
+ this._gmpPath);
+ gmpService.removePluginDirectory(this._gmpPath);
+ }
+@@ -374,15 +368,10 @@
+ AddonManagerPrivate.callInstallListeners("onExternalInstall", null, this,
+ null, false);
+ AddonManagerPrivate.callAddonListeners("onInstalling", this, false);
+- this._gmpPath = null;
+- if (this.isInstalled) {
+- this._gmpPath = OS.Path.join(OS.Constants.Path.profileDir,
+- this._plugin.id,
+- GMPPrefs.get(GMPPrefs.KEY_PLUGIN_VERSION,
+- null, this._plugin.id));
+- }
++ this._gmpPath = GMPPrefs.get(GMPPrefs.KEY_PLUGIN_PATH,
++ null, this._plugin.id);
+ if (this._gmpPath && this.isActive) {
+- this._log.info("onPrefVersionChanged() - registering gmp directory " +
++ this._log.info("onPrefPathChanged() - registering gmp directory " +
+ this._gmpPath);
+ gmpService.addPluginDirectory(this._gmpPath);
+ }
+@@ -393,9 +382,9 @@
+ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED,
+ this._plugin.id),
+ this.onPrefEnabledChanged, this);
+- Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
++ Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_PATH,
+ this._plugin.id),
+- this.onPrefVersionChanged, this);
++ this.onPrefPathChanged, this);
+ if (this._plugin.isEME) {
+ Preferences.ignore(GMPPrefs.KEY_EME_ENABLED,
+ this.onPrefEMEGlobalEnabledChanged, this);
diff --git a/mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk b/mail/thunderbird/files/patch-toolkit_mozapps_installer_packager_mk
index 9a2a4ea99070..9a2a4ea99070 100644
--- a/mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk
+++ b/mail/thunderbird/files/patch-toolkit_mozapps_installer_packager_mk
diff --git a/mail/thunderbird/files/patch-z-bug517422 b/mail/thunderbird/files/patch-z-bug517422
index aa2758e4e12d..278d24062535 100644
--- a/mail/thunderbird/files/patch-z-bug517422
+++ b/mail/thunderbird/files/patch-z-bug517422
@@ -4,7 +4,7 @@ diff --git config/Makefile.in config/Makefile.in
index 5383399..0410004 100644
--- mozilla/config/Makefile.in
+++ mozilla/config/Makefile.in
-@@ -79,6 +79,13 @@ export:: $(export-preqs)
+@@ -77,6 +77,14 @@ export:: $(export-preqs)
-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
-DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
-DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
@@ -12,6 +12,7 @@ index 5383399..0410004 100644
+ -DMOZ_NATIVE_THEORA=$(MOZ_NATIVE_THEORA) \
+ -DMOZ_NATIVE_VORBIS=$(MOZ_NATIVE_VORBIS) \
+ -DMOZ_NATIVE_TREMOR=$(MOZ_NATIVE_TREMOR) \
++ -DMOZ_NATIVE_CELT=$(MOZ_NATIVE_CELT) \
+ -DMOZ_NATIVE_OPUS=$(MOZ_NATIVE_OPUS) \
+ -DMOZ_NATIVE_SPEEX=$(MOZ_NATIVE_SPEEX) \
+ -DMOZ_NATIVE_SOUNDTOUCH=$(MOZ_NATIVE_SOUNDTOUCH) \
@@ -22,14 +23,17 @@ diff --git config/external/moz.build config/external/moz.build
index f67c5c7..eb909ce 100644
--- mozilla/config/external/moz.build
+++ mozilla/config/external/moz.build
-@@ -15,13 +15,19 @@ if CONFIG['MOZ_UPDATER']:
- if not CONFIG['MOZ_NATIVE_BZ2']:
- external_dirs += ['modules/libbz2']
+@@ -19,10 +19,19 @@ if CONFIG['MOZ_UPDATER']:
+ # There's no "native brotli" yet, but probably in the future...
+ external_dirs += ['modules/brotli']
-if CONFIG['MOZ_VORBIS']:
+if not CONFIG['MOZ_NATIVE_OGG']:
+ external_dirs += ['media/libogg']
+
++if not CONFIG['MOZ_NATIVE_CELT'] or not CONFIG['MOZ_NATIVE_OPUS']:
++ external_dirs += ['media/libopus']
++
+if not CONFIG['MOZ_NATIVE_THEORA']:
+ external_dirs += ['media/libtheora']
+
@@ -40,12 +44,8 @@ index f67c5c7..eb909ce 100644
+if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']:
external_dirs += ['media/libtremor']
--if CONFIG['MOZ_OPUS']:
-+if CONFIG['MOZ_OPUS'] and not CONFIG['MOZ_NATIVE_OPUS']:
- external_dirs += ['media/libopus']
-
if CONFIG['MOZ_WEBM']:
-@@ -36,13 +42,15 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
+@@ -37,15 +46,16 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ
if not CONFIG['MOZ_NATIVE_PNG']:
external_dirs += ['media/libpng']
@@ -59,35 +59,35 @@ index f67c5c7..eb909ce 100644
'media/kiss_fft',
'media/libcubeb',
- 'media/libogg',
+- 'media/libopus',
- 'media/libtheora',
- 'media/libspeex_resampler',
+ 'media/libstagefright',
- 'media/libsoundtouch',
]
- PARALLEL_DIRS += ['../../' + i for i in external_dirs]
+ DIRS += ['../../' + i for i in external_dirs]
diff --git config/system-headers config/system-headers
index bef567c..9807c29 100644
--- mozilla/config/system-headers
+++ mozilla/config/system-headers
-@@ -1050,8 +1050,6 @@ X11/Xutil.h
- xpt_struct.h
- xpt_xdr.h
+@@ -1263,7 +1263,6 @@ X11/Xlocale.h
+ X11/Xos.h
+ X11/Xutil.h
zmouse.h
--speex/speex_resampler.h
-soundtouch/SoundTouch.h
#if MOZ_NATIVE_PNG==1
png.h
#endif
-@@ -1119,6 +1117,8 @@ ogg/ogg.h
+@@ -1325,6 +1324,7 @@ vorbis/codec.h
+ theora/theoradec.h
+ tremor/ivorbiscodec.h
+ speex/speex_resampler.h
++soundtouch/SoundTouch.h
+ ogg/ogg.h
ogg/os_types.h
nestegg/nestegg.h
- cubeb/cubeb.h
-+speex/speex_resampler.h
-+soundtouch/SoundTouch.h
- #endif
- gst/gst.h
- gst/app/gstappsink.h
-@@ -1155,3 +1155,29 @@ graphite2/Segment.h
+@@ -1365,3 +1365,35 @@ graphite2/Segment.h
harfbuzz/hb-ot.h
harfbuzz/hb.h
#endif
@@ -105,6 +105,12 @@ index bef567c..9807c29 100644
+#if MOZ_NATIVE_TREMOR==1
+tremor/ivorbiscodec.h
+#endif
++#if MOZ_NATIVE_CELT==1
++celt.h
++celt_header.h
++celt/celt.h
++celt/celt_header.h
++#endif
+#if MOZ_NATIVE_OPUS==1
+opus.h
+opus_multistream.h
@@ -121,7 +127,7 @@ diff --git configure.in configure.in
index 87db361..7947626 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -5211,6 +5211,63 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then
+@@ -5223,6 +5223,157 @@ if test "${ac_cv_c_attribute_aligned}" !
fi
dnl ========================================================
@@ -144,8 +150,6 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_OGG)
-+AC_SUBST(MOZ_OGG_CFLAGS)
-+AC_SUBST(MOZ_OGG_LIBS)
+
+dnl ========================================================
+dnl Check for libvorbis
@@ -161,8 +165,6 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_VORBIS)
-+AC_SUBST(MOZ_VORBIS_CFLAGS)
-+AC_SUBST(MOZ_VORBIS_LIBS)
+
+dnl ========================================================
+dnl Check for integer-only libvorbis aka tremor
@@ -178,17 +180,25 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_TREMOR)
-+AC_SUBST(MOZ_TREMOR_CFLAGS)
-+AC_SUBST(MOZ_TREMOR_LIBS)
+
+dnl ========================================================
- dnl = Disable Opus audio codec support
- dnl ========================================================
- MOZ_ARG_DISABLE_BOOL(opus,
-@@ -5219,6 +5274,97 @@ MOZ_ARG_DISABLE_BOOL(opus,
- MOZ_OPUS=1)
-
- dnl ========================================================
++dnl Check for libcelt
++dnl ========================================================
++
++MOZ_ARG_WITH_BOOL(system-celt,
++[ --with-system-celt Use system libcelt (located with pkgconfig)],
++MOZ_NATIVE_CELT=1,
++MOZ_NATIVE_CELT=)
++
++if test -n "$MOZ_NATIVE_CELT"; then
++ PKG_CHECK_MODULES(MOZ_CELT, celt)
++else
++ MOZ_CELT_CFLAGS='-I$(topsrcdir)/media/libopus'
++fi
++
++AC_SUBST(MOZ_NATIVE_CELT)
++
++dnl ========================================================
+dnl Check for libopus
+dnl ========================================================
+
@@ -204,8 +214,6 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_OPUS)
-+AC_SUBST(MOZ_OPUS_CFLAGS)
-+AC_SUBST(MOZ_OPUS_LIBS)
+
+dnl ========================================================
+dnl Check for libtheora
@@ -221,8 +229,6 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_THEORA)
-+AC_SUBST(MOZ_THEORA_CFLAGS)
-+AC_SUBST(MOZ_THEORA_LIBS)
+
+dnl ========================================================
+dnl Check for libspeex resampler
@@ -238,8 +244,6 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_SPEEX)
-+AC_SUBST(MOZ_SPEEX_CFLAGS)
-+AC_SUBST(MOZ_SPEEX_LIBS)
+
+dnl ========================================================
+dnl Check for libsoundtouch
@@ -276,19 +280,17 @@ index 87db361..7947626 100644
+fi
+
+AC_SUBST(MOZ_NATIVE_SOUNDTOUCH)
-+AC_SUBST(MOZ_SOUNDTOUCH_CFLAGS)
-+AC_SUBST(MOZ_SOUNDTOUCH_LIBS)
+
+dnl ========================================================
dnl = Disable VP8 decoder support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webm,
-diff --git content/media/AudioStream.h content/media/AudioStream.h
+diff --git dom/media/AudioStream.h dom/media/AudioStream.h
index 085676d..00c54fb 100644
---- mozilla/content/media/AudioStream.h
-+++ mozilla/content/media/AudioStream.h
-@@ -26,7 +26,7 @@ public:
- };
+--- mozilla/dom/media/AudioStream.h
++++ mozilla/dom/media/AudioStream.h
+@@ -17,7 +17,7 @@
+ #include "CubebUtils.h"
namespace soundtouch {
-class SoundTouch;
@@ -296,177 +298,265 @@ index 085676d..00c54fb 100644
}
namespace mozilla {
-diff --git content/media/Makefile.in content/media/Makefile.in
-index fd34449..c6c42c8 100644
---- mozilla/content/media/Makefile.in
-+++ mozilla/content/media/Makefile.in
-@@ -6,3 +6,31 @@ include $(topsrcdir)/config/rules.mk
+diff --git dom/media/moz.build dom/media/moz.build
+index 7526cff..e0a0ca0 100644
+--- mozilla/dom/media/moz.build
++++ mozilla/dom/media/moz.build
+@@ -212,3 +212,24 @@ if CONFIG['ANDROID_VERSION'] > '15':
+
+ CFLAGS += CONFIG['GSTREAMER_CFLAGS']
+ CXXFLAGS += CONFIG['GSTREAMER_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CXXFLAGS += CONFIG['MOZ_OGG_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ CXXFLAGS += CONFIG['MOZ_THEORA_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ CXXFLAGS += CONFIG['MOZ_VORBIS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ CXXFLAGS += CONFIG['MOZ_TREMOR_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ CXXFLAGS += CONFIG['MOZ_OPUS_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ CXXFLAGS += CONFIG['MOZ_SPEEX_CFLAGS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ CXXFLAGS += CONFIG['MOZ_SOUNDTOUCH_CFLAGS']
+diff --git media/libcubeb/src/moz.build media/libcubeb/src/moz.build
+index 944744d..9a7c8c0 100644
+--- mozilla/media/libcubeb/src/moz.build
++++ mozilla/media/libcubeb/src/moz.build
+@@ -65,6 +65,9 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
- CFLAGS += $(GSTREAMER_CFLAGS)
- CXXFLAGS += $(GSTREAMER_CFLAGS)
-+
-+ifdef MOZ_NATIVE_OGG
-+CXXFLAGS += $(MOZ_OGG_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_THEORA
-+CXXFLAGS += $(MOZ_THEORA_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_VORBIS
-+CXXFLAGS += $(MOZ_VORBIS_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_TREMOR
-+CXXFLAGS += $(MOZ_TREMOR_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_OPUS
-+CXXFLAGS += $(MOZ_OPUS_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_SPEEX
-+CXXFLAGS += $(MOZ_SPEEX_CFLAGS)
-+endif
-+
-+ifdef MOZ_NATIVE_SOUNDTOUCH
-+CXXFLAGS += $(MOZ_SOUNDTOUCH_CFLAGS)
-+endif
-diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in
-index 4c14494..1cb98e2 100644
---- mozilla/media/libcubeb/src/Makefile.in
-+++ mozilla/media/libcubeb/src/Makefile.in
-@@ -9,3 +9,7 @@ CFLAGS += \
- $(MOZ_ALSA_CFLAGS) \
- $(MOZ_PULSEAUDIO_CFLAGS) \
- $(NULL)
-+
-+ifdef MOZ_NATIVE_SPEEX
-+CFLAGS += $(MOZ_SPEEX_CFLAGS)
-+endif
-diff --git media/libtheora/Makefile.in media/libtheora/Makefile.in
-new file mode 100644
-index 0000000..1f02dc0
---- /dev/null
-+++ mozilla/media/libtheora/Makefile.in
-@@ -0,0 +1,9 @@
-+# 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 $(topsrcdir)/config/rules.mk
-+
-+ifdef MOZ_NATIVE_OGG
-+CFLAGS += $(MOZ_OGG_CFLAGS)
-+endif
-diff --git media/libtremor/Makefile.in media/libtremor/Makefile.in
-new file mode 100644
-index 0000000..1f02dc0
---- /dev/null
-+++ mozilla/media/libtremor/Makefile.in
-@@ -0,0 +1,9 @@
-+# 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 $(topsrcdir)/config/rules.mk
-+
-+ifdef MOZ_NATIVE_OGG
-+CFLAGS += $(MOZ_OGG_CFLAGS)
-+endif
-diff --git media/libvorbis/Makefile.in media/libvorbis/Makefile.in
-new file mode 100644
-index 0000000..1f02dc0
---- /dev/null
-+++ mozilla/media/libvorbis/Makefile.in
-@@ -0,0 +1,9 @@
-+# 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 $(topsrcdir)/config/rules.mk
-+
-+ifdef MOZ_NATIVE_OGG
-+CFLAGS += $(MOZ_OGG_CFLAGS)
-+endif
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
+ FINAL_LIBRARY = 'gkmedias'
+
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ SOURCES['cubeb_resampler.cpp'].flags += CONFIG['MOZ_SPEEX_CFLAGS']
++
+ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+ CFLAGS += [
+ '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
+diff --git media/libogg/README_MOZILLA media/libogg/README_MOZILLA
+index 0833e4d..7ece97b 100644
+--- mozilla/media/libogg/README_MOZILLA
++++ mozilla/media/libogg/README_MOZILLA
+@@ -6,3 +6,6 @@ The svn revision number used was r17287.
+ The int-types.patch address a bug that config_types.h generated from
+ Linux platform can't be used on OpenSolaris directly see Mozilla bug
+ 449754
++
++The in-tree copy may be omitted during build by --with-system-ogg.
++Keep version in configure.in in sync on updates.
+diff --git media/libopus/README_MOZILLA media/libopus/README_MOZILLA
+index 2d85c9f..d3fb9f8 100644
+--- mozilla/media/libopus/README_MOZILLA
++++ mozilla/media/libopus/README_MOZILLA
+@@ -9,3 +9,6 @@ files after the copy step.
+ The upstream repository is https://git.xiph.org/opus.git
+
+ The git tag/revision used was v1.1.
++
++The in-tree copy may be omitted during build by --with-system-opus.
++So, keep its pkg-config version check within configure.in in sync on updates.
+diff --git media/libsoundtouch/README_MOZILLA media/libsoundtouch/README_MOZILLA
+index bfd4b1a..15b158d 100644
+--- mozilla/media/libsoundtouch/README_MOZILLA
++++ mozilla/media/libsoundtouch/README_MOZILLA
+@@ -6,3 +6,5 @@ The whole library is not used, only the relevant files are imported in the tree,
+ using the script `update.sh`. Some changes have been made to the files, using
+ the patch `moz-libsoundtouch.patch`. We also use a custom soundtouch_config.h.
+
++The in-tree copy may be omitted during build by --with-system-soundtouch.
++Keep version in configure.in in sync on updates.
+diff --git media/libspeex_resampler/README_MOZILLA media/libspeex_resampler/README_MOZILLA
+index 7f6b1bb..e830300 100644
+--- mozilla/media/libspeex_resampler/README_MOZILLA
++++ mozilla/media/libspeex_resampler/README_MOZILLA
+@@ -3,3 +3,6 @@ This source is from the Speex DSP library
+
+ It consists in the audio resampling code (resampler.c) and its header files
+ dependancies, imported into the tree using the update.sh script.
++
++The in-tree copy may be omitted during build by --with-system-speex.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/README_MOZILLA media/libtheora/README_MOZILLA
+index d48dbfa..f08a2ed 100644
+--- mozilla/media/libtheora/README_MOZILLA
++++ mozilla/media/libtheora/README_MOZILLA
+@@ -3,3 +3,6 @@ using the update.sh script. The changes made were those applied by update.sh,
+ the addition/update of Makefile.in files for the Mozilla build system.
+
+ The subversion revision used was r17578.
++
++The in-tree copy may be omitted during build by --with-system-theora.
++Keep version in configure.in in sync on updates.
+diff --git media/libtheora/moz.build media/libtheora/moz.build
+index 14265b1..3069e99 100644
+--- mozilla/media/libtheora/moz.build
++++ mozilla/media/libtheora/moz.build
+@@ -93,3 +93,5 @@ if CONFIG['GNU_AS']:
+ if CONFIG['OS_TARGET'] == 'Android':
+ DEFINES['__linux__'] = True
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/libtremor/README_MOZILLA media/libtremor/README_MOZILLA
+index ee67b53..3f34a09 100644
+--- mozilla/media/libtremor/README_MOZILLA
++++ mozilla/media/libtremor/README_MOZILLA
+@@ -5,3 +5,6 @@ Makefile.in files for the Mozilla build system.
+
+ The upstream release used was http://svn.xiph.org/trunk/Tremor/
+ The subversion revision used was r17547.
++
++The in-tree copy may be omitted during build by --with-system-tremor.
++Keep version in configure.in in sync on updates.
+diff --git media/libtremor/moz.build media/libtremor/moz.build
+index 31831ba..a03d576 100644
+--- mozilla/media/libtremor/moz.build
++++ mozilla/media/libtremor/moz.build
+@@ -6,3 +6,5 @@
+
+ DIRS += ['include/tremor', 'lib']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/libvorbis/README_MOZILLA media/libvorbis/README_MOZILLA
+index 7c7454c..55baedd 100644
+--- mozilla/media/libvorbis/README_MOZILLA
++++ mozilla/media/libvorbis/README_MOZILLA
+@@ -8,3 +8,6 @@ https://svn.xiph.org/tags/vorbis/libvorbis-1.3.4@19059
+
+ Some files are renamed during the copy to prevent clashes with object
+ file names with other Mozilla libraries.
++
++The in-tree copy may be omitted during build by --with-system-vorbis.
++Keep version in configure.in in sync on updates.
+diff --git media/libvorbis/moz.build media/libvorbis/moz.build
+index 919b99e..cc776f7 100644
+--- mozilla/media/libvorbis/moz.build
++++ mozilla/media/libvorbis/moz.build
+@@ -55,3 +55,6 @@ FINAL_LIBRARY = 'gkmedias'
+ # Suppress warnings in third-party code.
+ if CONFIG['GNU_CC']:
+ CFLAGS += ['-Wno-uninitialized']
++
++if CONFIG['MOZ_NATIVE_OGG']:
++ CFLAGS += CONFIG['MOZ_OGG_CFLAGS']
+diff --git media/webrtc/signaling/test/moz.build media/webrtc/signaling/test/moz.build
index bbc971c..6ed7e41 100644
---- mozilla/media/webrtc/signaling/test/Makefile.in
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -48,6 +48,12 @@ LIBS += \
- $(NULL)
- endif
+--- mozilla/media/webrtc/signaling/test/moz.build
++++ mozilla/media/webrtc/signaling/test/moz.build
+@@ -127,6 +127,9 @@ if CONFIG['MOZ_ALSA']:
+ if CONFIG['MOZ_NATIVE_JPEG']:
+ OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
+
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
-+ifdef MOZ_NATIVE_OPUS
-+LIBS += \
-+ $(MOZ_OPUS_LIBS) \
-+ $(NULL)
-+endif
-+
- ifdef MOZ_NATIVE_LIBVPX
- LIBS += \
- $(MOZ_LIBVPX_LIBS) \
diff --git media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
index 00e77e7..55f48ab 100644
--- mozilla/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
+++ mozilla/media/webrtc/trunk/webrtc/modules/audio_coding/codecs/opus/opus.gypi
-@@ -14,9 +14,9 @@
+@@ -17,18 +17,11 @@
'conditions': [
['build_with_mozilla==1', {
# Mozilla provides its own build of the opus library.
- 'include_dirs': [
- '/media/libopus/include',
-- ]
+- '/media/libopus/src',
+- '/media/libopus/celt',
+ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
+ '$(MOZ_OPUS_CFLAGS)',
-+ ],
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '/media/libopus/include',
+- '/media/libopus/src',
+- '/media/libopus/celt',
+- ],
+- },
}, {
'dependencies': [
'<(DEPTH)/third_party/opus/opus.gyp:opus'
-diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
+diff --git media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+index 00e77e7..55f48ab 100644
+--- mozilla/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
++++ mozilla/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/neteq.gypi
+@@ -84,19 +84,11 @@
+ ],
+ }],
+ ['build_with_mozilla==1', {
+- 'include_dirs': [
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
++ 'cflags_mozilla': [
++ '$(filter -I%, $(MOZ_CELT_CFLAGS))/celt',
++ '$(MOZ_OPUS_CFLAGS)',
++ '$(filter -I%, $(MOZ_OPUS_CFLAGS))/../src',
+ ],
+- 'direct_dependent_settings': {
+- 'include_dirs': [
+- '../../../../../../media/opus/celt',
+- # Need Opus header files for the audio classifier.
+- '<(DEPTH)/../../../media/opus/celt',
+-# '<(DEPTH)/third_party/opus/src/src',
+- ],
+- },
+ }],
+ ],
+ 'sources': [
+diff --git toolkit/library/moz.build toolkit/library/moz.build
index d42137a..695e75a8 100644
---- mozilla/toolkit/library/libxul.mk
-+++ mozilla/toolkit/library/libxul.mk
-@@ -77,6 +77,34 @@ ifdef MOZ_NATIVE_HUNSPELL
- EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
- endif
+--- mozilla/toolkit/library/moz.build
++++ mozilla/toolkit/library/moz.build
+@@ -178,6 +178,30 @@ if CONFIG['MOZ_NATIVE_PNG']:
+ if CONFIG['MOZ_NATIVE_HUNSPELL']:
+ OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+
++if CONFIG['MOZ_NATIVE_OGG']:
++ OS_LIBS += CONFIG['MOZ_OGG_LIBS']
++
++if CONFIG['MOZ_NATIVE_THEORA']:
++ OS_LIBS += CONFIG['MOZ_THEORA_LIBS']
++
++if CONFIG['MOZ_NATIVE_VORBIS']:
++ OS_LIBS += CONFIG['MOZ_VORBIS_LIBS']
++
++if CONFIG['MOZ_NATIVE_TREMOR']:
++ OS_LIBS += CONFIG['MOZ_TREMOR_LIBS']
++
++if CONFIG['MOZ_NATIVE_CELT']:
++ OS_LIBS += CONFIG['MOZ_CELT_LIBS']
++
++if CONFIG['MOZ_NATIVE_OPUS']:
++ OS_LIBS += CONFIG['MOZ_OPUS_LIBS']
++
++if CONFIG['MOZ_NATIVE_SPEEX']:
++ OS_LIBS += CONFIG['MOZ_SPEEX_LIBS']
++
++if CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ OS_LIBS += CONFIG['MOZ_SOUNDTOUCH_LIBS']
++
+ if CONFIG['MOZ_NATIVE_LIBEVENT']:
+ OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
-+ifdef MOZ_NATIVE_OGG
-+EXTRA_DSO_LDOPTS += $(MOZ_OGG_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_THEORA
-+EXTRA_DSO_LDOPTS += $(MOZ_THEORA_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_VORBIS
-+EXTRA_DSO_LDOPTS += $(MOZ_VORBIS_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_TREMOR
-+EXTRA_DSO_LDOPTS += $(MOZ_TREMOR_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_OPUS
-+EXTRA_DSO_LDOPTS += $(MOZ_OPUS_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_SPEEX
-+EXTRA_DSO_LDOPTS += $(MOZ_SPEEX_LIBS)
-+endif
-+
-+ifdef MOZ_NATIVE_SOUNDTOUCH
-+EXTRA_DSO_LDOPTS += $(MOZ_SOUNDTOUCH_LIBS)
-+endif
-+
- ifdef MOZ_NATIVE_LIBEVENT
- EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
- endif
-diff --git xpcom/build/nsXPComInit.cpp xpcom/build/nsXPComInit.cpp
+diff --git xpcom/build/XPCOMInit.cpp xpcom/build/XPCOMInit.cpp
index 2cf281e..6d7af0e 100644
---- mozilla/xpcom/build/nsXPComInit.cpp
-+++ mozilla/xpcom/build/nsXPComInit.cpp
-@@ -130,7 +130,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
+--- mozilla/xpcom/build/XPCOMInit.cpp
++++ mozilla/xpcom/build/XPCOMInit.cpp
+@@ -138,7 +138,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports*, REFNSIID, void**);
#include "mozilla/VisualEventTracer.h"
#endif
@@ -476,17 +566,17 @@ index 2cf281e..6d7af0e 100644
#if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
#include "vpx_mem/vpx_mem.h"
#endif
-@@ -571,11 +573,13 @@ NS_InitXPCOM2(nsIServiceManager* *result,
- // this oddness.
- mozilla::SetICUMemoryFunctions();
+@@ -651,11 +653,13 @@ NS_InitXPCOM2(nsIServiceManager** aResult,
+ // this oddness.
+ mozilla::SetICUMemoryFunctions();
+#ifndef MOZ_OGG_NO_MEM_REPORTING
- // Do the same for libogg.
- ogg_set_mem_functions(OggReporter::CountingMalloc,
- OggReporter::CountingCalloc,
- OggReporter::CountingRealloc,
- OggReporter::CountingFree);
+ // Do the same for libogg.
+ ogg_set_mem_functions(OggReporter::CountingMalloc,
+ OggReporter::CountingCalloc,
+ OggReporter::CountingRealloc,
+ OggReporter::CountingFree);
+#endif
#if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
- // And for VPX.
+ // And for VPX.