[BACK]Return to patch-bin_updmap CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / print / tex-tetex / patches

File: [cvs.NetBSD.org] / pkgsrc / print / tex-tetex / patches / Attic / patch-bin_updmap (download)

Revision 1.6, Sun Jun 14 12:50:05 2015 UTC (7 years, 7 months ago) by markd
Branch: MAIN
CVS Tags: pkgsrc-2015Q2-base, pkgsrc-2015Q2
Changes since 1.5: +30 -30 lines

Update to texlive 2015.

pdfTEX: Support JPEG Exif as well as JFIF; do not even emit a warning if
 \pdfinclusionerrorlevel is negative; sync with xpdf 3.04.
LuaTEX: New library newtokenlib for scanning tokens; bug fixes in the normal
 random number generator and other places.
XeTEX: Image handling fixes; xdvipdfmx binary looked for first as a sibling
 to xetex; internal XDV opcodes changed.
MetaPost: New numbersystem binary; new Japanese-enabled upmpost and
 updvitomp programs, analogous to up*tex.
Infrastructure: The fmtutil script has been reimplemented to read
 fmtutil.cnf on a per-tree basis, analogous to updmap. Web2C mktex* scripts
 (including mktexlsr, mktextfm, mktexpk) now prefer programs in their own
 directory, instead of always using the existing PATH.

$NetBSD: patch-bin_updmap,v 1.6 2015/06/14 12:50:05 markd Exp $

--- bin/updmap.orig	2015-04-27 17:08:10.000000000 +0000
+++ bin/updmap
@@ -19,7 +19,7 @@ my $svnid = '$Id: updmap.pl 37076 2015-0
 my $TEXMFROOT;
 BEGIN {
   $^W = 1;
-  $TEXMFROOT = `kpsewhich -var-value=TEXMFROOT`;
+  $TEXMFROOT = `@KPSEWHICH@ -var-value=TEXMFROOT`;
   if ($?) {
     die "$0: kpsewhich -var-value=TEXMFROOT failed, aborting early.\n";
   }
@@ -37,7 +37,7 @@ my $version = "r$svnrev ($lastchdate)";
 
 use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
 use strict;
-use TeXLive::TLUtils qw(mkdirhier mktexupd win32 basename dirname 
+use TeXLive::TLUtils qw(mkdirhier mktexupd win32 basename dirname
   sort_uniq member touch);
 
 #use Data::Dumper;
@@ -49,12 +49,12 @@ use TeXLive::TLUtils qw(mkdirhier mktexu
 # see more comments at the definition of this function.
 reset_root_home();
 
-chomp(my $TEXMFDIST = `kpsewhich --var-value=TEXMFDIST`);
-chomp(my $TEXMFVAR = `kpsewhich -var-value=TEXMFVAR`);
-chomp(my $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
-chomp(my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
-chomp(my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
-chomp(my $TEXMFHOME = `kpsewhich -var-value=TEXMFHOME`);
+chomp(my $TEXMFDIST = `@KPSEWHICH@ --var-value=TEXMFDIST`);
+chomp(my $TEXMFVAR = `@KPSEWHICH@ -var-value=TEXMFVAR`);
+chomp(my $TEXMFSYSVAR = `@KPSEWHICH@ -var-value=TEXMFSYSVAR`);
+chomp(my $TEXMFCONFIG = `@KPSEWHICH@ -var-value=TEXMFCONFIG`);
+chomp(my $TEXMFSYSCONFIG = `@KPSEWHICH@ -var-value=TEXMFSYSCONFIG`);
+chomp(my $TEXMFHOME = `@KPSEWHICH@ -var-value=TEXMFHOME`);
 
 # make sure that on windows *everything* is in lower case for comparison
 if (win32()) {
@@ -77,8 +77,8 @@ my $updLSR;
 my @cmdline_options = (
   "sys",
   "listfiles",
-  "cnffile=s@", 
-  "copy", 
+  "cnffile=s@",
+  "copy",
   "disable=s@",
   "dvipdfmoutputdir=s",
   "dvipdfmxoutputdir=s",
@@ -207,7 +207,7 @@ sub main {
     save_updmap($opts{'_readsave'});
     exit 0;
   }
- 
+
   if ($opts{'showoptions'}) {
     for my $o (@{$opts{'showoptions'}}) {
       if (defined($settings{$o})) {
@@ -247,7 +247,7 @@ sub main {
     # in the list is the one where changes will be written to.
     ($changes_config_file) = @{$opts{'cnffile'}};
   } else {
-    my @all_files = `kpsewhich -all updmap.cfg`;
+    my @all_files = `@KPSEWHICH@ -all updmap.cfg`;
     chomp(@all_files);
     my @used_files;
     for my $f (@all_files) {
@@ -257,10 +257,10 @@ sub main {
     my $TEXMFLOCALVAR;
     my @TEXMFLOCAL;
     if (win32()) {
-      chomp($TEXMFLOCALVAR =`kpsewhich --expand-path=\$TEXMFLOCAL`);
+      chomp($TEXMFLOCALVAR =`@KPSEWHICH@ --expand-path=\$TEXMFLOCAL`);
       @TEXMFLOCAL = map { lc } split(/;/ , $TEXMFLOCALVAR);
     } else {
-      chomp($TEXMFLOCALVAR =`kpsewhich --expand-path='\$TEXMFLOCAL'`);
+      chomp($TEXMFLOCALVAR =`@KPSEWHICH@ --expand-path='\$TEXMFLOCAL'`);
       @TEXMFLOCAL = split /:/ , $TEXMFLOCALVAR;
     }
     #
@@ -292,7 +292,7 @@ sub main {
     # TEXMFSYSVAR    $TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg
     # TEXMFLOCAL     $TEXLIVE/texmf-local/web2c/updmap.cfg
     # TEXMFDIST      $TEXLIVE/YYYY/texmf-dist/web2c/updmap.cfg
-    # 
+    #
     # updmap-sys (root):
     # ==================
     # TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
@@ -427,7 +427,7 @@ sub main {
 
 
   if ($cmd && !$opts{'force'} && !$changed) {
-    print "$changes_config_file unchanged.  Map files not recreated.\n" 
+    print "$changes_config_file unchanged.  Map files not recreated.\n"
       if !$opts{'quiet'};
   } else {
     if (!$opts{'nomkmap'}) {
@@ -921,7 +921,7 @@ sub cidx2dvips_old {
       if ($_ =~ /.*[@\:\/,]/) {next;}
       elsif ($_ =~ /^[^ ][^ ]* unicode /) {next;}
       s/^([^ ][^ ]* [^ ][^ ]* [^ ][^ ]*)\.[Oo][Tt][Ff]/$1/;
-      s/^([^ ][^ ]* [^ ][^ ]* [^ ][^ ]*)\.[Tt][Tt][FfCc]/$1/; 
+      s/^([^ ][^ ]* [^ ][^ ]* [^ ][^ ]*)\.[Tt][Tt][FfCc]/$1/;
       s/$/ %/;
       s/^(([^ ]*).*)/$1$2/;
       s/^([^ ][^ ]* ([^ ][^ ]*) !*([^ ][^ ]*).*)/$1 $3-$2/;
@@ -969,11 +969,11 @@ sub mkMaps {
   }
 
   my ($mode, $mode_origin) = get_cfg('LW35');
-  my ($dvipsPreferOutline, $dvipsPreferOutline_origin) = 
+  my ($dvipsPreferOutline, $dvipsPreferOutline_origin) =
     get_cfg('dvipsPreferOutline');
-  my ($dvipsDownloadBase35, $dvipsDownloadBase35_origin) = 
+  my ($dvipsDownloadBase35, $dvipsDownloadBase35_origin) =
     get_cfg('dvipsDownloadBase35');
-  my ($pdftexDownloadBase14, $pdftexDownloadBase14_origin) = 
+  my ($pdftexDownloadBase14, $pdftexDownloadBase14_origin) =
     get_cfg('pdftexDownloadBase14');
   my ($pxdviUse, $pxdviUse_origin) = get_cfg('pxdviUse');
   my ($kanjiEmbed, $kanjiEmbed_origin) = get_cfg('kanjiEmbed');
@@ -1128,23 +1128,23 @@ sub mkMaps {
   push @ps2pk_map, transLW35($mode, @ps2pk_fonts);
   push @ps2pk_map, @mixedmaps_fonts;
   push @ps2pk_map, @notmixedmaps_fonts;
-  &writeLines(">$dvipsoutputdir/ps2pk.map", 
+  &writeLines(">$dvipsoutputdir/ps2pk.map",
     normalizeLines(@ps2pk_map));
 
   print "Generating output for dvips...\n" if !$opts{'quiet'};
   my @download35_map;
   push @download35_map, "% ps2pk35.map";
   push @download35_map, transLW35($mode, @ps2pk_fonts);
-  &writeLines(">$dvipsoutputdir/download35.map", 
+  &writeLines(">$dvipsoutputdir/download35.map",
     normalizeLines(@download35_map));
 
   my @builtin35_map;
   push @builtin35_map, "% dvips35.map";
   push @builtin35_map, transLW35($mode, @dvips35_fonts);
-  &writeLines(">$dvipsoutputdir/builtin35.map", 
+  &writeLines(">$dvipsoutputdir/builtin35.map",
     normalizeLines(@builtin35_map));
 
-  my @dftdvips_fonts = 
+  my @dftdvips_fonts =
     (($dvipsDownloadBase35 eq "true") ? @ps2pk_fonts : @dvips35_fonts);
 
   my @psfonts_t1_map;
@@ -1160,14 +1160,14 @@ sub mkMaps {
   push @psfonts_t1_map, @mixedmaps_fonts;
   push @psfonts_t1_map, @notmixedmaps_fonts;
   push @psfonts_t1_map, @tmpkanji2;
-  &writeLines(">$dvipsoutputdir/psfonts_t1.map", 
+  &writeLines(">$dvipsoutputdir/psfonts_t1.map",
     normalizeLines(@psfonts_t1_map));
 
   my @psfonts_pk_map;
   push @psfonts_pk_map, transLW35($mode, @dftdvips_fonts);
   push @psfonts_pk_map, @notmixedmaps_fonts;
   push @psfonts_pk_map, @tmpkanji2;
-  &writeLines(">$dvipsoutputdir/psfonts_pk.map", 
+  &writeLines(">$dvipsoutputdir/psfonts_pk.map",
     normalizeLines(@psfonts_pk_map));
 
   print "Generating output for pdftex...\n" if !$opts{'quiet'};
@@ -1231,7 +1231,7 @@ sub mkMaps {
 
   sub check_mismatch {
     my ($mm, $d, $f, $prog) = @_;
-    chomp (my $kpsefound = `kpsewhich --progname=$prog $f`);
+    chomp (my $kpsefound = `@KPSEWHICH@ --progname=$prog $f`);
     if (lc("$d/$f") ne lc($kpsefound)) {
       $mm->{$f} = $kpsefound;
     }
@@ -1340,7 +1340,7 @@ listed below).
 
 sub locateMap {
   my $map = shift;
-  my $ret = `kpsewhich --format=map $map`;
+  my $ret = `@KPSEWHICH@ --format=map $map`;
   chomp($ret);
   return $ret;
 }
@@ -1384,7 +1384,7 @@ sub processOptions {
 
   # now continue with normal option handling
 
-  GetOptions(\%opts, @cmdline_options) or 
+  GetOptions(\%opts, @cmdline_options) or
     die "Try \"$prg --help\" for more information.\n";
 }
 
@@ -1416,14 +1416,14 @@ sub setupOutputDir {
 #   we can only have "key=value" since that is the way it was prepared
 #   in process_options
 #   (These were the values provided to --setoption.)
-#   
+#
 sub setOptions {
   my (@options) = @_;
   for (my $i = 0; $i < @options; $i++) {
     my $o = $options[$i];
 
     my ($key,$val) = split (/=/, $o, 2);
-    
+
     die "$prg: unexpected empty key or val for options (@options), goodbye.\n"
       if !$key || !defined($val);
 
@@ -1505,7 +1505,7 @@ sub disable_map {
     my $orig = $alldata->{'maps'}{$map}{'origin'};
     # add a new entry to the top level where we disable it
     # copy over the type from the last entry
-    $alldata->{'updmap'}{$tc}{'maps'}{$map}{'type'} = 
+    $alldata->{'updmap'}{$tc}{'maps'}{$map}{'type'} =
       $alldata->{'updmap'}{$orig}{'maps'}{$map}{'type'};
     $alldata->{'updmap'}{$tc}{'maps'}{$map}{'status'} = "disabled";
     $alldata->{'updmap'}{$tc}{'maps'}{$map}{'line'} = -1;
@@ -1603,7 +1603,7 @@ sub save_updmap {
 #
 sub check_option {
   my ($opt, $val) = @_;
-  if ((($settings{$opt}{'type'} eq "binary") && 
+  if ((($settings{$opt}{'type'} eq "binary") &&
        $val ne "true" && $val ne "false") ||
       (($settings{$opt}{'type'} eq "string") &&
        !member($val, @{$settings{$opt}{'possible'}}))) {
@@ -1621,12 +1621,12 @@ sub setOption {
   my ($opt, $val) = @_;
 
   die "$prg: Unsupported option $opt." if (!defined($settings{$opt}));
-  die "$0: Invalid value $val for option $opt." 
+  die "$0: Invalid value $val for option $opt."
     if (!check_option($opt, $val));
 
   # silently accept this old option name, just in case.
   return if $opt eq "dvipdfmDownloadBase14";
-  
+
   #print "Setting option $opt to $val...\n" if !$opts{'quiet'};
   my $tc = $alldata->{'changes_config'};
 
@@ -1774,9 +1774,9 @@ sub normalizeLines {
 # $alldata->{'updmap'}{$full_path_name_of_updmap}{'lines'} = \@lines
 # $alldata->{'updmap'}{$full_path_name_of_updmap}{'setting'}{$key}{'val'} = $val
 # $alldata->{'updmap'}{$full_path_name_of_updmap}{'setting'}{$key}{'line'} = $i
-# $alldata->{'updmap'}{$full_path_name_of_updmap}{'maps'}{$mapname}{'type'} 
+# $alldata->{'updmap'}{$full_path_name_of_updmap}{'maps'}{$mapname}{'type'}
 #            = 'Map'|'MixedMap'|'KanjiMap'|'disabled'
-# $alldata->{'updmap'}{$full_path_name_of_updmap}{'maps'}{$mapname}{'status'} 
+# $alldata->{'updmap'}{$full_path_name_of_updmap}{'maps'}{$mapname}{'status'}
 #            = 'enabled'|'disabled'
 # $alldata->{'updmap'}{$full_path_name_of_updmap}{'maps'}{$mapname}{'line'} = $i
 # $alldata->{'maps'}{$m}{'origin'} = $updmap_path_name
@@ -1976,14 +1976,14 @@ sub read_map_files {
     $alldata->{'maps'}{$m}{'status'} = 'enabled';
   }
   @maps = sort_uniq(@maps);
-  my @fullpath = `kpsewhich --format=map @maps`;
+  my @fullpath = `@KPSEWHICH@ --format=map @maps`;
   chomp @fullpath;
   foreach my $map (@maps) {
     my ($ff) = grep /\/$map(\.map)?$/, @fullpath;
     if ($ff) {
       $alldata->{'maps'}{$map}{'fullpath'} = $ff;
     } else {
-      # if the map file is not found, then push it onto the list of 
+      # if the map file is not found, then push it onto the list of
       # missing map files, since we know that it is enabled
       push @missing, $map;
     }
@@ -2085,13 +2085,13 @@ sub merge_data {
     for my $f (keys %{$alldata->{'maps'}{$m}{'fonts'}}) {
       # use the font definition only for those fonts where the origin matches
       if ($alldata->{'fonts'}{$f}{'origin'} eq $m) {
-        $alldata->{'merged'}{'allMaps'}{'fonts'}{$f} = 
+        $alldata->{'merged'}{'allMaps'}{'fonts'}{$f} =
           $alldata->{'maps'}{$m}{'fonts'}{$f}
             if ($alldata->{'updmap'}{$origin}{'maps'}{$m}{'type'} ne "KanjiMap");
-        $alldata->{'merged'}{'noMixedMaps'}{'fonts'}{$f} = 
+        $alldata->{'merged'}{'noMixedMaps'}{'fonts'}{$f} =
           $alldata->{'maps'}{$m}{'fonts'}{$f}
             if ($alldata->{'updmap'}{$origin}{'maps'}{$m}{'type'} eq "Map");
-        $alldata->{'merged'}{'KanjiMap'}{'fonts'}{$f} = 
+        $alldata->{'merged'}{'KanjiMap'}{'fonts'}{$f} =
           $alldata->{'maps'}{$m}{'fonts'}{$f}
             if ($alldata->{'updmap'}{$origin}{'maps'}{$m}{'type'} eq "KanjiMap");
       }
@@ -2103,7 +2103,7 @@ sub merge_data {
 #
 # $HOME and sudo and updmap-sys horror
 #   some instances of sudo do not reset $HOME to the home of root
-#   as an effect of "sudo updmap" creates root owned files in the home 
+#   as an effect of "sudo updmap" creates root owned files in the home
 #   of a normal user, and "sudo updmap-sys" uses map files and updmap.cfg
 #   files from the directory of a normal user, but creating files
 #   in TEXMFSYSCONFIG. This is *all* wrong.
@@ -2190,7 +2190,7 @@ historical reasons.  A general overview:
 Good luck.
 
 Options:
-  --cnffile FILE            read FILE for the updmap configuration 
+  --cnffile FILE            read FILE for the updmap configuration
                              (can be given multiple times, in which case
                              all the files are used)
   --dvipdfmxoutputdir DIR   specify output directory (dvipdfm(x) syntax)
@@ -2278,7 +2278,7 @@ Explanation of trees and files normally 
   Thus, if updmap.cfg files are present in all trees, and the default
   layout is used as shipped with TeX Live, the following files are
   read, in the given order.
-  
+
   For updmap-sys:
   TEXMFSYSCONFIG \$TEXLIVE/YYYY/texmf-config/web2c/updmap.cfg
   TEXMFSYSVAR    \$TEXLIVE/YYYY/texmf-var/web2c/updmap.cfg