Index: tlpkg/TeXLive/TLPDB.pm =================================================================== --- tlpkg/TeXLive/TLPDB.pm (Revision 10956) +++ tlpkg/TeXLive/TLPDB.pm (Arbeitskopie) @@ -1022,28 +1022,67 @@ containing only those formats present in the installation. =cut + sub fmtutil_cnf_lines { my $self = shift; - my %fmtcnffiles; - foreach my $p ($self->list_packages) { - my $obj = $self->get_package ($p); - die "No TeX Live package named $p, strange" if ! $obj; + my @fmtlines = (); + + foreach my $pkg ($self->list_packages) { + my $obj = $self->get_package ($pkg); + die "No TeX Live package named $pkg, too strange" if ! $obj; + my $first = 1; foreach my $e ($obj->executes) { - if ($e =~ m/BuildFormat (.*)$/) { - $fmtcnffiles{$1} = 1; - } - # others are ignored here + if ($e =~ m/AddFormat\s+(.*)\s*/) { + my $name; + my $engine; + my $patterns = "-"; + my $options = ""; + my $mode = ""; + if ($first) { + push @fmtlines, "# from $pkg:\n"; + $first = 0; + } + foreach my $p (&TeXLive::TLUtils::quotewords('\s+', 0, "$1")) { + # foreach my $p (split(' ', $1)) { + my ($a, $b); + if ($p =~ m/^(name|engine|mode|patterns|options)=(.*)$/) { + $a = $1; + $b = $2; + } else { + die "Unknown format directive in $pkg: $e"; + } + if ($a eq "name") { + die "AddFormat line needs name=something: $pkg, $e" unless $b; + $name = $b; next; + } + if ($a eq "engine") { + die "AddFormat line needs engine=something: $pkg, $e" unless $b; + $engine = $b; next; + } + if ($a eq "patterns") { + $patterns = ( $b ? $b : "-"); + next; + } + if ($a eq "mode") { + if ($b eq "disabled") { + $mode = "#! "; + } else { + $mode = ""; + } + next; + } + if ($a eq "options") { + $options = ( $b ? $b : ""); + next; + } + # should not be reached at all + die "Unknown language directive in $pkg: $e"; + } + push @fmtlines, "$mode$name $engine $patterns $options\n"; + } } } - my @formatlines; - foreach my $f (sort keys %fmtcnffiles) { - open(INFILE,"<$self->{'root'}/texmf/fmtutil/format.$f.cnf") - or tlwarn("Cannot open $self->{'root'}/texmf/fmtutil/format.$f.cnf\nThe generated fmtutil.cnf file might be incomplete!\nError: $!\n"); - @tmp = ; - close(INFILE); - push @formatlines, @tmp; - } - return(@formatlines); + return @fmtlines; } =item C<< $tlpdb->updmap_cfg_lines >> Index: tlpkg/TeXLive/TLPSRC.pm =================================================================== --- tlpkg/TeXLive/TLPSRC.pm (Revision 10956) +++ tlpkg/TeXLive/TLPSRC.pm (Arbeitskopie) @@ -654,9 +654,14 @@ C, C (both integers), and C (a comma-separated list of alias names for that hyphenation). -=item C I +=item C engine=I [I...]> -build the format I, as specified in the C file. +activates the format with name I based on the engine I. The +additional variables I are: +C which can only be equal to C in which case the format +will only be mentioned but disabled (prefixed with C<#!>; +C which gives the patterns file, if not present C<-> is used; +C which gives the additional options for the C file. =back Index: tlpkg/TeXLive/TLPOBJ.pm =================================================================== --- tlpkg/TeXLive/TLPOBJ.pm (Revision 10956) +++ tlpkg/TeXLive/TLPOBJ.pm (Arbeitskopie) @@ -874,7 +874,7 @@ } else { push @maps, "disable $3"; } - } elsif ($e =~ m/^BuildFormat\s+([^\s]+)\s*$/) { + } elsif ($e =~ m/^AddFormat\s+([^\s]+)\s*$/) { push @formats, $1; } elsif ($e =~ m/^AddHyphen\s+(.*)\s*$/) { push @dats, $1; Index: tlpkg/tlpsrc/bin-tex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-tex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-tex.tlpsrc (Arbeitskopie) @@ -1,7 +1,6 @@ name bin-tex category TLCore depend bin-kpathsea -execute BuildFormat tex -runpattern f texmf/fmtutil/format.tex.cnf +execute AddFormat name=tex engine=tex options="tex.ini" docpattern f texmf/doc/man/man1/tex.* binpattern f bin/${ARCH}/tex Index: tlpkg/tlpsrc/bin-mex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-mex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-mex.tlpsrc (Arbeitskopie) @@ -2,10 +2,9 @@ category TLCore depend pdftex depend bin-tex -execute BuildFormat mex -execute BuildFormat utf8mex -runpattern f texmf/fmtutil/format.mex.cnf -runpattern f texmf/fmtutil/format.utf8mex.cnf +execute AddFormat name=mex engine=pdftex patterns=mexconf.tex options="-translate-file=cp227.tcx *mex.ini" +execute AddFormat name=pdfmex engine=pdftex patterns=mexconf.tex options="-translate-file=cp227.tcx *pdfmex.ini" +execute AddFormat name=utf8mex engine=pdftex patterns=mexconf.tex options="-enc *utf8mex.ini" binpattern f bin/${ARCH}/mex binpattern f bin/${ARCH}/pdfmex binpattern f bin/${ARCH}/utf8mex Index: tlpkg/tlpsrc/pdftex.tlpsrc =================================================================== --- tlpkg/tlpsrc/pdftex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/pdftex.tlpsrc (Arbeitskopie) @@ -1,8 +1,9 @@ name pdftex category TLCore depend bin-kpathsea -execute BuildFormat pdftex -runpattern f texmf/fmtutil/format.pdftex.cnf +execute AddFormat name=etex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *etex.ini" +execute AddFormat name=pdfetex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *pdfetex.ini" +execute AddFormat name=pdftex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *pdfetex.ini" runpattern f texmf/fonts/map/pdftex/updmap/* runpattern f texmf/tex/generic/config/pdftex*.tex runpattern f texmf/tex/generic/pdftex/* Index: tlpkg/tlpsrc/bin-csplain.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-csplain.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-csplain.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-csplain category TLCore depend bin-tex -execute BuildFormat csplain -runpattern f texmf/fmtutil/format.csplain.cnf +execute AddFormat name=csplain engine=pdftex options="-etex -translate-file=cp227.tcx csplain.ini" +execute AddFormat name=pdfcsplain engine=pdftex options="-etex -translate-file=cp227.tcx csplain.ini" binpattern f bin/${ARCH}/csplain binpattern f bin/${ARCH}/pdfcsplain Index: tlpkg/tlpsrc/bin-metapost.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-metapost.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-metapost.tlpsrc (Arbeitskopie) @@ -1,8 +1,8 @@ name bin-metapost category TLCore depend bin-kpathsea -execute BuildFormat metapost -runpattern f texmf/fmtutil/format.metapost.cnf +execute AddFormat name=mpost engine=mpost options="-translate-file=cp227.tcx mpost.mp" +execute AddFormat name=mfplain engine=mpost options="-translate-file=cp227.tcx mfplain.ini" docpattern f texmf/doc/man/man1/dmp.* docpattern f texmf/doc/man/man1/dvitomp.* docpattern f texmf/doc/man/man1/makempx.* Index: tlpkg/tlpsrc/bin-context.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-context.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-context.tlpsrc (Arbeitskopie) @@ -1,9 +1,15 @@ name bin-context category TLCore depend pdftex -execute BuildFormat context +execute AddFormat name=cont-en engine=pdftex patterns=cont-usr.tex options="-8bit *cont-en.ini" +execute AddFormat name=cont-cz mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-cz.ini" +execute AddFormat name=cont-de mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-de.ini" +execute AddFormat name=cont-nl mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-nl.ini" +execute AddFormat name=cont-uk mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-uk.ini" +execute AddFormat name=cont-en engine=xetex patterns=cont-usr.tex options="-8bit *cont-en.ini" +execute AddFormat name=mptopdf engine=pdftex options="-translate-file=cp227.tcx mptopdf.tex" +execute AddFormat name=metafun engine=mpost options="-translate-file=cp227.tcx metafun.mp" runpattern f texmf-dist/tex/mptopdf/config/mptopdf.ini -runpattern f texmf/fmtutil/format.context.cnf docpattern f texmf/doc/man/man1/ctxtools.* docpattern f texmf/doc/man/man1/makempy.* docpattern f texmf/doc/man/man1/mptopdf.* Index: tlpkg/tlpsrc/bin-mltex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-mltex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-mltex.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-mltex category TLCore depend bin-latex -execute BuildFormat mltex -runpattern f texmf/fmtutil/format.mltex.cnf +execute AddFormat name=mltex engine=pdftex options="-translate-file=cp227.tcx -mltex mltex.ini" +execute AddFormat name=mllatex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx -mltex mllatex.ini" binpattern f bin/${ARCH}/mllatex binpattern f bin/${ARCH}/mltex Index: tlpkg/tlpsrc/luatex.tlpsrc =================================================================== --- tlpkg/tlpsrc/luatex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/luatex.tlpsrc (Arbeitskopie) @@ -1,8 +1,8 @@ name luatex category TLCore -execute BuildFormat luatex +execute AddFormat name=luatex engine=luatex options="luatex.ini" +execute AddFormat name=pdfluatex engine=luatex options="pdfluatex.ini" docpattern d texmf-dist/doc/luatex -runpattern f texmf/fmtutil/format.luatex.cnf binpattern f/!hppa-hpux bin/${ARCH}/luatex binpattern f/!hppa-hpux bin/${ARCH}/pdfluatex binpattern f/!hppa-hpux bin/${ARCH}/texlua Index: tlpkg/tlpsrc/bin-cslatex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-cslatex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-cslatex.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-cslatex category TLCore depend bin-latex -execute BuildFormat cslatex -runpattern f texmf/fmtutil/format.cslatex.cnf +execute AddFormat name=cslatex engine=pdftex options="-etex -translate-file=cp227.tcx cslatex.ini" +execute AddFormat name=pdfcslatex engine=pdftex options="-etex -translate-file=cp227.tcx cslatex.ini" binpattern f bin/${ARCH}/cslatex binpattern f bin/${ARCH}/pdfcslatex Index: tlpkg/tlpsrc/bin-latex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-latex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-latex.tlpsrc (Arbeitskopie) @@ -4,12 +4,14 @@ depend pdftex depend latexconfig depend latex-fonts -execute BuildFormat latex +execute AddFormat name=latex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *latex.ini" +execute AddFormat name=pdflatex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *pdflatex.ini" +execute AddFormat name=lualatex engine=luatex patterns=language.dat options="lualatex.ini" +execute AddFormat name=pdflualatex engine=luatex patterns=language.dat options="pdflualatex.ini" binpattern f bin/${ARCH}/latex binpattern f/!hppa-hpux bin/${ARCH}/lualatex binpattern f bin/${ARCH}/pdflatex binpattern f/!hppa-hpux bin/${ARCH}/pdflualatex docpattern f texmf/doc/man/man1/latex.* docpattern f texmf/doc/man/man1/pdflatex.* -runpattern f texmf/fmtutil/format.latex.cnf runpattern d texmf/tex/latex/config Index: tlpkg/tlpsrc/bin-omega.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-omega.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-omega.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-omega category TLCore -execute BuildFormat omega -runpattern f texmf/fmtutil/format.omega.cnf +execute AddFormat name=omega engine=omega options="omega.ini" +execute AddFormat name=lambda engine=omega patterns=language.dat options="lambda.ini" docpattern f texmf/doc/man/man1/lambda.* docpattern f texmf/doc/man/man1/omega.* binpattern f bin/${ARCH}/lambda Index: tlpkg/tlpsrc/bin-xmltex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-xmltex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-xmltex.tlpsrc (Arbeitskopie) @@ -2,7 +2,7 @@ category TLCore depend pdftex depend bin-tex -execute BuildFormat xmltex -runpattern f texmf/fmtutil/format.xmltex.cnf +execute AddFormat name=xmltex engine=pdftex patterns=language.dat options="&latex xmltex.ini" +execute AddFormat name=pdfxmltex engine=pdftex patterns=language.dat options="&pdflatex pdfxmltex.ini" binpattern f bin/${ARCH}/pdfxmltex binpattern f bin/${ARCH}/xmltex Index: tlpkg/tlpsrc/bin-texsis.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-texsis.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-texsis.tlpsrc (Arbeitskopie) @@ -1,6 +1,5 @@ name bin-texsis category TLCore depend bin-tex -execute BuildFormat texsis -runpattern f texmf/fmtutil/format.texsis.cnf +execute AddFormat name=texsis engine=pdftex options="-translate-file=cp227.tcx texsis.ini" binpattern f bin/${ARCH}/texsis Index: tlpkg/tlpsrc/t2.tlpsrc =================================================================== --- tlpkg/tlpsrc/t2.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/t2.tlpsrc (Arbeitskopie) @@ -1,5 +1,5 @@ name t2 category Package -execute BuildFormat cyramstex -execute BuildFormat cyrtex -execute BuildFormat cyrtexinfo +execute AddFormat name=cyramstex mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyramstx.ini" +execute AddFormat name=cyrtex mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyrtex.ini" +execute AddFormat name=cyrtexinfo mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyrtxinf.ini" Index: tlpkg/tlpsrc/bin-physe.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-physe.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-physe.tlpsrc (Arbeitskopie) @@ -1,6 +1,5 @@ name bin-physe category TLCore depend bin-tex -execute BuildFormat physe -runpattern f texmf/fmtutil/format.physe.cnf +execute AddFormat name=physe engine=pdftex options="physe.ini" binpattern f bin/${ARCH}/physe Index: tlpkg/tlpsrc/bin-phyzzx.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-phyzzx.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-phyzzx.tlpsrc (Arbeitskopie) @@ -1,6 +1,5 @@ name bin-phyzzx category TLCore depend bin-tex -execute BuildFormat phyzzx -runpattern f texmf/fmtutil/format.phyzzx.cnf +execute AddFormat name=phyzzx engine=pdftex options="physe.ini" binpattern f bin/${ARCH}/phyzzx Index: tlpkg/tlpsrc/bin-eplain.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-eplain.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-eplain.tlpsrc (Arbeitskopie) @@ -1,8 +1,7 @@ name bin-eplain category TLCore depend pdftex -execute BuildFormat eplain -runpattern f texmf/fmtutil/format.eplain.cnf +execute AddFormat name=eplain engine=pdftex options="-translate-file=cp227.tcx *eplain.ini" docpattern f texmf/doc/info/eplain.info docpattern f texmf/doc/man/man1/eplain.* binpattern f bin/${ARCH}/eplain Index: tlpkg/tlpsrc/bin-jadetex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-jadetex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-jadetex.tlpsrc (Arbeitskopie) @@ -2,7 +2,7 @@ category TLCore depend pdftex depend bin-tex -execute BuildFormat jadetex -runpattern f texmf/fmtutil/format.jadetex.cnf +execute AddFormat name=jadetex engine=pdftex patterns=language.dat options="&latex jadetex.ini" +execute AddFormat name=pdfjadetex engine=pdftex patterns=language.dat options="&pdflatex pdfjadetex.ini" binpattern f bin/${ARCH}/jadetex binpattern f bin/${ARCH}/pdfjadetex Index: tlpkg/tlpsrc/bin-amstex.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-amstex.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-amstex.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-amstex category TLCore depend bin-tex -execute BuildFormat amstex -runpattern f texmf/fmtutil/format.amstex.cnf +execute AddFormat name=amstex engine=pdftex options="-translate-file=cp227.tcx *amstex.ini" +execute AddFormat name=pdfamstex mode=disabled engine=pdftex options="-translate-file=cp227.tcx *pdfamstex.ini" docpattern f texmf/doc/man/man1/amstex.* binpattern f bin/${ARCH}/amstex Index: tlpkg/tlpsrc/bin-aleph.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-aleph.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-aleph.tlpsrc (Arbeitskopie) @@ -1,7 +1,7 @@ name bin-aleph category TLCore depend bin-omega -execute BuildFormat aleph -runpattern f texmf/fmtutil/format.aleph.cnf +execute AddFormat name=aleph engine=aleph options=*aleph.ini +execute AddFormat name=lamed engine=aleph patterns=language.dat options=*lambda.ini binpattern f bin/${ARCH}/aleph binpattern f bin/${ARCH}/lamed Index: tlpkg/tlpsrc/bin-metafont.tlpsrc =================================================================== --- tlpkg/tlpsrc/bin-metafont.tlpsrc (Revision 10956) +++ tlpkg/tlpsrc/bin-metafont.tlpsrc (Arbeitskopie) @@ -1,8 +1,7 @@ name bin-metafont category TLCore depend bin-kpathsea -execute BuildFormat metafont -runpattern f texmf/fmtutil/format.metafont.cnf +execute AddFormat name=mf engine=mf-nowin options="-translate-file=cp227.tcx mf.ini" docpattern f texmf/doc/man/man1/mf-nowin.* docpattern f texmf/doc/man/man1/mf.* binpattern f bin/${ARCH}/mf