diff options
author | Norbert Preining <preining@logic.at> | 2007-06-28 09:11:24 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-06-28 09:11:24 +0000 |
commit | f82d752fb1943968e50950f963a3b1623b417963 (patch) | |
tree | e7b3f8f57a6d7320f140c316e54a588834172726 /Master/tlpkg/TeXLive | |
parent | b5d5393562c31c26d21b7249b794467cf2afbe51 (diff) |
intelligent patterns for win32:
- patterns of the form "f bin/${ARCH}/foobar" also match
"bin/win32/foobar.exe/.bat"
- document the changes in TLPSRC.pm and update the man page
- add a note to the specification and Perl-API that the man pages are
more up2date
- update TODO since many things are fixed
- update the tlpsrc files (remove the useless win32/...exe entries
- update texlive.tlpdb
git-svn-id: svn://tug.org/texlive/trunk@4520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 20 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLTREE.pm | 20 |
2 files changed, 33 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 4d4ab734aa1..4d65bf1fa24 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -579,6 +579,26 @@ If the C<PREFIX> contains the symbol ! the meaning of the pattern is reversed, i.e., file matching this pattern are removed from the list of included files. +=head2 arch expansion + +In case the string C<${ARCH}> occurs in one C<binpattern> it is +automatically expanded to the respective architecture. + +=head2 bat/exe for win32 + +For C<binpatterns> of the form C<f bin/win32/foobar> (i.e., also for a +binpattern of the form C<f bin/${ARCH}/foobar>) files F<foobar.bat> and +F<foobar.exe> are also matched. + +The above two properties allows to capture the binaries for all architectures +in one binpattern + + binpattern f bin/${ARCH}/dvips + +and would get F<bin/win32/dvips.exe> into the runfiles for arch=win32. + +Note that the bat/exe expansion B<only> works for patterns of the C<f> type! + =head1 MEMBER ACCESS FUNCTIONS For any of the above I<keys> a function diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm index 39c650665b6..1246a6893a9 100644 --- a/Master/tlpkg/TeXLive/TLTREE.pm +++ b/Master/tlpkg/TeXLive/TLTREE.pm @@ -176,9 +176,7 @@ sub get_matching_files { my %returnfiles; foreach $a (@Architectures) { # return empty list of arch!=win32 and pattern matches bin/win32 - # this is a special case to treat with tlsrc files auto generated - # from tpm files - if (($p =~ m@f bin/win32/@) && ($a ne "win32")) { + if (($p =~ m@f bin/win32/@) && ($a ne "win32")) { $returnfiles{$a} = [ ]; next; } @@ -204,7 +202,7 @@ sub _get_matching_files { if ($pattype eq "t") { @matchfiles = $self->_get_files_matching_dir_pattern($type,$patdata,@rest); } elsif ($pattype eq "f") { - @matchfiles = $self->_get_files_matching_glob_pattern($type,$patdata); + @matchfiles = $self->_get_files_matching_glob_pattern($type,$patdata,$arch); } elsif ($pattype eq "r") { @matchfiles = $self->_get_files_matching_regexp_pattern($type,$patdata); } elsif ($pattype eq "d") { @@ -244,6 +242,16 @@ sub _get_files_matching_glob_pattern { push @returnfiles, "$dirpart/$f"; } } + if ($dirpart =~ m@^bin/win32@) { + # for arch=win32 under bin we also want to match .bat and .exe files + foreach my $f (@candfiles) { + &TeXLive::TLUtils::debug("matching $f in $dirpart via glob $globline.{bat/exe}\n"); + if ($f =~ /^$basepart\.(bat|exe)$/) { + &TeXLive::TLUtils::debug("hit: globline=$globline, $dirpart/$f\n"); + push @returnfiles, "$dirpart/$f"; + } + } + } return(@returnfiles); } @@ -306,8 +314,6 @@ sub architectures { return @Architectures; } - - 1; ### Local Variables: @@ -315,4 +321,4 @@ sub architectures { ### tab-width: 2 ### indent-tabs-mode: nil ### End: -# vim:set tabstop=2: # +# vim:set tabstop=2 expandtab: # |