summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-08 19:05:09 +0000
committerKarl Berry <karl@freefriends.org>2008-03-08 19:05:09 +0000
commit0aeb8a0fd26be4d444811cbfc4975960578c28ef (patch)
tree7a4ff7f90bab5e3c0f03acc98e87745697ce8071 /Master
parent8b595c714f37f447d634a45f8d3e64eb772f7649 (diff)
symlink vpe script
git-svn-id: svn://tug.org/texlive/trunk@6897 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
l---------[-rwxr-xr-x]Master/bin/i386-linux/vpe422
-rw-r--r--Master/texmf-dist/scripts/vpe/vpe.pl (renamed from Master/texmf/scripts/vpe/vpe.pl)0
-rwxr-xr-xMaster/tlpkg/bin/ctan2tds17
-rw-r--r--Master/tlpkg/tlpsrc/bin-thumbpdf.tlpsrc6
-rw-r--r--Master/tlpkg/tlpsrc/bin-vpe.tlpsrc5
-rw-r--r--Master/tlpkg/tlpsrc/vpe.tlpsrc3
6 files changed, 6 insertions, 447 deletions
diff --git a/Master/bin/i386-linux/vpe b/Master/bin/i386-linux/vpe
index 9eb52b69e3c..ed1727b6ff8 100755..120000
--- a/Master/bin/i386-linux/vpe
+++ b/Master/bin/i386-linux/vpe
@@ -1,421 +1 @@
-eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
- if 0;
-use strict;
-#
-# vpe.pl
-#
-# Copyright (C) 2000 Heiko Oberdiek.
-#
-# This program may be distributed and/or modified under the
-# conditions of the LaTeX Project Public License, either version 1.2
-# of this license or (at your option) any later version.
-# The latest version of this license is in
-# http://www.latex-project.org/lppl.txt
-# and version 1.2 or later is part of all distributions of LaTeX
-# version 1999/12/01 or later.
-#
-# See file "vpe.txt" for a list of files that belong to this project.
-#
-# This file "vpe.pl" may be renamed to "vpe"
-# for installation purposes.
-#
-my $file = "vpe.pl";
-my $program = uc($&) if $file =~ /^\w+/;
-my $version = "0.1";
-my $date = "2000/09/15";
-my $author = "Heiko Oberdiek";
-my $copyright = "Copyright (c) 2000 by $author.";
-#
-# History:
-# 2000/09/15 v0.1: First release.
-#
-
-### program identification
-my $title = "$program $version, $date - $copyright\n";
-
-### editor call
-# %F: file name
-# %L: line number
-my $EditorCall = "xterm -e joe +%d %s";
-$EditorCall = $ENV{TEXEDIT} if $ENV{TEXEDIT};
-$EditorCall = $ENV{VPE} if $ENV{VPE};
-
-### error strings
-my $Error = "!!! Error:"; # error prefix
-
-my $usage = <<"END_OF_USAGE";
-${title}
-Depending on the name of the script `vpe' works in four modes:
-
-* [vpe] Syntax: vpe <pdf file>[.pdf]
- The pdf file is scanned for actions created by VTeX,
- that start an editor with the source file at the
- specified line under Windows.
- A symbol link is made from the source file name
- extended by the extension `.vpe' to this script.
- The line number is encoded in the path and the
- action is changed to start this script.
-
-* [sty] Internal for vpe.sty:
- Syntax: vpe --sty [--progname=...] <latex file> <vpe file>
-
-* [system] Internal for vpe.sty:
- Syntax: vpe --system <vpe file>
-
-* [launch] Syntax: <source file name>.vpe
- The script decodes the line number in the path of
- the source file name and starts an editor with
- this file at that line number.
-
-Options:
- --help: print usage.
- --verbose: print additional informations during running.
- --force: force symbol links
- --delete: delete symbol links
- --sty: internal for `vpe.sty' (get absolute file name and lines)
- --system: internal for `vpe.sty' (get system info linux or win)
- --progname: latex, pdflatex, elatex, pdfelatex
-END_OF_USAGE
-
-### options
-$::opt_verbose = 0;
-$::opt_help = 0;
-$::opt_force = 0;
-$::opt_delete = 0;
-$::opt_sty = 0;
-$::opt_system = 0;
-$::opt_progname = "latex";
-use Getopt::Long;
-GetOptions(
- "help!",
- "verbose!",
- "force!",
- "delete!",
- "sty!",
- "system!",
- "progname=s",
-) or die $usage;
-if ($::opt_help) {
- die $usage;
-}
-
-if ($::opt_sty and $::opt_system) {
- die "$usage" .
- "$Error Options --sty and --system cannot used together!\n";
-}
-
-###################
-### launch mode ###
-###################
-if ($0 =~ /\.vpe/) {
-
- @ARGV == 0 or
- die "$usage$Error Too many arguments [launch mode]!\n";
-
- my $file = "";
- $0 =~ m|(^[\./]+\./)(.+)\.vpe$| or
- die "$Error Cannot extract line number ($0)!\n";
- my $str = $1;
- $file = "/$2";
-
- my $line = "";
- while ($str ne "") {
- $str =~ m|^(/*)(\.?)\./(.*)$| or
- die "$Error Parse error!\n";
- $line .= length($1) + (($2 eq ".") ? 5 : 0);
- $str = $3;
- }
-
- my $callstr = $EditorCall;
- $EditorCall =~ s/%s/$file/;
- $EditorCall =~ s/%d/$line/;
- print "File: $file, line: $line\n" if $::opt_verbose;
- exec($EditorCall);
- exit 1;
-}
-
-###
-### used by both sty and system mode:
-###
-my $system = "linux";
-$system = "" if $^O =~ /os2/i;
-$system = "" if $^O =~ /mac/i;
-$system = "win" if $^O =~ /dos/i;
-$system = "win" if $^O =~ /win/i;
-
-################
-### sty mode ###
-################
-if ($::opt_sty) {
-
- @ARGV == 2 or
- die "$usage$Error Wrong arguments [sty mode]!\n";
-
- my $vpefile = $ARGV[1];
- print "VPE file: $vpefile\n" if $::opt_verbose;
-
- my $file = `kpsewhich -progname=$::opt_progname $ARGV[0]`;
- chomp $file;
- if (!($file =~ m|^/| or $file =~ m|^\w:|)) {
- use Cwd;
- $file = cwd() . "/" . $file;
- $file =~ s|/[^/]+/\.\./|/|g;
- $file =~ s|/\./|/|g;
- }
- -f $file or
- die "$Error Cannot find file `$file' [sty mode]!\n";
- print "File: $file\n" if $::opt_verbose;
-
- my $last = 0;
- if (open(IN, $file)) {
- while (<IN>) {
- $last++;
- }
- }
- if ($last == 0) {
- $last = 10000;
- }
- print "Last line: $last\n" if $::opt_verbose;
-
- open(OUT, ">>$vpefile") or
- die "$Error Cannot open file `$vpefile`!\n";
- print OUT "\\vpeentry{$file}{$last}\n";
-
- exit 1;
-}
-
-###################
-### system mode ###
-###################
-if ($::opt_system) {
-
- @ARGV == 1 or
- die "$usage$Error Wrong arguments [system mode]!\n";
-
- my $vpefile = $ARGV[0];
- print "VPE file: $vpefile\n" if $::opt_verbose;
-
- open(OUT, ">>$vpefile") or
- die "$Error Cannot open file `$vpefile`!\n";
- print OUT "\\vpesystem{$system}\n";
-
- exit 1;
-}
-
-################
-### vpe mode ###
-################
-if (@ARGV < 1) {
- die "$usage$Error Missing pdf file [vpe mode]!\n";
-}
-if (@ARGV > 2) {
- die "$usage$Error Too many arguments [vpe mode]!\n";
-}
-
-my $pdffile = $ARGV[0];
-if (!-f $pdffile) {
- my $name = $pdffile;
- $pdffile .= ".pdf";
- -f $pdffile or
- die "$Error File `$name' not found [vpe mode]!\n";
-}
-
-open(IN, "+<$pdffile") or
- die "$Error Cannot open `$pdffile' [vpe mode]!\n";
-binmode(IN);
-my %symlinks = ();
-while (<IN>) {
-
- if (m|/F\([\./]*(/.*)\.vpe\)|) {
- $symlinks{$1} = 1;
- next;
- }
-
- my $do = 0;
- my ($action, $file, $line, $type);
- # my $color; # only for debugging
-
- if (m|^
- /A \s* << \s*
- /Type \s* /Action \s*
- /S \s* /Launch \s*
- /Win \s* << \s*
- /F \s* \(aftcomp.exe\) \s*
- /P \s* \("(.*)\" \s+ \d+\-(\d+)\) \s*
- >> \s*
- >> \s*
- $
- |x
- ) {
- $action = $_;
- $file = $1;
- $line = $2;
- # $color = "/C[0 0 1]"; # only for debugging
- $type = "aftcomp";
- $do = 1;
- }
-
- if (m|^
- /A \s* << \s*
- /Type \s* /Action \s*
- /S \s* /Launch \s*
- /Win \s* << \s*
- /F \s* \(repos.exe\) \s*
- /P \s* \(
- "(.*)" \s*
- "(\d+)" \s*
- "(.*)" \s*
- "(\d+)"
- \) \s*
- >> \s*
- >> \s*
- $
- |x
- ) {
- $action = $_;
- if ($3 eq "") {
- $file = $1;
- $line = $2;
- }
- else {
- # ???
- $file = $1;
- $line = $2;
- }
- # $color = "/C[1 0 0]"; # only for debugging
- $type = "repos";
- $do = 1;
- }
-
- if ($do) {
- my $length = length($action);
- print "* File: $file, line: $line, type: $type\n" if $::opt_verbose;
-
- if (!($file =~ m|^/|)) {
- print STDERR "$Error File `$file' lacks of absolute path!\n";
- next;
- }
-
- if (!$::opt_delete) {
- if ($line <= 0) {
- $line = 1;
- }
-
- my $newaction = "";
- {
- my $digit = substr($line, 0, 1);
- if ($digit <= 5) {
- $newaction .= "/" x $digit;
- }
- else {
- $newaction .= "/" x ($digit - 5) . ".";
- }
- $newaction .= "./";
- my $rest = $line;
- while (($rest = substr($rest, 1)) ne "") {
- $digit = substr($rest, 0, 1);
- if ($digit < 5) {
- $newaction .= "/" x $digit;
- }
- else {
- $newaction .= "/" x ($digit - 5) . ".";
- }
- $newaction .= "./";
- }
- }
- $newaction .= substr($file, 1) . ".vpe";
- $newaction = # $color . # only for debugging
- "/A<</Type/Action/S/Launch/F($newaction)>>";
- $newaction .= " " x ($length - length($newaction) - 1);
- if (length($newaction) > $length) {
- print STDERR "$Error Action too long!\n";
- next;
- }
-
- seek(IN, -length($action), 1);
- print IN $newaction;
- }
-
- $symlinks{$file} = 1;
- }
-}
-
-if (keys(%symlinks)) {
-
- my $this = $0;
- if (!$::opt_delete) {
- if (!-f $0 or !-x $0) {
- $this = `which $0`;
- ($this ne "") or die "$Error Cannot find this script!\n";
- }
- if (!($this =~ m|^/|)) {
- use Cwd;
- $this = cwd() . "/" . $this;
- }
- $this =~ s|/[^/]+/\.\./|/|g;
- $this =~ s|/\./|/|g;
- }
-
- if ($::opt_delete) {
- print "Delete symlinks:\n";
- }
- else {
- if ($::opt_force) {
- print "Forced symlinks to $this:\n";
- }
- else {
- print "Symlinks to $this:\n";
- }
- }
-
- foreach (keys(%symlinks)) {
- my $sym = $_ . ".vpe";
- print " $sym [";
-
- if ($::opt_delete) {
- if (!-l $sym) {
- print "ok, not existing]\n";
- next;
- }
- unlink($sym);
- if (!-l $sym) {
- print "ok, deleted]\n";
- next;
- }
- print "failed]\n";
- next;
- }
- if ($::opt_force) {
- if (-l $sym) {
- unlink($sym);
- if (-l $sym) {
- print "deletion failed]\n";
- next;
- }
- if (symlink($this, $sym)) {
- print "ok, deleted and created]\n";
- next;
- }
- print "deleted, creation failed]\n";
- next;
- }
- if (symlink($this, $sym)) {
- print "ok, created]\n";
- next;
- }
- print "creation failed]\n";
- next;
- }
- if (-f $sym) {
- print "exists]\n";
- next;
- }
- if (symlink($this, $sym)) {
- print "ok, created]\n";
- next;
- }
- print "failed]\n";
- next;
- }
-}
-__END__
+../../texmf-dist/scripts/vpe/vpe.pl \ No newline at end of file
diff --git a/Master/texmf/scripts/vpe/vpe.pl b/Master/texmf-dist/scripts/vpe/vpe.pl
index 9eb52b69e3c..9eb52b69e3c 100644
--- a/Master/texmf/scripts/vpe/vpe.pl
+++ b/Master/texmf-dist/scripts/vpe/vpe.pl
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds
index 8a21c637249..530b3d63ac1 100755
--- a/Master/tlpkg/bin/ctan2tds
+++ b/Master/tlpkg/bin/ctan2tds
@@ -146,6 +146,7 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'epiolmec', "&MAKEflatten",
'epix', "die 'skipping, needs C++'",
'eplain', "&MAKEcopy",
+ 'epstopdf', "die 'skipping, needs .pl vs. noext + man help, sorry'",
'eqnarray', "&MAKEeqnarray",
'eskdx', "&MAKEeskdx",
'esvect', "&MAKEflatten",
@@ -399,7 +400,6 @@ chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
'vicentino', "die 'skipping, nonfree license'",
'vntex', "&MAKEcopy",
'voss-de', "&MAKEvossde",
- 'vpe', "&MAKEvpe",
'vrsion', "die 'skipping, nonfree license'",
'wasy2', "&MAKEflatten",
'wordcount', "&MAKEwordcount",
@@ -1251,6 +1251,7 @@ $standardxmt='\.xmt';
%specialscripts = (
'a2ping' => '\.pl$',
'epstopdf' => 'epstopdf',
+ 'vpe' => '\.pl$',
);
# which suffixes to remove after building. Checked after runins and at
@@ -2853,19 +2854,6 @@ sub MAKEvossde {
}
-# includes shell script.
-sub MAKEvpe {
- &xchdir ($packagedir);
- #
- print "\t SPECIAL $package: moving vpe.pl to /tmp\n";
- &SYSTEM('mv vpe.pl /tmp/vpe');
- #
- &xchdir ("..");
- &donormal ();
- #
- print "YOU-MUST-DO! update /tmp/vpe to source/texk/texlive\n";
-}
-
sub MAKEwordcount {
&xchdir ($packagedir);
#
@@ -3013,6 +3001,7 @@ sub MAKEthumbpdf {
&SYSTEM("mv thumbpdf.pl $myscriptdir/");
}
+
sub MAKEIEEEtran {
print "\t SPECIAL renaming README files, then flatten\n";
chdir ($packagedir) || die "chdir($packagedir) failed: $!";
diff --git a/Master/tlpkg/tlpsrc/bin-thumbpdf.tlpsrc b/Master/tlpkg/tlpsrc/bin-thumbpdf.tlpsrc
deleted file mode 100644
index 04653e0f8b8..00000000000
--- a/Master/tlpkg/tlpsrc/bin-thumbpdf.tlpsrc
+++ /dev/null
@@ -1,6 +0,0 @@
-name bin-thumbpdf
-category TLCore
-runpattern f texmf/scripts/thumbpdf/*
-docpattern f texmf/doc/man/man1/thumbpdf.1
-docpattern f texmf/doc/man/man1/thumbpdf.1.html
-binpattern f bin/${ARCH}/thumbpdf
diff --git a/Master/tlpkg/tlpsrc/bin-vpe.tlpsrc b/Master/tlpkg/tlpsrc/bin-vpe.tlpsrc
deleted file mode 100644
index 04aac61ad2f..00000000000
--- a/Master/tlpkg/tlpsrc/bin-vpe.tlpsrc
+++ /dev/null
@@ -1,5 +0,0 @@
-name bin-vpe
-category TLCore
-runpattern f texmf/scripts/vpe/*
-binpattern f bin/${ARCH}/vpe
-depend vpe
diff --git a/Master/tlpkg/tlpsrc/vpe.tlpsrc b/Master/tlpkg/tlpsrc/vpe.tlpsrc
index 19a5c215206..8fb8a6e3588 100644
--- a/Master/tlpkg/tlpsrc/vpe.tlpsrc
+++ b/Master/tlpkg/tlpsrc/vpe.tlpsrc
@@ -1,3 +1,4 @@
name vpe
category Package
-depend bin-vpe
+binpattern f bin/${ARCH}/vpe
+runpattern +f texmf-dist/scripts/vpe/*