From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C65BF138206 for ; Sat, 23 Apr 2016 15:55:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FEDCE0850; Sat, 23 Apr 2016 15:55:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DEA9EE0850 for ; Sat, 23 Apr 2016 15:55:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3EC0D3407E6 for ; Sat, 23 Apr 2016 15:55:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A4EEB16 for ; Sat, 23 Apr 2016 15:55:01 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1461422933.7eaaabf232470e21d2206ba7a74c832c2278d55f.axs@gentoo> Subject: [gentoo-commits] proj/mozilla:master commit in: eclass/, www-client/firefox/ X-VCS-Repository: proj/mozilla X-VCS-Files: eclass/mozconfig-v6.46.eclass www-client/firefox/firefox-46.0_beta11.ebuild X-VCS-Directories: eclass/ www-client/firefox/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: 7eaaabf232470e21d2206ba7a74c832c2278d55f X-VCS-Branch: master Date: Sat, 23 Apr 2016 15:55:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e28b6d44-f17f-4ce5-a753-3ce842d2c351 X-Archives-Hash: 2de3a4eb71bf38dc684ddc24560a8974 commit: 7eaaabf232470e21d2206ba7a74c832c2278d55f Author: Ian Stakenvicius gentoo org> AuthorDate: Sat Apr 23 14:48:47 2016 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Sat Apr 23 14:48:53 2016 +0000 URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=7eaaabf2 force the graphite pref when system-harfbuzz is enabled As system-harfbuzz is a mozconfig-based pref, a helper function has been added to the mozconfig eclass that will add common entries into the specified prefs file based on values from use flags or settings controlled by mozconfig. eclass/mozconfig-v6.46.eclass | 41 +++++++++++++++++++++++++++ www-client/firefox/firefox-46.0_beta11.ebuild | 9 ++---- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/eclass/mozconfig-v6.46.eclass b/eclass/mozconfig-v6.46.eclass index 7cb2322..62cc189 100644 --- a/eclass/mozconfig-v6.46.eclass +++ b/eclass/mozconfig-v6.46.eclass @@ -361,3 +361,44 @@ mozconfig_config() { fi fi } + +# @FUNCTION: mozconfig_install_prefs +# @DESCRIPTION: +# Set preferences into the prefs.js file specified as a parameter to +# the function. This sets both some common prefs to all mozilla +# packages, and any prefs that may relate to the use flags administered +# by mozconfig_config(). +# +# Call this within src_install() phase, after copying the template +# prefs file (if any) from ${FILESDIR} +# +# Example: +# +# inherit mozconfig-v6.46 +# +# src_install() { +# cp "${FILESDIR}"/gentoo-default-prefs.js \ +# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ +# || die +# +# mozconfig_install_prefs \ +# "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" +# +# ... +# } + +mozconfig_install_prefs() { + local prefs_file="${1}" + + einfo "Adding prefs from mozconfig to ${prefs_file}" + + # set dictionary path, to use system hunspell + echo "pref(\"spellchecker.dictionary_path\", \"${EPREFIX}/usr/share/myspell\");" \ + >>"${prefs_file}" || die + + # force the graphite pref if system-harfbuzz is enabled, since the pref cant disable it + if use system-harfbuzz ; then + echo "sticky_pref(\"gfx.font_rendering.graphite.enabled\",true);" \ + >>"${prefs_file}" || die + fi +} diff --git a/www-client/firefox/firefox-46.0_beta11.ebuild b/www-client/firefox/firefox-46.0_beta11.ebuild index 7e8f883..3cccb6c 100644 --- a/www-client/firefox/firefox-46.0_beta11.ebuild +++ b/www-client/firefox/firefox-46.0_beta11.ebuild @@ -256,7 +256,6 @@ src_compile() { src_install() { MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}" - DICTPATH="\"${EPREFIX}/usr/share/myspell\"" cd "${BUILD_OBJ_DIR}" || die @@ -265,6 +264,9 @@ src_install() { "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ || die + mozconfig_install_prefs \ + "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" + # Augment this with hwaccel prefs if use hwaccel ; then cat "${FILESDIR}"/gentoo-hwaccel-prefs.js-1 >> \ @@ -272,11 +274,6 @@ src_install() { || die fi - # Set default path to search for dictionaries. - echo "pref(\"spellchecker.dictionary_path\", ${DICTPATH});" \ - >> "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ - || die - echo "pref(\"extensions.autoDisableScopes\", 3);" >> \ "${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ || die