summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPSRC.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm71
1 files changed, 65 insertions, 6 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index d2d13d98543..41ff0601915 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -30,6 +30,7 @@ sub new
srcpatterns => $params{'srcpatterns'},
docpatterns => $params{'docpatterns'},
binpatterns => $params{'binpatterns'},
+ postactions => $params{'postactions'},
executes => defined($params{'executes'}) ? $params{'executes'} : [],
depends => defined($params{'depends'}) ? $params{'depends'} : [],
};
@@ -67,6 +68,7 @@ sub from_file
my $catalogue = "";
my (@executes, @depends);
my (@runpatterns, @docpatterns, @binpatterns, @srcpatterns);
+ my (@postactions);
my $started = 0;
my $finished = 0;
my $savedline = "";
@@ -132,6 +134,9 @@ sub from_file
} elsif ($line =~ /^depend\s+(.*)\s*$/) {
push @depends, $1 if ($1 ne "");
next;
+ } elsif ($line =~ /^postaction\s+(.*)\s*$/) {
+ push @postactions, $1 if ($1 ne "");
+ next;
} else {
tlwarn("$srcfile:$.: unknown tlpsrc directive, please fix: $line\n");
}
@@ -149,6 +154,7 @@ sub from_file
$self->docpatterns(@docpatterns) if @docpatterns;
$self->executes(@executes) if @executes;
$self->depends(@depends) if @depends;
+ $self->postactions(@postactions) if @postactions;
}
@@ -175,6 +181,11 @@ sub writeout
print $fd "execute $_\n";
}
}
+ if (defined($self->{'postactions'})) {
+ foreach (@{$self->{'postactions'}}) {
+ print $fd "postaction $_\n";
+ }
+ }
if (defined($self->{'srcpatterns'}) && (@{$self->{'srcpatterns'}})) {
foreach (sort @{$self->{'srcpatterns'}}) {
print $fd "srcpattern $_\n";
@@ -213,6 +224,7 @@ sub make_tlpobj
$tlp->longdesc($self->{'longdesc'}) if (defined($self->{'longdesc'}));
$tlp->catalogue($self->{'catalogue'}) if (defined($self->{'catalogue'}));
$tlp->executes(@{$self->{'executes'}}) if (defined($self->{'executes'}));
+ $tlp->postactions(@{$self->{'postactions'}}) if (defined($self->{'postactions'}));
$tlp->depends(@{$self->{'depends'}}) if (defined($self->{'depends'}));
$tlp->revision(0);
my $filemax;
@@ -540,6 +552,11 @@ sub executes {
if (@_) { @{ $self->{'executes'} } = @_ }
return @{ $self->{'executes'} };
}
+sub postactions {
+ my $self = shift;
+ if (@_) { @{ $self->{'postactions'} } = @_ }
+ return @{ $self->{'postactions'} };
+}
format multilineformat =
longdesc ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
@@ -580,7 +597,7 @@ I<key> I<value>
where I<key> can be C<name>, C<category>, C<shortdesc>, C<longdesc>,
C<catalogue>, C<runpattern>, C<srcpattern>, C<docpattern>, C<binpattern>,
-C<execute>, or C<depend>.
+C<execute>, C<postaction>, or C<depend>.
Continuation lines are supported via a trailing backslash. That is, if
the C<.tlpsrc> file contains two physical lines like this:
@@ -631,14 +648,14 @@ The full list of currently used packages of this type is:
This package contains configuration options for the TeX Live archive.
If container_split_{doc,src}_files occurs in the depend lines the
-{doc,src} files are split into separate containers (.tar.lzma)
+{doc,src} files are split into separate containers (.tar.xz)
during container build time. Note that this has NO effect on the
appearance within the texlive.tlpdb. It is only on container level.
The container_format/XXXXX specifies the format, currently allowed
-is only "lzma", which generates .tar.lzma files. zip can be supported.
+is only "xz", which generates .tar.xz files. zip can be supported.
release/NNNN specifies the release number as used in the installer.
-=item B<00texlive-installation.config>
+=item B<00texlive.installation>
This package serves a double purpose:
@@ -737,9 +754,51 @@ I<file> for that language. The additional variables I<var> are:
C<lefthyphenmin>, C<righthyphenmin> (both integers), and C<synonyms> (a
comma-separated list of alias names for that hyphenation).
-=item C<execute BuildFormat> I<format>
+=item C<execute AddFormat name=I<fmt> engine=I<eng> [I<var>...]>
+
+activates the format with name I<fmt> based on the engine I<eng>. The
+additional variables I<var> are:
+C<mode> which can only be equal to C<disable> in which case the format
+will only be mentioned but disabled (prefixed with C<#!>;
+C<patterns> which gives the patterns file, if not present C<-> is used;
+C<options> which gives the additional options for the C<fmtutil.cnf> file.
+
+=back
+
+=item <postaction>
+
+gives a free from entry of post install and removal actions to be
+executed. The difference to the C<execute> statement is that
+C<postaction> is concerned with system integration, i.e., adjusting
+things outside the installation directory, while C<execute> touches
+only things within the installation.
+
+Currently the following C<postaction>s are understood:
+
+=over 4
+
+=item C<postaction shortcut name=I<name> type=menu|desktop icon=I<path> cmd=I<cmd> args=I<args> hide=0|1>
+
+On W32 creates a shortcut either in the main TeX Live menu or on the
+desktop. Please see the documentation of TeXLive::TLWinGoo for details
+on the parameters.
+
+=item C<postaction filetype name=I<name> cmd=I<cmd>>
+
+On W32 associates the file type I<name> with the command I<cmd>.
+
+=item C<postaction fileassoc extension=I<.ext> filetype=I<name>>
+
+On W32 declares files with the extenstion I<.ext> of file type I<name>.
+
+=item C<postaction script file=I<file> [filew32=I<filew32>]>
+
+This postaction executes the given I<file> with two arguments, the first
+being the root of the installation, the second being either the string
+C<install> or C<remove>.
-build the format I<format>, as specified in the C<fmtutil.cnf> file.
+If the C<filew32> argument is given this script is run on Windows systems
+instead of the one given via C<file>.
=back