summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-05-13 03:53:19 +0000
committerNorbert Preining <preining@logic.at>2012-05-13 03:53:19 +0000
commit677388a3c8652b310f83074efd620cc0a052ed4a (patch)
tree84a91fcb2f28f1eadf517612952f92b2a7e2e8e7 /Master/tlpkg/TeXLive
parent9b3a52f96953df4e8e846b63d7cc8779e48d6f6f (diff)
multi updmap integration, we have now separate updmap.cfg files
git-svn-id: svn://tug.org/texlive/trunk@26320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm67
1 files changed, 5 insertions, 62 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index a385b6b2d62..12e7c8a4ce2 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -2681,67 +2681,10 @@ sub create_fmtutil {
}
sub create_updmap {
- my ($tlpdb,$dest,$localconf) = @_;
- my @tlpdblines = $tlpdb->updmap_cfg_lines(
- get_disabled_local_configs($localconf, '#'));
- # we do not use _create_config_files here because we want to
- # parse the $localconf file for the five options in updmap.cfg
- #_create_config_files($tlpdb, "texmf/web2c/updmap-hdr.cfg", $dest,
- # $localconf, 0, '#', \@tlpdblines);
- my $headfile = "texmf/web2c/updmap-hdr.cfg";
- my $root = $tlpdb->root;
- my @lines;
- my @localconflines;
- my %configs;
- if (-r "$localconf") {
- #
- # this should be done more intelligently, but for now only add those
- # lines without any duplication check ...
- open FOO, "<$localconf"
- or die "strange, -r ok but cannot open $localconf: $!";
- my @bla = <FOO>;
- close(FOO);
- for my $l (@bla) {
- my ($k, $v, @rest) = split(' ', $l);
- if (check_updmap_config_value($k, $v, $localconf)) {
- $configs{$k} = $v;
- } else {
- push @localconflines, $l;
- }
- }
- }
- #
- # read the -hdr file and replace the options if given in the local
- # config file
- open(INFILE,"<$root/$headfile") or die("Cannot open $root/$headfile");
- for my $l (<INFILE>) {
- my ($k, $v, @rest) = split(' ', $l);
- if (check_updmap_config_value($k, $v, "$root/$headfile")) {
- if (defined($configs{$k})) {
- push @lines, "$k $configs{$k}\n";
- } else {
- push @lines, $l;
- }
- } else {
- push @lines, $l;
- }
- }
- close (INFILE);
-
- # add the lines from the tlpdb
- push @lines, @tlpdblines;
-
- # add additional local config lines
- push @lines, @localconflines;
-
- if ($#lines >= 0) {
- open(OUTFILE,">$dest")
- or die("Cannot open $dest for writing: $!");
-
- printf OUTFILE "# Generated by %s on %s\n", "$0", scalar localtime;
- print OUTFILE @lines;
- close(OUTFILE) || warn "close(>$dest) failed: $!";
- }
+ my ($tlpdb,$dest) = @_;
+ my @tlpdblines = $tlpdb->updmap_cfg_lines();
+ _create_config_files($tlpdb, "texmf/web2c/updmap-hdr.cfg", $dest,
+ undef, 0, '#', \@tlpdblines);
}
sub check_updmap_config_value {
@@ -2809,7 +2752,7 @@ sub _create_config_files {
my @lines = <INFILE>;
push @lines, @$tlpdblinesref;
close (INFILE);
- if (-r "$localconf") {
+ if (defined($localconf) && -r $localconf) {
#
# this should be done more intelligently, but for now only add those
# lines without any duplication check ...