3
0
Fork 0
forked from mirrors/nixpkgs

* Include the conf.d directory shipped in the fontconfig distribution.

* Don't use $fontconfig/var/cache/fontconfig as a cache (when running
  as root), instead use /var/cache/fontconfig.

svn path=/nixos/trunk/; revision=9411
This commit is contained in:
Eelco Dolstra 2007-10-05 12:56:44 +00:00
parent 5c08d306e5
commit 073c0fec9f
2 changed files with 10 additions and 2 deletions

View file

@ -125,6 +125,7 @@ import ../helpers/make-etc.nix {
inherit (pkgs) fontconfig;
}
"xsltproc --stringparam fontDirectories \"$fontDirectories\" \\
--stringparam fontconfig \"$fontconfig\" \\
${./fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\
> $out
";

View file

@ -15,12 +15,19 @@
<xsl:output method='xml' encoding="UTF-8" doctype-system="fonts.dtd" />
<xsl:param name="fontDirectories" />
<xsl:param name="fontconfig" />
<xsl:template match="/fontconfig">
<fontconfig>
<xsl:copy-of select="child::node()[name() != 'dir']" />
<xsl:copy-of select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
<include xml:space="preserve"><xsl:value-of select="$fontconfig" />/etc/fonts/conf.d</include>
<include ignore_missing="yes" xml:space="preserve">/etc/fonts/conf.d</include>
<cachedir xml:space="preserve">/var/cache/fontconfig</cachedir>
<cachedir xml:space="preserve">~/.fontconfig</cachedir>
<xsl:for-each select="str:tokenize($fontDirectories)">
<dir><xsl:value-of select="." /></dir>
<xsl:text>&#0010;</xsl:text>
@ -30,4 +37,4 @@
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>