From 634b70566837aef2db1c5ea3dfcac32d5c610cdc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 20 Jun 2009 03:01:48 +0000 Subject: - extend %NAME% expansion in autopatterns to be able to remove stuff at the beginning and end of the pkg name - add new category ConTeXt for context packages - define proper auto patterns for context packages - simplify all the context-* packages git-svn-id: svn://tug.org/texlive/trunk@13838 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLConfig.pm | 4 +- Master/tlpkg/TeXLive/TLPSRC.pm | 45 +++++++++++++++++++--- Master/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc | 14 +++++++ Master/tlpkg/tlpsrc/context-account.tlpsrc | 4 +- Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc | 2 +- Master/tlpkg/tlpsrc/context-bnf.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-chromato.tlpsrc | 3 +- .../tlpkg/tlpsrc/context-construction-plan.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-degrade.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-fixme.tlpsrc | 2 +- Master/tlpkg/tlpsrc/context-french.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-games.tlpsrc | 4 +- Master/tlpkg/tlpsrc/context-gnuplot.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-letter.tlpsrc | 7 +--- Master/tlpkg/tlpsrc/context-lettrine.tlpsrc | 4 +- Master/tlpkg/tlpsrc/context-lilypond.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-mathsets.tlpsrc | 4 +- Master/tlpkg/tlpsrc/context-simplefonts.tlpsrc | 4 +- Master/tlpkg/tlpsrc/context-simpleslides.tlpsrc | 1 + Master/tlpkg/tlpsrc/context-taspresent.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-typearea.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-typescripts.tlpsrc | 3 +- Master/tlpkg/tlpsrc/context-vim.tlpsrc | 4 +- 23 files changed, 77 insertions(+), 52 deletions(-) (limited to 'Master') diff --git a/Master/tlpkg/TeXLive/TLConfig.pm b/Master/tlpkg/TeXLive/TLConfig.pm index 40c55a15db9..eca234e5c96 100644 --- a/Master/tlpkg/TeXLive/TLConfig.pm +++ b/Master/tlpkg/TeXLive/TLConfig.pm @@ -44,12 +44,12 @@ $ReleaseYear = 2009; our @MetaCategories = qw/Collection Scheme/; our $MetaCategoriesRegexp = '(Collection|Scheme)'; # Normal Categories contain actial files and do not depend on other things. -our @NormalCategories = qw/Package TLCore Documentation/; +our @NormalCategories = qw/Package TLCore Documentation ConTeXt/; # list of all Categories our @Categories = (@MetaCategories, @NormalCategories); -our $CategoriesRegexp = '(Collection|Scheme|Package|TLCore|Documentation)'; +our $CategoriesRegexp = '(Collection|Scheme|Package|TLCore|Documentation|ConTeXt)'; our $DefaultCategory = "Package"; diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 19a32285a01..0825b23a95e 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -277,10 +277,23 @@ sub make_tlpobj for my $a (@autoaddpat) { my $type_patterns = $category_patterns->{$pattype}; for my $p (@{$type_patterns}) { - # replace the string %NAME% with the actual package name + # the occurrence of %[str:]NAME[:str]% and its + # expansion is documented in 00texlive.autopatterns.tlpsrc # we have to make a copy of $p otherwise we change it in the # hash once and for all - (my $pp = $p) =~ s/%NAME%/$a/g; + my $pp = $p; + while ($pp =~ m/%(([^%]*):)?NAME(:([^%]*))?%/) { + my $nn = $a; + if (defined($1)) { + $nn =~ s/^$2//; + } + if (defined($3)) { + $nn =~ s/$4$//; + } + $pp =~ s/%(([^%]*):)?NAME(:([^%]*))?%/$nn/; + } + # replace the string %NAME% with the actual package name + #(my $pp = $p) =~ s/%NAME%/$a/g; # sort through the patterns, and make sure that * are added to # tag the default patterns if ($pp =~ m/^!(.*)$/) { @@ -707,7 +720,7 @@ basic infrastructure functionality. identifies the category into which this package belongs. This determines the default patterns applied. Possible categories are defined in C, currently C, C, C, -C, C. Most packages will fall into the +C, C, C. Most packages will fall into the C category. =item C @@ -771,7 +784,7 @@ C which gives the additional options for the C file. =back -=item +=item C gives a free from entry of post install and removal actions to be executed. The difference to the C statement is that @@ -908,7 +921,7 @@ named C<00texlive.autopatterns.>IC<.tlpsrc>. =item C -for category C: +For category C: t texmf-dist topdir $name @@ -916,6 +929,16 @@ where C is one of: C, C, C, C, C, C, C, C, C, C, C, C. +For category C: + + d texmf-dist/tex/context/third/%context-:NAME% + d texmf-dist/metapost/context/third/%context-:NAME% + f texmf-dist/tex/context/interface/third/*%context-:NAME%.xml + +(where C<%context-:NAME%> is replaced by the package name with an initial +C is removed. E.g., if the package is called C +the replacement in the above rules will be C.) + For other categories B patterns are automatically added to the list of Cs. @@ -925,12 +948,24 @@ for category C: t texmf-dist doc $name +for category C: + + d texmf-dist/doc/context/third/%context-:NAME% + +(see above for the C construct) + =item C for category C: t texmf-dist source $name +for category C: + + d texmf-dist/source/context/third/%context-:NAME% + +(see above for the C construct) + =item C No Cs are ever automatically added. diff --git a/Master/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc b/Master/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc index 06a4779fc65..6f87d3fdbb3 100644 --- a/Master/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc +++ b/Master/tlpkg/tlpsrc/00texlive.autopatterns.tlpsrc @@ -25,3 +25,17 @@ docpattern Package t texmf-dist doc %NAME% # auto patterns for category TLCore docpattern TLCore t texmf doc %NAME% + +# auto patterns for category ConTeXt +# %STRING% expansion: +# general form: %[str:]NAME[:str]% +# - initial str deletes str at the beginning of pkg name (if matches) +# - terminal str deletes str at then end of pkg name (if matches) +# Example: +# pkg name: context-foobar +# %context-:NAME% expands to foobar +runpattern ConTeXt d texmf-dist/tex/context/third/%context-:NAME% +runpattern ConTeXt d texmf-dist/metapost/context/third/%context-:NAME% +runpattern ConTeXt f texmf-dist/tex/context/interface/third/*%context-:NAME%.xml +docpattern ConTeXt d texmf-dist/doc/context/third/%context-:NAME% +srcpattern ConTeXt d texmf-dist/source/context/third/%context-:NAME% diff --git a/Master/tlpkg/tlpsrc/context-account.tlpsrc b/Master/tlpkg/tlpsrc/context-account.tlpsrc index 18e9726c6d6..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-account.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-account.tlpsrc @@ -1,3 +1 @@ -runpattern d texmf-dist/tex/context/third/account -runpattern f texmf-dist/tex/context/interface/third/t-account.xml -docpattern d texmf-dist/doc/context/third/account +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc b/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc index d07b3818813..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-algorithmic.tlpsrc @@ -1 +1 @@ -runpattern d texmf-dist/tex/context/third/algorithmic +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-bnf.tlpsrc b/Master/tlpkg/tlpsrc/context-bnf.tlpsrc index dd8635574e3..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-bnf.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-bnf.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/bnf -docpattern d texmf-dist/doc/context/third/bnf +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-chromato.tlpsrc b/Master/tlpkg/tlpsrc/context-chromato.tlpsrc index 737a609a01e..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-chromato.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-chromato.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/chromato -docpattern d texmf-dist/doc/context/third/chromato +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-construction-plan.tlpsrc b/Master/tlpkg/tlpsrc/context-construction-plan.tlpsrc index e785e33e791..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-construction-plan.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-construction-plan.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/construction-plan -docpattern d texmf-dist/doc/context/third/construction-plan +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-degrade.tlpsrc b/Master/tlpkg/tlpsrc/context-degrade.tlpsrc index e8db0159bb9..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-degrade.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-degrade.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/degrade -docpattern d texmf-dist/doc/context/third/degrade +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-fixme.tlpsrc b/Master/tlpkg/tlpsrc/context-fixme.tlpsrc index f1e37bfa8d9..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-fixme.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-fixme.tlpsrc @@ -1 +1 @@ -runpattern d texmf-dist/tex/context/third/fixme +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-french.tlpsrc b/Master/tlpkg/tlpsrc/context-french.tlpsrc index 8ee426eebbd..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-french.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-french.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/french -docpattern d texmf-dist/doc/context/third/french +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-games.tlpsrc b/Master/tlpkg/tlpsrc/context-games.tlpsrc index 905eb13f1bc..02eb586d30c 100644 --- a/Master/tlpkg/tlpsrc/context-games.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-games.tlpsrc @@ -1,4 +1,2 @@ -runpattern d texmf-dist/tex/context/third/games -docpattern d texmf-dist/doc/context/third/games +category ConTeXt depend skaknew - diff --git a/Master/tlpkg/tlpsrc/context-gnuplot.tlpsrc b/Master/tlpkg/tlpsrc/context-gnuplot.tlpsrc index bf8886c6bdf..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-gnuplot.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-gnuplot.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/gnuplot -runpattern d texmf-dist/metapost/context/third/gnuplot +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-letter.tlpsrc b/Master/tlpkg/tlpsrc/context-letter.tlpsrc index ee3ca159613..59d80c12bcc 100644 --- a/Master/tlpkg/tlpsrc/context-letter.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-letter.tlpsrc @@ -1,5 +1,2 @@ -runpattern d texmf-dist/tex/context/third/letter -runpattern f texmf-dist/tex/context/interface/third/t-letter.xml -runpattern f texmf-dist/tex/context/interface/third/t-resume.xml -docpattern d texmf-dist/doc/context/third/letter -srcpattern d texmf-dist/source/context/third/letter +category ConTeXt +runpattern +f texmf-dist/tex/context/interface/third/t-resume.xml diff --git a/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc b/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc index b6e6ce45bc0..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-lettrine.tlpsrc @@ -1,3 +1 @@ -runpattern d texmf-dist/tex/context/third/lettrine -runpattern f texmf-dist/tex/context/interface/third/lettrine.xml -docpattern d texmf-dist/doc/context/third/lettrine +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-lilypond.tlpsrc b/Master/tlpkg/tlpsrc/context-lilypond.tlpsrc index 86744062ea8..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-lilypond.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-lilypond.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/lilypond -docpattern d texmf-dist/doc/context/third/lilypond +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-mathsets.tlpsrc b/Master/tlpkg/tlpsrc/context-mathsets.tlpsrc index c145c606927..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-mathsets.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-mathsets.tlpsrc @@ -1,3 +1 @@ -runpattern d texmf-dist/tex/context/third/mathsets -runpattern f texmf-dist/tex/context/interface/third/t-mathsets.xml -docpattern d texmf-dist/doc/context/third/mathsets +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-simplefonts.tlpsrc b/Master/tlpkg/tlpsrc/context-simplefonts.tlpsrc index 5563c26c8a7..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-simplefonts.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-simplefonts.tlpsrc @@ -1,3 +1 @@ -runpattern d texmf-dist/tex/context/third/simplefonts -docpattern d texmf-dist/doc/context/third/simplefonts -docpattern d texmf-dist/source/context/third/simplefonts +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-simpleslides.tlpsrc b/Master/tlpkg/tlpsrc/context-simpleslides.tlpsrc index 9f226b4d4d3..7aa2626c11e 100644 --- a/Master/tlpkg/tlpsrc/context-simpleslides.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-simpleslides.tlpsrc @@ -1,3 +1,4 @@ +category ConTeXt runpattern f texmf-dist/tex/context/interface/third/t-simpleslides.xml runpattern d texmf-dist/tex/context/third/simple-slides runpattern d texmf-dist/scripts/context/lua/third/simple-slides diff --git a/Master/tlpkg/tlpsrc/context-taspresent.tlpsrc b/Master/tlpkg/tlpsrc/context-taspresent.tlpsrc index c03c211775f..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-taspresent.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-taspresent.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/taspresent -docpattern d texmf-dist/doc/context/third/taspresent +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-typearea.tlpsrc b/Master/tlpkg/tlpsrc/context-typearea.tlpsrc index c1479ecab8d..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-typearea.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-typearea.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/typearea -docpattern d texmf-dist/doc/context/third/typearea +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-typescripts.tlpsrc b/Master/tlpkg/tlpsrc/context-typescripts.tlpsrc index 9847cb99a2a..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-typescripts.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-typescripts.tlpsrc @@ -1,2 +1 @@ -runpattern d texmf-dist/tex/context/third/typescripts -docpattern d texmf-dist/doc/context/third/typescripts +category ConTeXt diff --git a/Master/tlpkg/tlpsrc/context-vim.tlpsrc b/Master/tlpkg/tlpsrc/context-vim.tlpsrc index 264898c0b11..8e194d47208 100644 --- a/Master/tlpkg/tlpsrc/context-vim.tlpsrc +++ b/Master/tlpkg/tlpsrc/context-vim.tlpsrc @@ -1,3 +1 @@ -runpattern d texmf-dist/tex/context/third/vim -runpattern f texmf-dist/tex/context/interface/third/t-vim.xml -docpattern d texmf-dist/doc/context/third/vim +category ConTeXt -- cgit v1.2.3