From b648feec2acc5b84a99afda72aa24ef9bc489fe2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 15 May 2014 16:55:07 +0000 Subject: enctex-may2014 git-svn-id: svn://tug.org/texlive/trunk@34042 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tlpkginfo | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'Master/tlpkg/bin/tlpkginfo') diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 2f1829e61db..df1fd3081e4 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -59,8 +59,8 @@ sub main { } # -# Return 0 for success if we find a path (and print it on stdout), else -# return 1. +# Return 0 for success if we find a path (and print it on stdout), +# else return 1. # sub find_ctan_dir { my ($pkgname) = @_; @@ -197,8 +197,8 @@ sub find_ctan_dir { -# If the .tlpsrc file for ME has a catalogue entry, return it. -# Else return empty string. +# If the .tlpsrc file for ME has a catalogue entry, return it, +# else return empty string. # sub tlpsrc_find_catalogue { my ($me) = @_; @@ -217,7 +217,7 @@ sub tlpsrc_find_catalogue { -# look up ctan path for given package name in catalogue entry. +# Look up ctan path for given package name in catalogue entry. # xml is too hard to parse, so just look for the entry. # # Return the ctan path if found (without leading /), or undef. @@ -231,7 +231,7 @@ sub catalogue_find_ctan_path { return undef unless -r $catfile; # get the raw tag from the catalogue file. - open (CATFILE, "<$catfile") || die "Cannot read $catfile: $!\nFix me!\n"; + open (CATFILE, "<$catfile") || die "open($catfile) failed, fixme: $!"; while ($ctan_path = ) { last if $ctan_path =~ /; } close CATFILE; - $ctan_path =~ s/\n/ /g; - ($ctan_path) = ($ctan_path =~ m,(<.*?/>),); - return undef unless $ctan_path; # in case it's not present at all + $ctan_path =~ s/\n/ /g; # put it on one line + ($ctan_path) = ($ctan_path =~ m,(<.*?/>),); # remove angle brackets + return undef unless $ctan_path; # if it's not present at all # extract just the dir or file name, without options, etc. $ctan_path =~ m,path=(["'])/(.*?)\1,; @@ -300,6 +300,11 @@ sub prepare { } elsif ($pkg eq "context") { $tds_path = "/home/ftp/mirror/www.pragma-ade.com/context/current/cont-tmf.zip"; + } elsif ($pkg eq "enctex") { + # not tds, but we omit the TDS_READY below + # and do the rest in ctan2tds as usual. + $tds_path = "$CTAN/systems/enctex/enctex.tar.gz"; + } elsif ($pkg eq "hfoldsty") { $tds_path = glob ("$CTAN/fonts/hfoldsty/hfoldsty-v*.zip"); @@ -322,13 +327,16 @@ sub prepare { # now we have a tds, so unzip it in a tmpdir and be sure it's readable. my $tmpdir = ©_to_tmpdir ($pkg); - system ("unzip -q $tds_path -d $tmpdir"); + my $unpack = ($tds_path =~ /zip$/) + ? "unzip -q $tds_path -d $tmpdir" + : "tar -C $tmpdir -xf $tds_path"; + system ($unpack) == 0 || die "unpack failed: $!\n($unpack)"; system ("chmod -R a+rX $tmpdir"); - # put a flag for ctan2tds' donormal() to work + # put a flag for ctan2tds' donormal() to work. system ("echo $tds_path >$tmpdir/TDS_READY"); - # problems with amslatex packages: they are all bundled together, + # fixups ... the amslatex packages are all bundled together, # we now have to remove the unwanted ones. if ($pkg =~ /^($amslatex_tds_pkgs)$/) { chdir ($tmpdir) || die "chdir($tmpdir) failed: $!"; @@ -341,6 +349,11 @@ sub prepare { push (@deldir, $dir); } system ("rm -rf @deldir"); # discard the rest + + } elsif ($pkg eq "enctex") { + unlink ("$tmpdir/TDS_READY"); # not tds + # one more file not in tarball + system ("cp -p $CTAN/systems/enctex/utf8warn.tex $tmpdir/"); } return $tmpdir; -- cgit v1.2.3