www-client/firefox-bin: fix localization
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 12 Jan 2019 22:42:08 +0000 (23:42 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 12 Jan 2019 22:42:22 +0000 (23:42 +0100)
Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
www-client/firefox-bin/files/all-gentoo-2.js [new file with mode: 0644]
www-client/firefox-bin/firefox-bin-60.4.0-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-60.4.0.ebuild with 92% similarity]
www-client/firefox-bin/firefox-bin-64.0.2-r1.ebuild [moved from www-client/firefox-bin/firefox-bin-64.0.2.ebuild with 93% similarity]

diff --git a/www-client/firefox-bin/files/all-gentoo-2.js b/www-client/firefox-bin/files/all-gentoo-2.js
new file mode 100644 (file)
index 0000000..29e34ca
--- /dev/null
@@ -0,0 +1,12 @@
+// Ensure preference can't be changed by users
+lockPref("app.update.auto", false);
+lockPref("app.update.enabled", false);
+
+// Allow user to change based on needs
+defaultPref("browser.display.use_system_colors", true);
+defaultPref("spellchecker.dictionary_path", "/usr/share/myspell");
+defaultPref("browser.shell.checkDefaultBrowser", false);
+defaultPref("intl.locale.requested", "");
+
+// Preferences that should be reset every session
+pref("browser.EULA.override", true);
similarity index 92%
rename from www-client/firefox-bin/firefox-bin-60.4.0.ebuild
rename to www-client/firefox-bin/firefox-bin-60.4.0-r1.ebuild
index 371ab74243bdd6c14dbf7f42ee5a3e954b5704c1..ebbc9c1312931c4b5d3d8052be47c6524298ad0f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -123,18 +123,12 @@ src_install() {
        insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
        doins "${FILESDIR}"/local-settings.js
        insinto ${MOZILLA_FIVE_HOME}
-       newins "${FILESDIR}"/all-gentoo-1.js all-gentoo.js
+       newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js
 
        # Install language packs
-       MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install
-
-       local LANG=${LINGUAS%% *}
-       if [[ -n ${LANG} && ${LANG} != "en" ]]; then
-               elog "Setting default locale to ${LANG}"
-               echo "pref(\"intl.locale.requested\", \"${LANG}\");" \
-                       >> "${ED}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
-                       die "sed failed to change locale"
-       fi
+       MOZEXTENSION_TARGET="distribution/extensions" \
+               MOZ_INSTALL_L10N_XPIFILE="1" \
+               mozlinguas_src_install
 
        # Create /usr/bin/firefox-bin
        dodir /usr/bin/
similarity index 93%
rename from www-client/firefox-bin/firefox-bin-64.0.2.ebuild
rename to www-client/firefox-bin/firefox-bin-64.0.2-r1.ebuild
index 0fbbe4c781d9d8c0141d1f4161bfd777e845b1ed..0567f8c5f39f19e81bd431db3ce904d3702f8bd9 100644 (file)
@@ -123,18 +123,12 @@ src_install() {
        insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
        doins "${FILESDIR}"/local-settings.js
        insinto ${MOZILLA_FIVE_HOME}
-       newins "${FILESDIR}"/all-gentoo-1.js all-gentoo.js
+       newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js
 
        # Install language packs
-       MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install
-
-       local LANG=${LINGUAS%% *}
-       if [[ -n ${LANG} && ${LANG} != "en" ]]; then
-               elog "Setting default locale to ${LANG}"
-               echo "pref(\"intl.locale.requested\", \"${LANG}\");" \
-                       >> "${ED}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
-                       die "sed failed to change locale"
-       fi
+       MOZEXTENSION_TARGET="distribution/extensions" \
+               MOZ_INSTALL_L10N_XPIFILE="1" \
+               mozlinguas_src_install
 
        # Create /usr/bin/firefox-bin
        dodir /usr/bin/