[Reproducible-commits] [texlive-bin] 71/400: add pmpost patches update to current sources replace/provide/conflict with jmpost
Maria Valentina Marin Rodrigues
akira-guest at moszumanska.debian.org
Thu Jul 9 21:39:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
akira-guest pushed a commit to branch master
in repository texlive-bin.
commit 91438da3a0a7aa775a8154d8b2be8224d7990866
Author: Norbert Preining <preining at debian.org>
Date: Fri Apr 27 04:33:18 2012 +0000
add pmpost patches
update to current sources
replace/provide/conflict with jmpost
---
debian/changelog | 7 +-
debian/control | 6 +-
debian/patches/50_fmtutil_deb | 22 +-
debian/patches/51_fmtutil_keep_failedlog | 10 +-
debian/patches/53_builtin-searchpath-fix | 41 +-
debian/patches/pmpost-20120415-tl11.diff | 1371 ++++++++++++++++++++++++++
debian/patches/pmpost-svg-20120119-tl11.diff | 93 ++
debian/patches/series | 2 +
debian/patches/set-e-in-various-scripts | 14 +-
debian/pmakempx | 14 +
debian/rules | 2 +
11 files changed, 1538 insertions(+), 44 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 17fae67..b8d4c87 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-texlive-bin (2011.201204XX-1~1) unstable; urgency=low
+texlive-bin (2011.20120427-1) unstable; urgency=low
- * NEW UPSTREAM NECESSARY!!!
* drop patches for config file inclusion in (x)dvipdfmx, included upstream
* add man page for etex
+ * include pmpost patches and build it
+ * adapt/unfuzzify patches for current sources
- -- Norbert Preining <preining at debian.org> Wed, 25 Apr 2012 07:23:33 +0900
+ -- Norbert Preining <preining at debian.org> Fri, 27 Apr 2012 11:54:57 +0900
texlive-bin (2011.20120410-1) unstable; urgency=low
diff --git a/debian/control b/debian/control
index e052011..4f250f2 100644
--- a/debian/control
+++ b/debian/control
@@ -11,10 +11,10 @@ Package: texlive-binaries
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, texlive-common (>= 2011), tex-common (>= 3), ed, perl, dpkg (>= 1.15.4) | install-info
Recommends: texlive-base, luatex, python, ruby, wish
-Replaces: texlive-metapost (<< 2010), texlive-base (<< 2010), ptex-bin, mendexk
-Conflicts: mendexk, makejvf
+Replaces: texlive-metapost (<< 2010), texlive-base (<< 2010), ptex-bin, mendexk, jmpost
+Conflicts: mendexk, makejvf, jmpost
Breaks: texlive-base (<< 2010)
-Provides: texlive-base-bin, makejvf, mendexk
+Provides: texlive-base-bin, makejvf, mendexk, jmpost
Description: Binaries for TeX Live
This package contains all the binaries of TeX Live packages.
.
diff --git a/debian/patches/50_fmtutil_deb b/debian/patches/50_fmtutil_deb
index 334849a..e2321f4 100644
--- a/debian/patches/50_fmtutil_deb
+++ b/debian/patches/50_fmtutil_deb
@@ -9,10 +9,10 @@
texk/tetex/fmtutil.man | 7 +++++--
2 files changed, 14 insertions(+), 21 deletions(-)
-Index: texlive-bin-2011.20120216/texk/tetex/fmtutil.man
+Index: texlive-bin-2011.20120427/texk/tetex/fmtutil.man
===================================================================
---- texlive-bin-2011.20120216.orig/texk/tetex/fmtutil.man 2011-06-28 06:32:19.000000000 +0900
-+++ texlive-bin-2011.20120216/texk/tetex/fmtutil.man 2012-02-17 10:41:07.061487176 +0900
+--- texlive-bin-2011.20120427.orig/texk/tetex/fmtutil.man 2012-04-27 11:31:33.599071967 +0900
++++ texlive-bin-2011.20120427/texk/tetex/fmtutil.man 2012-04-27 11:31:40.747069403 +0900
@@ -45,7 +45,7 @@
no-op in TeX Live
.TP
@@ -35,11 +35,11 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil.man
.SH "BUGS"
None known, but report any bugs found to <tex-k at tug.org> (mailing list).
.SH "AUTHOR"
-Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
+Index: texlive-bin-2011.20120427/texk/tetex/fmtutil
===================================================================
---- texlive-bin-2011.20120216.orig/texk/tetex/fmtutil 2011-06-28 06:32:19.000000000 +0900
-+++ texlive-bin-2011.20120216/texk/tetex/fmtutil 2012-02-17 10:42:46.161039803 +0900
-@@ -541,9 +541,11 @@
+--- texlive-bin-2011.20120427.orig/texk/tetex/fmtutil 2012-04-27 11:31:33.599071967 +0900
++++ texlive-bin-2011.20120427/texk/tetex/fmtutil 2012-04-27 11:31:40.747069403 +0900
+@@ -542,9 +542,11 @@
grep -v '^ *#' "$cnf_file" | sed 's@^ *@@; s@ *$@@' | grep . | sort
cleanup $? ;;
edit)
@@ -54,7 +54,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
cleanup 0 ;;
enablefmt|disablefmt)
$cmd $arg ;; # does not return
-@@ -555,22 +557,6 @@
+@@ -556,22 +558,6 @@
cleanup $? ;;
esac
@@ -77,7 +77,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
# set up destdir:
if test -z "$destdir"; then
: ${MT_TEXMFVAR=`kpsewhich -var-value=TEXMFVAR`}
-@@ -984,6 +970,7 @@
+@@ -985,6 +971,7 @@
###############################################################################
# disablefmt(format)
# disables format in configuration file
@@ -85,7 +85,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
###############################################################################
disablefmt()
{
-@@ -1000,6 +987,7 @@
+@@ -1001,6 +988,7 @@
###############################################################################
# enablefmt(format)
# enables format in configuration file
@@ -93,7 +93,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
###############################################################################
enablefmt()
{
-@@ -1012,5 +1000,7 @@
+@@ -1013,5 +1001,7 @@
(exit 0); return 0
}
diff --git a/debian/patches/51_fmtutil_keep_failedlog b/debian/patches/51_fmtutil_keep_failedlog
index 5af0382..70b6239 100644
--- a/debian/patches/51_fmtutil_keep_failedlog
+++ b/debian/patches/51_fmtutil_keep_failedlog
@@ -2,11 +2,11 @@
texk/tetex/fmtutil | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
+Index: texlive-bin-2011.20120427/texk/tetex/fmtutil
===================================================================
---- texlive-bin-2011.20120216.orig/texk/tetex/fmtutil 2012-02-17 10:42:46.161039803 +0900
-+++ texlive-bin-2011.20120216/texk/tetex/fmtutil 2012-02-17 10:42:59.924975955 +0900
-@@ -762,7 +762,6 @@
+--- texlive-bin-2011.20120427.orig/texk/tetex/fmtutil 2012-04-27 11:31:40.747069403 +0900
++++ texlive-bin-2011.20120427/texk/tetex/fmtutil 2012-04-27 11:31:48.051066459 +0900
+@@ -763,7 +763,6 @@
log_warning "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed."
# We don't want user-interaction for the following "mv" commands:
@@ -14,7 +14,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
#
destfile=$fulldestdir/$fmtfile
if mv "$fmtfile" "$destfile" </dev/null; then
-@@ -801,6 +800,9 @@
+@@ -802,6 +801,9 @@
else
log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' failed"
fi
diff --git a/debian/patches/53_builtin-searchpath-fix b/debian/patches/53_builtin-searchpath-fix
index bf4782f..7af6444 100644
--- a/debian/patches/53_builtin-searchpath-fix
+++ b/debian/patches/53_builtin-searchpath-fix
@@ -4,14 +4,14 @@
## DP: adjust built-in search paths for kpathsea library to Debian standard
@DPATCH@
- texk/kpathsea/texmf.cnf | 23 +++++++++++++----------
- 1 file changed, 13 insertions(+), 10 deletions(-)
+ texk/kpathsea/texmf.cnf | 34 +++++++++++++---------------------
+ 1 file changed, 13 insertions(+), 21 deletions(-)
-Index: texlive-bin-2011.20120226/texk/kpathsea/texmf.cnf
+Index: texlive-bin-2011.20120427/texk/kpathsea/texmf.cnf
===================================================================
---- texlive-bin-2011.20120226.orig/texk/kpathsea/texmf.cnf 2012-02-26 22:24:25.000000000 +0900
-+++ texlive-bin-2011.20120226/texk/kpathsea/texmf.cnf 2012-02-27 07:50:06.340884511 +0900
-@@ -53,19 +53,22 @@
+--- texlive-bin-2011.20120427.orig/texk/kpathsea/texmf.cnf 2012-04-17 23:43:40.000000000 +0900
++++ texlive-bin-2011.20120427/texk/kpathsea/texmf.cnf 2012-04-27 11:34:05.942960043 +0900
+@@ -55,19 +55,22 @@
% The tree containing runtime files related to the specific
% distribution and version.
@@ -39,7 +39,7 @@ Index: texlive-bin-2011.20120226/texk/kpathsea/texmf.cnf
% Per-user texmf tree(s) -- organized per the TDS, as usual. To define
% more than one per-user tree, set this to a list of directories in
-@@ -92,7 +95,7 @@
+@@ -94,7 +97,7 @@
% versions should take precedence over those -- although it is generally
% a source of confusion to have different versions of a package
% installed, whatever the trees, so try to avoid it.
@@ -48,7 +48,7 @@ Index: texlive-bin-2011.20120226/texk/kpathsea/texmf.cnf
% Where to look for ls-R files. There need not be an ls-R in the
% directories in this path, but if there is one, Kpathsea will use it.
-@@ -100,18 +103,18 @@
+@@ -102,18 +105,18 @@
% does not create ls-R files in the non-!! elements -- because if an
% ls-R is present, it will be used, and the disk will not be searched.
% This is arguably a bug in kpathsea.
@@ -70,12 +70,23 @@ Index: texlive-bin-2011.20120226/texk/kpathsea/texmf.cnf
% On some systems, there will be a system tree which contains all the font
% files that may be created as well as the formats. For example
-@@ -463,7 +466,7 @@
- %
- % For security reasons, it is better not to include . in this path.
+@@ -480,18 +483,7 @@
+ % since we don't want to scatter ../'s throughout the value. Hence we
+ % explicitly list every directory. Arguably more understandable anyway.
%
--TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
+-TEXMFCNF = {\
+-$SELFAUTOLOC,\
+-$SELFAUTOLOC/share/texmf-local/web2c,$SELFAUTOLOC/share/texmf/web2c,\
+-$SELFAUTOLOC/texmf-local/web2c,$SELFAUTOLOC/texmf/web2c,\
+-$SELFAUTODIR,\
+-$SELFAUTODIR/share/texmf-local/web2c,$SELFAUTODIR/share/texmf/web2c,\
+-$SELFAUTODIR/texmf-local/web2c,$SELFAUTODIR/texmf/web2c,\
+-$SELFAUTOPARENT/../texmf-local/web2c,\
+-$SELFAUTOPARENT,\
+-$SELFAUTOPARENT/share/texmf-local/web2c,$SELFAUTOPARENT/share/texmf/web2c,\
+-$SELFAUTOPARENT/texmf-local/web2c,$SELFAUTOPARENT/texmf/web2c\
+-}
+TEXMFCNF = /etc/texmf/web2c;/usr/share/texlive/texmf/web2c;/usr/share/texlive/texmf-dist/web2c;/usr/local/share/texmf/web2c
-
- % kpathsea 3.5.3 and later sets these at runtime. To avoid empty
- % expansions from binaries linked against an earlier version of the
+ %
+ % For reference, here is the old brace-using definition:
+ %TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
diff --git a/debian/patches/pmpost-20120415-tl11.diff b/debian/patches/pmpost-20120415-tl11.diff
new file mode 100644
index 0000000..b404998
--- /dev/null
+++ b/debian/patches/pmpost-20120415-tl11.diff
@@ -0,0 +1,1371 @@
+---
+ texk/kpathsea/texmf.cnf | 1
+ texk/web2c/Makefile.am | 3
+ texk/web2c/ac/web2c.ac | 5
+ texk/web2c/configure.ac | 1
+ texk/web2c/pmplibdir/am/pmpost.am | 78 ++++++
+ texk/web2c/pmplibdir/jfm.ch | 110 ++++++++
+ texk/web2c/pmplibdir/jmp.ch | 283 +++++++++++++++++++++
+ texk/web2c/pmplibdir/jmppsw.ch | 76 +++++
+ texk/web2c/pmplibdir/pdvitomp.ch | 494 ++++++++++++++++++++++++++++++++++++++
+ texk/web2c/pmplibdir/pmpost.ch | 233 +++++++++++++++++
+ 10 files changed, 1284 insertions(+)
+
+Index: texlive-bin-2011.20120427/texk/kpathsea/texmf.cnf
+===================================================================
+--- texlive-bin-2011.20120427.orig/texk/kpathsea/texmf.cnf 2012-04-27 11:34:05.942960043 +0900
++++ texlive-bin-2011.20120427/texk/kpathsea/texmf.cnf 2012-04-27 11:37:53.846649471 +0900
+@@ -617,6 +617,7 @@
+ % Used by makempx to run TeX. We use "etex" because MetaPost is
+ % expecting DVI, and not "tex" because we want first line parsing.
+ TEX = etex
++TEX.pmpost = eptex
+
+ % These variables specify the external program called for the
+ % interactive `e' option. %d is replaced by the line number and %s by
+Index: texlive-bin-2011.20120427/texk/web2c/Makefile.am
+===================================================================
+--- texlive-bin-2011.20120427.orig/texk/web2c/Makefile.am 2011-10-05 00:41:38.370251000 +0900
++++ texlive-bin-2011.20120427/texk/web2c/Makefile.am 2012-04-27 11:37:53.850649466 +0900
+@@ -161,6 +161,9 @@
+ ## MetaPost
+ include $(srcdir)/mplibdir/am/mplib.am
+
++## pMetaPost
++include $(srcdir)/pmplibdir/am/pmpost.am
++
+ ## libmplib, used by MetaPost and luaTeX
+ include $(srcdir)/mplibdir/am/libmplib.am
+
+Index: texlive-bin-2011.20120427/texk/web2c/ac/web2c.ac
+===================================================================
+--- texlive-bin-2011.20120427.orig/texk/web2c/ac/web2c.ac 2011-08-14 23:23:26.366247000 +0900
++++ texlive-bin-2011.20120427/texk/web2c/ac/web2c.ac 2012-04-27 11:37:53.850649466 +0900
+@@ -75,6 +75,11 @@
+ AS_HELP_STRING([--disable-mp],
+ [do not build METAPOST],
+ kpse_indent_26))[]dnl
++## configure options for PMP
++AC_ARG_ENABLE([pmp],
++ AS_HELP_STRING([--disable-pmp],
++ [do not build pMETAPOST],
++ kpse_indent_26))[]dnl
+ ## configure options for WEB programs
+ AC_ARG_ENABLE([web-progs],
+ AS_HELP_STRING([--disable-web-progs],
+Index: texlive-bin-2011.20120427/texk/web2c/configure.ac
+===================================================================
+--- texlive-bin-2011.20120427.orig/texk/web2c/configure.ac 2012-01-18 20:18:30.055776000 +0900
++++ texlive-bin-2011.20120427/texk/web2c/configure.ac 2012-04-27 11:37:53.850649466 +0900
+@@ -195,6 +195,7 @@
+ [KPSE_MFWIN_DEFINE(Kpse_Win)])])[]dnl
+
+ AM_CONDITIONAL([MP], [test "x$enable_mp" != xno])
++AM_CONDITIONAL([PMP], [test "x$enable_pmp" != xno])
+
+ AM_CONDITIONAL([WEB], [test "x$enable_web_progs" != xno])
+
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/am/pmpost.am
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/am/pmpost.am 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,78 @@
++## texk/web2c/pmplibdir/am/pmpost.am: Makefile fragment for MetaPost.
++##
++## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live at tug.org>
++## You may freely use, modify and/or distribute this file.
++
++## pMetaPost
++##
++if PMP
++bin_PROGRAMS += pmpost
++bin_links += pmpost$(EXEEXT):pdvitomp
++endif PMP
++EXTRA_PROGRAMS += pmpost
++
++pmpost_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/pmplibdir -I$(srcdir)/mplibdir $(PTEXENC_INCLUDES)
++pmpost_LDADD = $(KPATHSEA_LIBS) -lm $(PTEXENC_LIBS)
++
++
++.PHONY: install-pmpost-links uninstall-pmpost-links
++
++# Creating one file: just one rule
++pmp_ctangle = CWEBINPUTS=.:$(srcdir)/pmplibdir $(ctangle)
++# Creating several files: need stamp file and two rules with identical recipes
++pmp_ctangle_sh = CWEBINPUTS=.:$(srcdir)/pmplibdir $(SHELL) ./tangle-sh $@ $(CTANGLE)
++
++## pMetaPost C sources
++pmpost_SOURCES = mplibdir/avl.h mplibdir/avl.c
++nodist_pmpost_SOURCES = pmpost.c $(pmpxout_c_h) $(pmp_c_h) $(pmpmath_c_h) $(ppsout_c_h) $(psvgout_c_h) ptfmin.c
++pmpxout_c_h = pmpxout.c pmpxout.h
++pmp_c_h = pmp.c pmplib.h pmpmp.h
++pmpmath_c_h = pmpmath.h pmpmath.c
++ppsout_c_h = pmppsout.h ppsout.c pmplibps.h
++psvgout_c_h = pmplibsvg.h pmpsvgout.h psvgout.c
++pmp_sed = "s/mpxout\\.h/pmpxout.h/;s/mpmp\\.h/pmpmp.h/;s/mplib\\.h/pmplib.h/;s/mppsout\\.h/pmppsout.h/;s/mplibps\\.h/pmplibps.h/;s/mplibsvg\\.h/pmplibsvg.h/;s/mpsvgout\\.h/pmpsvgout.h/;s/mpmath\\.h/pmpmath.h/"
++
++ptfmin.c: ctangle$(EXEEXT) mplibdir/tfmin.w
++ cat $(srcdir)/mplibdir/tfmin.w | sed $(pmp_sed) > ptfmin.w
++ $(pmp_ctangle) ptfmin.w jfm.ch
++pmpost.c: ctangle$(EXEEXT) mplibdir/mpost.w
++ cat $(srcdir)/mplibdir/mpost.w | sed $(pmp_sed) > pmpost.w
++ $(pmp_ctangle) pmpost.w pmpost.ch
++$(pmp_c_h): pmp-tangle
++ @$(pmp_ctangle_sh) pmp.w jmp.ch
++$(ppsout_c_h): ppsout-tangle
++ @$(pmp_ctangle_sh) ppsout.w jmppsw.ch
++$(pmpxout_c_h): pmpxout-tangle
++ @$(pmp_ctangle_sh) pmpxout pdvitomp.ch
++pmp-tangle: ctangle$(EXEEXT) mplibdir/mp.w tangle-sh
++ cat $(srcdir)/mplibdir/mp.w | sed $(pmp_sed) > pmp.w
++ @$(pmp_ctangle_sh) pmp.w jmp.ch
++ppsout-tangle: ctangle$(EXEEXT) mplibdir/psout.w tangle-sh
++ cat $(srcdir)/mplibdir/psout.w | sed $(pmp_sed) > ppsout.w
++ @$(pmp_ctangle_sh) ppsout.w jmppsw.ch
++pmpxout-tangle: ctangle$(EXEEXT) mplibdir/mpxout.w tangle-sh
++ cat $(srcdir)/mplibdir/mpxout.w | sed $(pmp_sed) > pmpxout.w
++ @$(pmp_ctangle_sh) pmpxout pdvitomp.ch
++
++$(psvgout_c_h): psvgout-tangle
++ @$(pmp_ctangle_sh) psvgout
++psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w tangle-sh
++ cat $(srcdir)/mplibdir/svgout.w | sed $(pmp_sed) > psvgout.w
++ @$(pmp_ctangle_sh) psvgout
++$(pmpmath_c_h): pmpmath-tangle
++ @$(pmp_ctangle_sh) pmpmath
++pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh
++ cat $(srcdir)/mplibdir/mpmath.w | sed $(pmp_sed) > pmpmath.w
++ @$(pmp_ctangle_sh) pmpmath
++
++
++## pMetaPost CWeb sources
++pmpost_web = mplibdir/mpost.w mplibdir/mpxout.w
++pmpost_web += mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w
++pmpost_web += mplibdir/mpmath.w mplibdir/tfmin.w
++
++
++$(pmpost_OBJECTS): $(nodist_pmpost_SOURCES)
++
++DISTCLEANFILES += $(nodist_pmpost_SOURCES)
++
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/jfm.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/jfm.ch 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,110 @@
++ at x
++#include <w2c/config.h>
++ at y
++#ifdef WIN32
++#include <kpathsea/kpathsea.h>
++#endif
++#include <w2c/config.h>
++ at z
++
++%
++% local variable "nt" && "ct"
++ at x
++ halfword lf,tfm_lh,bc,ec,nw,nh,nd; /* subfile size parameters */
++ at y
++ halfword lf,tfm_lh,bc,ec,nw,nh,nd,nt; /* subfile size parameters */
++ at z
++
++ at x
++ int h_and_d; /* height and depth indices being unpacked */
++ at y
++ int h_and_d; /* height and depth indices being unpacked */
++ halfword ct; /* char and type */
++ halfword id; /* JFM font id */
++ at z
++
++ at x
++@<Read the character data and the width, height, and depth tables and
++ |goto done|@>
++ at y
++@<Read the character type table@>;
++@<Read the character data and the width, height, and depth tables and
++ |goto done|@>
++ at z
++
++%
++% routine to process JFM file format
++ at x
++@<Read the \.{TFM} size fields@>=
++tfget; read_two(lf);
++ at y
++ at d yoko_jfm_id 11 /* `yoko-kumi' fonts */
++ at d tate_jfm_id 9 /* `tate-kumi' fonts */
++ at d font_jfm_p(A) (mp->font_id[(A)]!=0)
++ at d incr(A) (A)=(A)+1 /* increase a variable by unity */
++@<Read the \.{TFM} size fields@>=
++tfget; read_two(lf);
++if ( (lf==yoko_jfm_id) || (lf==tate_jfm_id) ) {
++ id=lf;
++ tfget; read_two(nt);
++ tfget; read_two(lf);
++} else {
++ id=0; nt=0;
++};
++ at z
++
++ at x
++whd_size=(size_t)((ec+1-bc)+nw+nh+nd);
++ at y
++whd_size=(size_t)((ec+1-bc)+nt+nw+nh+nd);
++ at z
++
++%
++% reserve space for character type table
++ at x
++mp->char_base[n]=(int)(mp->next_fmem-(size_t)bc);
++mp->width_base[n]=(int)(mp->next_fmem+(size_t)(ec-bc)+1);
++ at y
++mp->font_id[n]=id;
++mp->font_nt[n]=nt;
++mp->ctype_base[n]=mp->next_fmem;
++mp->char_base[n]=(int)(mp->next_fmem+nt-(size_t)bc);
++mp->width_base[n]=(int)(mp->next_fmem+nt+(size_t)(ec-bc)+1);
++ at z
++
++%
++% read character type table
++%
++ at x
++tf_ignore(4*(tfm_lh-2))
++ at y
++tf_ignore(4*(tfm_lh-2))
++
++@ @<Read the character type table@>=
++ii=mp->ctype_base[n]+nt;
++i=mp->ctype_base[n];
++while ( i<ii ) {
++ tfget; read_two(ct);
++ mp->font_info[i].hh.LH=ct;
++ tfget; read_two(ct);
++ mp->font_info[i].hh.RH=ct;
++ incr(i);
++}
++ at z
++
++ at x
++mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext);
++mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics);
++ at y
++mp_pack_file_name(mp, mp->cur_name,mp->cur_area,mp->cur_ext);
++#ifdef WIN32
++{
++ char *fulln;
++ fulln = kpse_find_file(fname, kpse_tfm_format, 1);
++ mp->tfm_infile = (mp->open_file)(mp, fulln, "r",mp_filetype_metrics);
++ if(fulln) mp_xfree(fulln);
++}
++#else
++mp->tfm_infile = (mp->open_file)(mp, mp->name_of_file, "r",mp_filetype_metrics);
++#endif
++ at z
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/jmp.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/jmp.ch 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,283 @@
++% jMetaPost change file for MetaPost
++%
++% written by Michio Matsuyama <fwhw5892 at mb.infoweb.ne.jp>
++% Hideyuki Suzuki <hideyuki at sat.t.u-tokyo.ac.jp>
++%
++% $Id: jmp.ch,v 1.42 2000/03/20 02:55:50 hideyuki Exp $
++
++%
++% change file of mp.w for pMetaPost (CWEB version)
++% Akira Kakuto (translated the WEB version)
++%
++% rewrited for TeX Live 2011
++% Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
++
++ at x
++ at d default_banner "This is MetaPost, Version 1.504" /* printed when \MP\ starts */
++ at y
++ at d default_banner "This is pMetaPost, Version 1.504-0.04" /* printed when \MP\ starts */
++ at z
++
++ at x
++#define metapost_version "1.504"
++ at y
++#define metapost_version "1.504-0.04"
++ at z
++
++ at x
++# include <unistd.h> /* for access */
++#endif
++ at y
++# include <unistd.h> /* for access */
++#endif
++#include <ptexenc/ptexenc.h>
++#include <kpathsea/kpathsea.h>
++#include <errno.h>
++ at z
++
++ at x
++mp->buf_size = 200;
++ at y
++mp->buf_size = atoi(kpse_var_value("buf_size"));
++ at z
++
++ at x
++static boolean mp_input_ln (MP mp, void *f) {
++ /* inputs the next line or returns |false| */
++ char *s;
++ size_t size = 0;
++ mp->last = mp->first; /* cf.\ Matthew 19\thinspace:\thinspace30 */
++ s = (mp->read_ascii_file) (mp, f, &size);
++ if (s == NULL)
++ return false;
++ if (size > 0) {
++ mp->last = mp->first + size;
++ if (mp->last >= mp->max_buf_stack) {
++ mp->max_buf_stack = mp->last + 1;
++ while (mp->max_buf_stack > mp->buf_size) {
++ mp_reallocate_buffer (mp, (mp->buf_size + (mp->buf_size >> 2)));
++ }
++ }
++ (void) memcpy ((mp->buffer + mp->first), s, size);
++ }
++ free (s);
++ return true;
++}
++ at y
++static boolean mp_input_ln (MP mp, void *f ) {
++ int i = EOF;
++ mp->last = input_line2((FILE *)f, mp->buffer, mp->first, mp->buf_size, &i);
++ if (i == EOF && errno != EINTR && mp->last == mp->first)
++ return false;
++ if (i != EOF && i != '\n' && i != '\r') {
++ fprintf (stderr, "! Unable to read an entire line---bufsize=%u.\n",
++ (unsigned) mp->buf_size);
++ fputs ("Please increase buf_size in texmf.cnf.\n", stderr);
++ exit (1);
++ }
++ if (i == '\r') {
++ while ((i = fgetc (f)) == EOF && errno == EINTR)
++ ;
++ if (i != '\n')
++ ungetc (i, f);
++ }
++ return true;
++}
++ at z
++
++ at x
++wterm (mp->banner);
++ at y
++wterm (mp->banner);
++wterm(" (");
++wterm((char *)getencstring());
++wterm(")");
++ at z
++
++ at x
++} four_quarters;
++typedef union {
++ integer sc;
++ four_quarters qqqq;
++} font_data;
++ at y
++} four_quarters;
++typedef struct {
++ halfword RH, LH;
++} two_halves;
++typedef union {
++ two_halves hh;
++ integer sc;
++ four_quarters qqqq;
++} font_data;
++ at z
++
++%
++% tategaki support
++%
++% Suppose h==(0,height), d==(0,-depth) && w==(width,0) in horizontal string,
++% && h==(height,0), d==(-depth,0) && w==(0,-width) in vertical string.
++% Four vertices of the bounding box is h, d, h+w && d+w && those of the
++% transformed boundig box is Th, Td, T(h+w) && T(d+w), so that the values
++% of Th, Td && Tw are compared here.
++
++ at x
++@ The height width and depth information stored in a text node determines a
++rectangle that needs to be transformed according to the transformation
++parameters stored in the text node.
++
++@<Other cases for updating the bounding box...@>=
++case mp_text_node_type:
++x1 = mp_take_scaled (mp, txx_val (p), width_val (p));
++y0 = mp_take_scaled (mp, txy_val (p), -depth_val (p));
++y1 = mp_take_scaled (mp, txy_val (p), height_val (p));
++ at y
++@ The height width and depth information stored in a text node determines a
++rectangle that needs to be transformed according to the transformation
++parameters stored in the text node.
++
++Boundig box depends on JFM font ID.
++
++ at d yoko_jfm_id 11 /* `yoko-kumi' fonts */
++ at d tate_jfm_id 9 /* `tate-kumi' fonts */
++ at d font_jfm_p(A) (mp->font_id[(A)]!=0)
++
++@<Other cases for updating the bounding box...@>=
++case mp_text_node_type:
++ if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) {
++ x1 = mp_take_scaled(mp, txx_val(p), width_val(p));
++ y0 = mp_take_scaled(mp, txy_val(p), -depth_val(p));
++ y1 = mp_take_scaled(mp, txy_val(p), height_val(p));
++ } else {
++ x1 = mp_take_scaled(mp, txy_val(p), -width_val(p));
++ y0 = mp_take_scaled(mp, txx_val(p), -depth_val(p));
++ y1 = mp_take_scaled(mp, txx_val(p), height_val(p));
++ };
++ at z
++
++ at x
++x1 = mp_take_scaled (mp, tyx_val (p), width_val (p));
++y0 = mp_take_scaled (mp, tyy_val (p), -depth_val (p));
++y1 = mp_take_scaled (mp, tyy_val (p), height_val (p));
++ at y
++if ( mp->font_id[mp_font_n(p)]!=tate_jfm_id ) {
++ x1 = mp_take_scaled(mp, tyx_val(p), width_val(p));
++ y0 = mp_take_scaled(mp, tyy_val(p), -depth_val(p));
++ y1 = mp_take_scaled(mp, tyy_val(p),height_val(p));
++} else {
++ x1 = mp_take_scaled(mp, tyy_val(p), -width_val(p));
++ y0 = mp_take_scaled(mp, tyx_val(p), -depth_val(p));
++ y1 = mp_take_scaled(mp, tyx_val(p), height_val(p));
++};
++ at z
++
++ at x
++ wlog (mp->banner);
++ at y
++ wlog (mp->banner);
++ wlog (" (");
++ wlog ((char *)(getencstring()));
++ wlog (")");
++ at z
++
++%
++% char type pointers
++ at x
++eight_bits *font_bc;
++eight_bits *font_ec; /* first and last character code */
++ at y
++eight_bits *font_bc;
++eight_bits *font_ec; /* first and last character code */
++halfword *font_nt;
++halfword *font_id;
++ at z
++
++ at x
++int *char_base; /* base address for |char_info| */
++ at y
++int *char_base; /* base address for |char_info| */
++int *ctype_base;
++ at z
++
++ at x
++xfree (mp->char_base);
++ at y
++xfree (mp->font_id);
++xfree (mp->font_nt);
++xfree (mp->char_base);
++xfree (mp->ctype_base);
++ at z
++
++ at x
++ XREALLOC (mp->char_base, l, int);
++ at y
++ XREALLOC (mp->font_id, l, halfword);
++ XREALLOC (mp->font_nt, l, halfword);
++ XREALLOC (mp->char_base, l, int);
++ XREALLOC (mp->ctype_base, l, int);
++ at z
++
++
++ at x
++mp->char_base[null_font] = 0;
++ at y
++mp->font_id[null_font] = 0;
++mp->font_nt[null_font] = 0;
++mp->char_base[null_font] = 0;
++mp->ctype_base[null_font] = 0;
++ at z
++
++ at x
++ at d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq
++ at y
++ at d char_mp_info(A,B) mp->font_info[mp->char_base[(A)]+(B)].qqqq
++ at d ctype_char_end(A) (A)].hh.LH
++ at d ctype_char(A) mp->font_info[mp->ctype_base[(A)]+ctype_char_end
++ at d ctype_type_end(A) (A)].hh.RH
++ at d ctype_type(A) mp->font_info[mp->ctype_base[(A)]+ctype_type_end
++ at z
++
++%
++% lookup character type table
++ at x
++void mp_set_text_box (MP mp, mp_node p) {
++ at y
++@<Declare JFM function for text measuring@>;
++void mp_set_text_box (MP mp, mp_node p) {
++ at z
++
++ at x
++ if ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) {
++ mp_lost_warning (mp, f, *(mp_text_p (p)->str + k));
++ } else {
++ cc = char_mp_info (f, *(mp_text_p (p)->str + k));
++ at y
++ if ( ((*(mp_text_p (p)->str + k) < bc) || (*(mp_text_p (p)->str + k) > ec)) && (mp->font_id[f]==0) ) {
++ mp_lost_warning (mp, f, *(mp_text_p (p)->str + k));
++ } else { if (mp->font_id[f]==0) {
++ cc = char_mp_info (f, *(mp_text_p (p)->str + k));
++ } else {
++ cc=char_mp_info(f,mp_lookup_ctype(mp, f,fromBUFF(mp_text_p(p)->str,limit,k)));
++ k++; }
++ at z
++
++ at x
++@* Debugging.
++ at y
++@ @<Declare JFM function for text measuring@>=
++int mp_lookup_ctype (MP mp,font_number f, integer c)
++{
++ int l, u, r, ch;
++ l=0; u=mp->font_nt[f]-1;
++ while ( l<u ) {
++ r=(l+u)/2;
++ ch=ctype_char(f)(r);
++ if ( (ch==c) ) {
++ return ctype_type(f)(r);};
++ if ( (ch<c) ) l=r+1;
++ else u=r-1;
++ };
++ return 0;
++}
++@* Debugging.
++ at z
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/jmppsw.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/jmppsw.ch 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,76 @@
++%
++%
++% change file of psout.w for jMetaPost (CWEB version)
++% Akira Kakuto (translated the WEB version)
++%
++% rewrited for TeX Live 2011
++% Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
++%
++
++ at x
++#include "pmppsout.h" /* internal header */
++#include "pmpmath.h" /* internal header */
++ at y
++#include "pmppsout.h" /* internal header */
++#include "pmpmath.h" /* internal header */
++#include <ptexenc/ptexenc.h>
++ at z
++
++% Treat all Kanji fonts as used
++ at x
++ if ( mp->font_info[p].qqqq.b3==mp_used )
++ at y
++ if ( mp->font_info[p].qqqq.b3==mp_used || mp->font_id[f]!=0)
++ at z
++
++%
++% Kanji string output
++ at x
++static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues);
++ at y
++static void mp_print_initial_comment(MP mp,mp_edge_object *hh, int prologues);
++void mp_ps_kanji_string_out (MP mp, string s);
++
++#define Hi(x) (((x) >> 8) & 0xff)
++#define Lo(x) ((x) & 0xff)
++
++@ @c
++void mp_ps_kanji_string_out (MP mp, string s)
++{
++int i, len;
++int c;
++
++len = strlen(s);
++i=0;
++mp_ps_print(mp, "<");
++while (i<len)
++ { if ( mp->ps->ps_offset+5>mp->max_print_line ) mp_ps_print_ln(mp);
++ c=toDVI(fromBUFF(s, i+2, i));
++ i=i+2;
++ mp_hex_digit_out(mp, Hi(c) / 16);
++ mp_hex_digit_out(mp, Hi(c) % 16);
++ mp_hex_digit_out(mp, Lo(c) / 16);
++ mp_hex_digit_out(mp, Lo(c) % 16);
++ };
++mp_ps_print(mp, ">");
++};
++ at z
++
++ at x
++ mp_ps_print_nl(mp, "%%Creator: MetaPost ");
++ at y
++ mp_ps_print_nl(mp, "%%Creator: MetaPost (Japanese version) ");
++ at z
++
++%
++% Call Kanji string output routine if the font is JFM.
++ at x
++ mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p));
++ mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false);
++ at y
++ if (mp->font_id[gr_font_n(p)]!=0)
++ mp_ps_kanji_string_out(mp, gr_text_p(p));
++ else
++ mp_ps_string_out(mp, gr_text_p(p),gr_text_l(p));
++ mp_ps_name_out(mp, mp->font_name[gr_font_n(p)],false);
++ at z
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/pdvitomp.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/pdvitomp.ch 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,494 @@
++ at x
++#include "pmpxout.h"
++ at h
++ at y
++#include "pmpxout.h"
++#include <ptexenc/ptexenc.h>
++ at h
++ at z
++
++ at x
++ at d max_widths (256*max_fonts) /* maximum number of different characters among all fonts */
++ at y
++ at d max_widths 512000 /* maximum number of different characters among all fonts */
++ at z
++
++ at x
++ at d undefined_commands 250: case 251: case 252: case 253: case 254: case 255
++ at y
++ at d dir 255 /* p\TeX\ direction */
++ at d undefined_commands 250: case 251: case 252: case 253: case 254
++ at z
++
++ at x
++mpx_read_tfm_word(mpx); lh=mpx->b2*(int)(256)+mpx->b3;
++ at y
++mpx_read_tfm_word(mpx);
++@<Read the pTeX header data@>;@/
++lh=mpx->b2*(int)(256)+mpx->b3;
++ at z
++
++ at x
++ if ( mpx->b0<128 )
++ mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++ else
++ mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++ }
++ if ( k==5 ) {
++ if (mpx->mode == mpx_troff_mode) {
++ mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
++ }
++ }
++}
++ at y
++ if ( mpx->b0<128 )
++ mpx->tfm_check_sum=((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++ else
++ mpx->tfm_check_sum=(((mpx->b0-256)*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3;
++ }
++ if ( k==5 ) {
++ if (mpx->mode == mpx_troff_mode) {
++ mpx->font_design_size[f]=(((mpx->b0*(int)(256)+mpx->b1)*256+mpx->b2)*256+mpx->b3)/(65536.0*16);
++ }
++ }
++}
++@<Read JFM character type table@>;
++ at z
++
++ at x
++@<Width of character |c| in font |f|@>=
++floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c))
++
++@ @<Width of character |p| in font |cur_font|@>=
++floor(mpx->dvi_scale*mpx->font_scaled_size[cur_font]*char_width(cur_font,p))
++ at y
++@ @c @<Declare JFM character type table lookup routine@>@; /* p\TeX */
++integer mpx_scaled_char_width (MPX mpx,integer f,integer c)
++{
++ if (mpx->font_id[f]!=0) c=mpx_lookup_ctype(mpx, f,c);
++ return floor(mpx->dvi_scale*mpx->font_scaled_size[f]*char_width(f,c));
++}
++ at z
++
++ at x
++@ @c @<Declare a procedure called |finish_last_char|@>@;
++static void mpx_do_set_char (MPX mpx,web_integer f, web_integer c) {
++ if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) )
++ mpx_abort(mpx,"attempt to typeset invalid character %d",c);
++ at .attempt to typeset...@>
++ at y
++@ PDVItoMP: |do_set_char| is called with non-virtual font.
++In the case of non-virtual Kanji font, the width is looked up
++with the character type, and the character is printed by the
++function |set_kanji_char|.
++
++When the width written in the virtual font is same as
++the width of the substituted font, the next character can be
++written in the same string in output mpx file.
++In other words, the width of the character is calculated
++in |do_dvi_commands|. So even if the width is wrong here, the output PostScript file is not affected.
++
++@ @c @<Declare a procedure called |finish_last_char|@>@;
++void mpx_do_set_char (MPX mpx,integer f,integer c)
++{
++integer kkk;
++
++if (mpx->font_id[f]!=0) {
++ kkk=mpx_lookup_ctype(mpx, f,c);
++ if ( (kkk<mpx->font_bc[f]) || (kkk>mpx->font_ec[f]) )
++ mpx_abort(mpx,"attempt to typeset invalid character (JFM) %d",c);
++} else if ( (c<mpx->font_bc[f])||(c>mpx->font_ec[f]) ) {
++ mpx_abort(mpx,"attempt to typeset invalid character %d",c);
++}
++ at .attempt to typeset...@>
++ at z
++
++ at x
++ if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v)||
++ (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
++ at y
++ if ((mpx->h!=mpx->str_h2)||(mpx->v!=mpx->str_v2)||
++ (f!=mpx->str_f)||(mpx->dvi_scale!=mpx->str_scale) ) {
++ at z
++
++ at x
++ fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;@/
++ mpx->str_scale=mpx->dvi_scale; mpx->str_f=f;
++ mpx->str_v=mpx->v; mpx->str_h1=mpx->h;
++ at y
++ if ((mpx->d==0) || (mpx->font_id[f]==9)) {
++ fprintf(mpx->mpxfile,"_s("); mpx->print_col=3;}@/
++ else {
++ fprintf(mpx->mpxfile,"_sr("); mpx->print_col=4;}@/
++ mpx->str_scale=mpx->dvi_scale; mpx->str_f=f;
++ mpx->str_v1=mpx->v; mpx->str_h1=mpx->h;
++ at z
++
++ at x
++ mpx_print_char(mpx, (unsigned char)c);
++ mpx->str_h2=(web_integer)(mpx->h+@<Width of character |c| in font |f|@>);
++ at y
++ if (mpx->font_id[f]!=0)
++ mpx_print_kanji_char(mpx, c);
++ else
++ mpx_print_char(mpx, c);
++ if (mpx->d==0) {
++ mpx->str_h2=mpx->h+mpx_scaled_char_width(mpx, f, c);
++ mpx->str_v2=mpx->v;
++ } else {
++ mpx->str_h2=mpx->h;
++ mpx->str_v2=mpx->v+mpx_scaled_char_width(mpx, f, c);
++ }
++ at z
++
++ at x
++web_integer str_h1;
++web_integer str_v; /* starting position for current output string */
++web_integer str_h2; /* where the current output string ends */
++ at y
++integer str_h1;
++integer str_v1; /* starting position for current output string */
++integer str_h2;
++integer str_v2; /* where the current output string ends */
++ at z
++
++ at x
++ fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
++ fprintf(mpx->mpxfile,
++ " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
++ at y
++ fprintf(mpx->mpxfile,"vardef _s(expr _t,_f,_m,_x,_y)(text _c)=\n");
++ fprintf(mpx->mpxfile,
++ " addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef;\n");
++ fprintf(mpx->mpxfile,"vardef _sr(expr _t,_f,_m,_x,_y)=\n");
++ fprintf(mpx->mpxfile," addto _p also _t infont _f rotated -90");
++ fprintf(mpx->mpxfile," scaled _m shifted (_x,_y); enddef;\n");
++ at z
++
++ at x
++ x=mpx->conv*mpx->str_h1;
++ y=mpx->conv*(-mpx->str_v);
++ at y
++ x=mpx->conv*mpx->str_h1;
++ y=mpx->conv*(-mpx->str_v1);
++ at z
++
++ at x
++@<Handle a special rule that determines the box size@>=
++{
++ mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v;
++}
++ at y
++@<Handle a special rule that determines the box size@>=
++{ if (mpx->d==0) {
++ mpx->pic_wd=mpx->h; mpx->pic_dp=mpx->v; mpx->pic_ht=ht-mpx->v;
++ } else {
++ mpx->pic_wd=mpx->v; mpx->pic_dp=-mpx->h; mpx->pic_ht=ht+mpx->h;
++ }
++}
++ at z
++
++ at x
++ mpx->str_v=0;
++ mpx->str_h2=0;
++ mpx->str_scale=1.0; /* values don't matter */
++ at y
++ mpx->str_h2=0;
++ mpx->str_v2=0;
++ mpx->str_scale=1.0; /* values don't matter */
++ at z
++
++ at x
++dd=-mpx->pic_dp*mpx->conv;
++w=mpx->conv*mpx->pic_wd;
++h=mpx->conv*mpx->pic_ht;
++fprintf(mpx->mpxfile,
++ "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n"
++ " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",dd,w,dd,w,h,h)
++ at y
++if (mpx->d==0) {
++ dd=-mpx->pic_dp*mpx->conv;
++ w=mpx->conv*mpx->pic_wd;
++ h=mpx->conv*mpx->pic_ht;
++ fprintf(mpx->mpxfile,
++ "setbounds _p to (0,%1.4f)--(%1.4f,%1.4f)--\n",dd,w,dd);
++ fprintf(mpx->mpxfile,
++ " (%1.4f,%1.4f)--(0,%1.4f)--cycle;\n",w,h,h);
++} else {
++ dd=-mpx->pic_dp*mpx->conv;
++ w=-mpx->pic_wd*mpx->conv;
++ h=mpx->conv*mpx->pic_ht;
++ fprintf(mpx->mpxfile,
++ "setbounds _p to (%1.4f,0)--(%1.4f,%1.4f)--\n",h,h,w);
++ fprintf(mpx->mpxfile,
++ " (%1.4f,%1.4f)--(%1.4f,0)--cycle;\n", dd,w,dd);
++}
++ at z
++
++ at x
++web_integer w;web_integer x;web_integer y;web_integer z;
++ /* current state values (|h| and |v| have already been declared) */
++web_integer hstack[(stack_size+1)];
++web_integer vstack[(stack_size+1)];
++web_integer wstack[(stack_size+1)];
++web_integer xstack[(stack_size+1)];
++web_integer ystack[(stack_size+1)];
++web_integer zstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
++ at y
++integer w;integer x;integer y;integer z;integer d;
++ /* current state values (|h| and |v| have already been declared) */
++integer hstack[(stack_size+1)];
++integer vstack[(stack_size+1)];
++integer wstack[(stack_size+1)];
++integer xstack[(stack_size+1)];
++integer ystack[(stack_size+1)];
++integer zstack[(stack_size+1)];
++integer dstack[(stack_size+1)]; /* pushed down values in \.{DVI} units */
++ at z
++
++ at x
++mpx->h=0; mpx->v=0;
++ at y
++mpx->h=0; mpx->v=0; mpx->d=0;
++ at z
++
++ at x
++ mpx->hstack[mpx->stk_siz]=mpx->h;
++ mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
++ mpx->xstack[mpx->stk_siz]=mpx->x;
++ mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
++ at y
++ mpx->hstack[mpx->stk_siz]=mpx->h;
++ mpx->vstack[mpx->stk_siz]=mpx->v; mpx->wstack[mpx->stk_siz]=mpx->w;
++ mpx->xstack[mpx->stk_siz]=mpx->x;
++ mpx->ystack[mpx->stk_siz]=mpx->y; mpx->zstack[mpx->stk_siz]=mpx->z;
++ mpx->dstack[mpx->stk_siz]=mpx->d;
++ at z
++
++ at x
++ mpx->h=mpx->hstack[mpx->stk_siz];
++ mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
++ mpx->x=mpx->xstack[mpx->stk_siz];
++ mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
++ at y
++ mpx->h=mpx->hstack[mpx->stk_siz];
++ mpx->v=mpx->vstack[mpx->stk_siz]; mpx->w=mpx->wstack[mpx->stk_siz];
++ mpx->x=mpx->xstack[mpx->stk_siz];
++ mpx->y=mpx->ystack[mpx->stk_siz]; mpx->z=mpx->zstack[mpx->stk_siz];
++ mpx->d=mpx->dstack[mpx->stk_siz];
++ at z
++
++ at x
++ case z0: return mpx->z; break;
++ at y
++ case z0: return mpx->z; break;
++ case dir: return mpx_get_byte(mpx); break;
++ at z
++
++ at x
++ mpx->h += @<Width of character |p| in font |cur_font|@>;
++ at y
++ if (mpx->d==0) {
++ mpx->h+=mpx_scaled_char_width(mpx, cur_font, p);
++ } else {
++ mpx->v+=mpx_scaled_char_width(mpx, cur_font, p);
++ }
++ at z
++
++ at x
++ mpx->h += q;
++ at y
++ if (mpx->d==0) {
++ mpx->h += q;
++ } else {
++ mpx->v += q;
++ }
++ at z
++
++ at x
++case pop:
++ mpx_do_pop(mpx);
++ break;
++ at y
++case pop:
++ mpx_do_pop(mpx);
++ break;
++case dir:
++ mpx->d=p;
++ break;
++ at z
++
++ at x
++case four_cases(right1):
++ mpx->h += trunc(p*mpx->dvi_scale);
++ break;
++case w0: case four_cases(w1):
++ mpx->w = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->w;
++ break;
++case x0: case four_cases(x1):
++ mpx->x = (web_integer)trunc(p*mpx->dvi_scale); mpx->h += mpx->x;
++ break;
++case four_cases(down1):
++ mpx->v += trunc(p*mpx->dvi_scale);
++ break;
++case y0: case four_cases(y1):
++ mpx->y = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->y;
++ break;
++case z0: case four_cases(z1):
++ mpx->z = (web_integer)trunc(p*mpx->dvi_scale); mpx->v += mpx->z;
++ break;
++ at y
++case four_cases(right1):
++ if (mpx->d==0) {
++ mpx->h+=trunc(p*mpx->dvi_scale);
++ } else {
++ mpx->v+=trunc(p*mpx->dvi_scale);
++ }
++ break;
++case w0: case four_cases(w1):
++ if (mpx->d==0) {
++ mpx->h+=mpx->w;
++ } else {
++ mpx->v+=mpx->w;
++ }
++ break;
++case x0: case four_cases(x1):
++ if (mpx->d==0) {
++ mpx->h+=mpx->x;
++ } else {
++ mpx->v+=mpx->x;
++ }
++ break;
++case four_cases(down1):
++ if (mpx->d==0) {
++ mpx->v+=trunc(p*mpx->dvi_scale);
++ } else {
++ mpx->h-=trunc(p*mpx->dvi_scale);
++ }
++ break;
++case y0: case four_cases(y1):
++ if (mpx->d==0) {
++ mpx->v+=mpx->y;
++ } else {
++ mpx->h-=mpx->y;
++ }
++ break;
++case z0: case four_cases(z1):
++ if (mpx->d==0) {
++ mpx->v+=mpx->z;
++ } else {
++ mpx->h-=mpx->z;
++ }
++ break;
++ at z
++
++ at x
++@<Check if mp file is newer than mpxfile, exit if not@>=
++if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
++ return 0
++ at y
++@<Check if mp file is newer than mpxfile, exit if not@>=
++if (mpx_newer(mpxopt->mpname, mpxopt->mpxname))
++ return 0
++
++@ ASCII p\TeX JFM ID
++ at d yoko_jfm_id 11 /* for `yoko-kumi' fonts */
++ at d tate_jfm_id 9 /* for `tate-kumi' fonts */
++ at d font_jfm_p(A) (mpx->font_id[(A)]!=0)
++
++@ @<Global...@>=
++integer font_nt[max_fonts+1]; /* number of words in ctype table */
++integer font_id[max_fonts+1];
++integer jfm_char_code[max_widths+1];
++integer jfm_char_type[max_widths+1];
++integer jfm_char_index[max_fonts+1];
++integer next_jfm_char_index;
++
++@ @<Set init...@>=
++mpx->font_nt[0]=0;
++mpx->font_id[0]=0;
++mpx->jfm_char_type[0]=0;
++mpx->next_jfm_char_index=0;
++
++@ JFM character type table is stored in the array |jfm_char_code| and
++|jfm_char_type|. The character code and the character type of $i$-th
++record is stored in |jfm_char_code[i]| and |jfm_char_type[i]|, respectively.
++The table is in the order of character code.
++
++@<Read the pTeX header data@>=
++mpx->font_id[f]=mpx->b0*(int)(256)+mpx->b1;
++if ((mpx->font_id[f]==yoko_jfm_id) || (mpx->font_id[f]==tate_jfm_id)) {
++ mpx->font_nt[f]=mpx->b2*(int)(256)+mpx->b3;
++ mpx_read_tfm_word(mpx);
++} else {
++ mpx->font_id[f]=0;
++ mpx->font_nt[f]=0;
++}
++
++@ @<Read JFM character type table@>=
++mpx->jfm_char_index[f]=mpx->next_jfm_char_index;
++k=mpx->jfm_char_index[f];
++mpx->next_jfm_char_index+=mpx->font_nt[f];
++while (k<mpx->next_jfm_char_index) {
++ mpx_read_tfm_word(mpx);
++ mpx->jfm_char_code[k]=mpx->b0*(int)(256)+mpx->b1;
++ mpx->jfm_char_type[k]=mpx->b2*(int)(256)+mpx->b3;
++ k++;
++}
++
++@ JFM character type table is looked up by binary search.
++
++@<Declare JFM character type table lookup routine@>=
++integer mpx_lookup_ctype (MPX mpx,integer f, integer c)
++{
++ integer l, u, r, ch;
++ l=0; u=mpx->font_nt[f]-1;
++ while (l<u) {
++ r=(l+u)/2;
++ ch=mpx->jfm_char_code[mpx->jfm_char_index[f]+r];
++ if (ch==c) {
++ return mpx->jfm_char_type[mpx->jfm_char_index[f]+r];
++ }
++ if (ch<c)
++ l=r+1;
++ else
++ u=r-1;
++ }
++ return 0;
++}
++
++@ Every Kanji characters are supposed to be printable here,
++so that the state always results in normal at the end of the procedure.
++Kanji characters need to be converted into output Kanji encoding
++from DVI(JIS).
++
++ at d Hi(x) (((x)>> 8) & 0xff)
++ at d Lo(x) ( (x) & 0xff)
++
++@<Declare subroutines for printing strings@>=
++void mpx_print_kanji_char (MPX mpx,integer c)
++{
++ if (mpx->print_col+2>line_length-2 ) {
++ if (mpx->state==normal) {
++ fprintf(mpx->mpxfile, "\"");
++ mpx->state=special;
++ }
++ fprintf(mpx->mpxfile, " \n");
++ mpx->print_col=0;
++ }
++ if (mpx->state==special) {
++ fprintf(mpx->mpxfile,"&");
++ mpx->print_col++;
++ }
++ if (mpx->state!=normal) {
++ fprintf(mpx->mpxfile, "\"");
++ mpx->print_col++;
++ mpx->state=normal;
++ }
++ c=toBUFF(fromDVI(c));
++ putc2(Hi(c), mpx->mpxfile);
++ mpx->print_col++;
++ putc2(Lo(c), mpx->mpxfile);
++ mpx->print_col++;
++}
++ at z
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/pmpost.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/pmpost.ch 2012-04-27 11:37:53.850649466 +0900
+@@ -0,0 +1,233 @@
++ at x
++#include <pmpxout.h>
++ at y
++#include <pmpxout.h>
++#include <ptexenc/ptexenc.h>
++char kanjioption[16];
++ at z
++
++ at x
++ at d TEX "tex"
++ at y
++ at d TEX "ptex"
++ at z
++
++ at x
++#define MPXCOMMAND "makempx"
++ at y
++#define MPXCOMMAND "pmakempx"
++ at z
++
++ at x
++ if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) {
++ if (mp_troff_mode(mp)!=0)
++ cmd = concatn (cnf_cmd, " -troff ",
++ qmpname, " ", qmpxname, NULL);
++ else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0')
++ cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ",
++ qmpname, " ", qmpxname, NULL);
++ at y
++ if (cnf_cmd!=NULL && (strcmp (cnf_cmd, "1")!=0)) {
++ if (kanjioption[0])
++ cnf_cmd = concatn (cnf_cmd, " --kanji=", kanjioption, NULL);
++ if (mp_troff_mode(mp)!=0)
++ cmd = concatn (cnf_cmd, " -troff ",
++ qmpname, " ", qmpxname, NULL);
++ else if (mpost_tex_program!=NULL && *mpost_tex_program != '\0')
++ cmd = concatn (cnf_cmd, " -tex=", mpost_tex_program, " ",
++ qmpname, " ", qmpxname, NULL);
++ at z
++
++ at x
++ mpxopt = mpost_xmalloc(sizeof(mpx_options));
++ if (mpost_tex_program != NULL && *mpost_tex_program != '\0') {
++ at y
++ mpxopt = mpost_xmalloc(sizeof(mpx_options));
++ if (mpost_tex_program != NULL && *mpost_tex_program != '\0') {
++ if (kanjioption[0]) {
++ maincmd = (char *)mpost_xmalloc (strlen(mpost_tex_program) +
++ strlen(kanjioption) + 15);
++ strcpy(maincmd, mpost_tex_program);
++ strcat(maincmd, " --kanji=");
++ strcat(maincmd, kanjioption);
++ } else
++ at z
++
++ at x
++ if (s==NULL) s = mpost_xstrdup (TEX);
++ at y
++ if (s==NULL) s = mpost_xstrdup (TEX);
++ if (kanjioption[0])
++ maincmd = (char *)mpost_xmalloc (strlen(s)+strlen(default_args)+
++ strlen(kanjioption)+13);
++ else
++ at z
++
++ at x
++ strcat(maincmd,default_args);
++ at y
++ if (kanjioption[0]) {
++ strcat(maincmd, " --kanji=");
++ strcat(maincmd, kanjioption);
++ }
++ strcat(maincmd,default_args);
++ at z
++
++ at x
++ const char *banner = "% Written by metapost version ";
++ at y
++ const char *banner = "% Written by pmetapost version ";
++ at z
++
++ at x
++ const char *banner = "% Written by dvitomp version ";
++ at y
++ const char *banner = "% Written by pdvitomp version ";
++ at z
++
++ at x
++ { "kpathsea-debug", 1, 0, 0 },
++ at y
++ { "kpathsea-debug", 1, 0, 0 },
++ { "kanji", 1, 0, 0 },
++ at z
++
++ at x
++ if (user_progname == NULL)
++ user_progname = optarg;
++ }
++ at y
++ if (user_progname == NULL)
++ user_progname = optarg;
++ }
++ } else if (ARGUMENT_IS ("kanji")) {
++ strcpy(kanjioption, optarg);
++ if(!set_enc_string(optarg, optarg)) {
++ fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
++ }
++ at z
++
++ at x
++ { "no-kpathsea", 0, &nokpse, 1 },
++ at y
++ { "no-kpathsea", 0, &nokpse, 1 },
++ { "kanji", 1, 0, 0 },
++ at z
++
++ at x
++ user_progname = optarg;
++ at y
++ user_progname = optarg;
++ } else if (option_is ("kanji")) {
++ strcpy (kanjioption, optarg);
++ if(!set_enc_string(optarg, optarg)) {
++ fprintf(stderr,"Ignoring unknown argument `%s' to --kanji", optarg);
++ }
++ at z
++
++ at x
++if (dvitomp_only)
++ fprintf(stdout, "This is dvitomp %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "This is MetaPost %s (TeX Live 2012)\n", s);
++ at y
++if (dvitomp_only)
++ fprintf(stdout, "This is pdvitomp %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "This is pMetaPost %s (TeX Live 2012)\n", s);
++ at z
++
++ at x
++"Usage: mpost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n"
++" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++ at y
++"Usage: pmetapost [OPTION] [&MEMNAME] [MPNAME[.mp]] [COMMANDS]\n"
++" pmetapost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++ at z
++
++ at x
++" Run MetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n"
++ at y
++" Run pMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps\n"
++ at z
++
++ at x
++" With a --dvitomp argument, MetaPost acts as DVI-to-MPX converter only.\n"
++" Call MetaPost with --dvitomp --help for option explanations.\n\n");
++ at y
++" With a --dvitomp argument, pMetaPost acts as DVI-to-MPX converter only.\n"
++" Call pMetaPost with --dvitomp --help for option explanations.\n\n");
++ at z
++
++ at x
++" -jobname=STRING set the job name to STRING\n"
++ at y
++" -jobname=STRING set the job name to STRING\n"
++" -kanji=STRING set the Japanese encoding to STRING\n"
++ at z
++
++ at x
++if (dvitomp_only)
++ fprintf(stdout, "This is dvitomp %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "This is MetaPost %s (TeX Live 2012)\n", s);
++ at y
++if (dvitomp_only)
++ fprintf(stdout, "This is pdvitomp %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "This is pMetaPost %s (TeX Live 2012)\n", s);
++ at z
++
++ at x
++"Usage: dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++" mpost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++ at y
++"Usage: pdvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++" pmetapost --dvitomp DVINAME[.dvi] [MPXNAME[.mpx]]\n"
++ at z
++
++ at x
++" -progname=STRING set program name to STRING\n"
++ at y
++" -progname=STRING set program name to STRING\n"
++" -kanji=STRING set kanji encoding (sjis, jis, euc, utf8)\n"
++ at z
++
++ at x
++if (dvitomp_only)
++ fprintf(stdout, "dvitomp (MetaPost) %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "MetaPost %s (TeX Live 2012)\n", s);
++ at y
++if (dvitomp_only)
++ fprintf(stdout, "pdvitomp (pMetaPost) %s (TeX Live 2012)\n", s);
++else
++ fprintf(stdout, "pMetaPost %s (TeX Live 2012)\n", s);
++ at z
++
++ at x
++"Author of the CWEB MetaPost: Taco Hoekwater.\n"
++ at y
++"Author of the CWEB MetaPost: Taco Hoekwater.\n"
++"Authors of pMetaPost: Michio Matsuyama, Hideyuki Suzuki.\n"
++ at z
++
++ at x
++ const char * banner = "This is MetaPost, version ";
++ at y
++ const char * banner = "This is pMetaPost, version ";
++ at z
++
++ at x
++ if (!strcmp(base, "dvitomp") || !strcasecmp(base, "dvitomp.exe"))
++ at y
++ kanjioption[0] = '\0';
++ set_enc_string(NULL, "default");
++ if (!strcmp(base, "pdvitomp") || !strcasecmp(base, "pdvitomp.exe"))
++ at z
++
++ at x
++ if(putenv(xstrdup("engine=metapost")))
++ at y
++ if(putenv(xstrdup("engine=pmetapost")))
++ at z
diff --git a/debian/patches/pmpost-svg-20120119-tl11.diff b/debian/patches/pmpost-svg-20120119-tl11.diff
new file mode 100644
index 0000000..06abdf8
--- /dev/null
+++ b/debian/patches/pmpost-svg-20120119-tl11.diff
@@ -0,0 +1,93 @@
+---
+ texk/web2c/pmplibdir/am/pmpost.am | 4 +-
+ texk/web2c/pmplibdir/psvgout.ch | 66 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 68 insertions(+), 2 deletions(-)
+
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/am/pmpost.am
+===================================================================
+--- texlive-bin-2011.20120427.orig/texk/web2c/pmplibdir/am/pmpost.am 2012-04-27 11:37:53.850649466 +0900
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/am/pmpost.am 2012-04-27 11:39:09.086958336 +0900
+@@ -55,10 +55,10 @@
+ @$(pmp_ctangle_sh) pmpxout pdvitomp.ch
+
+ $(psvgout_c_h): psvgout-tangle
+- @$(pmp_ctangle_sh) psvgout
++ @$(pmp_ctangle_sh) psvgout.w psvgout.ch
+ psvgout-tangle: ctangle$(EXEEXT) mplibdir/svgout.w tangle-sh
+ cat $(srcdir)/mplibdir/svgout.w | sed $(pmp_sed) > psvgout.w
+- @$(pmp_ctangle_sh) psvgout
++ @$(pmp_ctangle_sh) psvgout.w psvgout.ch
+ $(pmpmath_c_h): pmpmath-tangle
+ @$(pmp_ctangle_sh) pmpmath
+ pmpmath-tangle: ctangle$(EXEEXT) mplibdir/mpmath.w tangle-sh
+Index: texlive-bin-2011.20120427/texk/web2c/pmplibdir/psvgout.ch
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ texlive-bin-2011.20120427/texk/web2c/pmplibdir/psvgout.ch 2012-04-27 11:39:09.086958336 +0900
+@@ -0,0 +1,66 @@
++ at x
++#include <stdio.h>
++ at y
++#include <ptexenc/ptexenc.h>
++#include <stdio.h>
++ at z
++
++ at x
++@<Character |k| is not allowed in SVG output@>=
++ (k=='&')||(k=='>')||(k=='<')
++ at y
++@<Character |k| is not allowed in SVG output@>=
++ (k=='&')||(k=='>')||(k=='<')||(k>=0x7F)
++ at z
++
++ at x
++@ Now for outputting the actual graphic objects.
++ at y
++@ Now for outputting the actual graphic objects.
++
++ at d yoko_jfm_id 11 /* `yoko-kumi' fonts */
++ at d tate_jfm_id 9 /* `tate-kumi' fonts */
++ at d font_jfm_p(A) (mp->font_id[(A)]!=0)
++ at z
++ at x Even if prologues=3, Japanese texts are not converted into paths.
++ if (prologues == 3 ) {
++ at y
++ if (prologues == 3 && mp->font_id[gr_font_n(p)]==0) {
++ at z
++
++ at x To realise vertical Japanese texts ...
++ mp_svg_attribute(mp, "font-size", mp->svg->buf);
++ at y
++ mp_svg_attribute(mp, "font-size", mp->svg->buf);
++ if ( mp->font_id[gr_font_n(p)]==tate_jfm_id ) {
++ mp_svg_reset_buf(mp);
++ append_string("tb-rl");
++ mp_svg_attribute(mp, "writing-mode", mp->svg->buf);
++ }
++ at z
++
++ at x
++ while (l-->0) {
++ k=(int)*s++;
++ if (@<Character |k| is illegal in SVG output@>) {
++ at y
++ if ( mp->font_id[gr_font_n(p)]!=0 ) {
++ l >>= 1;
++ while (l-->0) {
++ k =((int)*s++)*0x100; k += (int)*s++;
++ fprintf(stderr, "\n>>> %d\n", k);
++ append_string("&#");
++ mp_svg_store_int(mp,toUCS(k));
++ append_char(';');
++ }
++ } else
++ while (l-->0) {
++ k=(int)*s++;
++ if (@<Character |k| is illegal in SVG output@>) {
++ at z
++
++ at x
++ mp_svg_print(mp, "<?xml version=\"1.0\"?>");
++ at y
++ mp_svg_print(mp, "<?xml version=\"1.0\" encoding=\"utf-8\"?>");
++ at z
diff --git a/debian/patches/series b/debian/patches/series
index 28894bc..a84f295 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -44,3 +44,5 @@ build-wovp2ovf
61_path_max.diff
#dvipdfmx-config-i-directive
#xdvipdfmx-config-i-directive
+pmpost-20120415-tl11.diff
+pmpost-svg-20120119-tl11.diff
diff --git a/debian/patches/set-e-in-various-scripts b/debian/patches/set-e-in-various-scripts
index 14249f2..ce3d354 100644
--- a/debian/patches/set-e-in-various-scripts
+++ b/debian/patches/set-e-in-various-scripts
@@ -4,10 +4,10 @@ set -e in mktexlsr, updmap, fmtutil
texk/tetex/texconfig | 41 ++++++++++++++++++++++-------------------
2 files changed, 27 insertions(+), 21 deletions(-)
-Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
+Index: texlive-bin-2011.20120427/texk/tetex/fmtutil
===================================================================
---- texlive-bin-2011.20120216.orig/texk/tetex/fmtutil 2012-02-17 10:42:59.000000000 +0900
-+++ texlive-bin-2011.20120216/texk/tetex/fmtutil 2012-02-17 10:49:15.999076162 +0900
+--- texlive-bin-2011.20120427.orig/texk/tetex/fmtutil 2012-04-27 11:31:48.051066459 +0900
++++ texlive-bin-2011.20120427/texk/tetex/fmtutil 2012-04-27 11:34:16.014949167 +0900
@@ -3,6 +3,9 @@
# Public domain. Originally written by Thomas Esser.
# Run with --help for usage.
@@ -18,7 +18,7 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
# program history:
# further changes in texk/tetex/ChangeLog.
# 2007-01-04 patch by JK to support $engine subdir (enabled by default)
-@@ -522,8 +525,8 @@
+@@ -523,8 +526,8 @@
if test -n "$cfgmaint"; then
if test -z "$cfgparam"; then
setupTmpDir
@@ -29,10 +29,10 @@ Index: texlive-bin-2011.20120216/texk/tetex/fmtutil
set x $co; shift
id=$1; cnf_file=$3; orig=$4
verboseMsg "$progname: initial config file is \`$orig'"
-Index: texlive-bin-2011.20120216/texk/tetex/texconfig
+Index: texlive-bin-2011.20120427/texk/tetex/texconfig
===================================================================
---- texlive-bin-2011.20120216.orig/texk/tetex/texconfig 2012-02-17 10:48:08.000000000 +0900
-+++ texlive-bin-2011.20120216/texk/tetex/texconfig 2012-02-17 10:49:15.999076162 +0900
+--- texlive-bin-2011.20120427.orig/texk/tetex/texconfig 2012-04-27 11:34:15.194950064 +0900
++++ texlive-bin-2011.20120427/texk/tetex/texconfig 2012-04-27 11:34:16.018949164 +0900
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
diff --git a/debian/pmakempx b/debian/pmakempx
new file mode 100755
index 0000000..478cedc
--- /dev/null
+++ b/debian/pmakempx
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# pmakempx - set default environment variables suitable for jMetaPost and
+# invoke makempx.
+#
+# $Id: pmakempx,v 1.3 1999/11/10 03:57:35 hideyuki Exp $
+
+: ${DVITOMP=pdvitomp}
+: ${TEX=ptex}
+
+export DVITOMP
+export TEX
+
+exec makempx "$@"
diff --git a/debian/rules b/debian/rules
index d4bfa3d..f71480f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -61,6 +61,8 @@ override_dh_install:
# copy updmap-sys over
rm debian/texlive-binaries/usr/bin/updmap-sys
cp debian/texlive-binaries/usr/share/texlive/texmf/scripts/tetex/updmap-sys.sh debian/texlive-binaries/usr/bin/updmap-sys
+ # install pmakempx
+ cp debian/pmakempx debian/texlive-binaries/usr/bin/
# remove texlive directories, they should not be shipped here
rm -rf debian/texlive-binaries/usr/share/texlive
#rm -rf debian/texlive-binaries/usr/share/info
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/texlive-bin.git
More information about the Reproducible-commits
mailing list