Commit 5e156c55 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 05ed34a9
......@@ -40,6 +40,9 @@ install =
cd {}
export LD_LIBRARY_PATH=$PWD:{}
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 "$@"
""".format(
firefox,
......@@ -68,6 +71,21 @@ part = ${firefox-52:location}
wrapper-name = firefox-51
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 :cache-dir
key fonts :fonts
key includes :includes
fonts =
${ipaex-fonts:location}
${liberation-fonts:location}
includes =
${fontconfig:location}/etc/fonts/conf.d
cache-dir =
~/.fontconfig-firefox/
[firefox]
# 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