diff options
author | Norbert Preining <preining@logic.at> | 2007-12-23 21:38:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-12-23 21:38:57 +0000 |
commit | e8d394853e5aa3f38f3767070afb6f60624132b0 (patch) | |
tree | 46d35ce5fa68243b59b3edb5144072f1fa3f1dd3 /Master | |
parent | 4852626f4cf33604cd1fb3f3e6a910ef3c79944e (diff) |
src and doc splitting
options setting via texlive.config meta package
update texlive.tlpdb for that
git-svn-id: svn://tug.org/texlive/trunk@5846 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 93 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 33 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 2 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 32 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpdb2container | 63 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpsrc2tlpdb | 13 | ||||
-rw-r--r-- | Master/tlpkg/texlive.tlpdb | 76 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/texlive.config.tlpsrc | 5 |
8 files changed, 260 insertions, 57 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 0fb2400518b..3e5c6e482cb 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -35,6 +35,9 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages $tlpdb->language_dat_lines; $tlpdb->package_revision("packagename"); $tlpdb->location; + $tlpdb->config_src_container; + $tlpdb->config_doc_container; + $tlpdb->config_container_format; TeXLive::TLPDB->listdir([$dir]); $tlpdb->generate_listfiles([$destdir]); @@ -497,23 +500,78 @@ sub location { =pod - -=pod - =item C<< $tlpdb->listdir >> The function C<listdir> allows to read and set the packages variable specifiying where generated list files are created. =cut + sub listdir { my $self = shift; if (@_) { $_listdir = $_[0] } return $_listdir; } -=back +=pod + +=item C<< $tlpdb->config_src_container >> +Returns 1 if the the texlive config option for src files splitting on +container level is set. See Options below. + +=cut + +sub config_src_container { + my $self = shift; + if (defined($self->{'tlps'}{'texlive.config'})) { + foreach my $d ($self->{'tlps'}{'texlive.config'}->depends) { + if ($d eq "container_split_src_files") { + return 1; + } + } + } + return 0; +} + +=item C<< $tlpdb->config_doc_container >> + +Returns 1 if the the texlive config option for doc files splitting on +container level is set. See Options below. + +=cut + +sub config_doc_container { + my $self = shift; + if (defined($self->{'tlps'}{'texlive.config'})) { + foreach my $d ($self->{'tlps'}{'texlive.config'}->depends) { + if ($d eq "container_split_doc_files") { + return 1; + } + } + } + return 0; +} + +=item C<< $tlpdb->config_doc_container >> + +Returns the currently set default container format. See Options below. + +=cut + +sub config_container_format { + my $self = shift; + if (defined($self->{'tlps'}{'texlive.config'})) { + foreach my $d ($self->{'tlps'}{'texlive.config'}->depends) { + if ($d =~ m!^container_format/(.*)$!) { + return "$1"; + } + } + } + return ""; +} + +=pod =item C<< $tlpdb->fmtutil_cnf_lines >> @@ -627,6 +685,33 @@ sub language_dat_lines { =pod +=head1 OPTIONS + +Options regarding the full TeX Live installation to be described are saved +in a package C<texlive.config> as values of C<depend> lines. This special +package C<texlive.config> does not contain any files, only depend lines +which set one or more of the following options: + +=over 6 + +=item C<container_split_src_files> + +=item C<container_split_doc_files> + +These options specify that at container generation time the source and +documentation files for a package have been put into a separate container +named C<package.source.extension> and C<package.doc.extension>. + +=item C<container_format/I<format>> + +This option specifies a format for containers. The currently supported +formats are C<lzma> and C<zip>. But note that C<zip> is untested. + +=back + +To set these options the respective lines should be added to +C<texlive.config.tlpsrc>. + =head1 SEE ALSO The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index e44bf2c2543..0d2fdea3af1 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -512,10 +512,6 @@ sub make_container { $nul = "/dev/null"; } @files = TeXLive::TLUtils::sort_uniq(@files); - if (!@files) { - &TeXLive::TLUtils::debug("Not creating empty container file for $containername"); - return; - } # we do relative packages ONLY if the files do NOT span multiple # texmf trees. check this here my $tltree; @@ -694,17 +690,32 @@ sub is_meta_package { return 0; } +sub split_doc_package { + my $self = shift; + if (not($self->docfiles)) { return ; } + my $tlp = new TeXLive::TLPOBJ; + $tlp->name($self->name . ".doc"); + $tlp->shortdesc("doc files of " . $self->name); + $tlp->revision($self->revision); + $tlp->category($self->category); + $tlp->add_docfiles($self->docfiles); + $tlp->docsize($self->docsize); + $self->clear_docfiles(); + $self->docsize(0); + return($tlp); +} + sub split_src_package { my $self = shift; if (not($self->srcfiles)) { return ; } my $tlp = new TeXLive::TLPOBJ; - $tlp->name($self->name . ".SOURCES"); + $tlp->name($self->name . ".source"); $tlp->shortdesc("source files of " . $self->name); $tlp->revision($self->revision); $tlp->category($self->category); $tlp->add_srcfiles($self->srcfiles); $tlp->srcsize($self->srcsize); - $self->clearsrcfiles(); + $self->clear_srcfiles(); $self->srcsize(0); return($tlp); } @@ -726,7 +737,7 @@ sub split_bin_package { if (keys(%binf)) { push @{$self->{'depends'}}, $self->name . ".ARCH"; } - $self->clearbinfiles(); + $self->clear_binfiles(); return(@retlist); } @@ -822,7 +833,7 @@ sub srcsize { if (@_) { $self->{'srcsize'} = shift } return ( defined($self->{'srcsize'}) ? $self->{'srcsize'} : 0 ); } -sub clearsrcfiles { +sub clear_srcfiles { my $self = shift; $self->{'srcfiles'} = [ ] ; } @@ -839,7 +850,7 @@ sub docfiles { if (@_) { $self->{'docfiles'} = [ @_ ] } return @{ $self->{'docfiles'} }; } -sub cleardocfiles { +sub clear_docfiles { my $self = shift; $self->{'docfiles'} = [ ] ; } @@ -862,7 +873,7 @@ sub binfiles { if (@_) { $self->{'binfiles'} = \%newfiles } return $self->{'binfiles'}; } -sub clearbinfiles { +sub clear_binfiles { my $self = shift; $self->{'binfiles'} = { }; } @@ -891,7 +902,7 @@ sub runfiles { if (@_) { $self->{'runfiles'} = [ @_ ] } return @{ $self->{'runfiles'} }; } -sub clearrunfiles { +sub clear_runfiles { my $self = shift; $self->{'runfiles'} = [ ] ; } diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 646b9dd32b2..e0ed89aaee5 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -78,7 +78,7 @@ sub from_file if ($line =~ /^ /) { die "$srcfile: continuation line not allowed in tlpsrc: $line\n"; } - if ($line =~ /^name\s*([-\w]+)$/) { + if ($line =~ /^name\s*([-\w]+|texlive\.config)$/) { $name = "$1"; $started && die("$srcfile: tlpsrc cannot have two name directives"); $started = 1; diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 52b8443b64c..4e14b054cd0 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -499,6 +499,8 @@ installed (currently implemented only for installation from DVD). sub install_packages { my ($fromtlpdb,$totlpdb,$what,$netarchs,$opt_src,$opt_doc) = @_; + my $container_src_split = $fromtlpdb->config_src_container; + my $container_doc_split = $fromtlpdb->config_doc_container; foreach my $package (@$what) { print "INSTALL $package\n"; my $tlpobj=$fromtlpdb->get_package($package); @@ -540,6 +542,35 @@ sub install_packages { $container = "$::texlive_url/$::netarchive/$package.$DefaultContainerExtension"; } install_package($container,\@installfiles,$totlpdb->root,$vars{'this_platform'}); + # if we are installing from CD or NET we have to fetch the respective + # source and doc packages $pkg.source and $pkg.doc and install them, too + if ((&media eq 'NET') || (&media eq 'CD')) { + # we install split containers under the following conditions: + # - the container were split generated + # - src/doc files should be installed + # - the package is not already a split one (like .i386-linux) + # - there are actually src/doc files present + if ($container_src_split && $opt_src && + ($package !~ m/\./) && $tlpobj->srcfiles) { + my $srccontainer = $container; + $srccontainer =~ s/(.tar.lzma|.zip)/.source$1/; + install_package($srccontainer,\@installfiles,$totlpdb->root,$vars{'this_platform'}); + } + if ($container_doc_split && $opt_doc && + ($package !~ m/\./) && $tlpobj->docfiles) { + my $doccontainer = $container; + $doccontainer =~ s/(.tar.lzma|.zip)/.doc$1/; + install_package($doccontainer,\@installfiles,$totlpdb->root,$vars{'this_platform'}); + } + } + # we don't want to have wrong information in the tlpdb, so remove the + # src/doc files if they are not installed ... + if (!$opt_src) { + $tlpobj->clear_srcfiles; + } + if (!$opt_doc) { + $tlpobj->clear_docfiles; + } $totlpdb->add_tlpobj($tlpobj); } $totlpdb->save; @@ -807,6 +838,7 @@ sub additional_architectures_available_from_net { while (<WGET>) { chop; my $line=$_; + push @::pkgverlines,$line; next unless /-1$/; ($platform, undef)=split " ", $line; unless (defined $vars->{"diskbin_$platform"}) { diff --git a/Master/tlpkg/bin/tlpdb2container b/Master/tlpkg/bin/tlpdb2container index efb33bd9531..4d903ce6b77 100755 --- a/Master/tlpkg/bin/tlpdb2container +++ b/Master/tlpkg/bin/tlpdb2container @@ -25,20 +25,22 @@ use File::Path; my $opt_all = 0; our $mydir; our $opt_debug = 0; -my $opt_type = "lzma"; my $opt_outputdir = "./archive"; my $opt_relative = 0; my $help = 0; GetOptions("outputdir=s" => \$opt_outputdir, - "all!" => \$opt_all, - "debug!" => \$opt_debug, - "relative!" => \$opt_relative, - "type=s" => \$opt_type, - "help|?" => \$help) or pod2usage(1); + "all!" => \$opt_all, + "debug!" => \$opt_debug, + "relative!" => \$opt_relative, + "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; +my $srcsplit = 0; +my $docsplit = 0; +my $type = "lzma"; + exit (&main ()); sub main @@ -46,18 +48,40 @@ sub main # get the db. chomp (my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); - die("Cannot find tlpdb in $Master!\n") unless defined($tlpdb); - my @packs; - if ($opt_all) { - @packs = $tlpdb->list_packages; - } else { - @packs = @ARGV; - } + die("Cannot find tlpdb in $Master!\n") unless defined($tlpdb); + my @packs; + if ($opt_all) { + @packs = $tlpdb->list_packages; + } else { + @packs = @ARGV; + } + # get configuration of package splitting + $srcsplit = $tlpdb->config_src_container; + $docsplit = $tlpdb->config_doc_container; + my $format = $tlpdb->config_container_format; + if (($format eq "lzma") || ($format eq "zip")) { + $type = $format; + } else { + warn "unknown container format specified in texlive.config: $format\nIgnoring and continuing with $type!\n"; + } # get list of packages. for my $pkg (@packs) { + next if ($pkg eq "texlive.config"); my $obj = $tlpdb->get_package ($pkg); die "$0: no TeX Live package named $pkg in $Master.\n" if ! $obj; - $obj->make_container($opt_type,$Master,$opt_outputdir,$pkg,$opt_relative); + if ($srcsplit) { + my $objsrc = $obj->split_src_package; + if ($objsrc) { + $objsrc->make_container($type,$Master,$opt_outputdir,"$pkg.source",$opt_relative); + } + } + if ($docsplit) { + my $objdoc = $obj->split_doc_package; + if ($objdoc) { + $objdoc->make_container($type,$Master,$opt_outputdir,"$pkg.doc",$opt_relative); + } + } + $obj->make_container($type,$Master,$opt_outputdir,$pkg,$opt_relative); } } @@ -83,10 +107,6 @@ build container file for all packages present in the tlpdb. =item B<-outputdir> I<outputdir> The location where created container files are placed, defaults to ./zip. -=item B<-type> I<zip|lzma> -Specifies the type of container to be used. C<zip> generates zip files, -while C<lzma> generates .tar.lzma files. - =item B<-relative> Create a relative package, see TeXLive::TLPOBJ.1 for details. @@ -95,6 +115,11 @@ Create a relative package, see TeXLive::TLPOBJ.1 for details. The standard options C<-help> and C<-debug> are also accepted. See the tlpfiles documentation for details. +Note that the format of the containers and the splitting off of source +and documentation files are controlled by the TLPDB options saved in the +pseudo package C<texlive.config>. Please see the documentation for TLPDB +for details. + =head1 DESCRIPTION @@ -118,4 +143,4 @@ GNU General Public License Version 2 or later. ### tab-width: 2 ### indent-tabs-mode: nil ### End: -# vim:set tabstop=2: # +# vim:set tabstop=2 expandtab: # diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb index f92bc7266b7..5245ebae042 100755 --- a/Master/tlpkg/bin/tlpsrc2tlpdb +++ b/Master/tlpkg/bin/tlpsrc2tlpdb @@ -29,14 +29,12 @@ chomp (my $opt_master = `cd $::mydir/../.. && pwd`); our $opt_debug = 0; my $help = 0; my $opt_nobinsplit = 0; -my $opt_srcsplit = 0; GetOptions( "all!" => \$opt_all, "master=s" => \$opt_master, # location of the TL tree "catalogue=s" => \$opt_catalogue, # location of the TeX Catalogue "no-bin-split!" => \$opt_nobinsplit, - "src-split!" => \$opt_srcsplit, "debug!", "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -99,14 +97,6 @@ sub main $tldb->add_tlpobj($_); } } - # split src packages off - if ($opt_srcsplit) { - my $srcobj = $tlp->split_src_package; - if (defined($srcobj)) { - $tldb->add_tlpobj($srcobj); - } - } - $tldb->add_tlpobj ($tlp); } warn "\n"; @@ -151,9 +141,6 @@ gathered from the TeX Catalogue. The location given by B<-master> must point to a valid svn repository of TeX Live's Master direcory. Defaults to C<../..> of C<$0>. -=item B<-src-split> -Do split source packages off. This is disabled by default. - =item B<-no-bin-split> Do NOT split files with binaries into several packages, one for the arch independent and one for each of the architectures with only the respective diff --git a/Master/tlpkg/texlive.tlpdb b/Master/tlpkg/texlive.tlpdb index 487f5ee604b..16fabf8afa7 100644 --- a/Master/tlpkg/texlive.tlpdb +++ b/Master/tlpkg/texlive.tlpdb @@ -24951,6 +24951,32 @@ catalogue-date 2006-12-31 18:14:50 +0100 catalogue-ctan /fonts/chess/chess catalogue-license pd +name chessboard +category Package +revision 5838 +shortdesc Print chess boards. +longdesc This package offers commands to print chessboards. It can print +longdesc partial boards, hide pieces and fields, color the boards and +longdesc put various marks on the board. It has a lot of options to +longdesc place pieces on the board. Using exotic pieces (e.g., for fairy +longdesc chess) is possible. The documentation includes an example of an +longdesc animated chessboard, for those whose PDF viewer can display +longdesc animations. +docfiles size=1 + texmf-dist/doc/latex/chessboard/README details="Readme" +srcfiles size=48 + texmf-dist/source/latex/chessboard/chessboard-src.dtx + texmf-dist/source/latex/chessboard/chessboard.ins +runfiles size=48 + texmf-dist/tex/latex/chessboard/chessboard-keys-main.sty + texmf-dist/tex/latex/chessboard/chessboard-keys-pgf.sty + texmf-dist/tex/latex/chessboard/chessboard-pgf.sty + texmf-dist/tex/latex/chessboard/chessboard.sty +catalogue-version 1.5 +catalogue-date 2007-12-20 19:50:59 +0100 +catalogue-ctan /macros/latex/contrib/chessboard +catalogue-license lppl + name chessfss category Package revision 5419 @@ -29330,7 +29356,7 @@ depend collection-basic name collection-games category Collection -revision 5419 +revision 5839 shortdesc Games typesetting (chess, etc) longdesc Setups for typesetting various board games, including chess depend backgammon @@ -29338,6 +29364,7 @@ depend bridge depend cchess depend cheq depend chess +depend chessboard depend chessfss depend egameps depend go @@ -29351,6 +29378,7 @@ depend skaknew depend sudoku depend sudokubundle depend xq +depend xskak depend collection-latex name collection-genericextra @@ -37945,7 +37973,7 @@ runfiles size=13 texmf-dist/tex/latex/eepic/eepicemu.sty texmf-dist/tex/latex/eepic/epic.sty catalogue-version -catalogue-date 2007-02-06 22:00:42 +0100 +catalogue-date 2007-12-23 15:05:55 +0100 catalogue-ctan /macros/latex/contrib/eepic catalogue-license dfsg @@ -41822,7 +41850,7 @@ longdesc floats side by side, and to put the caption beside its float. longdesc The floatrow settings could be expanded to the floats created longdesc by packages rotating, wrapfig, subfig (in the case of rows of longdesc subfloats), and longtable. -docfiles size=234 +docfiles size=233 texmf-dist/doc/latex/floatrow/README details="Readme" texmf-dist/doc/latex/floatrow/floatrow-rus.tex texmf-dist/doc/latex/floatrow/floatrow.pdf details="Package documentation" @@ -44903,7 +44931,7 @@ docfiles size=206 runfiles size=22 texmf-dist/tex/latex/gmutils/gmutils.sty catalogue-version v0.85 -catalogue-date 2007-11-17 21:57:01 +0100 +catalogue-date 2007-11-17 20:57:01 +0000 catalogue-ctan /macros/latex/contrib/gmutils catalogue-license lppl @@ -64083,7 +64111,7 @@ srcfiles size=5 runfiles size=1 texmf-dist/tex/latex/newspaper/newspaper.sty catalogue-version 1.0 -catalogue-date 2007-12-16 23:13:59 +0100 +catalogue-date 2007-12-23 11:59:00 +0100 catalogue-ctan /macros/latex/contrib/newspaper catalogue-license lppl @@ -71699,7 +71727,7 @@ runfiles size=39 texmf-dist/tex/latex/quotmark/quotmark-welsh.def texmf-dist/tex/latex/quotmark/quotmark.sty catalogue-version 1.0 -catalogue-date 2007-12-19 18:53:26 +0100 +catalogue-date 2007-12-23 11:59:00 +0100 catalogue-ctan /macros/latex/contrib/quotmark catalogue-license lppl @@ -80944,6 +80972,13 @@ srcfiles size=40 texmf-doc/source/chinese/texlive-zh-cn/tex-live.sty texmf-doc/source/chinese/texlive-zh-cn/xcp.py +name texlive.config +category TLCore +revision 0 +depend container_split_src_files +depend container_split_doc_files +depend container_format/lzma + name texlogos category Package revision 4479 @@ -81039,7 +81074,7 @@ docfiles size=267 texmf-dist/doc/latex/texpower/tpslifonts/tpslifonts.dtx texmf-dist/doc/latex/texpower/tpslifonts/tpslifonts.ins texmf-dist/doc/latex/texpower/verbexample.tex -srcfiles size=173 +srcfiles size=172 texmf-dist/source/latex/texpower/Makefile texmf-dist/source/latex/texpower/powersem.dtx texmf-dist/source/latex/texpower/texpower-addons.dtx @@ -89207,7 +89242,7 @@ docfiles size=372 texmf-dist/doc/generic/vntex/vntex-man-print.pdf texmf-dist/doc/generic/vntex/vntex-man.pdf details="Package manual" language="vi" texmf-dist/doc/generic/vntex/vntex.txt -runfiles size=2598 +runfiles size=2579 texmf-dist/fonts/afm/vntex/chartervn/bchb8v.afm texmf-dist/fonts/afm/vntex/chartervn/bchbi8v.afm texmf-dist/fonts/afm/vntex/chartervn/bchr8v.afm @@ -91030,7 +91065,7 @@ docfiles size=1 runfiles size=2 texmf-dist/tex/xelatex/xgreek/xgreek.sty catalogue-version v1.0c -catalogue-date 2007-11-18 23:01:55 +0100 +catalogue-date 2007-11-18 22:01:55 +0000 catalogue-ctan /macros/xetex/latex/xgreek catalogue-license lppl @@ -91346,6 +91381,29 @@ catalogue-date 2007-03-13 09:23:19 +0100 catalogue-ctan /fonts/xq catalogue-license lppl +name xskak +category Package +revision 5839 +shortdesc An extension to the skak package for chess typesetting. +longdesc Xskak, as its prime function, saves infromation about a chess +longdesc game for later use (e.g., to loop through a game to make an +longdesc animated board). The package also extends the input that the +longdesc parsing commands can handle and offers an interface to define +longdesc and switch between indefinite levels of styles. +docfiles size=1 + texmf-dist/doc/latex/xskak/README details="Readme" +srcfiles size=22 + texmf-dist/source/latex/xskak/xskak-src.dtx + texmf-dist/source/latex/xskak/xskak.ins +runfiles size=22 + texmf-dist/tex/latex/xskak/xskak-keys.sty + texmf-dist/tex/latex/xskak/xskak-nagdef.sty + texmf-dist/tex/latex/xskak/xskak.sty +catalogue-version 1.0 +catalogue-date 2007-12-23 11:59:00 +0100 +catalogue-ctan /macros/latex/contrib/xskak +catalogue-license lppl + name xtab category Package revision 4479 diff --git a/Master/tlpkg/tlpsrc/texlive.config.tlpsrc b/Master/tlpkg/tlpsrc/texlive.config.tlpsrc new file mode 100644 index 00000000000..c51d8747fcc --- /dev/null +++ b/Master/tlpkg/tlpsrc/texlive.config.tlpsrc @@ -0,0 +1,5 @@ +name texlive.config +category TLCore +depend container_split_src_files +depend container_split_doc_files +depend container_format/lzma |