summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/thunderbird/Makefile1
-rw-r--r--mail/thunderbird/files/patch-mail-app-nsMailApp.cpp4
-rw-r--r--mail/thunderbird/files/patch-system-openh264239
-rw-r--r--multimedia/openh264/Makefile4
-rw-r--r--multimedia/openh264/files/gmpopenh264.js.in3
-rw-r--r--www/firefox-esr/Makefile1
-rw-r--r--www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp3
-rw-r--r--www/firefox-esr/files/patch-system-openh264239
-rw-r--r--www/firefox/Makefile2
-rw-r--r--www/firefox/files/patch-browser-app-nsBrowserApp.cpp3
-rw-r--r--www/firefox/files/patch-system-openh264231
-rw-r--r--www/libxul/Makefile1
-rw-r--r--www/libxul/files/patch-system-openh264239
-rw-r--r--www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp3
-rw-r--r--www/seamonkey/Makefile2
-rw-r--r--www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp22
-rw-r--r--www/seamonkey/files/patch-system-openh264221
17 files changed, 34 insertions, 1184 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 7f1a132b1bdd..37dd5eca64c0 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -3,6 +3,7 @@
PORTNAME= thunderbird
DISTVERSION= 38.1.0
+PORTREVISION= 1
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
index 3d3c7d044585..27faab9fa5a9 100644
--- a/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
+++ b/mail/thunderbird/files/patch-mail-app-nsMailApp.cpp
@@ -1,10 +1,12 @@
--- mail/app/nsMailApp.cpp~
+++ mail/app/nsMailApp.cpp
-@@ -320,6 +320,7 @@ int main(int argc, char* argv[])
+@@ -320,6 +320,9 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
++
int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
diff --git a/mail/thunderbird/files/patch-system-openh264 b/mail/thunderbird/files/patch-system-openh264
deleted file mode 100644
index 0da1175a2e06..000000000000
--- a/mail/thunderbird/files/patch-system-openh264
+++ /dev/null
@@ -1,239 +0,0 @@
-# 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/multimedia/openh264/Makefile b/multimedia/openh264/Makefile
index e14dbff487cd..18a5797e8281 100644
--- a/multimedia/openh264/Makefile
+++ b/multimedia/openh264/Makefile
@@ -3,7 +3,7 @@
PORTNAME= openh264
PORTVERSION= 1.4.0
DISTVERSIONPREFIX=v
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= multimedia
MAINTAINER= gecko@FreeBSD.org
@@ -35,7 +35,7 @@ PLUGINS_USES= webplugin:gecko
WEBPLUGIN_NAME= gmp-gmp${PORTNAME}
WEBPLUGIN_FILES=gmp${PORTNAME}.info libgmp${PORTNAME}.so
SUB_FILES+= gmp${PORTNAME}.js
-SUB_LIST+= PORTVERSION=${PORTVERSION} WEBPLUGIN_DIR="${WEBPLUGIN_DIR}"
+SUB_LIST+= PORTVERSION=${PORTVERSION} TIMESTAMP="`date +%s`"
TEST_BUILD_DEPENDS=googletest>=1.6.0:${PORTSDIR}/devel/googletest
TEST_CFLAGS= -I${LOCALBASE}/include
diff --git a/multimedia/openh264/files/gmpopenh264.js.in b/multimedia/openh264/files/gmpopenh264.js.in
index e1924555ff34..a24374103180 100644
--- a/multimedia/openh264/files/gmpopenh264.js.in
+++ b/multimedia/openh264/files/gmpopenh264.js.in
@@ -1,2 +1,3 @@
-pref("media.gmp-gmpopenh264.path", "%%WEBPLUGIN_DIR%%");
+pref("media.gmp-gmpopenh264.autoupdate", false);
+pref("media.gmp-gmpopenh264.lastUpdate", %%TIMESTAMP%%);
pref("media.gmp-gmpopenh264.version", "%%PORTVERSION%%");
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index 17a32e808387..ef6c6d4882e2 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -4,6 +4,7 @@
PORTNAME= firefox
DISTVERSION= 38.2.0
DISTVERSIONSUFFIX=esr.source
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
diff --git a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
index b3f59e4eeb6d..97b7b8d0cd0b 100644
--- a/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/firefox-esr/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,9 +1,10 @@
--- browser/app/nsBrowserApp.cpp~
+++ browser/app/nsBrowserApp.cpp
-@@ -334,6 +334,7 @@ int main(int argc, char* argv[])
+@@ -417,6 +417,8 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
int gotCounters;
#if defined(XP_UNIX)
diff --git a/www/firefox-esr/files/patch-system-openh264 b/www/firefox-esr/files/patch-system-openh264
deleted file mode 100644
index e694b28f436e..000000000000
--- a/www/firefox-esr/files/patch-system-openh264
+++ /dev/null
@@ -1,239 +0,0 @@
-# Revert bug 1045209 to allow using absolute path
-
-diff --git dom/media/gmp/GMPChild.cpp dom/media/gmp/GMPChild.cpp
-index 1dde3ac..12c88cf 100644
---- dom/media/gmp/GMPChild.cpp
-+++ 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
---- dom/media/gmp/GMPParent.cpp
-+++ 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
---- toolkit/modules/GMPInstallManager.jsm
-+++ 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
---- toolkit/modules/GMPUtils.jsm
-+++ 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
---- toolkit/mozapps/extensions/internal/GMPProvider.jsm
-+++ 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/www/firefox/Makefile b/www/firefox/Makefile
index 970f50591191..3783147dfc2e 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -4,7 +4,7 @@
PORTNAME= firefox
DISTVERSION= 40.0
DISTVERSIONSUFFIX=.source
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
diff --git a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
index b3f59e4eeb6d..97b7b8d0cd0b 100644
--- a/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
+++ b/www/firefox/files/patch-browser-app-nsBrowserApp.cpp
@@ -1,9 +1,10 @@
--- browser/app/nsBrowserApp.cpp~
+++ browser/app/nsBrowserApp.cpp
-@@ -334,6 +334,7 @@ int main(int argc, char* argv[])
+@@ -417,6 +417,8 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
int gotCounters;
#if defined(XP_UNIX)
diff --git a/www/firefox/files/patch-system-openh264 b/www/firefox/files/patch-system-openh264
deleted file mode 100644
index f2f8a9e796bf..000000000000
--- a/www/firefox/files/patch-system-openh264
+++ /dev/null
@@ -1,231 +0,0 @@
-# Revert bug 1045209 to allow using absolute path
-
-diff --git dom/media/gmp/GMPChild.cpp dom/media/gmp/GMPChild.cpp
-index 1dde3ac..12c88cf 100644
---- dom/media/gmp/GMPChild.cpp
-+++ 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
---- dom/media/gmp/GMPParent.cpp
-+++ dom/media/gmp/GMPParent.cpp
-@@ -93,22 +93,15 @@
- 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));
-+ nsAutoString leafname;
-+ nsresult rv = aPluginDir->GetLeafName(leafname);
- if (NS_FAILED(rv)) {
- return rv;
- }
-- nsAutoString parentLeafName;
-- rv = parent->GetLeafName(parentLeafName);
-- if (NS_FAILED(rv)) {
-- return rv;
-- }
-- LOGD("%s: for %s", __FUNCTION__, NS_LossyConvertUTF16toASCII(parentLeafName).get());
-+ LOGD("%s: for %s", __FUNCTION__, 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
---- toolkit/modules/GMPInstallManager.jsm
-+++ 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);
-@@ -895,10 +893,12 @@ GMPDownloader.prototype = {
- // 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);
- // Reset the trial create pref, so that Gecko knows to do a test
- // run before reporting that the GMP works to content.
- GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_TRIAL_CREATE, gmpAddon.version,
-diff --git toolkit/modules/GMPUtils.jsm toolkit/modules/GMPUtils.jsm
-index 1f3a0b1..93517be 100644
---- toolkit/modules/GMPUtils.jsm
-+++ 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
---- toolkit/mozapps/extensions/internal/GMPProvider.jsm
-+++ 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);
-@@ -135,11 +134,8 @@ GMPWrapper.prototype = {
-
- 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;
- },
-@@ -158,8 +154,13 @@ GMPWrapper.prototype = {
- 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.removeAndDeletePluginDirectory(this._gmpPath, true /* can defer */);
- }
-@@ -415,15 +409,10 @@ GMPWrapper.prototype = {
- 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/www/libxul/Makefile b/www/libxul/Makefile
index 0b5bbb6be90f..2ed5a4393a6e 100644
--- a/www/libxul/Makefile
+++ b/www/libxul/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libxul
DISTVERSION= 38.2.0
+PORTREVISION= 1
CATEGORIES?= www devel
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \
MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build2/source
diff --git a/www/libxul/files/patch-system-openh264 b/www/libxul/files/patch-system-openh264
deleted file mode 100644
index e694b28f436e..000000000000
--- a/www/libxul/files/patch-system-openh264
+++ /dev/null
@@ -1,239 +0,0 @@
-# Revert bug 1045209 to allow using absolute path
-
-diff --git dom/media/gmp/GMPChild.cpp dom/media/gmp/GMPChild.cpp
-index 1dde3ac..12c88cf 100644
---- dom/media/gmp/GMPChild.cpp
-+++ 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
---- dom/media/gmp/GMPParent.cpp
-+++ 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
---- toolkit/modules/GMPInstallManager.jsm
-+++ 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
---- toolkit/modules/GMPUtils.jsm
-+++ 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
---- toolkit/mozapps/extensions/internal/GMPProvider.jsm
-+++ 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/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp b/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
index cb0e7f7b9abd..9ea5eed32171 100644
--- a/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
+++ b/www/libxul/files/patch-xulrunner-stub-nsXULStub.cpp
@@ -1,9 +1,10 @@
--- xulrunner/stub/nsXULStub.cpp~
+++ xulrunner/stub/nsXULStub.cpp
-@@ -202,6 +202,8 @@ main(int argc, char **argv)
+@@ -160,6 +160,9 @@ main(int argc, char **argv)
char greDir[MAXPATHLEN];
bool greFound = false;
++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+
#if defined(XP_MACOSX)
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile
index 05ce86a9ae50..d584b322f274 100644
--- a/www/seamonkey/Makefile
+++ b/www/seamonkey/Makefile
@@ -3,7 +3,7 @@
PORTNAME= seamonkey
DISTVERSION= 2.33.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES?= www mail news editors irc ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp b/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp
index 6809693a20ce..00dd483a95fb 100644
--- a/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp
+++ b/www/seamonkey/files/patch-suite-app-nsSuiteApp.cpp
@@ -1,11 +1,21 @@
--- suite/app/nsSuiteApp.cpp~
+++ suite/app/nsSuiteApp.cpp
-@@ -215,6 +215,8 @@ int main(int argc, char* argv[])
- #ifdef XP_MACOSX
+@@ -331,6 +331,9 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
-+
+
++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
+ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
-
- nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath);
- if (NS_FAILED(rv)) {
++
+ int gotCounters;
+ #if defined(XP_UNIX)
+ struct rusage initialRUsage;
+@@ -339,7 +342,7 @@ int main(int argc, char* argv[])
+ IO_COUNTERS ioCounters;
+ gotCounters = GetProcessIoCounters(GetCurrentProcess(), &ioCounters);
+ #endif
+-
++
+ nsIFile *xreDirectory;
+
+ #ifdef HAS_DLL_BLOCKLIST
diff --git a/www/seamonkey/files/patch-system-openh264 b/www/seamonkey/files/patch-system-openh264
deleted file mode 100644
index 0e9c9ff7284a..000000000000
--- a/www/seamonkey/files/patch-system-openh264
+++ /dev/null
@@ -1,221 +0,0 @@
-# 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
-@@ -107,6 +107,7 @@
- */
- KEY_LOG_ENABLED: "media.gmp-manager.log",
- KEY_ADDON_LAST_UPDATE: "media.{0}.lastUpdate",
-+ KEY_ADDON_PATH: "media.{0}.path",
- KEY_ADDON_VERSION: "media.{0}.version",
- KEY_ADDON_AUTOUPDATE: "media.{0}.autoupdate",
- KEY_URL: "media.gmp-manager.url",
-@@ -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);
-@@ -899,10 +898,12 @@
- // Success, set the prefs
- let now = Math.round(Date.now() / 1000);
- GMPPrefs.set(GMPPrefs.KEY_ADDON_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_ADDON_VERSION, gmpAddon.version,
- gmpAddon.id);
-+ GMPPrefs.set(GMPPrefs.KEY_ADDON_PATH,
-+ installToDirPath.path, gmpAddon.id);
- this._deferred.resolve(extractedPaths);
- }, err => {
- this._deferred.reject(err);
-diff --git toolkit/mozapps/extensions/internal/OpenH264Provider.jsm toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
-index 1f3a0b1..93517be 100644
---- mozilla/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
-+++ mozilla/toolkit/mozapps/extensions/internal/OpenH264Provider.jsm
-@@ -29,6 +29,7 @@
- const OPENH264_PLUGIN_ID = "gmp-gmpopenh264";
- const OPENH264_PREF_BRANCH = "media." + OPENH264_PLUGIN_ID + ".";
- const OPENH264_PREF_ENABLED = "enabled";
-+const OPENH264_PREF_PATH = "path";
- const OPENH264_PREF_VERSION = "version";
- const OPENH264_PREF_LASTUPDATE = "lastUpdate";
- const OPENH264_PREF_AUTOUPDATE = "autoupdate";
-@@ -93,7 +94,12 @@
-
- get description() { return pluginsBundle.GetStringFromName("openH264_description"); },
-
-- get version() { return prefs.get(OPENH264_PREF_VERSION, ""); },
-+ get version() {
-+ if (this.isInstalled) {
-+ return prefs.get(OPENH264_PREF_VERSION, "");
-+ }
-+ return "";
-+ },
-
- get isActive() { return !this.userDisabled; },
- get appDisabled() { return false; },
-@@ -217,24 +223,17 @@
-
- get pluginMimeTypes() { return []; },
- get pluginLibraries() {
-- if (this.isInstalled) {
-- let path = this.version;
-- return [path];
-- }
-- return [];
-+ let path = prefs.get(OPENH264_PREF_PATH, null);
-+ return path && path.length ? [OS.Path.basename(path)] : [];
- },
- get pluginFullpath() {
-- if (this.isInstalled) {
-- let path = OS.Path.join(OS.Constants.Path.profileDir,
-- OPENH264_PLUGIN_ID,
-- this.version);
-- return [path];
-- }
-- return [];
-+ let path = prefs.get(OPENH264_PREF_PATH, null);
-+ return path && path.length ? [path] : [];
- },
-
- get isInstalled() {
-- return this.version.length > 0;
-+ let path = prefs.get(OPENH264_PREF_PATH, "");
-+ return path.length > 0;
- },
- };
-
-@@ -245,19 +244,14 @@
- "OpenH264Provider" + "::");
- OpenH264Wrapper._log = Log.repository.getLoggerWithMessagePrefix("Toolkit.OpenH264Provider",
- "OpenH264Wrapper" + "::");
-- this.gmpPath = null;
-- if (OpenH264Wrapper.isInstalled) {
-- this.gmpPath = OS.Path.join(OS.Constants.Path.profileDir,
-- OPENH264_PLUGIN_ID,
-- prefs.get(OPENH264_PREF_VERSION, null));
-- }
-+ this.gmpPath = prefs.get(OPENH264_PREF_PATH, null);
- let enabled = prefs.get(OPENH264_PREF_ENABLED, true);
- this._log.trace("startup() - enabled=" + enabled + ", gmpPath="+this.gmpPath);
-
-
- Services.obs.addObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED, false);
- prefs.observe(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this);
-- prefs.observe(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this);
-+ prefs.observe(OPENH264_PREF_PATH, this.onPrefPathChanged, this);
- prefs.observe(OPENH264_PREF_LOGGING, configureLogging);
-
- if (this.gmpPath && enabled) {
-@@ -270,7 +264,7 @@
- this._log.trace("shutdown()");
- Services.obs.removeObserver(this, AddonManager.OPTIONS_NOTIFICATION_DISPLAYED);
- prefs.ignore(OPENH264_PREF_ENABLED, this.onPrefEnabledChanged, this);
-- prefs.ignore(OPENH264_PREF_VERSION, this.onPrefVersionChanged, this);
-+ prefs.ignore(OPENH264_PREF_PATH, this.onPrefPathChanged, this);
- prefs.ignore(OPENH264_PREF_LOGGING, configureLogging);
-
- return OpenH264Wrapper._updateTask;
-@@ -296,25 +290,20 @@
- wrapper);
- },
-
-- onPrefVersionChanged: function() {
-+ onPrefPathChanged: function() {
- let wrapper = OpenH264Wrapper;
-
- AddonManagerPrivate.callAddonListeners("onUninstalling", wrapper, false);
- if (this.gmpPath) {
-- this._log.info("onPrefVersionChanged() - unregistering gmp directory " + this.gmpPath);
-+ this._log.info("onPrefPathChanged() - removing gmp directory " + this.gmpPath);
- gmpService.removePluginDirectory(this.gmpPath);
- }
- AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper);
-
- AddonManagerPrivate.callInstallListeners("onExternalInstall", null, wrapper, null, false);
-- this.gmpPath = null;
-- if (OpenH264Wrapper.isInstalled) {
-- this.gmpPath = OS.Path.join(OS.Constants.Path.profileDir,
-- OPENH264_PLUGIN_ID,
-- prefs.get(OPENH264_PREF_VERSION, null));
-- }
-+ this.gmpPath = prefs.get(OPENH264_PREF_PATH, null);
- if (this.gmpPath && wrapper.isActive) {
-- this._log.info("onPrefVersionChanged() - registering gmp directory " + this.gmpPath);
-+ this._log.info("onPrefPathChanged() - adding gmp directory " + this.gmpPath);
- gmpService.addPluginDirectory(this.gmpPath);
- }
- AddonManagerPrivate.callAddonListeners("onInstalled", wrapper);