diff options
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/tlpostcode/xetex.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Master/tlpkg/tlpostcode/xetex.pl b/Master/tlpkg/tlpostcode/xetex.pl index e681244d797..f37fc491dfd 100644 --- a/Master/tlpkg/tlpostcode/xetex.pl +++ b/Master/tlpkg/tlpostcode/xetex.pl @@ -37,12 +37,14 @@ sub do_remove { sub do_install { # bin-installs font-config related stuff - chomp( my $texmfsysvar = `kpsewhich -var-value=TEXMFSYSVAR` ) ; + chomp( my $fcache = `kpsewhich -var-value=FC_CACHEDIR` ) ; + chomp( my $fconf = `kpsewhich -var-value=FONTCONFIG_PATH` ) ; if (-r "$texdir/bin/win32/xetex.exe") { # we have installed w32, so put it into texmfsysvar - mkdirhier("$texmfsysvar/fonts"); - TeXLive::TLUtils::rmtree("$texmfsysvar/fonts/conf"); - TeXLive::TLUtils::rmtree("$texmfsysvar/fonts/cache"); + mkdirhier($fcache); + mkdirhier($fconf); + TeXLive::TLUtils::rmtree($fcache); + TeXLive::TLUtils::rmtree($fconf); my @cpycmd; if (win32()) { push @cpycmd, "xcopy", "/e", "/i", "/q", "/y"; @@ -52,17 +54,15 @@ sub do_install { system(@cpycmd, (win32() ? conv_to_w32_path("$texdir/tlpkg/tlpostcode/xetex/conf") : "$texdir/tlpkg/tlpostcode/xetex/conf"), - (win32() ? conv_to_w32_path("$texmfsysvar/fonts/conf") : - "$texmfsysvar/fonts/conf")); + (win32() ? conv_to_w32_path($fconf) : $fconf)); system(@cpycmd, (win32() ? conv_to_w32_path("$texdir/tlpkg/tlpostcode/xetex/cache") : "$texdir/tlpkg/tlpostcode/xetex/cache"), - (win32() ? conv_to_w32_path("$texmfsysvar/fonts/cache") : - "$texmfsysvar/fonts/cache")); + (win32() ? conv_to_w32_path($fcache) : $fcache)); if (open(FONTSCONF, "<$texdir/tlpkg/tlpostcode/xetex/conf/fonts.conf")) { my @lines = <FONTSCONF>; close(FONTSCONF); - if (open(FONTSCONF, ">$texmfsysvar/fonts/conf/fonts.conf")) { + if (open(FONTSCONF, ">$fconf/fonts.conf")) { my $winfontdir; if (win32()) { $winfontdir = $ENV{'SystemRoot'}.'/fonts'; @@ -75,7 +75,7 @@ sub do_install { } close(FONTSCONF); } else { - warn("Cannot open $texmfsysvar/fonts/conf/fonts.conf for writing\n"); + warn("Cannot open $fconf/fonts.conf for writing\n"); } } else { warn("Cannot open $texdir/tlpkg/tlpostcode/xetex/conf/fonts.conf\n"); @@ -88,9 +88,9 @@ sub do_install { #system("fc-cache","-v", "-r"); } else { # create a texlive-fontconfig.conf file in $texmfsysvar - mkdirhier("$texmfsysvar/fonts/conf"); - if (!open(FONTSCONF, ">$texmfsysvar/fonts/conf/texlive-fontconfig.conf")) { - warn("Cannot open $texmfsysvar/fonts/conf/texlive-fontconfig.conf for writing\n"); + mkdirhier("$fconf/conf"); + if (!open(FONTSCONF, ">$fconf/texlive-fontconfig.conf")) { + warn("Cannot open $fconf/texlive-fontconfig.conf for writing\n"); } else { print FONTSCONF '<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> |