summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-08-16 23:33:14 +0000
committerKarl Berry <karl@freefriends.org>2009-08-16 23:33:14 +0000
commit1d678c9b24a56c664c9c27a350038656c8b49073 (patch)
tree56e390ac04c7958d1361e281649989f8355c6e06 /Master/tlpkg/TeXLive/TLPOBJ.pm
parentd0d7124586683746bbc2a57dc417b86eac77f341 (diff)
support disabling of maps/formats/hyphenations in local conf files
git-svn-id: svn://tug.org/texlive/trunk@14715 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm27
1 files changed, 18 insertions, 9 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index a2a17e257b3..b05366dff24 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -938,6 +938,7 @@ sub format_definitions {
#
sub fmtutil_cnf_lines {
my $obj = shift;
+ my @disabled = @_;
my @fmtlines = ();
my $first = 1;
my $pkg = $obj->name;
@@ -952,6 +953,7 @@ sub fmtutil_cnf_lines {
$first = 0;
}
my $mode = ($r{"mode"} ? "" : "#! ");
+ $mode = "#! " if TeXLive::TLUtils::member ($r{'name'}, @disabled);
push @fmtlines, "$mode$r{'name'} $r{'engine'} $r{'patterns'} $r{'options'}\n";
}
}
@@ -961,6 +963,7 @@ sub fmtutil_cnf_lines {
sub updmap_cfg_lines {
my $obj = shift;
+ my @disabled = @_;
my %maps;
foreach my $e ($obj->executes) {
if ($e =~ m/addMap (.*)$/) {
@@ -972,6 +975,7 @@ sub updmap_cfg_lines {
}
my @updmaplines;
foreach (sort keys %maps) {
+ next if TeXLive::TLUtils::member($_, @disabled);
if ($maps{$_} == 2) {
push @updmaplines, "MixedMap $_\n";
} else {
@@ -983,24 +987,33 @@ sub updmap_cfg_lines {
sub language_dat_lines {
+ my $self = shift;
+ local @disabled = @_; # we use @disabled in the nested sub
+ my @lines = $self->_parse_hyphen_execute(\&make_dat_lines);
+ return @lines;
+
sub make_dat_lines {
my ($name, $lhm, $rhm, $file, @syn) = @_;
my @ret;
+ return if TeXLive::TLUtils::member($name, @disabled);
push @ret, "$name $file\n";
foreach (@syn) {
push @ret, "=$_\n";
}
- return(@ret);
+ return @ret;
}
- my $self = shift;
- my @lines = $self->_parse_hyphen_execute(\&make_dat_lines);
- return(@lines);
}
sub language_def_lines {
+ my $self = shift;
+ local @disabled = @_; # we use @disabled in the nested sub
+ my @lines = $self->_parse_hyphen_execute(\&make_def_lines);
+ return @lines;
+
sub make_def_lines {
my ($name, $lhm, $rhm, $file, @syn) = @_;
+ return if TeXLive::TLUtils::member($name, @disabled);
my $exc = "";
my @ret;
push @ret, "\\addlanguage\{$name\}\{$file\}\{$exc\}\{$lhm\}\{$rhm\}\n";
@@ -1009,15 +1022,11 @@ sub language_def_lines {
push @ret, "\\addlanguage\{$_\}\{$file\}\{$exc\}\{$lhm\}\{$rhm\}\n";
#debug("Ignoring synonym $_ for $name when creating language.def\n");
}
- return(@ret);
+ return @ret;
}
- my $self = shift;
- my @lines = $self->_parse_hyphen_execute(\&make_def_lines);
- return(@lines);
}
-
sub _parse_hyphen_execute {
my ($obj, $coderef) = @_;
my @langlines = ();