From fec2c58ab6469ff23cf0de01118e1dc9c78d737f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 4 Jul 2008 18:53:46 +0000 Subject: semi-respect --dest for language.def generation; generate it in runtime; doc fixes git-svn-id: svn://tug.org/texlive/trunk@9248 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/plain/config/language.def | 124 ++++++++++++++++++++++-- Master/texmf/scripts/texlive/tlmgr.pl | 90 +++++++++-------- Master/texmf/tex/plain/config/language.us.def | 14 ++- Master/tlpkg/bin/tlpfiles | 6 +- 4 files changed, 177 insertions(+), 57 deletions(-) diff --git a/Master/texmf-dist/tex/plain/config/language.def b/Master/texmf-dist/tex/plain/config/language.def index e1552e44690..e0b3117527a 100644 --- a/Master/texmf-dist/tex/plain/config/language.def +++ b/Master/texmf-dist/tex/plain/config/language.def @@ -14,16 +14,122 @@ \addlanguage {USenglish}{hyphen}{}{2}{3} %%% This MUST be the first non-comment %%% line of the file -% Additional languages, patterns, exceptions and left- and right-hyphen -% minima may be added here, and an example is given for German. - -% The five parameters for \addlanguage are: -% language, patterns file, exceptions file, left- and right-hyphen minima - -%%% Next section is E X A M P L E O N L Y -%%% \addlanguage {German}{ghyph31}{}{2}{2} %%% further such lines may be used; -%%% Previous section is E X A M P L E O N L Y +% from dehyph-exptl: +\addlanguage{german-x-2008-06-18}{dehypht-x-2008-06-18.tex}{}{2}{2} +\addlanguage{german-x-latest}{dehypht-x-2008-06-18.tex}{}{2}{2} +% from dehyph-exptl: +\addlanguage{ngerman-x-2008-06-18}{dehyphn-x-2008-06-18.tex}{}{2}{2} +\addlanguage{ngerman-x-latest}{dehyphn-x-2008-06-18.tex}{}{2}{2} +% from hyphen-ancientgreek: +\addlanguage{ancientgreek}{loadhyph-grc.tex}{}{1}{1} +% from hyphen-ancientgreek: +\addlanguage{ibycus}{ibyhyph.tex}{}{2}{2} +% from hyphen-arabic: +\addlanguage{arabic}{zerohyph.tex}{}{2}{3} +% from hyphen-basque: +\addlanguage{basque}{loadhyph-eu.tex}{}{2}{2} +% from hyphen-bulgarian: +\addlanguage{bulgarian}{loadhyph-bg.tex}{}{2}{2} +% from hyphen-catalan: +\addlanguage{catalan}{loadhyph-ca.tex}{}{2}{2} +% from hyphen-chinese: +\addlanguage{pinyin}{loadhyph-zh-latn.tex}{}{1}{1} +% from hyphen-coptic: +\addlanguage{coptic}{loadhyph-cop.tex}{}{1}{1} +% from hyphen-croatian: +\addlanguage{croatian}{loadhyph-hr.tex}{}{2}{2} +% from hyphen-czech: +\addlanguage{czech}{loadhyph-cs.tex}{}{2}{3} +% from hyphen-danish: +\addlanguage{danish}{loadhyph-da.tex}{}{2}{2} +% from hyphen-dutch: +\addlanguage{dutch}{loadhyph-nl.tex}{}{2}{2} +% from hyphen-esperanto: +\addlanguage{esperanto}{loadhyph-eo.tex}{}{2}{2} +% from hyphen-estonian: +\addlanguage{estonian}{loadhyph-et.tex}{}{2}{3} +% from hyphen-farsi: +\addlanguage{farsi}{zerohyph.tex}{}{2}{3} +\addlanguage{persian}{zerohyph.tex}{}{2}{3} +% from hyphen-finnish: +\addlanguage{finnish}{loadhyph-fi.tex}{}{2}{2} +% from hyphen-french: +\addlanguage{french}{loadhyph-fr.tex}{}{2}{3} +\addlanguage{patois}{loadhyph-fr.tex}{}{2}{3} +\addlanguage{francais}{loadhyph-fr.tex}{}{2}{3} +% from hyphen-galician: +\addlanguage{galician}{loadhyph-gl.tex}{}{2}{2} +% from hyphen-german: +\addlanguage{german}{loadhyph-de-1901.tex}{}{2}{2} +% from hyphen-german: +\addlanguage{ngerman}{loadhyph-de-1996.tex}{}{2}{2} +% from hyphen-greek: +\addlanguage{monogreek}{loadhyph-el-monoton.tex}{}{1}{1} +% from hyphen-greek: +\addlanguage{greek}{loadhyph-el-polyton.tex}{}{1}{1} +\addlanguage{polygreek}{loadhyph-el-polyton.tex}{}{1}{1} +% from hyphen-hungarian: +\addlanguage{hungarian}{loadhyph-hu.tex}{}{2}{2} +% from hyphen-icelandic: +\addlanguage{icelandic}{loadhyph-is.tex}{}{2}{2} +% from hyphen-indonesian: +\addlanguage{indonesian}{loadhyph-id.tex}{}{2}{2} +% from hyphen-interlingua: +\addlanguage{interlingua}{loadhyph-ia.tex}{}{2}{2} +% from hyphen-irish: +\addlanguage{irish}{loadhyph-ga.tex}{}{2}{3} +% from hyphen-italian: +\addlanguage{italian}{loadhyph-it.tex}{}{2}{2} +% from hyphen-latin: +\addlanguage{latin}{loadhyph-la.tex}{}{2}{2} +% from hyphen-mongolian: +\addlanguage{mongolian}{loadhyph-mn-cyrl.tex}{}{2}{2} +% from hyphen-mongolian: +\addlanguage{mongolian2a}{loadhyph-mn-cyrl-x-2a.tex}{}{2}{2} +% from hyphen-norwegian: +\addlanguage{bokmal}{loadhyph-nb.tex}{}{2}{2} +\addlanguage{norwegian}{loadhyph-nb.tex}{}{2}{2} +\addlanguage{norsk}{loadhyph-nb.tex}{}{2}{2} +% from hyphen-norwegian: +\addlanguage{nynorsk}{loadhyph-nn.tex}{}{2}{2} +% from hyphen-polish: +\addlanguage{polish}{loadhyph-pl.tex}{}{2}{2} +% from hyphen-portuguese: +\addlanguage{portuguese}{loadhyph-pt.tex}{}{2}{3} +\addlanguage{portuges}{loadhyph-pt.tex}{}{2}{3} +% from hyphen-romanian: +\addlanguage{romanian}{loadhyph-ro.tex}{}{2}{2} +% from hyphen-russian: +\addlanguage{russian}{loadhyph-ru.tex}{}{2}{2} +% from hyphen-sanskrit: +\addlanguage{sanskrit}{loadhyph-sa.tex}{}{1}{5} +% from hyphen-serbian: +\addlanguage{serbian}{loadhyph-sr-latn.tex}{}{2}{2} +% from hyphen-serbian: +\addlanguage{serbianc}{loadhyph-sr-cyrl.tex}{}{2}{2} +% from hyphen-slovak: +\addlanguage{slovak}{loadhyph-sk.tex}{}{2}{3} +% from hyphen-slovenian: +\addlanguage{slovenian}{loadhyph-sl.tex}{}{2}{2} +\addlanguage{slovene}{loadhyph-sl.tex}{}{2}{2} +% from hyphen-spanish: +\addlanguage{spanish}{loadhyph-es.tex}{}{2}{2} +\addlanguage{espanol}{loadhyph-es.tex}{}{2}{2} +% from hyphen-swedish: +\addlanguage{swedish}{loadhyph-sv.tex}{}{2}{2} +% from hyphen-turkish: +\addlanguage{turkish}{loadhyph-tr.tex}{}{2}{2} +% from hyphen-ukenglish: +\addlanguage{ukenglish}{loadhyph-en-gb.tex}{}{2}{3} +\addlanguage{british}{loadhyph-en-gb.tex}{}{2}{3} +\addlanguage{UKenglish}{loadhyph-en-gb.tex}{}{2}{3} +% from hyphen-ukrainian: +\addlanguage{ukrainian}{loadhyph-uk.tex}{}{2}{2} +% from hyphen-uppersorbian: +\addlanguage{uppersorbian}{loadhyph-hsb.tex}{}{2}{2} +% from hyphen-welsh: +\addlanguage{welsh}{loadhyph-cy.tex}{}{2}{3} %%% No changes may be made beyond this point. \uselanguage {USenglish} %%% This MUST be the last line of the file. diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 3704e47f530..205d8802133 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -58,7 +58,6 @@ my $opt_gui = 0; my $opt_gui_lang; TeXLive::TLUtils::process_logging_options(); - GetOptions("location=s" => \$opt_location, "netarchive=s" => \$opt_netarchive, "diskarchive=s" => \$opt_diskarchive, @@ -75,28 +74,27 @@ if (!defined($action) && $opt_gui) { if ($opt_version) { print "tlmgr revision $tlmgrrevision\n"; - exit(0); -} - -if (!defined($action) && !$opt_help) { - print "missing action\ntry 'tlmgr help' for more information.\n"; - exit 1; + exit 0; } if (defined($action) && ($action =~ m/^help/i)) { $opt_help = 1; } -$NetArchive = $opt_netarchive if (defined($opt_netarchive)); -$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive)); +if (!defined($action) && !$opt_help) { + die "$0: missing action; try --help if you need it.\n"; +} -if ($^O=~/^MSWin(32|64)$/i) { +if ($^O =~ /^MSWin(32|64)$/i) { pod2usage(-exitstatus => 0, -verbose => 2, -noperldoc => 1) if $opt_help; } else { pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help; } -my $loadmediasrcerror = "Cannot load TeX Live Database from "; +$NetArchive = $opt_netarchive if (defined($opt_netarchive)); +$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive)); + +my $loadmediasrcerror = "Cannot load TeX Live database from "; my %ret; if ($action =~ m/^_include_tlpobj$/) { @@ -923,34 +921,38 @@ sub action_generate { GetOptions("localcfg=s" => \$localconf, "dest=s" => \$dest,) or pod2usage(2); init_local_db(); + my $TEXMFSYSVAR = kpsewhich("TEXMFSYSVAR"); + my $TEXMFLOCAL = kpsewhich("TEXMFLOCAL"); + if ($what =~ m/^language(\.dat|\.def)?$/i) { if ($what =~ m/^language(\.dat)?$/i) { - $dest || ($dest = kpsewhich ("TEXMFSYSVAR") . "/tex/generic/config/language.dat"); - $localconf || ($localconf = kpsewhich ("TEXMFLOCAL") . "/tex/generic/config/language-local.dat"); - debug("$0: writing language data to $dest\n"); - TeXLive::TLUtils::create_language_dat ($localtlpdb, $dest, $localconf); + $dest ||= "$TEXMFSYSVAR/tex/generic/config/language.dat"; + $localconf ||= "$TEXMFLOCAL/tex/generic/config/language-local.dat"; + debug ("$0: writing language.dat data to $dest\n"); + TeXLive::TLUtils::create_language_dat($localtlpdb, $dest, $localconf); + $dest .= ".def"; } - $dest = ""; if ($what =~ m/^language(\.def)?$/i) { - $dest || ($dest = kpsewhich ("TEXMFSYSVAR") . "/tex/plain/config/language.def"); - $localconf || ($localconf = kpsewhich ("TEXMFLOCAL") . "/tex/plain/config/language-local.def"); - debug("$0: writing language data to $dest\n"); - TeXLive::TLUtils::create_language_def ($localtlpdb, $dest, $localconf); + $dest ||= "$TEXMFSYSVAR/tex/plain/config/language.def"; + $localconf ||= "$TEXMFLOCAL/tex/plain/config/language-local.def"; + debug("$0: writing language.def data to $dest\n"); + TeXLive::TLUtils::create_language_def($localtlpdb, $dest, $localconf); } + } elsif ($what =~ m/^fmtutil$/i) { - $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf"); - $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf"); - debug("$0: writing fmtutil.cnf data to $dest\n"); + $dest ||= "$TEXMFSYSVAR/web2c/fmtutil.cnf"; + $localconf ||= "$TEXMFLOCAL/web2c/fmtutil-local.cnf"; + debug("$0: writing new fmtutil.cnf to $dest\n"); TeXLive::TLUtils::create_fmtutil($localtlpdb, $dest, $localconf); } elsif ($what =~ m/^updmap$/i) { - $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg"); - $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg"); + $dest ||= "$TEXMFSYSVAR/web2c/updmap.cfg"; + $localconf ||= "$TEXMFLOCAL/web2c/updmap-local.cfg"; debug("$0: writing new updmap.cfg to $dest\n"); - TeXLive::TLUtils::create_updmap ($localtlpdb, $dest, $localconf); + TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localconf); } else { - die "$0: Unknown option for generate: $what (try --help if you need it)\n"; + die "$0: Unknown option for generate: $what; try --help if you need it.\n"; } return; @@ -1219,12 +1221,12 @@ tlmgr - the TeX Live Manager =head1 SYNOPSIS -tlmgr [I] I [I