commit:     afb616410f45238e36c444097b2c10dd753e9325
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  3 21:14:17 2015 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 19:58:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=afb61641

unset MOZ_DEV_EDITION define but add back some of the pref's when USE=bindist

Since firefox-35, USE=bindist has enabled codepaths that completely change how 
profiles
are handled, as per bug 536682.  This patch attempts to address that by 
disabling this
codepath, but keeping some of the pref() entries that the codepath enables.  
The pref()
entries may not necessarily be a good idea to keep either, but we may not want 
a dev-edition
branded firefox to act exactly like a firefox-branded one either (in terms of 
crashreporting,
feedback, and so forth).

 www-client/firefox/firefox-40.0.3.ebuild     | 15 +++++++++++++++
 www-client/firefox/firefox-41.0_beta6.ebuild | 15 +++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/www-client/firefox/firefox-40.0.3.ebuild 
b/www-client/firefox/firefox-40.0.3.ebuild
index c1b7bbf..a467abf 100644
--- a/www-client/firefox/firefox-40.0.3.ebuild
+++ b/www-client/firefox/firefox-40.0.3.ebuild
@@ -174,6 +174,10 @@ src_prepare() {
        sed 's@\(xargs rm\)$@\1 -f@' \
                -i "${S}"/toolkit/mozapps/installer/packager.mk || die
 
+       # Keep codebase the same even if not using official branding
+       sed '/^MOZ_DEV_EDITION=1/d' \
+               -i "${S}"/browser/branding/aurora/configure.sh || die
+
        eautoreconf
 
        # Must run autoconf in js/src
@@ -332,6 +336,17 @@ src_install() {
                # Let's just stick with this one...
                icon="aurora"
                name="Aurora"
+
+               # Override preferences to set the MOZ_DEV_EDITION defaults, 
since we
+               # don't define MOZ_DEV_EDITION to avoid profile debaucles.
+               # (source: browser/app/profile/firefox.js)
+               cat 
>>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" 
<<PROFILE_EOF
+pref("app.feedback.baseURL", 
"https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/";);
+sticky_pref("lightweightThemes.selectedThemeID", 
"[email protected]");
+sticky_pref("browser.devedition.theme.enabled", true);
+sticky_pref("devtools.theme", "dark");
+PROFILE_EOF
+
        else
                sizes="16 22 24 32 256"
                icon_path="${S}/browser/branding/official"

diff --git a/www-client/firefox/firefox-41.0_beta6.ebuild 
b/www-client/firefox/firefox-41.0_beta6.ebuild
index a5d5d70..bdf7832 100644
--- a/www-client/firefox/firefox-41.0_beta6.ebuild
+++ b/www-client/firefox/firefox-41.0_beta6.ebuild
@@ -174,6 +174,10 @@ src_prepare() {
        sed 's@\(xargs rm\)$@\1 -f@' \
                -i "${S}"/toolkit/mozapps/installer/packager.mk || die
 
+       # Keep codebase the same even if not using official branding
+       sed '/^MOZ_DEV_EDITION=1/d' \
+               -i "${S}"/browser/branding/aurora/configure.sh || die
+
        eautoreconf
 
        # Must run autoconf in js/src
@@ -332,6 +336,17 @@ src_install() {
                # Let's just stick with this one...
                icon="aurora"
                name="Aurora"
+
+               # Override preferences to set the MOZ_DEV_EDITION defaults, 
since we
+               # don't define MOZ_DEV_EDITION to avoid profile debaucles.
+               # (source: browser/app/profile/firefox.js)
+               cat 
>>"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" 
<<PROFILE_EOF
+pref("app.feedback.baseURL", 
"https://input.mozilla.org/%LOCALE%/feedback/firefoxdev/%VERSION%/";);
+sticky_pref("lightweightThemes.selectedThemeID", 
"[email protected]");
+sticky_pref("browser.devedition.theme.enabled", true);
+sticky_pref("devtools.theme", "dark");
+PROFILE_EOF
+
        else
                sizes="16 22 24 32 256"
                icon_path="${S}/browser/branding/official"

Reply via email to