diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-16 23:10:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-16 23:10:31 +0000 |
commit | 6c8025cb60ed6910051ed5680516710673d65e19 (patch) | |
tree | 177e48b499f152306ac5c592278da131d9db5460 /Build/source | |
parent | c3967481d7fdf4163ba0f40114f15dd12cfb555f (diff) |
ctanify (16jan17)
git-svn-id: svn://tug.org/texlive/trunk@42969 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/ctanify/ctanify | 12 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/texlive/updmap.pl | 119 |
2 files changed, 103 insertions, 28 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ctanify/ctanify b/Build/source/texk/texlive/linked_scripts/ctanify/ctanify index 1214aa11763..3d0884bb095 100755 --- a/Build/source/texk/texlive/linked_scripts/ctanify/ctanify +++ b/Build/source/texk/texlive/linked_scripts/ctanify/ctanify @@ -19,13 +19,14 @@ use warnings; use strict; # Define some global variables. -our $VERSION = "1.8.2"; # ctanify version number +our $VERSION = "1.9"; # ctanify version number my $progname = basename $0; # Name of this program my $pkgname; # Base name of the package to create my $miscify = 0; # 1=replace singletons with misc; 0=don't my $autoinclude = 1; # 1=automatically include files named in .ins my $skipdroppings = 1; # 1=skip "dropping" files (e.g., "README~") my $unixify = 1; # 1=make text files use Unix line endings +my $maketds = 1; # 1=embed a .tds.zip file; 0=don't my @manifest; # List of files to include my %file2tds; # Map from specific filenames to TDS directories my @tdsdirlist; # Contents of the TDS tree @@ -147,6 +148,7 @@ GetOptions("p|pkgname=s" => \$pkgname, "a|auto!" => \$autoinclude, "d|tdsdir=s" => \$tdsoutdir, "T|tex=s" => \$texmacros, + "s|tds!" => \$maketds, "V|version" => \$wantversion, "h|help" => \$wanthelp) || pod2usage(-verbose => 0, @@ -338,6 +340,7 @@ if (-f "$workdir/$zipname") { else { $zipname = ""; } +$zipname = "" if !$maketds; chdir $prevdir || die "${progname}: Failed to switch to $prevdir ($!)\n"; rmdir $tdsdir || die "${progname}: Failed to remove $tdsdir ($!)\n"; @@ -408,6 +411,7 @@ ctanify [B<--tdsdir>=I<dirname> ...] [B<--tex>=I<macro_pkg>] [B<-->[B<no>]B<miscify>] +[B<-->[B<no>]B<tds>] I<filespec>[=I<dirname>] ... ctanify @@ -509,6 +513,10 @@ rename C<tex/latex/mypackage/mypackage.sty> to C<tex/latex/misc/mypackage.sty>.) This was common practice in the past but is now strongly discouraged. +=item B<-nos>, B<--no-tds> + +Do not embed a .tds.zip file in the generated tarball. + =back @@ -691,7 +699,7 @@ Scott Pakin, I<scott+ctify@pakin.org> =head1 COPYRIGHT AND LICENSE -Copyright 2016 Scott Pakin +Copyright 2017 Scott Pakin This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either S<version 1.3c> of this diff --git a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl index 5502bd33a72..08c314cf924 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $Id: updmap.pl 41566 2016-06-29 16:04:35Z karl $ +# $Id: updmap.pl 42939 2017-01-13 14:32:10Z preining $ # updmap - maintain map files for outline fonts. # (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.) # @@ -14,7 +14,7 @@ # the original versions were licensed under the following agreement: # Anyone may freely use, modify, and/or distribute this file, without -my $svnid = '$Id: updmap.pl 41566 2016-06-29 16:04:35Z karl $'; +my $svnid = '$Id: updmap.pl 42939 2017-01-13 14:32:10Z preining $'; my $TEXMFROOT; BEGIN { @@ -27,10 +27,10 @@ BEGIN { unshift(@INC, "$TEXMFROOT/tlpkg"); } -my $lastchdate = '$Date: 2016-06-29 18:04:35 +0200 (Wed, 29 Jun 2016) $'; +my $lastchdate = '$Date: 2017-01-13 15:32:10 +0100 (Fri, 13 Jan 2017) $'; $lastchdate =~ s/^\$Date:\s*//; $lastchdate =~ s/ \(.*$//; -my $svnrev = '$Revision: 41566 $'; +my $svnrev = '$Revision: 42939 $'; $svnrev =~ s/^\$Revision:\s*//; $svnrev =~ s/\s*\$$//; my $version = "r$svnrev ($lastchdate)"; @@ -136,14 +136,26 @@ my %settings = ( type => "binary", default => "false", }, - kanjiEmbed => { + jaEmbed => { type => "any", default => "noEmbed", }, - kanjiVariant => { + jaVariant => { type => "any", default => "", }, + scEmbed => { + type => "any", + default => "noEmbed", + }, + tcEmbed => { + type => "any", + default => "noEmbed", + }, + koEmbed => { + type => "any", + default => "noEmbed", + }, ); &main(); @@ -995,8 +1007,19 @@ sub mkMaps { my ($pdftexDownloadBase14, $pdftexDownloadBase14_origin) = get_cfg('pdftexDownloadBase14'); my ($pxdviUse, $pxdviUse_origin) = get_cfg('pxdviUse'); - my ($kanjiEmbed, $kanjiEmbed_origin) = get_cfg('kanjiEmbed'); - my ($kanjiVariant, $kanjiVariant_origin) = get_cfg('kanjiVariant'); + my ($jaEmbed, $jaEmbed_origin) = get_cfg('jaEmbed'); + my ($jaVariant, $jaVariant_origin) = get_cfg('jaVariant'); + my ($scEmbed, $scEmbed_origin) = get_cfg('scEmbed'); + my ($tcEmbed, $tcEmbed_origin) = get_cfg('tcEmbed'); + my ($koEmbed, $koEmbed_origin) = get_cfg('koEmbed'); + + # keep backward compatibility with old definitions + # of kanjiEmbed, kanjiVariant + ($jaEmbed, $jaEmbed_origin) = get_cfg('kanjiEmbed') + if (!defined($jaEmbed)); + ($jaVariant, $jaVariant_origin) = get_cfg('kanjiVariant') + if (!defined($jaVariant)); + # pxdvi is optional, and off by default. Don't create the output # directory unless we are going to put something there. @@ -1014,10 +1037,16 @@ sub mkMaps { . "$dvipsDownloadBase35 ($dvipsDownloadBase35_origin)" . "\n download standard fonts (pdftex) : " . "$pdftexDownloadBase14 ($pdftexDownloadBase14_origin)" - . "\n kanjiEmbed replacement string : " - . "$kanjiEmbed ($kanjiEmbed_origin)" - . "\n kanjiVariant replacement string : " - . "$kanjiVariant ($kanjiVariant_origin)" + . "\n jaEmbed replacement string : " + . "$jaEmbed ($jaEmbed_origin)" + . "\n jaVariant replacement string : " + . ($jaVariant ? $jaVariant : "<empty>") . " ($jaVariant_origin)" + . "\n scEmbed replacement string : " + . "$scEmbed ($scEmbed_origin)" + . "\n tcEmbed replacement string : " + . "$tcEmbed ($tcEmbed_origin)" + . "\n koEmbed replacement string : " + . "$koEmbed ($koEmbed_origin)" . "\n create a mapfile for pxdvi : " . "$pxdviUse ($pxdviUse_origin)" . "\n\n"); @@ -1639,6 +1668,16 @@ sub check_option { sub setOption { my ($opt, $val) = @_; + # allow backward compatility with old kanjiEmbed and kanjiVariant settings + if ($opt eq "kanjiEmbed") { + print_warning("using jaEmbed instead of kanjiEmbed\n"); + $opt = "jaEmbed"; + } + if ($opt eq "kanjiVariant") { + print_warning("using jaVariant instead of kanjiVariant\n"); + $opt = "jaVariant"; + } + die "$prg: Unsupported option $opt." if (!defined($settings{$opt})); die "$0: Invalid value $val for option $opt." if (!check_option($opt, $val)); @@ -1862,8 +1901,19 @@ sub merge_settings_replace_kanji { } } # - my ($kanjiEmbed, $kanjiEmbed_origin) = get_cfg('kanjiEmbed'); - my ($kanjiVariant, $kanjiVariant_origin) = get_cfg('kanjiVariant'); + my ($jaEmbed, $jaEmbed_origin) = get_cfg('jaEmbed'); + my ($jaVariant, $jaVariant_origin) = get_cfg('jaVariant'); + my ($scEmbed, $scEmbed_origin) = get_cfg('scEmbed'); + my ($tcEmbed, $tcEmbed_origin) = get_cfg('tcEmbed'); + my ($koEmbed, $koEmbed_origin) = get_cfg('koEmbed'); + + # keep backward compatibility with old definitions + # of kanjiEmbed, kanjiVariant + ($jaEmbed, $jaEmbed_origin) = get_cfg('kanjiEmbed') + if (!defined($jaEmbed)); + ($jaVariant, $jaVariant_origin) = get_cfg('kanjiVariant') + if (!defined($jaVariant)); + # # go through all map files and check that the text is properly replaced # after the replacement check that the generated map file actually @@ -1871,10 +1921,19 @@ sub merge_settings_replace_kanji { # for my $l (@l) { for my $m (keys %{$alldata->{'updmap'}{$l}{'maps'}}) { - if ($m =~ m/\@kanjiEmbed@/ || $m =~ m/\@kanjiVariant@/) { - my $newm = $m; - $newm =~ s/\@kanjiEmbed@/$kanjiEmbed/; - $newm =~ s/\@kanjiVariant@/$kanjiVariant/; + my $newm = $m; + # do all kinds of substitutions + $newm =~ s/\@jaEmbed@/$jaEmbed/; + $newm =~ s/\@jaVariant@/$jaVariant/; + $newm =~ s/\@scEmbed@/$scEmbed/; + $newm =~ s/\@tcEmbed@/$tcEmbed/; + $newm =~ s/\@koEmbed@/$koEmbed/; + # also do substitutions of old strings in case they are left + # over somewhere + $newm =~ s/\@kanjiEmbed@/$jaEmbed/; + $newm =~ s/\@kanjiVariant@/$jaVariant/; + if ($newm ne $m) { + # something was substituted if (locateMap($newm)) { # now we have to update various linked items $alldata->{'updmap'}{$l}{'maps'}{$newm}{'type'} = @@ -1885,7 +1944,7 @@ sub merge_settings_replace_kanji { $alldata->{'updmap'}{$l}{'maps'}{$m}{'line'}; $alldata->{'updmap'}{$l}{'maps'}{$newm}{'original'} = $m; } else { - print_warning("generated map $newm (from $m) does not exists, not activating it!\n"); + print_warning("generated map $newm (from $m) does not exist, not activating it!\n"); } # in any case delete the @kanji...@ entry line, such a map will # never exist @@ -1952,6 +2011,9 @@ sub read_updmap_file { if (@rest) { print_warning("line $i in $fn contains a syntax error, more than two words!\n"); } + # backward compatibility with kanjiEmbed/kanjiVariant + $a = ($a eq "kanjiEmbed" ? "jaEmbed" : $a); + $a = ($a eq "kanjiVariant" ? "jaVariant" : $a); if (defined($settings{$a})) { if (check_option($a, $b)) { $data{'setting'}{$a}{'val'} = $b; @@ -2290,8 +2352,11 @@ Explanation of the OPTION names for --showoptions, --showoption, --setoption: Whether pdftex includes the standard 14 PDF fonts in its output. pxdviUse true,false (default false) Whether maps for pxdvi (Japanese-patched xdvi) are under updmap's control. - kanjiEmbed (any string) - kanjiVariant (any string) + jaEmbed (any string) + jaVariant (any string) + scEmbed (any string) + tcEmbed (any string) + koEmbed (any string) See below. LW35 URWkb,URW,ADOBEkb,ADOBE (default URWkb) Adapt the font and file names of the standard 35 PostScript fonts. @@ -2307,11 +2372,13 @@ Explanation of the OPTION names for --showoptions, --showoption, --setoption: command-line options or configuration files to the programs, as explained at the beginning of updmap.cfg. - The options kanjiEmbed and kanjiVariant specify special replacements - in the map lines. If a map contains the string \@kanjiEmbed\@, then - this will be replaced by the value of that option; similarly for - kanjiVariant. In this way, users of Japanese TeX can select different - fonts to be included in the final output. + The options jaEmbed and jaVariant (formerly kanjiEmbed and kanjiVariant) + specify special replacements in the map lines. If a map contains the + string \@jaEmbed\@, then this will be replaced by the value of that option; + similarly for jaVariant. In this way, users of Japanese TeX can select + different fonts to be included in the final output. The counterpart for + Simplified Chinese, Traditional Chinese and Korean fonts are + scEmbed, tcEmbed and koEmbed respectively. Explanation of trees and files normally used: |