summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-06-27 16:31:48 +0000
committerNorbert Preining <preining@logic.at>2007-06-27 16:31:48 +0000
commit9f5c9044cd41e6822a3c641f4f14056d3e31f300 (patch)
tree02e077c1e8902867bd00a41dee49067b3e8b1d9d /Master/tlpkg/TeXLive
parent456c45de2f75e9d3cf7583da1cd9aea643e4ee23 (diff)
pod documentation for TLPOBJ
add man pages (pod2man) for TLPSRC and TLPOBJ fixes for TLPSRC pod doc git-svn-id: svn://tug.org/texlive/trunk@4518 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm213
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm2
2 files changed, 214 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 986c7a41fb2..5c2e32feccd 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -5,6 +5,8 @@
#
# This file is licensed under the GNU General Public Licence version 2
# or any later version
+#
+# pod documentation at the bottom
package TeXLive::TLPOBJ;
@@ -601,6 +603,217 @@ longdesc ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
$_tmp
.
+
+__END__
+
+=head1 NAME
+
+TeXLive::TLPOBJ - TeX Live Package Object access module
+
+=head1 SYNOPSIS
+
+ use TeXLive::TLPOBJ;
+
+ my $tlpobj = TeXLive::TLPOBJ->new( name => "foobar" );
+
+=head1 DESCRIPTION
+
+The L<TeXLive::TLPOBJ> module provide access to TeX Live Package Object
+files describing a self-contained package.
+
+=head1 FILE SPECIFICATION
+
+Please see L<TeXLive::TLPSRC> documentation for the specification. The
+only differences are that the various C<*pattern> keys are invalid, and
+instead there are the respective C<*files> keys described below. Furthermore
+one more I<key> is allowed, C<revision> which specifies the maximum of
+all last changed revision of files contained in the package.
+
+All these keys have in common that the are followed by a list of files
+B<intended> by one space. They differ only in the first line itself
+(described below).
+
+=over
+
+=item C<srcfiles>, C<docfiles>, C<runfiles>
+
+each of these three items contains in addition the sum of sizes of the
+single files (currently in byte, but this may change).
+
+ srcfiles size=NNNNNN
+ docfiles size=NNNNNN
+ runfiles size=NNNNNN
+
+=item C<runfiles>
+
+Since C<runfiles> are different for the different architectures one C<tlpobj>
+file can contain C<runfiles> lines for different architectures. The
+architecture is specified on the C<binfiles> using the C<arch=XXX> tag. Thus,
+C<binfiles> lines look like
+
+ binfiles arch=XXXX size=NNNNN
+
+=back
+
+Thus a typical entry for runfiles looks like this:
+
+ /------- excerpt from bin-dvips.tlpobj
+ |...
+ |runfiles size=1702468
+ | texmf/dvips/base/color.pro
+ | ...
+ | texmf/scripts/pkfix/pkfix.pl
+ |binfiles arch=i386-solaris size=329700
+ | bin/i386-solaris/afm2tfm
+ | bin/i386-solaris/dvips
+ | bin/i386-solaris/pkfix
+ |binfiles arch=win32 size=161280
+ | bin/win32/afm2tfm.exe
+ | bin/win32/dvips.exe
+ | bin/win32/pkfix.exe
+ |...
+
+
+=head1 PACKAGE VARIABLES
+
+TeXLive::TLPOBJ has one package wide variable which is C<zipdir> where
+generated zip files are saved (if not otherwise specified.
+
+ TeXLive::TLPOBJ->zipdir("path/to/zip/dir");
+
+=head1 MEMBER ACCESS FUNCTIONS
+
+For any of the I<keys> a function
+
+ $tlpobj->key
+
+is available, which returns the current value when called without an argument,
+and sets the respective value when called with an argument.
+
+Arguments and return values for C<name>, C<category>, C<shortdesc>,
+C<longdesc>, C<catalogue>, C<revision> are single scalars.
+Arguments and return values for C<depends>, C<executes> are lists.
+Arguments and return values for C<binfiles> is a hash with the architectures
+as keys.
+
+Other functions which work quite similar are:
+
+ $tlpobj->docsize
+ $tlpobj->srcsize
+ $tlpobj->runsize
+ $tlpobj->binsize
+
+which set or get the current value of the respective sizes. Note that also
+the C<binsize> function returns (and takes as argument) a hash with the
+architectures as keys, similar to the C<runfiles> functions (see above).
+
+=head1 OTHER FUNCTIONS
+
+The following functions can be called for an C<TLPOBJ> object:
+
+=over
+
+=item C<new>
+
+(constructor) returns a new C<TLPSRC> object. The arguments to the C<new>
+constructor can be in the usual hash representation for the different keys
+above:
+
+ $tlpobj = TLPOBJ->new ( name => "foobar", shortdesc => "The foobar package" );
+
+=item C<from_file("filename")>
+
+reads a C<tlpobj> file.
+
+ $tlpobj = new TLPOBJ;
+ $tlpobj->from_file("path/to/the/tlpobj/file");
+
+=item C<from_fh($filehandle [, $multi] )>
+
+read the textual representation of a TLPOBJ from an already opened file handle.
+If C<$multi> is undefined (ie not given) then multiple tlpobj in the
+same file are treated as errors. If C<$multi> is defined then returns
+after reading one tlpobj.
+
+Returns 1 if it found a tlpobj, otherwise 0
+
+=item C<writeout>
+
+writes the textual representation of a C<TLPOBJ> object to stdout, or the
+filehandle if given:
+
+ $tlpsrc->writeout;
+ $tlpsrc->writeout(\*FILEHANDLE);
+
+=item C<writeout_simple>
+
+debugging function for comparison with tpm/tlps, will go away.
+
+=item C<make_zip($tltree[,$destdir[,$zipname]])>
+
+creates a zip file of the arch B<independent> files in the TLPOBJ
+in $destdir (if not defined then TLPOBJ->zipdir is used).
+The file name of the created zipfile is $zipname (if not
+present $tlpobj->name.zip)
+
+If the package contains "binfiles"; then zip files for
+all archs containing B<only> the binfiles are created, and
+the zipfile name is C<$zipname.$arch.zip>
+
+All the arch independent zip files B<also> contain the
+respective TLPOBJ file in
+ .tlpobj/$name.tlpobj
+so C<$zipname.zip> does contain this tlpobj file, while
+C<$zipname.$arch.zip> does NOT.
+
+=item C<recompute_sizes ($tltree)>
+
+recomputes the sizes based on the information present in C<$tltree>.
+
+=item C<recompute_revision ($tltree)>
+
+recomputes the revision based on the information present in C<$tltree>.
+
+=item C<is_arch_dependent>
+
+returns 1 if there are C<binfiles>, otherwise 0.
+
+=item C<total_size>
+
+If no argument is given returns the sum of C<srcsize>, C<docsize>, C<runsize>
+
+If and argumen is given it returns the sum of the above increased by the
+sum of sizes of C<binsize> for the architectures given as argument.
+
+=item C<{add,remove}_{src,run,doc}files ( @files )>
+
+adds or removes files to the respective list of files
+
+=item C<{add,remove}_binfiles ($arch, @files)>
+
+adds or removes files from the list of C<binfiles> for the given architecture
+
+=item C<{add,remove}_files ($type, $files)>
+
+adds or removes files for the given type (only for C<run>, C<src>, C<doc>).
+
+=back
+
+=head1 AUTHORS AND COPYRIGHT
+
+This module and its documentation was written by
+Norbert Preining <F<preining@logic.at>> for the TeX Live distribution and both
+are licensed under the GNU General Public License Version 2 or later.
+
+=head1 SEE ALSO
+
+The modules L<TeXLive::TLUtils>, L<TeXLive::TLPSRC>,
+L<TeXLive::TLPDB>, L<TeXLive::TLTREE>.
+
+
+=cut
+
+
### Local Variables:
### perl-indent-level: 2
### tab-width: 2
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index d56ef330c20..4d4ab734aa1 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -389,7 +389,7 @@ __END__
=head1 NAME
-TeXLive::TLPSRC - TeX Live Source Package access modules
+TeXLive::TLPSRC - TeX Live Package Source access module
=head1 SYNOPSIS