diff options
author | Norbert Preining <preining@logic.at> | 2008-02-08 08:36:29 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-02-08 08:36:29 +0000 |
commit | ac32eba506cc20d1e7c5f45dbaa10436b84e0a7f (patch) | |
tree | ccea71324156ab8bf9b8f2c49b3f034e615116a4 | |
parent | 4fbb12efeffdffdf5a17b95f132ed4cc06300586 (diff) |
generate-* move:
- put the perl scripts into Master/texmf/scripts/texlive/
- put .texlua wrappers in Build/source/texk/texlive and install these
wrappers into Master/bin/$arch (without extension since we do that on
unix)
- add these texlua scripts to bin/i386-linux and (with .texlua) to bin/win32
- put the perl scripts and the wrappers into the bin-tetex tlpsrc
- remove the rest from tlpkg/installer
git-svn-id: svn://tug.org/texlive/trunk@6530 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/texlive/Makefile.in | 3 | ||||
-rwxr-xr-x | Build/source/texk/texlive/generate-fmtutil | 39 | ||||
-rwxr-xr-x | Build/source/texk/texlive/generate-language | 39 | ||||
-rwxr-xr-x | Build/source/texk/texlive/generate-updmap | 39 | ||||
-rwxr-xr-x | Master/bin/i386-linux/generate-fmtutil | 39 | ||||
-rwxr-xr-x | Master/bin/i386-linux/generate-language | 39 | ||||
-rwxr-xr-x | Master/bin/i386-linux/generate-updmap | 39 | ||||
-rwxr-xr-x | Master/bin/win32/generate-fmtutil.texlua | 39 | ||||
-rwxr-xr-x | Master/bin/win32/generate-language.texlua | 39 | ||||
-rwxr-xr-x | Master/bin/win32/generate-updmap.texlua | 39 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/generate-fmtutil.pl (renamed from Master/tlpkg/installer/generate-fmtutil) | 17 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/generate-language.pl (renamed from Master/tlpkg/installer/generate-language) | 15 | ||||
-rwxr-xr-x | Master/texmf/scripts/texlive/generate-updmap.pl (renamed from Master/tlpkg/installer/generate-updmap) | 15 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/bin-tetex.tlpsrc | 7 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/texlive-infra.tlpsrc | 5 |
15 files changed, 388 insertions, 25 deletions
diff --git a/Build/source/texk/texlive/Makefile.in b/Build/source/texk/texlive/Makefile.in index 42576e88ef7..901fa22f6e8 100644 --- a/Build/source/texk/texlive/Makefile.in +++ b/Build/source/texk/texlive/Makefile.in @@ -8,7 +8,8 @@ kpse_include ../make/programs.mk LIVESCRIPTS = simpdftex \ ebong getnonfreefonts giftopng \ - pdfthumb perltex pkfix ppower4 vpe wordcount.sh + pdfthumb perltex pkfix ppower4 vpe wordcount.sh \ + generate-updmap generate-language generate-fmtutil manpgs = getnonfreefonts getnonfreefonts-sys diff --git a/Build/source/texk/texlive/generate-fmtutil b/Build/source/texk/texlive/generate-fmtutil new file mode 100755 index 00000000000..efa451eb423 --- /dev/null +++ b/Build/source/texk/texlive/generate-fmtutil @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.fmtutil 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-fmtutil" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Build/source/texk/texlive/generate-language b/Build/source/texk/texlive/generate-language new file mode 100755 index 00000000000..1180c984881 --- /dev/null +++ b/Build/source/texk/texlive/generate-language @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-language.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-language" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Build/source/texk/texlive/generate-updmap b/Build/source/texk/texlive/generate-updmap new file mode 100755 index 00000000000..ca362add834 --- /dev/null +++ b/Build/source/texk/texlive/generate-updmap @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-updmap" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/i386-linux/generate-fmtutil b/Master/bin/i386-linux/generate-fmtutil new file mode 100755 index 00000000000..efa451eb423 --- /dev/null +++ b/Master/bin/i386-linux/generate-fmtutil @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.fmtutil 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-fmtutil" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/i386-linux/generate-language b/Master/bin/i386-linux/generate-language new file mode 100755 index 00000000000..1180c984881 --- /dev/null +++ b/Master/bin/i386-linux/generate-language @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-language.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-language" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/i386-linux/generate-updmap b/Master/bin/i386-linux/generate-updmap new file mode 100755 index 00000000000..ca362add834 --- /dev/null +++ b/Master/bin/i386-linux/generate-updmap @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-updmap" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/generate-fmtutil.texlua b/Master/bin/win32/generate-fmtutil.texlua new file mode 100755 index 00000000000..efa451eb423 --- /dev/null +++ b/Master/bin/win32/generate-fmtutil.texlua @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.fmtutil 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-fmtutil" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/generate-language.texlua b/Master/bin/win32/generate-language.texlua new file mode 100755 index 00000000000..1180c984881 --- /dev/null +++ b/Master/bin/win32/generate-language.texlua @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-language.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-language" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/bin/win32/generate-updmap.texlua b/Master/bin/win32/generate-updmap.texlua new file mode 100755 index 00000000000..ca362add834 --- /dev/null +++ b/Master/bin/win32/generate-updmap.texlua @@ -0,0 +1,39 @@ +#!/xusr/bin/env texlua +--*-Lua-*- +-- $Id: generate-updmap.texlua 6485 2008-02-01 20:15:06Z reinhardk $ + +-- Copyright (C) 2007 2008 Reinhard Kotucha, Norbert Preining +-- You may freely use, modify and/or distribute this file. + +-- Wrapper for Perl scripts. + + +if string.find(arg[0], "/") then -- UNIX path + filename=select(1, string.gsub(arg[0], ".*/", "")) +elseif string.find(arg[0], "\\") then -- Windows path + filename=select(1, string.gsub(arg[0], ".*\\", "")) +else -- no path + filename=arg[0] +end + +basename=select(1, string.gsub(filename, "\.texlua$", "")) + +basename="generate-updmap" + +kpse.set_program_name(basename) + +TEXDIR=kpse.var_value("SELFAUTOPARENT") + +os.setenv("PERL5LIB", TEXDIR.."/tlpkg/tlperl/lib") + +perlbin=TEXDIR.."/tlpkg/tlperl/bin/perl.exe" +script=kpse.find_file(basename..".pl", "texmfscripts") + +command={perlbin, script} + +for i=1, #arg do + command[#command+1]=arg[i] +end + +ret=os.spawn(command) +os.exit(ret) diff --git a/Master/tlpkg/installer/generate-fmtutil b/Master/texmf/scripts/texlive/generate-fmtutil.pl index c616ec9e330..19824aaa11f 100755 --- a/Master/tlpkg/installer/generate-fmtutil +++ b/Master/texmf/scripts/texlive/generate-fmtutil.pl @@ -9,8 +9,13 @@ BEGIN { $^W = 1; - ($mydir = $0) =~ s,/[^/]*$,,; - unshift (@INC, "$mydir/.."); + $master = `kpsewhich -var-value=SELFAUTOPARENT`; + chomp($master); + if (-r "$master/tlpkg/TeXLive") { + unshift (@INC, "$master/tlpkg"); + } else { + die("Cannot find TeX Live's Perl modules, exiting!\n"); + } } use strict; @@ -22,13 +27,12 @@ use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; -use Cwd 'abs_path'; -our $mydir; my $opt_debug = 0; my $help = 0; my $dest = ""; my $localconf = ""; +our $master; GetOptions("debug!", "dest=s" => \$dest, "local=s" => \$localconf, "help|?" => \$help) or pod2usage(1); @@ -45,10 +49,9 @@ exit (&main ()); sub main { # get the db. - my $Master = abs_path("$mydir/../.."); - my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); + my $tlpdb = TeXLive::TLPDB->new ("root" => "$master"); if (!defined($tlpdb)) { - die "Cannot find texlive.tlpdb below $Master: $!\n"; + die "Cannot find texlive.tlpdb below $master: $!\n"; } $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf"); diff --git a/Master/tlpkg/installer/generate-language b/Master/texmf/scripts/texlive/generate-language.pl index dc82106aa69..3def1f1e757 100755 --- a/Master/tlpkg/installer/generate-language +++ b/Master/texmf/scripts/texlive/generate-language.pl @@ -9,8 +9,13 @@ BEGIN { $^W = 1; - ($mydir = $0) =~ s,/[^/]*$,,; - unshift (@INC, "$mydir/.."); + $master = `kpsewhich -var-value=SELFAUTOPARENT`; + chomp($master); + if (-r "$master/tlpkg/TeXLive") { + unshift (@INC, "$master/tlpkg"); + } else { + die("Cannot find TeX Live's Perl modules, exiting!\n"); + } } use strict; @@ -22,9 +27,8 @@ use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; -use Cwd 'abs_path'; -our $mydir; +our $master; my $opt_debug = 0; my $help = 0; my $dest = ""; @@ -45,8 +49,7 @@ exit (&main ()); sub main { # get the db. - my $Master = abs_path("$mydir/../.."); - my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); + my $tlpdb = TeXLive::TLPDB->new ("root" => "$master"); $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/tex/generic/config/language.dat"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/tex/generic/config/language-local.dat"); tllog($::LOG_NORMAL, "writing language.dat data to $dest\n"); diff --git a/Master/tlpkg/installer/generate-updmap b/Master/texmf/scripts/texlive/generate-updmap.pl index bd4cca20038..10b22bfffa4 100755 --- a/Master/tlpkg/installer/generate-updmap +++ b/Master/texmf/scripts/texlive/generate-updmap.pl @@ -9,8 +9,13 @@ BEGIN { $^W = 1; - ($mydir = $0) =~ s,/[^/]*$,,; - unshift (@INC, "$mydir/.."); + $master = `kpsewhich -var-value=SELFAUTOPARENT`; + chomp($master); + if (-r "$master/tlpkg/TeXLive") { + unshift (@INC, "$master/tlpkg"); + } else { + die("Cannot find TeX Live's Perl modules, exiting!\n"); + } } use strict; @@ -22,9 +27,8 @@ use TeXLive::TLUtils qw/kpsewhich tllog/; use Getopt::Long; use Pod::Usage; use File::Path; -use Cwd 'abs_path'; -our $mydir; +our $master; my $opt_debug = 0; my $help = 0; my $dest = ""; @@ -45,8 +49,7 @@ exit (&main ()); sub main { # get the db. - my $Master = abs_path("$mydir/../.."); - my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); + my $tlpdb = TeXLive::TLPDB->new ("root" => "$master"); $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg"); $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg"); tllog($::LOG_NORMAL, "$0: writing new updmap.cfg to $dest\n"); diff --git a/Master/tlpkg/tlpsrc/bin-tetex.tlpsrc b/Master/tlpkg/tlpsrc/bin-tetex.tlpsrc index 093d0e0c45e..f1233ad1b94 100644 --- a/Master/tlpkg/tlpsrc/bin-tetex.tlpsrc +++ b/Master/tlpkg/tlpsrc/bin-tetex.tlpsrc @@ -8,6 +8,9 @@ runpattern f texmf/fonts/map/dvips/tetex/* runpattern f texmf/scripts/tetex/texdoctk.pl runpattern f texmf/scripts/tetex/texi2html.pl runpattern f texmf/scripts/tetex/updmap.pl +runpattern f texmf/scripts/texlive/generate-fmtutil.pl +runpattern f texmf/scripts/texlive/generate-language.pl +runpattern f texmf/scripts/texlive/generate-updmap.pl runpattern f texmf/web2c/updmap.cfg runpattern f texmf/web2c/updmap-hdr.cfg docpattern f texmf/doc/man/man1/a2ping.* @@ -42,6 +45,10 @@ binpattern f bin/${ARCH}/texconfig-sys binpattern f bin/${ARCH}/texlinks binpattern f bin/${ARCH}/updmap binpattern f bin/${ARCH}/updmap-sys +# on win32 these are with .texlua extension, all or texlua scripts +binpattern f bin/${ARCH}/generate-fmtutil +binpattern f bin/${ARCH}/generate-language +binpattern f bin/${ARCH}/generate-updmap # that should be removed at some point binpattern f/win32 bin/win32/updmap-sys.pl binpattern f bin/${ARCH}/updmap-sys.texlua diff --git a/Master/tlpkg/tlpsrc/texlive-infra.tlpsrc b/Master/tlpkg/tlpsrc/texlive-infra.tlpsrc index d88cea34752..918ff5f073f 100644 --- a/Master/tlpkg/tlpsrc/texlive-infra.tlpsrc +++ b/Master/tlpkg/tlpsrc/texlive-infra.tlpsrc @@ -3,8 +3,3 @@ category TLCore docpattern f tlpkg/man/* docpattern f tlpkg/doc/* runpattern f tlpkg/TeXLive/* -# here we should add scripts usefull for an installed system from tlpkg/bin! -runpattern f tlpkg/bin/uninstall-tl.* -runpattern f tlpkg/bin/generate-fmtutil -runpattern f tlpkg/bin/generate-updmap -runpattern f tlpkg/bin/generate-language |