summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-01 16:47:03 +0000
committerKarl Berry <karl@freefriends.org>2010-06-01 16:47:03 +0000
commitefa150b0c0e1c73cf5c5010e782f458720e7d2e7 (patch)
tree5c2c80c18820a48f0dcac7c691822362fd65b44e /Build
parentdda232091b98442362506b0d26d69c91ba207b07 (diff)
rename supp-pdf to mptopdf, and include the other mptopdf-related files, while excluding them from context. enable mptopdf.fmt. after discussions with taco.
git-svn-id: svn://tug.org/texlive/trunk@18674 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/tetex/fmtutil.cnf18
-rw-r--r--Build/source/texk/texlive/context/Makefile.am3
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.am13
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.in13
-rw-r--r--Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl154
5 files changed, 182 insertions, 19 deletions
diff --git a/Build/source/texk/tetex/fmtutil.cnf b/Build/source/texk/tetex/fmtutil.cnf
index 0ffe61fe6ff..ed79a138ad3 100644
--- a/Build/source/texk/tetex/fmtutil.cnf
+++ b/Build/source/texk/tetex/fmtutil.cnf
@@ -1,4 +1,4 @@
-# Generated by /home/texlive/karl/Master/bin/i386-linux/tlmgr on Wed May 26 04:00:09 2010
+# Generated by /home/texlive/karl/Master/bin/i386-linux/tlmgr on Tue Jun 1 04:08:55 2010
# $Id: fmtutil-hdr.cnf 13067 2009-05-12 22:04:17Z preining $
# Originally written by Thomas Esser, 1998. Public domain.
#
@@ -45,10 +45,11 @@ amstex pdftex - -translate-file=cp227.tcx *amstex.ini
# from context:
cont-en pdftex cont-usr.tex -8bit *cont-en.ini
cont-en xetex cont-usr.tex -8bit *cont-en.ini
-#! cont-cs pdftex cont-usr.tex -8bit *cont-cs.ini
#! cont-de pdftex cont-usr.tex -8bit *cont-de.ini
-#! cont-gb pdftex cont-usr.tex -8bit *cont-gb.ini
+#! cont-fr pdftex cont-usr.tex -8bit *cont-fr.ini
+#! cont-it pdftex cont-usr.tex -8bit *cont-it.ini
#! cont-nl pdftex cont-usr.tex -8bit *cont-nl.ini
+#! cont-ro pdftex cont-usr.tex -8bit *cont-ro.ini
metafun mpost - metafun.mp
#
# from cslatex:
@@ -69,12 +70,12 @@ pdfjadetex pdftex language.dat *pdfjadetex.ini
# from latex-bin:
latex pdftex language.dat -translate-file=cp227.tcx *latex.ini
pdflatex pdftex language.dat -translate-file=cp227.tcx *pdflatex.ini
-dvilualatex luatex language.dat dvilualatex.ini
-lualatex luatex language.dat lualatex.ini
+dvilualatex luatex language.dat,language.dat.lua dvilualatex.ini
+lualatex luatex language.dat,language.dat.lua lualatex.ini
#
# from luatex:
-luatex luatex language.def luatex.ini
-dviluatex luatex language.def dviluatex.ini
+luatex luatex language.def,language.dat.lua luatex.ini
+dviluatex luatex language.def,language.dat.lua dviluatex.ini
#
# from metafont:
mf mf-nowin - -translate-file=cp227.tcx mf.ini
@@ -92,6 +93,9 @@ utf8mex pdftex mexconf.tex -enc *utf8mex.ini
mltex pdftex - -translate-file=cp227.tcx -mltex mltex.ini
mllatex pdftex language.dat -translate-file=cp227.tcx -mltex mllatex.ini
#
+# from mptopdf:
+mptopdf pdftex - -translate-file=cp227.tcx mptopdf.tex
+#
# from pdftex:
pdftex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini
etex pdftex language.def -translate-file=cp227.tcx *etex.ini
diff --git a/Build/source/texk/texlive/context/Makefile.am b/Build/source/texk/texlive/context/Makefile.am
index f252aae9669..57968ea88a3 100644
--- a/Build/source/texk/texlive/context/Makefile.am
+++ b/Build/source/texk/texlive/context/Makefile.am
@@ -7,6 +7,9 @@
## texmf-dist/scripts/context/stubs/unix. They should be kept in sync.
## The scripts here are installed as-is into each Unixish bin directory.
##
+## Because mptopdf.pl is not part of the context/stubs directory, it is
+## handled through a symlink, see ../linked_scripts.
+##
ACLOCAL_AMFLAGS = -I ../../m4
bin_SCRIPTS = \
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am
index 4332ffe99ac..a5a8675fad4 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.am
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.am
@@ -33,6 +33,7 @@ nobase_dist_script_SCRIPTS = \
bundledoc/arlatex \
bundledoc/bundledoc \
cachepic/cachepic.tlu \
+ context/perl/mptopdf.pl \
de-macro/de-macro \
dviasm/dviasm.py \
epspdf/epspdf \
@@ -98,13 +99,13 @@ bin_links = \
# The idea is to install the scripts themselves in texmf*/scripts, and
# have bin/arch/foo be a symlink to, say,
-# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk space,
-# but much more importantly omit duplication, and most importantly of
-# all make it possible to invoke the same Perl script on Windows (via
-# tl-w32-wrapper).
+# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk
+# space, but much more importantly omit duplication, and most
+# importantly of all make it possible to invoke the same Perl script on
+# Windows (see ../w32_wrapper).
#
# The installation into texmf*/scripts is ideally done with ctan2tl.
-# The copy of the wrapper for Windows is also done by hand, but
+# The copy of the wrapper for Windows is done by hand, but (todo)
# could/should also be done by ctan2tl. The check-wrapper-consistency
# script at least checks after the fact for problems.
#
@@ -112,7 +113,7 @@ bin_links = \
# This is purely for other distro builders, so symlinks are not dangling in
# the inst/bin dir (it is meaningless in native TL). We have not yet
# written the auto-update to ensure linked_scripts is actually up to date
-# with the masters in Master/texmf*/scripts, but it will happen.
+# with the masters in Master/texmf*/scripts, but one day.
#
# We support both multiplatform and non-multiplatform builds.
#
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in
index a65041b9b58..da23cb75ad4 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.in
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.in
@@ -182,6 +182,7 @@ nobase_dist_script_SCRIPTS = \
bundledoc/arlatex \
bundledoc/bundledoc \
cachepic/cachepic.tlu \
+ context/perl/mptopdf.pl \
de-macro/de-macro \
dviasm/dviasm.py \
epspdf/epspdf \
@@ -554,13 +555,13 @@ uninstall-am: uninstall-binSCRIPTS uninstall-nobase_dist_scriptSCRIPTS \
# The idea is to install the scripts themselves in texmf*/scripts, and
# have bin/arch/foo be a symlink to, say,
-# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk space,
-# but much more importantly omit duplication, and most importantly of
-# all make it possible to invoke the same Perl script on Windows (via
-# tl-w32-wrapper).
+# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk
+# space, but much more importantly omit duplication, and most
+# importantly of all make it possible to invoke the same Perl script on
+# Windows (see ../w32_wrapper).
#
# The installation into texmf*/scripts is ideally done with ctan2tl.
-# The copy of the wrapper for Windows is also done by hand, but
+# The copy of the wrapper for Windows is done by hand, but (todo)
# could/should also be done by ctan2tl. The check-wrapper-consistency
# script at least checks after the fact for problems.
#
@@ -568,7 +569,7 @@ uninstall-am: uninstall-binSCRIPTS uninstall-nobase_dist_scriptSCRIPTS \
# This is purely for other distro builders, so symlinks are not dangling in
# the inst/bin dir (it is meaningless in native TL). We have not yet
# written the auto-update to ensure linked_scripts is actually up to date
-# with the masters in Master/texmf*/scripts, but it will happen.
+# with the masters in Master/texmf*/scripts, but one day.
#
# We support both multiplatform and non-multiplatform builds.
#
diff --git a/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl b/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
new file mode 100644
index 00000000000..ec08c5306b3
--- /dev/null
+++ b/Build/source/texk/texlive/linked_scripts/context/perl/mptopdf.pl
@@ -0,0 +1,154 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# MikTeX users can set environment variable TEXSYSTEM to "miktex".
+
+#D \module
+#D [ file=mptopdf.pl,
+#D version=2010.05.28, % 2000.05.29
+#D title=converting MP to PDF,
+#D subtitle=\MPTOPDF,
+#D author=Hans Hagen,
+#D date=\currentdate,
+#D url=www.pragma-ade.nl,
+#D copyright={PRAGMA ADE / Hans Hagen \& Ton Otten}]
+#C
+#C This module is part of the \CONTEXT\ macro||package and is
+#C therefore copyrighted by \PRAGMA. See licen-en.pdf for
+#C details.
+
+# use File::Copy ; # not in every perl
+
+use Config ;
+use Getopt::Long ;
+use strict ;
+use File::Basename ;
+
+$Getopt::Long::passthrough = 1 ; # no error message
+$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
+
+my $Help = 0;
+my $Latex = 0;
+my $RawMP = 1;
+my $MetaFun = 0 ;
+my $PassOn = '' ;
+
+&GetOptions
+ ( "help" => \$Help ,
+ "rawmp" => \$RawMP, # option is now default, but keep for compat
+ "metafun" => \$MetaFun,
+ "passon" => \$PassOn, # option is ignored, but keep for compat
+ "latex" => \$Latex ) ;
+
+my $program = "MPtoPDF 1.4.0" ;
+my $pattern = "@ARGV" ; # was $ARGV[0]
+my $miktex = 0 ;
+my $done = 0 ;
+my $report = '' ;
+my $mplatexswitch = " --tex=latex " ;
+
+my $dosish = ($Config{'osname'} =~/^(ms)?dos|^os\/2|^mswin/i) ;
+my $escapeshell = (($ENV{'SHELL'}) && ($ENV{'SHELL'} =~ m/sh/i ));
+
+if ($ENV{"TEXSYSTEM"}) {
+ $miktex = ($ENV{"TEXSYSTEM"} =~ /miktex/io) ;
+}
+
+my @files ;
+my $command = my $mpbin = '' ;
+
+# agressive copy, works for open files like in gs
+
+sub CopyFile {
+ my ($From,$To) = @_ ;
+ return unless open(INP,"<$From") ;
+ return unless open(OUT,">$To") ;
+ binmode INP ;
+ binmode OUT ;
+ while (<INP>) {
+ print OUT $_ ;
+ }
+ close (INP) ;
+ close (OUT) ;
+}
+
+if (($pattern eq '')||($Help)) {
+ print "\n$program : provide MP output file (or pattern)\n" ;
+ exit ;
+} elsif ($pattern =~ /\.mp$/io) {
+ shift @ARGV ; my $rest = join(" ", @ARGV) ;
+ if (open(INP,$pattern)) {
+ while (<INP>) {
+ if (/(documentstyle|documentclass|begin\{document\})/io) {
+ $Latex = 1 ; last ;
+ }
+ }
+ close (INP) ;
+ }
+ if ($Latex) {
+ $rest .= " $mplatexswitch" ;
+ }
+ if ($MetaFun) {
+ $mpbin = "mpost --progname=mpost --mem=metafun" ;
+ } else {
+ $mpbin = "mpost --mem=mpost" ;
+ }
+ my $runner = "$mpbin $rest $pattern" ;
+ print "\n$program : running '$runner'\n" ;
+ my $error = system ($runner) ;
+ if ($error) {
+ print "\n$program : error while processing mp file\n" ;
+ exit 1 ;
+ } else {
+ $pattern =~ s/\.mp$//io ;
+ @files = glob "$pattern.*" ;
+ }
+} elsif (-e $pattern) {
+ @files = ($pattern) ;
+} elsif ($pattern =~ /.\../o) {
+ @files = glob "$pattern" ;
+} else {
+ $pattern .= '.*' ;
+ @files = glob "$pattern" ;
+}
+
+foreach my $file (@files) {
+ $_ = $file ;
+ if (s/\.(\d+|mps)$// && -e $file) {
+ if ($miktex) {
+ $command = "pdftex -undump=mptopdf" ;
+ } else {
+ $command = "pdftex -fmt=mptopdf -progname=context" ;
+ }
+ if ($dosish) {
+ $command = "$command \\relax $file" ;
+ } else {
+ $command = "$command \\\\relax $file" ;
+ }
+ my $error = system($command) ;
+ if ($error) {
+ print "\n$program : error while processing tex file\n" ;
+ exit 1 ;
+ }
+ my $pdfsrc = basename($_).".pdf";
+ rename ($pdfsrc, "$_-$1.pdf") ;
+ if (-e $pdfsrc) {
+ CopyFile ($pdfsrc, "$_-$1.pdf") ;
+ }
+ if ($done) {
+ $report .= " +" ;
+ }
+ $report .= " $_-$1.pdf" ;
+ ++$done ;
+ }
+}
+
+if ($report eq '') {
+ $report = '*' ;
+}
+
+if ($done) {
+ print "\n$program : $pattern is converted to$report\n" ;
+} else {
+ print "\n$program : no filename matches $pattern\n" ;
+}