Commit 6e11219d authored by Jérome Perrin's avatar Jérome Perrin

component/firefox: generate a fallback $FONTCONFIG_FILE

Since e5687602 it's instance
responsability to generate a fonts.conf if they need fonts, but we
realized to late that if there is no /etc/fonts/fonts.conf on the
machine firefox does not start.

In recent ERP5 software release, we have a $FONTCONFIG_FILE, but on
older versions we don't.

To keep compatibility with old ERP5 software release, we generate a
default FONTCONFIG_FILE that will be used as fallback when
$FONTCONFIG_FILE environment variable is not set.
parent fd1a89c8
...@@ -40,6 +40,9 @@ install = ...@@ -40,6 +40,9 @@ install =
cd {} cd {}
export LD_LIBRARY_PATH=$PWD:{} export LD_LIBRARY_PATH=$PWD:{}
export PATH={}:$PATH export PATH={}:$PATH
# BBB use a default fonts.conf for compatibility, but it's software instance
# responsability to build a fonts.conf with the fonts they want.
[ -z $FONTCONFIG_FILE ] && export FONTCONFIG_FILE=${firefox-default-fonts-conf:rendered}
exec ./firefox "$@" exec ./firefox "$@"
""".format( """.format(
firefox, firefox,
...@@ -68,6 +71,20 @@ part = ${firefox-52:location} ...@@ -68,6 +71,20 @@ part = ${firefox-52:location}
wrapper-name = firefox-51 wrapper-name = firefox-51
part = ${firefox-51:location} part = ${firefox-51:location}
[firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
context =
key cachedir ~/.fontconfig-firefox/
key fonts :fonts
key includes :includes
fonts =
${ipaex-fonts:location}
${liberation-fonts:location}
includes =
${fontconfig:location}/etc/fonts/conf.d
[firefox] [firefox]
# The default installed firefox version when installing firefox-wrapper. # The default installed firefox version when installing firefox-wrapper.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment