--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.dirs
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.dirs
@@ -0,0 +1,5 @@
+usr/bin
+usr/share/texmf/web2c
+etc/texmf/texmf.d
+etc/texmf/fmt.d
+
--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.docs
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.docs
@@ -0,0 +1,3 @@
+debian/changelog.old
+debian/copyright.ja
+
--- ptex-bin-3.1.11+0.04b.orig/debian/rules
+++ ptex-bin-3.1.11+0.04b/debian/rules
@@ -0,0 +1,198 @@
+#!/usr/bin/make -f
+# debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+# Modified by Masayuki Hatta <mhatta@debian.org> for ptex-bin package.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+####################
+# Things you should change when new upstream version is available.
+
+# Minimal teTeX source tarball.
+# You should install ptex-buildsupport package beforehand.
+TETEX_SRC_TARBALL=/usr/src/tetex-src-3.0-stripped.tar.gz
+
+# teTeX source directory.
+TETEX_SRC_DIR=tetex-src-3.0
+
+# pTeX source tarball.
+PTEX_SRC_TARBALL=ptex-src-3.1.11.tar.gz
+
+# pTeX source directory.
+PTEX_SRC_DIR=ptex-src-3.1.11
+
+# Japanized MetaPost tarball.
+JMPOST_SRC_TARBALL=jmpost-0.04b.tar.gz
+
+# Japanized MetaPost source directory.
+JMPOST_SRC_DIR=jmpost-0.04b
+
+####################
+
+DEB_HOST_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+CFLAGS := -g
+ifeq (hppa-linux-gnu,$(DEB_HOST_GNU_TYPE))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Unpack tarballs.
+	tar xfz $(TETEX_SRC_TARBALL)
+	mkdir $(TETEX_SRC_DIR)/texk/kpathsea_tetex
+	mv $(TETEX_SRC_DIR)/texk/kpathsea/c-proto.h $(TETEX_SRC_DIR)/texk/kpathsea_tetex/
+	rm -rf $(TETEX_SRC_DIR)/texk/kpathsea
+	ln -s /usr/include/kpathsea $(TETEX_SRC_DIR)/texk/kpathsea
+	tar xfz $(PTEX_SRC_TARBALL) -C $(TETEX_SRC_DIR)/texk/web2c
+	tar xfz $(JMPOST_SRC_TARBALL) -C $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)
+
+	# Apply patches to teTeX source
+	for f in debian/patches/teTeX/*.patch; do \
+		patch -p0 -d $(TETEX_SRC_DIR) < $$f; \
+	done
+
+	# Apply patches to pTeX source (should be named as *.patch)
+	# Put patches in debian/patches.
+	(for f in debian/patches/*.patch ; do \
+	  patch -p0 -d $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR) < $$f ; \
+	done)
+
+	# Apply patches to Japanized MetaPost source (should be named as *.patch)
+	# Put patches in debian/patches/jmpost.
+	(for f in debian/patches/jmpost/*.patch ; do \
+	  patch -p0 -d $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/$(JMPOST_SRC_DIR) < $$f ; \
+	done)
+
+	# Copy texmf.cnf from your system.
+	cp /usr/share/texmf/web2c/texmf.cnf \
+	  $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/texmf.cnf.orig
+
+	# Add here commands to configure the package.
+	# Arguments for configure are identical to tetex-bin package
+	# For kpathsea
+	#(cd $(TETEX_SRC_DIR)/texk/kpathsea && \
+	#./configure --prefix=/usr --without-dialog --without-texinfo \
+	#	    --with-system-ncurses --with-x --with-system-zlib \
+	#	    --with-system-pnglib --disable-multiplatform \
+	#	    --enable-shared)
+	# For web2c
+	(cd $(TETEX_SRC_DIR)/texk/web2c && \
+	CFLAGS="$(CFLAGS)" \
+	./configure --prefix=/usr --without-dialog --without-texinfo \
+		      --with-system-ncurses --with-x --with-system-zlib \
+		      --with-system-pnglib --disable-multiplatform \
+		      --enable-shared)		      
+	# For pTeX
+	(cd $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR) && \
+	  ./configure EUC)
+
+	touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+	dh_testdir
+
+	# Add here commands to compile the package.
+	# Build pTeX.
+	(cd $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR) && \
+	  make programs XCPPFLAGS="-DHAVE_PROTOTYPES=1 -include $(CURDIR)/$(TETEX_SRC_DIR)/texk/kpathsea_tetex/c-proto.h")
+
+	# Configure & build Japanized MetaPost.
+	(cd $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/$(JMPOST_SRC_DIR) && \
+	  chmod 755 ./configure && ./configure && make XCPPFLAGS="-DHAVE_PROTOTYPES=1 -include $(CURDIR)/$(TETEX_SRC_DIR)/texk/kpathsea_tetex/c-proto.h")
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	# Remove teTeX source directory.
+	rm -rf $(TETEX_SRC_DIR)
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/ptex-bin.
+	(cd $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR) && \
+	  $(MAKE) install-exec prefix=$(CURDIR)/debian/ptex-bin/usr \
+	                  texmf=$(CURDIR)/debian/ptex-bin/usr/share/texmf)
+	install -m 644 $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/ptex.pool \
+		$(CURDIR)/debian/ptex-bin/usr/share/texmf/web2c
+	(cd $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/$(JMPOST_SRC_DIR) && \
+	  $(MAKE) install prefix=$(CURDIR)/debian/ptex-bin/usr \
+	                  texmf=$(CURDIR)/debian/ptex-bin/usr/share/texmf)
+
+	# Move jmpost -> jmpost.bin.
+	mv $(CURDIR)/debian/ptex-bin/usr/bin/jmpost \
+	   $(CURDIR)/debian/ptex-bin/usr/bin/jmpost.bin
+
+	# Install jmpost-wrapper as jmpost.
+	install -m 755 $(CURDIR)/debian/jmpost-wrapper $(CURDIR)/debian/ptex-bin/usr/bin/jmpost
+
+	# Remove unnecessary files and directories.
+	rm -f $(CURDIR)/debian/ptex-bin/usr/share/texmf/web2c/texmf.cnf
+	rm -rf $(CURDIR)/debian/ptex-bin/usr/share/texmf/fontname
+
+	# Separate jmpost & jbibtex-bin.
+	dh_movefiles --source=debian/ptex-bin
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf	
+	dh_installdocs
+#	dh_installexamples
+#	dh_installmenu
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+	dh_installman -pptex-bin debian/manpages/pltotf.1 \
+	                         debian/manpages/tftopl.1 \
+				 debian/manpages/pdvitype.1 \
+				 debian/manpages/platex.1 \
+				 debian/manpages/ptex.1 \
+				 debian/manpages/virptex.1
+	dh_installman -pjbibtex-bin debian/manpages/jbibtex.1
+	dh_installman -pjmpost debian/manpages/jmpost.1 \
+	                       debian/manpages/jmpost.bin.1 \
+	                       debian/manpages/pdvitomp.1 \
+	                       debian/manpages/virjmpost.1 \
+	                       debian/manpages/inijmpost.1
+#	dh_installinfo
+	dh_installchangelogs \
+	  $(TETEX_SRC_DIR)/texk/web2c/$(PTEX_SRC_DIR)/Changes.txt
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_makeshlibs
+	dh_installdeb
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.preinst
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.preinst
@@ -0,0 +1,48 @@
+#! /bin/sh
+# preinst script for jbibtex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# For details see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/ptex-bin.pid  \
+#                --exec /usr/sbin/ptex-bin 2>/dev/null || true
+#        fi
+
+    # Remove leftovers
+    rm -f /etc/texmf/texmf.d/60JBibTeX	      
+    rm -f /etc/texmf/texmf.d/60Jbibtex
+
+    ;;
+
+    abort-upgrade)
+
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost.copyright
+++ ptex-bin-3.1.11+0.04b/debian/jmpost.copyright
@@ -0,0 +1,22 @@
+This package was debianized by Masayuki Hatta <mhatta@debian.org> on
+Tue,  27 Aug 2001 23:36:56 +0900.
+
+It was downloaded from http://www.fsci.fuk.kindai.ac.jp/aftp/pub/ptex/utils/
+
+Upstream Authors: Hideyuki Suzuki <hideyuki@sat.t.u-tokyo.ac.jp> 
+                  Michio Matsuyama <fwhw5892@mb.infoweb.ne.jp>
+
+Copyright:
+
+ Copyright 1990 - 1995 by AT&T Bell Laboratories
+ Copyright 1998 - 2001 by Hideyuki Suzuki, Michio Matsuyama
+
+ Permission to use, copy, modify, and distribute this software
+ and its documentation for any purpose and without fee is hereby
+ granted, provided that the above copyright notice appear in all
+ copies and that both that the copyright notice and this
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the names of AT&T Bell Laboratories or
+ any of its entities not be used in advertising or publicity
+ pertaining to distribution of the software without specific,
+ written prior permission.
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost-wrapper
+++ ptex-bin-3.1.11+0.04b/debian/jmpost-wrapper
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# jmpost - set default environment variables suitable for jMetaPost and
+#            invoke jmpost.bin.
+#
+: ${DVITOMP=pdvitomp}
+: ${TEX=platex}
+
+export DVITOMP
+export TEX
+
+exec jmpost.bin -mem=jmpost "$@"
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.README.Debian
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.README.Debian
@@ -0,0 +1,6 @@
+jbibtex-bin for Debian
+-------------------
+
+o Most of documentation are placed in /usr/share/texmf/doc/jbibtex/.
+    
+ -- Masayuki Hatta <mhatta@debian.org>, Tue,  3 Apr 2001 22:25:18 +0900
--- ptex-bin-3.1.11+0.04b.orig/debian/README.Debian
+++ ptex-bin-3.1.11+0.04b/debian/README.Debian
@@ -0,0 +1,6 @@
+ptex-bin for Debian
+-------------------
+
+o Most of documentation are placed in /usr/share/doc/texmf/ptex/.
+
+ -- Masayuki Hatta <mhatta@debian.org>, Tue,  3 Apr 2001 22:25:18 +0900
--- ptex-bin-3.1.11+0.04b.orig/debian/watch
+++ ptex-bin-3.1.11+0.04b/debian/watch
@@ -0,0 +1,5 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site		Directory		Pattern			Version	Script
+ftp://ftp.ascii.co.jp	/pub/TeX/ascii-ptex/tetex	ptex-src-(.*)\.tar\.gz	debian	uupdate
--- ptex-bin-3.1.11+0.04b.orig/debian/copyright
+++ ptex-bin-3.1.11+0.04b/debian/copyright
@@ -0,0 +1,34 @@
+This package was debianized by Masayuki Hatta <mhatta@debian.org> on
+Tue,  3 Apr 2001 22:25:18 +0900.
+
+It was downloaded from ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/tetex/
+
+Upstream Author: ASCII Corp. <www-ptex@ascii.co.jp>
+
+Copyright:
+
+Copyright (C) 1987, 1995 ASCII Corporation.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the author may be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- ptex-bin-3.1.11+0.04b.orig/debian/compat
+++ ptex-bin-3.1.11+0.04b/debian/compat
@@ -0,0 +1 @@
+4
--- ptex-bin-3.1.11+0.04b.orig/debian/changelog
+++ ptex-bin-3.1.11+0.04b/debian/changelog
@@ -0,0 +1,369 @@
+ptex-bin (3.1.11+0.04b-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream release.  Only replaced ptex-src-3.1.10.tar.gz with
+    ptex-src-3.1.11.tar.gz and changed rules correspondingly.
+
+ -- Atsuhito KOHDA <kohda@debian.org>  Sun, 17 Jan 2010 19:31:15 +0900
+
+ptex-bin (3.1.10+0.04b-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix compilation chaos (headers libkpathsea4, lib kpathsea5) and thus
+    the fact the ptex cannot be run at all (Closes: #561427)
+    Code by YOSHINO Yoshihito. That fixed makes ptex compile with
+    libkpathsea5. Changes:
+    - debian/control: build-depend on texlive-binaries, remove alternative
+      dependency on libkpathsea4
+    - debian/control: depend on texlive-binaries (ptex-bin, jmpost)
+    - debian/rules: link system kpathsea into the kpathsea lib so 
+      that the right headers are used
+    - debian/rules: change build logic
+    - debian/rules: apply all patches in debian/patches/teTeX/ instead
+      of only common.mk.patch
+    - new patches:
+      . debian/patches/teTeX/Makefile.in.patch
+      . debian/patches/teTeX/common.mk.patch (updated)
+      . debian/patches/teTeX/config.h.patch
+      . debian/patches/teTeX/depend.mk.patch
+      . debian/patches/teTeX/splitup.c.patch
+      . debian/patches/teTeX/web2c.depend.mk.patch
+
+ -- Norbert Preining <preining@debian.org>  Sat, 02 Jan 2010 22:18:17 +0900
+
+ptex-bin (3.1.10+0.04b-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add a lot of if checks for mktexlsr, update-texmf and update-texmf
+    in the maintainer scripts to ensure that they don't break during
+    upgrades (Closes: #503543).
+  * Create /var/lib/texmf/web2c/ptex directory if it doesn't exist in
+    ptex-bin.postinst. This will ensure working upgrades for etch->lenny
+    in cases where the old tetex packages are still installed. The new
+    fmtutil-sys from texlive is capable of creating this directory itself.
+  * Remove or'ed dependency on tetex packages.
+
+ -- Sven Hoexter <sven@timegate.de>  Wed, 05 Nov 2008 20:04:13 +0100
+
+ptex-bin (3.1.10+0.04b-2) unstable; urgency=low
+
+  * Bumped to Standards-Version: 3.7.3.
+  * Fixed various lintian warnings.
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sat, 08 Dec 2007 09:19:08 +0900
+
+ptex-bin (3.1.10+0.04b-1) unstable; urgency=low
+
+  * New upstream release.
+  * Maintainer upload.
+  * Acknowledged NMU, thanks Daniel - closes: #429681, #430175
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Wed, 05 Dec 2007 01:04:38 +0900
+
+ptex-bin (3.1.10~beta3+0.04b-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Make libkpathsea-dev the default Build-Depends, instead of the
+    obsolete libkpathsea4-dev.  Closes: #429681.
+  * Also reorder dependencies to make texlive the default over tetex.
+  * Fix linking against libkpathsea.  Closes: #430175.
+  * Urgency medium for RC bug fixes.
+
+ -- Daniel Schepler <schepler@debian.org>  Mon, 27 Aug 2007 00:17:36 -0400
+
+ptex-bin (3.1.10~beta3+0.04b-4) unstable; urgency=low
+
+  * Added Build-Depends: texlive-metapost - closes: #421785
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Tue, 01 May 2007 22:47:23 +0900
+
+ptex-bin (3.1.10~beta3+0.04b-3) unstable; urgency=low
+
+  * Maintainer upload.
+  * Added Build-Depends: texlive-extra-utils - closes: #421103
+  * Now it can be installed on clean system, thanks Shinichiro HIDA - closes: #420397
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Tue, 01 May 2007 20:54:04 +0900
+
+ptex-bin (3.1.10~beta3+0.04b-2.2) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Really fix the package postrms to not call tools on purge when
+    they've already been taken care of in postrm remove.
+    Closes: #392964.
+
+ -- Steve Langasek <vorlon@debian.org>  Thu, 16 Nov 2006 18:38:26 -0800
+
+ptex-bin (3.1.10~beta3+0.04b-2.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Build with -O0 on hppa to work around a gcc ICE
+    jmpost-0.04b/pdvitomp.c.  Closes: #390199.
+
+ -- Steve Langasek <vorlon@debian.org>  Fri, 10 Nov 2006 21:59:02 -0800
+
+ptex-bin (3.1.10~beta3+0.04b-2) unstable; urgency=high
+
+  * Fixed Depends: texlive-math-base -> texlive-math-extra, so now it can really be installed with TeXLive - closes: #394481
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sun, 22 Oct 2006 08:53:16 +0900
+
+ptex-bin (3.1.10~beta3+0.04b-1) unstable; urgency=low
+
+  * New upstream release.
+  * postrm no longer calls mktexlsr if not present when purging - closes: #392947, #392964
+  * Support TeXLive - closes: #357195
+  * Bumped to Standards-Version: 3.7.2.
+  * Remove references to iniptex - closes: #361381
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sun, 15 Oct 2006 09:18:39 +0900
+
+ptex-bin (3.1.9+0.04b-1) unstable; urgency=low
+
+  * Works done at Codefest in Malaysia 2006.
+  * Tighten up dependencies.
+  * New upstream release, build with new teTeX 3.0 - closes: #354569, #320484, #322387
+  * Now uses fmtutil-sys instead of fmtutil - closes: #347966
+  * Moved *.pool & *.mem to /usr/share/texmf/web2c.
+  * Bumped to Standards-Version: 3.6.2.2 (no physical changes).
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sat,  4 Mar 2006 12:26:49 +0900
+
+ptex-bin (3.1.5+0.04a-1) unstable; urgency=low
+
+  * New upstream release.  3.1.5 is the last version which can be built with Web2C 7.4.5, so 3.1.7 or later will not be packaged until sarge is out.
+  * Updated copyright.ja.
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sat, 12 Mar 2005 17:14:54 +0900
+
+ptex-bin (3.1.3+0.04a-3) unstable; urgency=high
+
+  * [ptex-bin.postinst] updated the path to web2c stuff - closes: #253594
+  * [rules] updated the path to web2c stuff
+  * Revised description.
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Wed, 11 Aug 2004 14:52:03 +0900
+
+ptex-bin (3.1.3+0.04a-2) unstable; urgency=low
+
+  * Configuration files under /etc/texmf/*.d/ have been renamed to 30ptex.cnf.
+    The old 20ptex.cnf will be preserved as *.bak if exists. - closes: #232990
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Tue, 17 Feb 2004 15:18:40 +0900
+
+ptex-bin (3.1.3+0.04a-1) unstable; urgency=low
+
+  * Packaged updated Japanized MetaPost
+     - http://www.matsusaka-u.ac.jp/~okumura/texfaq/jmpost-0.04a.tar.gz
+
+ -- Masayuki Hatta (mhatta) <mhatta@debian.org>  Sun,  8 Feb 2004 12:50:49 +0900
+
+ptex-bin (3.1.3+0.04-1) unstable; urgency=low
+
+  * New upstream release.
+  * Bumped Standards-Version to 3.6.1 (no actual changes).
+
+ -- Masayuki Hatta <mhatta@debian.org>  Mon, 10 Nov 2003 22:06:32 +0900
+
+ptex-bin (3.1.2+0.04-2) unstable; urgency=low
+
+  * Call mktexlsr before fmtutil --byfmt - closes: #203438
+
+ -- Masayuki Hatta <mhatta@debian.org>  Thu, 21 Aug 2003 00:43:26 +0900
+
+ptex-bin (3.1.2+0.04-1) unstable; urgency=low
+
+  * New upstream release - closes: #182664
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sat,  8 Mar 2003 02:28:34 +0900
+
+ptex-bin (3.0.5+0.04-2) unstable; urgency=low
+
+  * Now generates /etc/texmf/{texmf.d|fmt.d}/*.cnf in postinst - closes: #141778, #172739
+
+ -- Masayuki Hatta <mhatta@debian.org>  Thu, 19 Dec 2002 11:47:21 +0900
+
+ptex-bin (3.0.5+0.04-1) unstable; urgency=low
+
+  * New upstream release - closes: #165987, #170641
+  * Bumped to Standards-Version: 3.5.8.
+  * [jmpost] now depends on tetex-bin - closes: #167541
+  * !!!WARNING!!! now jmpost can be built but doesn't work at all with 
+    pTeX 3.0.5.
+  * !!!WARNING!!! also jmpost doesn't understand --mem for some reason.
+  * To put it short, DO NOT UPGRADE IF YOU NEED JMPOST RIGHT NOW!
+
+ -- Masayuki Hatta <mhatta@debian.org>  Fri, 29 Nov 2002 20:57:39 +0900
+
+ptex-bin (3.0.1+0.04-12) unstable; urgency=low
+
+  * Removed ptexconfig and jbibtexconfig - closes: #145086
+  * Enabled file-line-error-style option - closes: #155880
+  
+ -- Masayuki Hatta <mhatta@debian.org>  Sat, 31 Aug 2002 16:04:35 +0900
+
+ptex-bin (3.0.1+0.04-11) unstable; urgency=low
+
+  * amsptex symlink should be overwritten - closes: #142939
+
+ -- Masayuki Hatta <mhatta@debian.org>  Mon, 15 Apr 2002 11:41:35 +0900
+
+ptex-bin (3.0.1+0.04-10) unstable; urgency=low
+
+  * Seems entries for pTeX should be more close to the top...
+
+ -- Masayuki Hatta <mhatta@debian.org>  Fri, 12 Apr 2002 15:47:48 +0900
+
+ptex-bin (3.0.1+0.04-9) unstable; urgency=low
+
+  * Oops, I forgot to fix this bug - closes: #141662
+
+ -- Masayuki Hatta <mhatta@debian.org>  Thu, 11 Apr 2002 00:50:20 +0900
+
+ptex-bin (3.0.1+0.04-8) unstable; urgency=low
+
+  * Changed for jbibtex-base reorganization.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Wed, 10 Apr 2002 23:06:22 +0900
+
+ptex-bin (3.0.1+0.04-7) unstable; urgency=low
+
+  * Now uses /usr/sbin/update-texmf -closes: #125793
+
+ -- Masayuki Hatta <mhatta@debian.org>  Fri,  5 Apr 2002 15:50:56 +0900
+
+ptex-bin (3.0.1+0.04-6) unstable; urgency=low
+
+  * Got rid of jbibtexconfig.
+  * Really added amsptex.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun, 10 Feb 2002 11:55:51 +0900
+
+ptex-bin (3.0.1+0.04-5) unstable; urgency=low
+
+  * Rebuilt with the latest ptex-buildsupport.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sat,  9 Feb 2002 15:25:15 +0900
+
+ptex-bin (3.0.1+0.04-4) unstable; urgency=low
+
+  * Oops, I didn't add tetex-extra to Build-Depends...Fixed.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Tue, 29 Jan 2002 08:42:29 +0900
+
+ptex-bin (3.0.1+0.04-3) unstable; urgency=low
+
+  * Added tetex-extra to Build-Depends - closes: #131275
+
+ -- Masayuki Hatta <mhatta@debian.org>  Mon, 28 Jan 2002 22:21:00 +0900
+
+ptex-bin (3.0.1+0.04-2) unstable; urgency=low
+
+  * Applied ptex-src-3.0.1.patch.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Tue, 22 Jan 2002 18:56:03 +0900
+
+ptex-bin (3.0.1+0.04-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added flex and bison to Build-Depends - closes: #130040
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun, 20 Jan 2002 15:53:54 +0900
+
+ptex-bin (3.0+0.04-1) unstable; urgency=low
+
+  * The "At Last I Am Free" release.
+  * New upstream release.
+  * The license has been changed to a modified BSD.  Now pTeX is DFSG-free!
+  * Also Mr. Matsui (the JBibTeX upstream) approved of changing his license 
+    to the new ASCII's.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Thu, 17 Jan 2002 22:31:32 +0900
+
+ptex-bin (2.1.11+0.04-7) unstable; urgency=low
+
+  * Fixed ptexconfig and jbibtexconfig to use "=" instead of "==" - closes: #128099
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun, 13 Jan 2002 21:58:03 +0900
+
+ptex-bin (2.1.11+0.04-6) unstable; urgency=low
+
+  * Fixed typo in prerm - closes: #117129
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sat, 27 Oct 2001 11:13:44 +0900
+
+ptex-bin (2.1.11+0.04-5) unstable; urgency=low
+
+  * Added Depends: tetex-extra. - closes: #115145
+
+ -- Masayuki Hatta <mhatta@debian.org>  Wed, 10 Oct 2001 23:19:36 +0900
+
+ptex-bin (2.1.11+0.04-4) unstable; urgency=low
+
+  * Added libkpathsea-dev to Build-Depends.
+  * Added amsptex support. - closes: #113439
+
+ -- Masayuki Hatta <mhatta@debian.org>  Mon,  8 Oct 2001 10:09:43 +0900
+
+ptex-bin (2.1.11+0.04-3) unstable; urgency=low
+
+  * ptex-bin should depend on only ptex-base, not dvi2ps-fontdata-ptexfake. - closes: #113142
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun, 23 Sep 2001 00:30:01 +0900
+
+ptex-bin (2.1.11+0.04-2) unstable; urgency=low
+
+  * Now uses fmtutil to generate *.fmt (from Atsuhito Kohda) - closes: #112864
+
+ -- Masayuki Hatta <mhatta@debian.org>  Fri, 21 Sep 2001 13:47:26 +0900
+
+ptex-bin (2.1.11+0.04-1) unstable; urgency=low
+
+  * Added Japanized MetaPost and separate jmpost package.
+  * Added a workaround to allow building if platex.fmt is over 1 year old.
+  * [ptex-bin] Added Suggests: jbibtex-bin.
+  
+ -- Masayuki Hatta <mhatta@debian.org>  Mon, 27 Aug 2001 13:38:12 +0900
+
+ptex-bin (2.1.10-5) unstable; urgency=low
+
+  * Applied ptex2.1.10-11.patch.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Wed, 23 May 2001 19:36:19 +0900
+
+ptex-bin (2.1.10-4) unstable; urgency=low
+
+  * The "Ain't That Good News" release.
+  * Initial release for Debian Project. - closes: #94846
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun, 22 Apr 2001 21:04:35 +0900
+
+ptex-bin (2.1.10-3) unstable; urgency=low
+
+  * Move /usr/share/texmf/web2c -> /var/lib/texmf/web2c.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Tue, 10 Apr 2001 20:16:33 +0900
+
+ptex-bin (2.1.10-2) unstable; urgency=low
+
+  * Incorporated part of Hiroshi Kise's hack (not completed yet).  Thanks!
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun,  8 Apr 2001 12:57:04 +0900
+
+ptex-bin (2.1.10-1) unstable; urgency=low
+
+  * New maintainer: Masayuki Hatta <mhatta@debian.org>.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Sun,  8 Apr 2001 00:35:30 +0900
+
+ptex-bin (2.1.10-0.1) unstable; urgency=low
+
+  * NMU.
+  * New upstream release.
+  * Re-packaged.
+
+ -- Masayuki Hatta <mhatta@debian.org>  Tue,  3 Apr 2001 22:25:18 +0900
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.prerm
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.prerm
@@ -0,0 +1,45 @@
+#! /bin/sh
+# prerm script for ptex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+FMTDIR=/var/lib/texmf/web2c
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/ptex-bin.info.gz
+    rm -rf /usr/doc/ptex-bin
+
+    rm -f /usr/bin/platex 
+    rm -f /usr/bin/amsptex
+    rm -f ${FMTDIR}/platex.* ${FMTDIR}/ptex.fmt ${FMTDIR}/amsptex.* ${FMTDIR}/ptex.log
+
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.files
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.files
@@ -0,0 +1,2 @@
+usr/bin/jbibtex
+
--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.postrm
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.postrm
@@ -0,0 +1,85 @@
+#! /bin/sh
+# postrm script for ptex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+       purge)
+
+       rm -f /etc/texmf/texmf.d/30ptex*
+       rm -f /etc/texmf/fmt.d/30ptex*
+
+       # Also remove old leftovers
+       rm -f /etc/texmf/texmf.d/20ptex*
+       rm -f /etc/texmf/fmt.d/20ptex*
+
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/bin/pltotf.nonja /usr/bin/pltotf
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz
+
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/bin/tftopl.nonja /usr/bin/tftopl
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
+
+        ;;
+
+       remove)
+
+       mv /etc/texmf/texmf.d/30ptex.cnf /etc/texmf/texmf.d/30ptex.bak
+       mv /etc/texmf/fmt.d/30ptex.cnf /etc/texmf/fmt.d/30ptex.bak
+
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/bin/pltotf.nonja /usr/bin/pltotf
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz
+
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/bin/tftopl.nonja /usr/bin/tftopl
+       dpkg-divert --package ptex-bin --remove --rename --divert \
+         /usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
+       
+       if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	   mktexlsr
+       fi
+
+       if [ -x "`which update-texmf 2>/dev/null`" ]; then
+	  update-texmf
+       fi
+
+       if [ -x "`which update-fmtutil 2>/dev/null`" ]; then
+	   update-fmtutil
+       fi
+
+        ;;
+
+       upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.docs
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.docs
@@ -0,0 +1,2 @@
+debian/changelog.old
+debian/copyright.ja.jbibtex
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost.postrm
+++ ptex-bin-3.1.11+0.04b/debian/jmpost.postrm
@@ -0,0 +1,43 @@
+#! /bin/sh
+# postrm script for jmpost
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+       purge|remove)
+
+	if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	    mktexlsr
+	fi
+
+	;;
+
+       upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.copyright
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.copyright
@@ -0,0 +1,35 @@
+This package was debianized by Masayuki Hatta <mhatta@debian.org> on
+Tue,  3 Apr 2001 22:25:18 +0900.
+
+It was downloaded from ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/tetex/
+
+Upstream Authors: Shouichi MATSUI <matsui@denken.or.jp>
+                  ASCII Corp. <www-ptex@ascii.co.jp>
+                    
+Copyright:
+
+Copyright (C) Shouichi MATSUI and ASCII Corporation.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the author may be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost.files
+++ ptex-bin-3.1.11+0.04b/debian/jmpost.files
@@ -0,0 +1,6 @@
+usr/bin/jmpost
+usr/bin/jmpost.bin
+usr/bin/pdvitomp
+usr/bin/pmakempx
+usr/share/texmf/web2c/jmp.pool
+usr/share/texmf/web2c/jmpost.mem
--- ptex-bin-3.1.11+0.04b.orig/debian/copyright.ja
+++ ptex-bin-3.1.11+0.04b/debian/copyright.ja
@@ -0,0 +1,34 @@
+($BCm(B) $B0J2<$O!"1QJ8$N7@Ls>r9`$rF|K\8l$KK]Lu$7$?$b$N$G$"$k!#F|K\8lLu$H1Q(B
+$B8lI=5-$N4V$Ksrsw$,$"$C$?>l9g$K$O!"7@Ls>r7o$O1Q8lI=5-$K$h$k7@Ls>r9`$K=>(B
+$B$&!#(B
+
+$B!ZCx:n8"I=<(![(B
+Copyright (C) 1987, 1995 ASCII Corporation.
+All rights reserved.
+
+$B!Z7@Ls>r7o![(B
+$B2~JQ$NM-L5$K$+$+$o$i$:!"K\%=%U%H%&%'%"$N%=!<%9%3!<%I5Z$S%P%$%J%j!<%3!<(B
+$B%I7A<0$K$h$k:FHRI[5Z$S;HMQ$O!"<!$N7@Ls>r7o$N2<$K5vBz$5$l$k!#(B
+1. $B%=!<%9%3!<%I$N:FHRI[$K:]$7$F$O!">e5-$N!ZCx:n8"I=<(![!"$3$N!Z7@Ls>r(B
+   $B7o![5Z$S<!$N!ZLH@U>r9`![$NI=5-$r!"0z$-B3$-0];}$7$FL@5-$7$J$1$l$P$J(B
+   $B$i$J$$!#(B
+2. $B%P%$%J%j!<7A<0$K$h$k:FHRI[$K:]$7$F$O!">e5-$N!ZCx:n8"I=<(![!"$3$N(B
+   $B!Z7@Ls>r7o![5Z$S<!$N!ZLH@U>r9`![$r!":FHRI[$K:]$7Ds6!$9$k@bL@=q5Z$S(B
+   $B$=$NB>$N4XO";qNA$K2~$a$FL@5-$7$J$1$l$P$J$i$J$$!#(B
+3. $BFCJL$J;vA0$N=qLL$K$h$k5vBz$,$J$$8B$j!"K\%=%U%H%&%'%"$+$iGI@8$7$?@=(B
+   $BIJ$r?d>)Kt$O@kEA$9$k$?$a$K!"Cx:n8"<TL>$O;HMQ$7$F$O$J$i$J$$!#(B
+
+$B!ZLH@U>r9`![(B
+$BK\%=%U%H%&%'%"$O!"Cx:n8"<T$K$h$j!"!V8=>uM-;Q$N$^$^!J$=$N$^$^$N7A$G!K!W(B
+$BDs6!$5$l$k$b$N$G$"$j!">&IJ@-Kt$OFCDjL\E*$X$NE,9g@-$K4X$9$kL[<(E*J]>Z$J(B
+$B$I!"L@<(Kt$OL[<($NJ]>Z$rLd$o$:!"$$$+$J$kJ]>Z$r$b9T$&$b$N$G$O$J$$!#(B
+$B$$$+$J$kM}M3$K$h$C$F$b!"$^$?!"7@Ls@UG$!"873J@UG$Kt$O!J2a<:$K$h$k$b$N$r(B
+$B4^$`!KITK!9T0Y@UG$$rLd$o$:$I$N$h$&$J@UG$$NM}O@$K$h$C$F$b!"Cx:n8"<T$O!"(B
+$B$$$+$J$k>l9g$b!"K\%=%U%H%&%'%"$r;HMQ$9$k$3$H$K$h$jH/@8$9$k!"$"$i$f$kD>(B
+$B@\B;32!"4V@\B;32!"6vH/B;32!"FCJLB;32!"D(H3E*B;32$"$k$$$OGI@8E*B;32!JBe(B
+$BBX@=IJ!&BeBX%5!<%S%9$ND4C#!";HMQMx1W!"%G!<%?Kt$O<}1W$K4X$9$kB;<:!"1D6H(B
+$BCfCG$K$h$kB;<:$J$I!K$K$D$$$F2?$i$N@UG$$bIi$o$J$$!#$3$l$O!"K\%=%U%H%&%'(B
+$B%"$r;HMQ$9$k$3$H$K$h$j!"$3$l$i$NB;32$,H/@8$9$k2DG=@-$K$D$$$F!"$"$i$+$8(B
+$B$a<(:6$5$l$F$$$?>l9g$G$"$C$F$bF1MM$G$"$k!#(B
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.postinst
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.postinst
@@ -0,0 +1,112 @@
+#! /bin/sh
+# postinst script for ptex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+# Generate /etc/texmf/texmf.d/30ptex.cnf
+if [ ! -f /etc/texmf/texmf.d/30ptex.cnf ]; then
+    cat > /etc/texmf/texmf.d/30ptex.cnf <<'EOF'
+%
+% ASCII pTeX (Japanized TeX)
+%
+TEXINPUTS.amsptex = .;$TEXMF/{ptex,tex}/{amstex,plain,generic,}//
+TEXINPUTS.platex = .;$TEXMF/{ptex,tex}/{platex,latex,generic,}//
+TEXINPUTS.ptex = .;$TEXMF/{ptex,tex}/{plain,generic,}//
+EOF
+fi
+
+
+if [ -x "`which update-texmf 2>/dev/null`" ]; then
+    update-texmf
+fi
+
+
+# Generate /etc/texmf/fmt.d/30ptex.cnf
+if [ ! -f /etc/texmf/fmt.d/30ptex.cnf ]; then
+    cat > /etc/texmf/fmt.d/30ptex.cnf <<'EOF'
+#
+# ASCII pTeX (Japanized TeX)
+#
+# format	engine		pattern-file	arguments
+ptex		ptex	-	ptex.ini
+platex		ptex	-	platex.ini
+amsptex		ptex	-	amsptex.ini
+EOF
+fi
+
+if [ -x "`which update-fmtutil 2>/dev/null`" ]; then
+    update-fmtutil
+fi
+
+if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+    mktexlsr
+
+# Run fmtutil and generate *.fmt
+    TEXMF=/var/lib/texmf
+    ptex_formats=$TEXMF/web2c/ptex
+    pdftex_formats=$TEXMF/web2c/pdftex
+    append_db=/usr/share/texmf/web2c/mktexupd
+
+    #Make sure that the ptex directory exists
+    #This is a workaround for etch->lenny upgrades with
+    #fmtutil-sys from the old tetex packages
+    if [ ! -d $ptex_formats ]; then
+	mkdir -p $ptex_formats
+    fi
+
+    
+    TEMPFILE=`tempfile -p ptex`
+    echo "Running fmtutil-sys. This may take some time. ..."
+      fmtutil-sys --byfmt ptex > $TEMPFILE; $append_db $ptex_formats ptex.fmt
+      fmtutil-sys --byfmt platex >> $TEMPFILE; $append_db $ptex_formats platex.fmt
+      TEXINPUTS="$TEXMF/tex/amstex//:$TEXMF/ptex/plain//:" \
+      fmtutil-sys --byfmt amsptex >> $TEMPFILE; $append_db $ptex_formats amsptex.fmt
+    echo "Output of fmtutil-sys is in $TEMPFILE"
+    echo
+
+    mktexlsr
+fi
+
+    cd /usr/bin && ln -sf ptex platex
+    ln -sf /usr/bin/ptex /usr/bin/amsptex
+    
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- ptex-bin-3.1.11+0.04b.orig/debian/control
+++ ptex-bin-3.1.11+0.04b/debian/control
@@ -0,0 +1,45 @@
+Source: ptex-bin
+Section: tex
+Priority: optional
+Maintainer: Masayuki Hatta (mhatta) <mhatta@debian.org>
+Build-Depends: debhelper (>> 4.0.0), texlive-binaries, texlive-extra-utils, texlive-metapost, flex, bison, libkpathsea-dev, ptex-base (>= 2.4), ptex-buildsupport (>= 3.0), libtool
+Standards-Version: 3.7.3
+
+Package: ptex-bin
+Architecture: any
+Replaces: platex
+Depends: ptex-base (>= 1:2.0-3), texlive-binaries, texlive-math-extra, ${shlibs:Depends}
+Suggests: dvipsk-ja, jbibtex-bin, jmpost, mendexk
+Conflicts: platex
+Description: The ASCII pTeX binary files
+ This is the binary part of ASCII pTeX, a Japanized TeX distribution.
+ .
+ These are all the binaries for the pTeX system.  pLaTeX is included
+ in this package, too.  You need at least ptex-base together with it.
+       
+Package: jbibtex-bin
+Architecture: any
+Depends: jbibtex-base, ${shlibs:Depends}
+Suggests: ptex-bin | jtex-bin
+Description: make a bibliography for ASCII p(La)TeX / NTT j(La)TeX
+ This is JBibTeX, a Japanized BibTeX based on the original BibTeX 0.99c.
+ JBibTeX can handle Kanji characters (EUC-JP).
+ .
+ This package contains only jbibtex binary.  You need at least 
+ jbibtex-base together with it.
+ .
+ This is a part of ASCII pTeX distribution,  but you can use this 
+ program not only with ASCII p(La)TeX but also with NTT j(La)TeX.
+
+Package: jmpost
+Architecture: any
+Depends: ${shlibs:Depends}, texlive-binaries
+Recommends: ptex-bin, dvipsk-ja
+Description: Japanized MetaPost, a system for drawing pictures
+ This is jMetaPost, a Japanized MetaPost based on the original
+ MetaPost 0.641. jMetaPost can handle Kanji characters (EUC-JP).
+ .
+ MetaPost interprets the MetaPost language and produces PostScript
+ pictures.  The MetaPost language is similar to Knuth's Metafont with
+ additional features for including tex(1) or troff(1) commands and
+ accessing features of PostScript not found in Metafont.
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.dirs
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.dirs
@@ -0,0 +1,2 @@
+etc/texmf/texmf.d
+
--- ptex-bin-3.1.11+0.04b.orig/debian/TODO
+++ ptex-bin-3.1.11+0.04b/debian/TODO
@@ -0,0 +1,4 @@
+TODO
+
+o Avoid building web2c (so that I don't need include kpathsea stuff in ptex-buildsupport). 
+o Write better manpages for pTeX binaries.
--- ptex-bin-3.1.11+0.04b.orig/debian/ptex-bin.preinst
+++ ptex-bin-3.1.11+0.04b/debian/ptex-bin.preinst
@@ -0,0 +1,72 @@
+#! /bin/sh
+# preinst script for ptex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# For details see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    install|upgrade)
+#        if [ "$1" = "upgrade" ]
+#        then
+#            start-stop-daemon --stop --quiet --oknodo  \
+#                --pidfile /var/run/ptex-bin.pid  \
+#                --exec /usr/sbin/ptex-bin 2>/dev/null || true
+#        fi
+
+    # Remove leftovers from older packages
+    rm -f /etc/texmf/texmf.d/20pTeX
+    rm -f /etc/texmf/texmf.d/20ptex
+    rm -f /etc/texmf/fmt.d/50pTeX.cnf
+    rm -f /etc/texmf/fmt.d/50ptex.cnf
+
+    # Backup old 20ptex.cnf if exist
+    if [ -f /etc/texmf/texmf.d/20ptex.cnf ]; then
+      mv /etc/texmf/texmf.d/20ptex.cnf /etc/texmf/texmf.d/20ptex.bak
+    fi
+    if [ -f /etc/texmf/fmt.d/20ptex.cnf ]; then
+      mv /etc/texmf/fmt.d/20ptex.cnf /etc/texmf/fmt.d/20ptex.bak
+    fi
+
+    dpkg-divert --package ptex-bin --add --rename --divert \
+      /usr/bin/pltotf.nonja /usr/bin/pltotf
+    dpkg-divert --package ptex-bin --add --rename --divert \
+      /usr/share/man/man1/pltotf.nonja.1.gz /usr/share/man/man1/pltotf.1.gz
+    
+    dpkg-divert --package ptex-bin --add --rename --divert \
+      /usr/bin/tftopl.nonja /usr/bin/tftopl
+    dpkg-divert --package ptex-bin --add --rename --divert \
+      /usr/share/man/man1/tftopl.nonja.1.gz /usr/share/man/man1/tftopl.1.gz
+	      
+    if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	mktexlsr
+    fi
+
+    ;;
+
+    abort-upgrade)
+
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.prerm
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.prerm
@@ -0,0 +1,40 @@
+#! /bin/sh
+# prerm script for jbibtex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade)
+#       install-info --quiet --remove /usr/info/ptex-bin.info.gz
+      rm -rf /usr/doc/jbibtex-bin
+        ;;
+    deconfigure)
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/copyright.ja.jbibtex
+++ ptex-bin-3.1.11+0.04b/debian/copyright.ja.jbibtex
@@ -0,0 +1,29 @@
+($BCm(B) $B0J2<$OF|K\8l$NJ}$,J,$+$j$d$9$$?M$N$?$a$K!"1Q8l$NCx:n8"I=<($rLu$7(B
+$B$?J8>O$G$"$k!#@5<0$JCx:n8"$O!"1Q8l$N86K\$K=>$&!#(B
+
+Copyright (C) Shouichi MATSUI and ASCII Corporation.
+All rights reserved.
+
+$BJQ99$NM-L5$K$+$+$o$i$:!"%=!<%9$*$h$S%P%$%J%j7A<0$N:FG[I[$*$h$SMxMQ$O!"(B
+$B0J2<$N>r7o$rK~$?$7$F$$$l$P!"$3$l$r5v2D$9$k!#(B
+
+1. $B%=!<%9!&%3!<%I$N:FG[I[$O!">e5-$NCx:n8"I=<(!"$3$N>r7o9`L\!"$*$h$S!"(B
+$B0J2<$NLH@U;v9`$rJ]B8$7$J$1$l$P$J$i$J$$!#(B
+
+2. $B%P%$%J%j7A<0$N:FG[I[$O!">e5-$NCx:n8"I=<(!"$3$N>r7o9`L\!"$*$h$S!"0J(B
+$B2<$NLH@U;v9`$r!"$=$NG[I[$KIU?o$9$k@bL@=q!"$"$k$$$O$=$NB>$N;qNA$N$$$:$l(B
+$B$+$KL@5-$7$J$1$l$P$J$i$J$$!#(B
+
+3. $BA0$b$C$FFCJL$K5vBz$rF@$J$$8B$j!"$3$N%=%U%H%&%'%"$+$iGI@8$7$?@=IJ$N(B
+$B?d>)$dHNGdB%?J$N$?$a$K!"$3$NCx:n8"<TL>$rMxMQ$7$F$O$J$i$J$$!#(B
+
+$B$3$N%=%U%H%&%'%"$O!V$3$N$^$^$N7A$G!WDs6!$5$l!"L@<(E*$"$k$$$O8@30$NJ]>Z(B
+$B$O!">&MQMxMQ$*$h$SFCDjL\E*$X$NE,9g$KBP$9$k8@30$NJ]>Z$b4^$_!"$^$?$3$l$i(B
+$B$@$1$K8B$i$:!"B8:_$7$J$$!#$?$H$(0J2<$N$h$&$JB;32$N2DG=@-$r<(:6$5$l$F$$(B
+$B$?$H$7$F$b!"$I$N$h$&$J7A$K$7$m$3$N%=%U%H%&%'%"$NMxMQ$+$iH/@8$7$?LdBj$K(B
+$B$*$$$F!"$3$NCx:n8"<T$O!"(B($BBeBX@=IJ$d%5!<%S%9$ND4C#(B; $BMxMQ8"!"%G!<%?!"$"(B
+$B$k$$$OMx1W$NB;<:(B; $B$"$k$$$O1D6H$NCfCG$r4^$`!"$^$?$3$l$i$@$1$K8B$i$:(B)$BD>(B
+$B@\E*$K!"4V@\E*$K!"6vA3$K!"FCJL$K!"D(H3>e!"$"$k$$$O!"I,A3E*$K@8$8$F$7$^$C(B
+$B$?B;32$KBP$7@UG$$O$J$/!"$$$+$J$k@UG$M}O@>e$G$b7@Ls$NM-L5$K78$o$i$:87L)(B
+$B$J@UG$$O$J$/!"$^$?(B($B2a<:$"$k$$$O$=$NB>$r4^$`(B)$BITK!9T0Y$KBP$7$F$b@UG$$O$J(B
+$B$$!#(B
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.postinst
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.postinst
@@ -0,0 +1,65 @@
+#! /bin/sh
+# postinst script for jbibtex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+# Generate /etc/texmf/texmf.d/60jbibtex.cnf
+if [ ! -f /etc/texmf/texmf.d/60jbibtex.cnf ]; then
+
+cat > /etc/texmf/texmf.d/60jbibtex.cnf <<'EOF'
+%
+% JBibTeX (Japanized BibTeX)
+%
+BIBINPUTS.jbibtex = .;$TEXMF/jbibtex/{bib,}//;$TEXMF/bibtex/{bib,}//
+BSTINPUTS.jbibtex = .;$TEXMF/jbibtex/{bst,}//;$TEXMF/bibtex/{bst,}//
+EOF
+fi
+
+    if [ -x "`which update-texmf 2>/dev/null`" ]; then
+       update-texmf
+    fi
+
+    if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	mktexlsr
+    fi
+			
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- ptex-bin-3.1.11+0.04b.orig/debian/changelog.old
+++ ptex-bin-3.1.11+0.04b/debian/changelog.old
@@ -0,0 +1,137 @@
+ptex-bin (2.1.8+1-3) frozen-jp unstable-jp; urgency=low
+
+  * Rebuild with web2c-src and config.sub from libtool_1.3.3-9.1
+  for newer Alpha processer like ev6 (21264).  Thanks Mr.Oka.
+  See debian-users@jp list archive (written in Japanese):
+  http://www.debian.or.jp/Lists-Archives/debian-devel/200004/msg00113.html
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Thu, 20 Apr 2000 00:05:23 +0900
+
+ptex-bin (2.1.8+1-2) frozen-jp unstable-jp; urgency=low (high for first install)
+
+  * ptex-bin, jbibtex-bin: postinst and prerm are back.  I forgot in
+    version 2.1.8+1-1 and 2.1.8-11. (Closes: Bug#JP/1158)
+  * changed ptexconfig.  It does not add/remove platex,ajtex and ajlatex path
+    now.
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Wed, 16 Feb 2000 23:36:57 +0900
+
+ptex-bin (2.1.8+1-1) unstable-jp; urgency=low
+
+  * It is NOT new upstream version.  I changed upstream version because
+    orig.tar.gz differ from <=2.1.8-10's.
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Wed,  5 Jan 2000 22:39:10 +0900
+
+ptex-bin (2.1.8-11) unstable-jp; urgency=low
+
+  * Remake package buiding system.  Now ptex-bin package uses web2c-src
+    instead of web and web2c because it is more plain.
+  * Added English version of copyright files.  Thanks to Mr.Hatta and
+    Mr.Kaneko.
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Sat,  1 Jan 2000 00:30:31 +0900
+
+ptex-bin (2.1.8-10) unstable-jp; urgency=low
+
+  * ptex-bin: Moved format files to /var/lib/texmf/web2c because
+    /usr/lib/texmf/web2c is symlink in tetex-bin. (Closes: Bug#JP/1081) 
+  * ptex-bin: Changed postinst: Check ptex.pool and ptex.fmt.
+  * Changed Depends entry from fontdata-j-ptex to dvi2ps-fontdata-ptexfake.
+    Because of the package name was changed.
+  
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Wed, 22 Dec 1999 20:13:09 +0900
+
+ptex-bin (2.1.8-9) unstable-jp; urgency=low
+
+  * Moved to /usr/share/texmf. (Fixed Bug#JP/853, Bug#JP/875)
+  * Still build packages on Debian 2.1.	
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Sat, 17 Apr 1999 17:57:39 +0900
+
+ptex-bin (2.1.8-8) frozen-jp unstable-jp; urgency=low
+
+  * Changed maintainer e-mail address.
+  * fixed ptexconfig: appended "," to TeX's path entries for texmf.cnf.
+    (Fixed Bug#JP/769)
+
+ -- Hiroshi KISE <fuyuneko@ryukyu.ne.jp>  Fri, 26 Feb 1999 20:23:08 +0900
+
+ptex-bin (2.1.8-7) stable-jp unstable-jp; urgency=high
+
+  * Fixed Copyright.  jBibTeX is non-free!
+  * Moved the jbibtex-bin to the non-free section.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Thu, 29 Oct 1998 02:11:57 +0900
+
+ptex-bin (2.1.8-6) frozen-jp unstable-jp; urgency=low
+
+  * Moved the ptex-bin package to the non-free section.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Tue, 30 Jun 1998 19:01:35 +0900
+
+ptex-bin (2.1.8-5) frozen-jp unstable-jp; urgency=low
+
+  * Fixed jbibtexconfig: add path to jbibtexbibpath add jbibtexbstpath.
+  * Fixed makeformat() in jbibtexconfig and ptexconfig.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Tue, 23 Jun 1998 22:35:07 +0900
+
+ptex-bin (2.1.8-4) frozen-jp unstable-jp; urgency=low
+
+  * Fixed prerm for jbibtex-bin: Upgrade problem.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Tue, 23 Jun 1998 14:48:22 +0900
+
+ptex-bin (2.1.8-3) frozen-jp unstable-jp; urgency=low
+
+  * Fixed version.c: "ptex --version" work.  (Bug in original source)
+  * Added jbibtexconfig to jbibtex-bin, then don't depend on ptexconfig
+    or jtexconfig to fix /etc/texmf/texmf.cnf.
+  * Removed about jbibtex setup from /usr/sbin/ptexconfig.
+  * Fixed ptex-bin "Depends:" field in debian/control. 
+  * Fixed jbibtex-bin "Depends:" field in debian/control. 
+  * Fixed debian/rules: give executable permission to config.status
+    when build package.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Tue, 16 Jun 1998 16:31:55 +0900
+
+ptex-bin (2.1.8-2) frozen-jp unstable-jp; urgency=low
+
+  * Changed jbibtex entry in /usr/sbin/ptexconfig. (Fixed Bug #JP/177, #JP/178)
+  * Added postinst and prerm to jbibtex-bin.
+  * Fixed "cleanpath" routine in /usr/sbin/ptexconfig.
+  * Fixed makeformatt routine in /usr/sbin/ptexconfig.
+  * add pTeX's URL in Description field.
+  * Added `frozen-jp unstable-jp' to the changelog.
+  * Replaced newest copyright for ptex-base and jbibtex-base.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Tue,  9 Jun 1998 22:00:12 +0900
+
+ptex-bin (2.1.8-1) unstable; urgency=low
+
+  * New upstream version.
+    (http://www.ascii.co.jp/pub/TeX/ascii-ptex/ptex218/ptex218.tar.gz)
+  * separeted WEB and Web2C package. 
+  * Updated to Standards-Version 2.4.0.0.
+  * Move ptexconfig from ptex-base.
+  * fixed ptexconfig for tetex-0.9 base system.
+  * New maintainer.
+
+ -- Hiroshi KISE <kise@imicom.or.jp>  Fri,  5 Jun 1998 15:55:51 +0900
+
+ptex-bin (2.1.4-2) unstable; urgency=low
+
+  * make ptex.fmt with TEXINPUTS
+
+ -- Atsushi KAMOSHIDA <kamop@post1.com>  Thu, 14 Aug 1997 01:28:57 +0900
+
+ptex-bin (2.1.4-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Atsushi KAMOSHIDA <kamop@post1.com>  Mon, 14 Jul 1997 02:49:55 +0900
+
+Local variables:
+mode: debian-changelog
+End:
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost.prerm
+++ ptex-bin-3.1.11+0.04b/debian/jmpost.prerm
@@ -0,0 +1,39 @@
+#! /bin/sh
+# prerm script for jmpost
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+    remove|upgrade|deconfigure)
+#       install-info --quiet --remove /usr/info/ptex-bin.info.gz
+      rm -rf /usr/doc/jmpost
+      rm -rf /usr/bin/inijmpost /usr/bin/virjmpost
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jmpost.postinst
+++ ptex-bin-3.1.11+0.04b/debian/jmpost.postinst
@@ -0,0 +1,54 @@
+#! /bin/sh
+# postinst script for jmpost
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see /usr/share/doc/packaging-manual/
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+    configure)
+
+	if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	    mktexlsr
+	fi
+
+    ln -sf /usr/bin/jmpost /usr/bin/inijmpost
+    ln -sf /usr/bin/jmpost /usr/bin/virjmpost
+			
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/jbibtex-bin.postrm
+++ ptex-bin-3.1.11+0.04b/debian/jbibtex-bin.postrm
@@ -0,0 +1,55 @@
+#! /bin/sh
+# postrm script for jbibtex-bin
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+       purge)
+
+       rm -f /etc/texmf/texmf.d/60jbibtex*
+
+        ;;
+
+       remove)
+
+       mv /etc/texmf/texmf.d/60jbibtex.cnf /etc/texmf/texmf.d/60jbibtex.bak
+
+       if [ -x "`which update-texmf 2>/dev/null`" ]; then
+	   update-texmf
+       fi
+
+       if [ -x "`which mktexlsr 2>/dev/null`" ]; then
+	   mktexlsr
+       fi
+
+        ;;
+
+       upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/Makefile.in.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/Makefile.in.patch
@@ -0,0 +1,151 @@
+--- Makefile.in.orig	2006-03-04 13:47:26.000000000 +0900
++++ Makefile.in	2006-03-04 13:56:00.000000000 +0900
+@@ -46,7 +46,7 @@
+ .p.c: # really depends on $(web2c_programs), and generates .h.
+ 	 $(web2c) $*
+ .ch.p: # really depends on $(srcdir)/tangle; for ptex, also generates .pool
+-	$(srcdir)/tangle $(thisdir)/$*.web $<
++	tangle $(thisdir)/$*.web $<
+ 
+ # These definitions have to come before the rules that expand them.
+ # The tex{ini,0,1,2}.c files are created by splitup, run as part of convert.
+@@ -71,7 +71,7 @@
+ programs: $(programs)
+ 
+ ### pTeX
+-ptex: $(ptex_o) $(plib_o) $(kpathsea) $(proglib)
++ptex: $(ptex_o) $(plib_o) $(proglib)
+ 	$(kpathsea_link) $(ptex_o) $(plib_o) $(socketlibs) $(LOADLIBES)
+ 
+ $(ptex_o): $(ptex_c) texcoerce.h texd.h kanji.h
+@@ -85,27 +85,27 @@
+ $(ptex_c) texcoerce.h texd.h: ptex.p $(web2c_aux) $(web2c_programs)
+ 	$(web2c) ptex
+ 
+-ptex.p: ptex.web ptex.ch $(srcdir)/tangle
++ptex.p: ptex.web ptex.ch
+ 
+-ptex.web: $(srcdir)/tex.web $(srcdir)/tex.ch $(srcdir)/tie
+-	$(srcdir)/tie -m ptex.web $(srcdir)/tex.web $(srcdir)/tex.ch
++ptex.web: $(srcdir)/tex.web $(srcdir)/tex.ch
++	tie -m ptex.web $(srcdir)/tex.web $(srcdir)/tex.ch
+ 
+-ptex.ch: $(srcdir)/tie ptex.web ptex-base.ch
+-	$(srcdir)/tie -c ptex.ch ptex.web ptex-base.ch
++ptex.ch: ptex.web ptex-base.ch
++	tie -c ptex.ch ptex.web ptex-base.ch
+ 
+ ### TFtoPL
+-tftopl: tftopl.o $(plib_o) $(kpathsea) $(proglib)
++tftopl: tftopl.o $(plib_o) $(proglib)
+ 	$(kpathsea_link) tftopl.o $(plib_o) $(LOADLIBES)
+ tftopl.o: tftopl.c kanji.h ptexhelp.h
+ tftopl.c: tftopl.p $(web2c_aux)
+ tftopl.p: tftopl.web tftopl.ch
+ tftopl.web: $(srcdir)/tftopl.web $(srcdir)/tftopl.ch
+ 	rm -f tftopl.web && \
+-	$(srcdir)/tie -m tftopl.web $(srcdir)/tftopl.web $(srcdir)/tftopl.ch
++	tie -m tftopl.web $(srcdir)/tftopl.web $(srcdir)/tftopl.ch
+ 
+ 
+ ### PLtoTF
+-pltotf: pltotf.o $(plib_o) $(kpathsea) $(proglib)
++pltotf: pltotf.o $(plib_o) $(proglib)
+ 	$(kpathsea_link) pltotf.o $(plib_o) $(LOADLIBES)
+ pltotf.o: pltotf.c kanji.h ptexhelp.h
+ 	$(compile) -DKANJI_C=1 -c pltotf.c
+@@ -113,10 +113,10 @@
+ pltotf.p: pltotf.web pltotf.ch
+ pltotf.web: $(srcdir)/pltotf.web $(srcdir)/pltotf.ch
+ 	rm -f pltotf.web && \
+-	$(srcdir)/tie -m pltotf.web $(srcdir)/pltotf.web $(srcdir)/pltotf.ch
++	tie -m pltotf.web $(srcdir)/pltotf.web $(srcdir)/pltotf.ch
+ 
+ ### pDVItype
+-pdvitype: pdvitype.o $(plib_o) $(kpathsea) $(proglib)
++pdvitype: pdvitype.o $(plib_o) $(proglib)
+ 	$(kpathsea_link) pdvitype.o $(plib_o) $(LOADLIBES)
+ pdvitype.o: pdvitype.c kanji.h ptexhelp.h
+ 	$(compile) -DDVITYPE -DHEX_CHAR_CODE -c pdvitype.c
+@@ -126,7 +126,7 @@
+ 	$(LN) $(srcdir)/dvitype.web pdvitype.web
+ 
+ ### jBibTeX
+-jbibtex: jbibtex.o jbibextra.o $(plib_o) $(kpathsea) $(proglib)
++jbibtex: jbibtex.o jbibextra.o $(plib_o) $(proglib)
+ 	$(kpathsea_link) jbibtex.o jbibextra.o $(plib_o) $(LOADLIBES)
+ jbibextra.o: jbibextra.c jbibd.h kanji.h ptexhelp.h
+ jbibtex.o: jbibtex.c jbibextra.h kanji.h ptexhelp.h
+@@ -143,52 +143,44 @@
+ usage.o: usage.c
+ 
+ # Additional dependencies for relinking.
+-$(srcdir)/tangleboot:
+-	cd $(srcdir) && $(MAKE) tangleboot
+-$(srcdir)/tangle:
+-	cd $(srcdir) && $(MAKE) tangle
+-$(srcdir)/tie:
+-	cd $(srcdir) && $(MAKE) tie
+-$(cwebdir)/fixwrites:
++$(cwebdir)/fixwrites: $(proglib)
+ 	cd $(cwebdir) && $(MAKE) fixwrites
+-$(cwebdir)/splitup:
++$(cwebdir)/splitup: $(proglib)
+ 	cd $(cwebdir) && $(MAKE) splitup
+-$(cwebdir)/web2c:
++$(cwebdir)/web2c: $(proglib)
+ 	cd $(cwebdir) && $(MAKE) web2c
+ $(proglib):
+ 	cd $(srcdir)/lib && $(MAKE) lib.a
+-$(kpathsea):
+-	cd $(kpathsea_dir) && $(MAKE) libkpathsea.a
+ 
+ # 
+ # Making formats and bases.
+ formats=$(euc-formats) $(sjis-formats)
+ formats: $(formats)
+ 
+-texmf.cnf: $(kpathsea_dir)/texmf.cnf
+-	$(SHELL) $(thisdir)/mkconf $(kpathsea_dir)/texmf.cnf > texmf.cnf
++texmf.cnf:
++	$(SHELL) $(thisdir)/mkconf texmf.cnf.orig > texmf.cnf
+ 
+ dumpenv = TEXMFCNF=$(thisdir)
+ 
+ ptex-euc.fmt: ptex texmf.cnf
+ 	$(dumpenv) $(MAKE) progname=ptex files="ptex.tex min10.tfm" prereq-check
+-	$(dumpenv) ./ptex --ini --kanji=euc --progname=ptex --jobname=ptex-euc \\input ptex.tex \\dump </dev/null
++	$(dumpenv) ./ptex --ini --kanji=euc --interaction=nonstopmode --progname=ptex --jobname=ptex-euc \\input ptex.tex \\dump </dev/null
+ 
+ ptex-sjis.fmt: ptex texmf.cnf
+ 	$(dumpenv) $(MAKE) progname=ptex files="ptex.tex min10.tfm" prereq-check
+-	$(dumpenv) ./ptex --ini --kanji=sjis --progname=ptex --jobname=ptex-sjis \\input ptex.tex \\dump </dev/null
++	$(dumpenv) ./ptex --ini --kanji=sjis --interaction=nonstopmode --progname=ptex --jobname=ptex-sjis \\input ptex.tex \\dump </dev/null
+ 
+ platex-euc.fmt: ptex texmf.cnf
+ 	$(dumpenv) $(MAKE) progname=platex files="platex.ltx" prereq-check
+-	$(dumpenv) ./ptex --ini --kanji=euc --progname=platex --jobname=platex-euc \\input platex.ltx </dev/null
++	$(dumpenv) ./ptex --ini --kanji=euc --interaction=nonstopmode --progname=platex --jobname=platex-euc \\input platex.ltx </dev/null
+ 
+ platex-sjis.fmt: ptex texmf.cnf
+ 	$(dumpenv) $(MAKE) progname=platex files="platex.ltx" prereq-check
+-	$(dumpenv) ./ptex --ini --kanji=sjis --progname=platex --jobname=platex-sjis \\input platex.ltx </dev/null
++	$(dumpenv) ./ptex --ini --kanji=sjis --interaction=nonstopmode --progname=platex --jobname=platex-sjis \\input platex.ltx </dev/null
+ 
+ # This is meant to be called recursively, with $(files) set.
+-prereq-check: $(kpathsea_dir)/kpsewhich
+-	$(dumpenv) $(kpathsea_dir)/kpsewhich --progname=$(progname) $(files) >/dev/null || $(MAKE) prereq-lose >/dev/null
++prereq-check:
++	$(dumpenv) kpsewhich --progname=$(progname) $(files) >/dev/null || $(MAKE) prereq-lose >/dev/null
+ 
+ prereq-lose:
+ 	@echo "You seem to be missing input files necessary to make the" >&2
+@@ -203,8 +195,6 @@
+ 	@echo "CTAN hosts in systems/web2c." >&2
+ 	false
+ 
+-$(kpathsea_dir)/kpsewhich: $(kpathsea)
+-
+ # 
+ install: install-exec install-data
+ 	$(top_srcdir)/kpathsea/mktexlsr
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/depend.mk.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/depend.mk.patch
@@ -0,0 +1,134 @@
+--- texk/web2c/lib/depend.mk.orig	2005-02-06 18:49:56.000000000 +0000
++++ texk/web2c/lib/depend.mk	2009-12-25 04:36:05.000000000 +0000
+@@ -6,7 +6,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ basechsuffix.o: basechsuffix.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -15,7 +15,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ chartostring.o: chartostring.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -24,7 +24,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ coredump.o: coredump.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -33,7 +33,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ eofeoln.o: eofeoln.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -42,7 +42,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ fprintreal.o: fprintreal.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -51,7 +51,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ input2int.o: input2int.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -60,7 +60,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ inputint.o: inputint.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -69,7 +69,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ main.o: main.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -78,7 +78,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ mfmpw32.o: mfmpw32.c
+ openclose.o: openclose.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -88,7 +88,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h \
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h \
+   $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \
+   $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h \
+   $(kpathsea_srcdir)/absolute.h
+@@ -100,7 +100,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ uexit.o: uexit.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -109,7 +109,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ usage.o: usage.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -118,7 +118,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ version.o: version.c ../c-auto.h
+ win32main.o: win32main.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -128,7 +128,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ zround.o: zround.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -137,4 +137,4 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/config.h.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/config.h.patch
@@ -0,0 +1,11 @@
+--- texk/web2c/config.h.orig	2004-08-06 19:41:57.000000000 +0000
++++ texk/web2c/config.h	2009-12-28 08:35:18.000000000 +0000
+@@ -33,8 +33,6 @@
+ #include <kpathsea/config.h>
+ #include <web2c/c-auto.h>
+ 
+-#include <kpathsea/c-vararg.h>
+-
+ /* How to open a binary file.  */
+ #include <kpathsea/c-fopen.h>
+ 
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/splitup.c.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/splitup.c.patch
@@ -0,0 +1,12 @@
+--- texk/web2c/web2c/splitup.c.orig	2004-07-04 10:55:06.000000000 +0000
++++ texk/web2c/web2c/splitup.c	2009-12-28 09:04:32.000000000 +0000
+@@ -11,7 +11,8 @@
+ #define unlink delete
+ #endif
+ 
+-char *program_invocation_name;
++#include <kpathsea/types.h>
++
+ int filenumber = 0, ifdef_nesting = 0, lines_in_file = 0;
+ char *output_name = NULL;
+ boolean has_ini;
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/web2c.depend.mk.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/web2c.depend.mk.patch
@@ -0,0 +1,62 @@
+--- texk/web2c/web2c/depend.mk.orig	2005-02-06 18:49:57.000000000 +0000
++++ texk/web2c/web2c/depend.mk	2009-12-28 08:30:39.000000000 +0000
+@@ -6,7 +6,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h \
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h \
+   $(kpathsea_srcdir)/c-pathmx.h
+ kps.o: kps.c web2c.h ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -16,7 +16,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ $(LEX_OUTPUT_ROOT).o: $(LEX_OUTPUT_ROOT).c \
+   web2c.h \
+   ../config.h $(kpathsea_srcdir)/config.h $(kpathsea_dir)/c-auto.h \
+@@ -27,7 +27,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h \
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h \
+   y_tab.h
+ main.o: main.c web2c.h ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -37,7 +37,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h \
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h \
+   y_tab.h
+ regfix.o: regfix.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -47,7 +47,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
+ splitup.o: splitup.c ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+   $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
+@@ -56,7 +56,7 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h \
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h \
+   $(kpathsea_srcdir)/getopt.h
+ y_tab.o: y_tab.c web2c.h ../config.h $(kpathsea_srcdir)/config.h \
+   $(kpathsea_dir)/c-auto.h $(kpathsea_srcdir)/c-std.h \
+@@ -66,4 +66,4 @@
+   $(kpathsea_srcdir)/c-minmax.h $(kpathsea_srcdir)/c-limits.h \
+   $(kpathsea_srcdir)/c-proto.h $(kpathsea_srcdir)/debug.h \
+   $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/progname.h \
+-  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/c-fopen.h 
++  ../../web2c/c-auto.h $(kpathsea_srcdir)/c-fopen.h 
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/common.mk.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/common.mk.patch
@@ -0,0 +1,20 @@
+--- texk/make/common.mk.orig	2004-08-07 03:40:50.000000000 +0900
++++ texk/make/common.mk	2006-03-04 15:34:06.000000000 +0900
+@@ -12,7 +12,7 @@
+ LDFLAGS = @LDFLAGS@ $(XLDFLAGS)
+ 
+ # Kpathsea needs this for compiling, programs need it for linking.
+-LIBTOOL = $(SHELL) $(kpathsea_parent)/libtool
++LIBTOOL = /usr/bin/libtool
+ 
+ # You can change [X]CPPFLAGS, [X]CFLAGS, or [X]DEFS, but
+ # please don't change ALL_CPPFLAGS or ALL_CFLAGS.
+@@ -54,7 +54,7 @@
+ kpathsea_dir = $(kpathsea_parent)/kpathsea
+ kpathsea_srcdir_parent = $(top_srcdir)/..
+ kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea
+-kpathsea = $(kpathsea_dir)/libkpathsea.la
++kpathsea = -lkpathsea
+ 
+ @MAINT@ifeq ($(CC), gcc)
+ @MAINT@XDEFS = -Wpointer-arith $(warn_more)
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/teTeX/Makefile.in.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/teTeX/Makefile.in.patch
@@ -0,0 +1,11 @@
+--- texk/web2c/web2c/Makefile.in.orig	2004-07-11 07:54:28.000000000 +0000
++++ texk/web2c/web2c/Makefile.in	2009-12-28 09:28:33.000000000 +0000
+@@ -37,7 +37,7 @@
+ fixwrites: fixwrites.o kps.o
+ 	$(build_link_command) fixwrites.o kps.o
+ splitup: splitup.o kps.o
+-	$(build_link_command) splitup.o kps.o
++	$(build_link_command) -lkpathsea splitup.o kps.o
+ regfix: regfix.o kps.o
+ 	$(build_link_command) regfix.o kps.o
+ 
--- ptex-bin-3.1.11+0.04b.orig/debian/patches/jmpost/Makefile.in.patch
+++ ptex-bin-3.1.11+0.04b/debian/patches/jmpost/Makefile.in.patch
@@ -0,0 +1,63 @@
+--- Makefile.in.orig	2004-11-12 18:40:34.000000000 +0900
++++ Makefile.in	2006-03-04 16:38:55.000000000 +0900
+@@ -76,20 +76,20 @@
+ ###mpextra.c: ../../lib/texmfmp.c
+ ###	sed s/TEX-OR-MF-OR-MP/mp/ ../../lib/texmfmp.c >$@
+ jmp.p jmp.pool: jmp.web
+-	$(srcdir)/tangle jmp.web
+-jmp.web: $(srcdir)/tie $(srcdir)/mp.web $(srcdir)/mp.ch jmp.ch
+-	$(srcdir)/tie -m jmp.web $(srcdir)/mp.web $(srcdir)/mp.ch jmp.ch
++	tangle jmp.web
++jmp.web: $(srcdir)/mp.web $(srcdir)/mp.ch jmp.ch
++	tie -m jmp.web $(srcdir)/mp.web $(srcdir)/mp.ch jmp.ch
+ 
+ ### pDVItoMP
+-pdvitomp: pdvitomp.o $(plib_o) $(kpathsea) $(proglib)
++pdvitomp: pdvitomp.o $(plib_o) $(proglib)
+ 	$(kpathsea_link) pdvitomp.o $(plib_o) $(LOADLIBES)
+ kanjiencoding.o: kanjiencoding.c
+ pdvitomp.o: pdvitomp.c ../kanji.h
+ pdvitomp.c: pdvitomp.p $(web2c_aux)
+-pdvitomp.p: pdvitomp.web $(srcdir)/tangle
+-	$(srcdir)/tangle pdvitomp.web
++pdvitomp.p: pdvitomp.web
++	tangle pdvitomp.web
+ pdvitomp.web: $(srcdir)/dvitomp.web $(srcdir)/dvitomp.ch pdvitomp.ch
+-	$(srcdir)/tie -m pdvitomp.web $(srcdir)/dvitomp.web \
++	tie -m pdvitomp.web $(srcdir)/dvitomp.web \
+ 	$(srcdir)/dvitomp.ch pdvitomp.ch
+ 
+ ../kanji.o: ../kanji.c ../kanji.h
+@@ -100,20 +100,16 @@
+ # automatically, included at the end.
+ 
+ # Additional dependencies for relinking.
+-$(srcdir)/tangle:
+-	cd $(srcdir) && $(MAKE) tangle
+-$(cwebdir)/fixwrites:
++$(cwebdir)/fixwrites: $(proglib)
+ 	cd $(cwebdir) && $(MAKE) fixwrites
+ $(cwebdir)/web2c:
+ 	cd $(cwebdir) && $(MAKE) web2c
+ $(proglib):
+ 	cd $(srcdir)/lib && $(MAKE) lib.a
+-$(kpathsea):
+-	cd $(kpathsea_dir) && $(MAKE) libkpathsea.a
+ 
+ # This is meant to be called recursively, with $(files) set.
+-prereq-check: $(kpathsea_dir)/kpsewhich
+-	$(dumpenv) $(kpathsea_dir)/kpsewhich --progname=$(progname) $(files) >/dev/null \
++prereq-check:
++	$(dumpenv) kpsewhich --progname=$(progname) $(files) >/dev/null \
+ 		|| $(MAKE) prereq-lose >/dev/null
+ 
+ prereq-lose:
+@@ -129,8 +125,6 @@
+ 	@echo "CTAN hosts in systems/web2c." >&2
+ 	false
+ 
+-$(kpathsea_dir)/kpsewhich: $(kpathsea)
+-
+ # 
+ install: install-exec install-data
+ install-exec:: install-links
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/ptex.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/ptex.1
@@ -0,0 +1,70 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PTEX "1" "December 2007" "pTeX 3.141592-p3.1.10 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+pTeX \- a patched version of TeX which supports Japanese
+.SH SYNOPSIS
+.B ptex
+[\fIoption\fR] \fItexfile\fR
+.SH DESCRIPTION
+.IP
+: ptex [option] &format texfile
+.PP
+\fB\-fmt\fR=\fINAME\fR               use NAME instead of program name or %&format.
+\fB\-halt\-on\-error\fR          stop processing at the first error
+[\-no]\-file\-line\-error   disable/enable file:line:error style messages
+\fB\-ini\fR                    be iniptex.
+\fB\-interaction\fR=\fISTRING\fR     set interaction mode (STRING=batchmode|nonstopmode|
+.IP
+scrollmode|errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR         set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR           set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR  set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+[\-no]\-mktex=FMT         disable/enable mktexFMT generation (FMT=tex/tfm)
+\fB\-mltex\fR                  enable MLTeX extensions such as \echarsubdef
+\fB\-output\-comment\fR=\fISTRING\fR  use STRING for DVI file comment instead of date
+\fB\-output\-directory\fR=\fIDIR\fR   use DIR as the directory to write files to
+[\-no]\-parse\-first\-line  disable/enable parsing of the first line of the
+.IP
+input file
+.PP
+\fB\-progname\fR=\fISTRING\fR        set program (and fmt) name to STRING
+\fB\-recorder\fR               enable filename recorder
+[\-no]\-shell\-escape      disable/enable \ewrite18{SHELL COMMAND}
+\fB\-src\-specials\fR           insert source specials into the DVI file
+\fB\-src\-specials\fR=\fIWHERE\fR     insert source specials in certain places of
+.IP
+the DVI file. WHERE is a comma\-separated value
+list: cr display hbox math par parend vbox
+.PP
+\fB\-translate\-file\fR=\fITCXNAME\fR use the TCX file TCXNAME
+\fB\-help\fR                   print this message and exit.
+\fB\-version\fR                print version information and exit.
+.SH "REPORTING BUGS"
+Email bug reports to www\-ptex@ascii.co.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1999 D.E. Knuth.
+Kpathsea is copyright (C) 1999 Free Software Foundation, Inc.
+There is NO warranty.  Redistribution of this software is
+covered by the terms of both the pTeX copyright and
+the GNU General Public License.
+For more information about these matters, see the files
+named COPYING and the pTeX source.
+Primary author of TeX: D.E. Knuth.
+Kpathsea written by Karl Berry and others.
+.SH "SEE ALSO"
+The full documentation for
+.B pTeX
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B pTeX
+programs are properly installed at your site, the command
+.IP
+.B info pTeX
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/virptex.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/virptex.1
@@ -0,0 +1,70 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PTEX "1" "December 2007" "pTeX 3.141592-p3.1.10 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+pTeX \- a patched version of TeX which supports Japanese
+.SH SYNOPSIS
+.B ptex
+[\fIoption\fR] \fItexfile\fR
+.SH DESCRIPTION
+.IP
+: ptex [option] &format texfile
+.PP
+\fB\-fmt\fR=\fINAME\fR               use NAME instead of program name or %&format.
+\fB\-halt\-on\-error\fR          stop processing at the first error
+[\-no]\-file\-line\-error   disable/enable file:line:error style messages
+\fB\-ini\fR                    be iniptex.
+\fB\-interaction\fR=\fISTRING\fR     set interaction mode (STRING=batchmode|nonstopmode|
+.IP
+scrollmode|errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR         set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR           set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR  set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+[\-no]\-mktex=FMT         disable/enable mktexFMT generation (FMT=tex/tfm)
+\fB\-mltex\fR                  enable MLTeX extensions such as \echarsubdef
+\fB\-output\-comment\fR=\fISTRING\fR  use STRING for DVI file comment instead of date
+\fB\-output\-directory\fR=\fIDIR\fR   use DIR as the directory to write files to
+[\-no]\-parse\-first\-line  disable/enable parsing of the first line of the
+.IP
+input file
+.PP
+\fB\-progname\fR=\fISTRING\fR        set program (and fmt) name to STRING
+\fB\-recorder\fR               enable filename recorder
+[\-no]\-shell\-escape      disable/enable \ewrite18{SHELL COMMAND}
+\fB\-src\-specials\fR           insert source specials into the DVI file
+\fB\-src\-specials\fR=\fIWHERE\fR     insert source specials in certain places of
+.IP
+the DVI file. WHERE is a comma\-separated value
+list: cr display hbox math par parend vbox
+.PP
+\fB\-translate\-file\fR=\fITCXNAME\fR use the TCX file TCXNAME
+\fB\-help\fR                   print this message and exit.
+\fB\-version\fR                print version information and exit.
+.SH "REPORTING BUGS"
+Email bug reports to www\-ptex@ascii.co.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1999 D.E. Knuth.
+Kpathsea is copyright (C) 1999 Free Software Foundation, Inc.
+There is NO warranty.  Redistribution of this software is
+covered by the terms of both the pTeX copyright and
+the GNU General Public License.
+For more information about these matters, see the files
+named COPYING and the pTeX source.
+Primary author of TeX: D.E. Knuth.
+Kpathsea written by Karl Berry and others.
+.SH "SEE ALSO"
+The full documentation for
+.B pTeX
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B pTeX
+programs are properly installed at your site, the command
+.IP
+.B info pTeX
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/inijmpost.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/inijmpost.1
@@ -0,0 +1,82 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH JMETAPOST "1" "December 2007" "jMetaPost 0.641-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+jMetaPost \- a patched version of MetaPost which supports Japanese
+.SH SYNOPSIS
+.B jmpost
+[\fIOPTION\fR]... [\fIMPNAME\fR[\fI.mp\fR]] [\fICOMMANDS\fR]
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI\FIRST-LINE\fR
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI&MEM ARGS\fR
+.SH DESCRIPTION
+.IP
+Run jMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps
+MPNAME.tfm), where NNN are the character numbers generated.
+Any remaining COMMANDS are processed as jMetaPost input,
+after MPNAME is read.
+If the first line of MPNAME is %&MEM, and MEM is an existing .mem file,
+use it. Else use `NAME.mem', where NAME is the program
+invocation name, most commonly `jmpost'.
+.IP
+Alternatively, if the first non\-option argument begins with a backslash,
+interpret all non\-option arguments as a line of jMetaPost input.
+.IP
+Alternatively, if the first non\-option argument begins with a &, the
+next word is taken as the MEM to read, overriding all else.  Any
+remaining arguments are processed as above.
+.IP
+If no arguments or options are specified, prompt for input.
+.PP
+\fB\-file\-line\-error\-style\fR   print file:line:error style messages
+\fB\-ini\fR                     be inijmpost, for dumping mems; this is implicitly
+.IP
+true if the program name is `inijmpost'
+.PP
+\fB\-interaction\fR=\fISTRING\fR      set interaction mode (STRING=batchmode/nonstopmode/
+.IP
+scrollmode/errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR          set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR            set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR   set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+\fB\-mem\fR=\fIMEMNAME\fR             use MEMNAME instead of program name or a %& line
+\fB\-output\-directory\fR=\fIDIR\fR    use DIR as the directory to write files to
+\fB\-progname\fR=\fISTRING\fR         set program (and mem) name to STRING
+\fB\-parse\-first\-line\fR        parse of the first line of the input file
+\fB\-recorder\fR                enable filename recorder
+\fB\-tex\fR=\fITEXPROGRAM\fR          use TEXPROGRAM for text labels.
+\fB\-translate\-file\fR=\fITCXNAME\fR  use the TCX file TCXNAME
+\fB\-T\fR, \fB\-troff\fR               set the prologues variable, use `makempx \fB\-troff\fR'
+\fB\-help\fR                    display this help and exit
+\fB\-version\fR                 output version information and exit
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboratories.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: jMetaPost is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B jMetaPost
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B jMetaPost
+programs are properly installed at your site, the command
+.IP
+.B info jMetaPost
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/jmpost.bin.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/jmpost.bin.1
@@ -0,0 +1,82 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH JMETAPOST "1" "December 2007" "jMetaPost 0.641-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+jMetaPost \- a patched version of MetaPost which supports Japanese
+.SH SYNOPSIS
+.B jmpost
+[\fIOPTION\fR]... [\fIMPNAME\fR[\fI.mp\fR]] [\fICOMMANDS\fR]
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI\FIRST-LINE\fR
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI&MEM ARGS\fR
+.SH DESCRIPTION
+.IP
+Run jMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps
+MPNAME.tfm), where NNN are the character numbers generated.
+Any remaining COMMANDS are processed as jMetaPost input,
+after MPNAME is read.
+If the first line of MPNAME is %&MEM, and MEM is an existing .mem file,
+use it. Else use `NAME.mem', where NAME is the program
+invocation name, most commonly `jmpost'.
+.IP
+Alternatively, if the first non\-option argument begins with a backslash,
+interpret all non\-option arguments as a line of jMetaPost input.
+.IP
+Alternatively, if the first non\-option argument begins with a &, the
+next word is taken as the MEM to read, overriding all else.  Any
+remaining arguments are processed as above.
+.IP
+If no arguments or options are specified, prompt for input.
+.PP
+\fB\-file\-line\-error\-style\fR   print file:line:error style messages
+\fB\-ini\fR                     be inijmpost, for dumping mems; this is implicitly
+.IP
+true if the program name is `inijmpost'
+.PP
+\fB\-interaction\fR=\fISTRING\fR      set interaction mode (STRING=batchmode/nonstopmode/
+.IP
+scrollmode/errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR          set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR            set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR   set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+\fB\-mem\fR=\fIMEMNAME\fR             use MEMNAME instead of program name or a %& line
+\fB\-output\-directory\fR=\fIDIR\fR    use DIR as the directory to write files to
+\fB\-progname\fR=\fISTRING\fR         set program (and mem) name to STRING
+\fB\-parse\-first\-line\fR        parse of the first line of the input file
+\fB\-recorder\fR                enable filename recorder
+\fB\-tex\fR=\fITEXPROGRAM\fR          use TEXPROGRAM for text labels.
+\fB\-translate\-file\fR=\fITCXNAME\fR  use the TCX file TCXNAME
+\fB\-T\fR, \fB\-troff\fR               set the prologues variable, use `makempx \fB\-troff\fR'
+\fB\-help\fR                    display this help and exit
+\fB\-version\fR                 output version information and exit
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboratories.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: jMetaPost is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B jMetaPost
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B jMetaPost
+programs are properly installed at your site, the command
+.IP
+.B info jMetaPost
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/pltotf.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/pltotf.1
@@ -0,0 +1,74 @@
+.TH PLTOTF 1 "27 December 1992" "Web2C 7.3.1"
+.\"=====================================================================
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP\" for troff
+.el .ds OX TeX\" for nroff
+.\" the same but obliqued
+.\" BX definition must follow TX so BX can use TX
+.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
+.if n .ds BX BibTeX
+.\" LX definition must follow TX so LX can use TX
+.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
+.if n .ds LX LaTeX
+.if n .ds WB Web
+.if t .ds WB W\s-2EB\s0
+.\"=====================================================================
+.SH NAME
+pltotf \- convert property list files to TeX font metric (tfm) format
+.SH SYNOPSIS
+.B pltotf
+[
+.B \-verbose
+]
+.I pl_file_name
+.I tfm_file_name
+.\"=====================================================================
+.SH DESCRIPTION
+This manual page is not meant to be exhaustive.  The complete
+documentation for this version of \*(TX can be found in the info file
+or manual
+.IR "Web2C: A TeX implementation" .
+.PP
+The
+.B pltotf
+program translates a (human-oriented) \*(WB property list file to a
+(program-oriented) \*(TX font metric file. Thus, after editing the property
+list file, a TFM file can be generated for use with, for example,
+.BR tex (1).
+.PP
+Both the
+.I pl_file_name
+and the
+.I tfm_file_name
+must be complete; no adding of default extensions or path searching is done.
+.\"=====================================================================
+.SH OPTIONS
+Without the
+.B \-verbose
+option,
+.B pltotf
+operates silently.  With it, a banner and progress report are printed on
+.IR stdout .
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR tftopl (1).
+.br
+Donald E. Knuth,
+.IR "\*(OXware" .
+.br
+Donald E. Knuth,
+.IR "The \*(MFbook" ,
+(Volume C of
+.IR "Computers and Typesetting" ),
+Addison-Wesley, 1986, ISBN 0-201-13445-4.
+.\"=====================================================================
+.SH AUTHORS
+Donald E. Knuth wrote the program. It was published as
+part of the
+.I \*(OXware
+technical report, available from the \*(TX Users Group.
+Howard Trickey, Pavel Curtis, and Richard Furuta originally ported it to
+Unix.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/jmpost.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/jmpost.1
@@ -0,0 +1,82 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH JMETAPOST "1" "December 2007" "jMetaPost 0.641-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+jMetaPost \- a patched version of MetaPost which supports Japanese
+.SH SYNOPSIS
+.B jmpost
+[\fIOPTION\fR]... [\fIMPNAME\fR[\fI.mp\fR]] [\fICOMMANDS\fR]
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI\FIRST-LINE\fR
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI&MEM ARGS\fR
+.SH DESCRIPTION
+.IP
+Run jMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps
+MPNAME.tfm), where NNN are the character numbers generated.
+Any remaining COMMANDS are processed as jMetaPost input,
+after MPNAME is read.
+If the first line of MPNAME is %&MEM, and MEM is an existing .mem file,
+use it. Else use `NAME.mem', where NAME is the program
+invocation name, most commonly `jmpost'.
+.IP
+Alternatively, if the first non\-option argument begins with a backslash,
+interpret all non\-option arguments as a line of jMetaPost input.
+.IP
+Alternatively, if the first non\-option argument begins with a &, the
+next word is taken as the MEM to read, overriding all else.  Any
+remaining arguments are processed as above.
+.IP
+If no arguments or options are specified, prompt for input.
+.PP
+\fB\-file\-line\-error\-style\fR   print file:line:error style messages
+\fB\-ini\fR                     be inijmpost, for dumping mems; this is implicitly
+.IP
+true if the program name is `inijmpost'
+.PP
+\fB\-interaction\fR=\fISTRING\fR      set interaction mode (STRING=batchmode/nonstopmode/
+.IP
+scrollmode/errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR          set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR            set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR   set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+\fB\-mem\fR=\fIMEMNAME\fR             use MEMNAME instead of program name or a %& line
+\fB\-output\-directory\fR=\fIDIR\fR    use DIR as the directory to write files to
+\fB\-progname\fR=\fISTRING\fR         set program (and mem) name to STRING
+\fB\-parse\-first\-line\fR        parse of the first line of the input file
+\fB\-recorder\fR                enable filename recorder
+\fB\-tex\fR=\fITEXPROGRAM\fR          use TEXPROGRAM for text labels.
+\fB\-translate\-file\fR=\fITCXNAME\fR  use the TCX file TCXNAME
+\fB\-T\fR, \fB\-troff\fR               set the prologues variable, use `makempx \fB\-troff\fR'
+\fB\-help\fR                    display this help and exit
+\fB\-version\fR                 output version information and exit
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboratories.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: jMetaPost is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B jMetaPost
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B jMetaPost
+programs are properly installed at your site, the command
+.IP
+.B info jMetaPost
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/jbibtex.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/jbibtex.1
@@ -0,0 +1,49 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH JBIBTEX "1" "December 2007" "JBibTeX 0.99c-j0.33 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+JBibTeX \- a patched version of BibTeX which supports Japanese
+.SH SYNOPSIS
+.B jbibtex
+[\fIoption\fR] \fIauxfile\fR
+.SH DESCRIPTION
+.TP
+\fB\-min\-crossrefs\fR=\fIINTEGER\fR
+minimum number of cross\-refs required
+for automatic cite_list inclusion (default 2).
+.TP
+\fB\-terse\fR
+do silently.
+.TP
+\fB\-version\fR
+print version information and exit.
+.TP
+\fB\-help\fR
+print this message and exit.
+.TP
+\fB\-kanji=\fR{jis|euc|sjis}
+kanji code for output\-file.
+.SH "REPORTING BUGS"
+Email bug reports to www\-ptex@ascii.co.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1999 Oren Patashnik.
+Kpathsea is copyright (C) 1999 Free Software Foundation, Inc.
+There is NO warranty.  Redistribution of this software is
+covered by the terms of both the JBibTeX copyright and
+the GNU General Public License.
+For more information about these matters, see the files
+named COPYING and the JBibTeX source.
+Primary author of BibTeX: Oren Patashnik.
+Kpathsea written by Karl Berry and others.
+.SH "SEE ALSO"
+The full documentation for
+.B JBibTeX
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B JBibTeX
+programs are properly installed at your site, the command
+.IP
+.B info JBibTeX
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/pdvitomp.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/pdvitomp.1
@@ -0,0 +1,40 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PDVITOMP "1" "December 2007" "PDVItoMP 0.64/color-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+PDVItoMP \- a patched version of DVItoMP which supports Japanese
+.SH SYNOPSIS
+.B pdvitomp
+[\fIOPTION\fR]... \fIDVIFILE\fR[\fI.dvi\fR] [\fIMPXFILE\fR[\fI.mpx\fR]]
+.SH DESCRIPTION
+.IP
+Translate DVIFILE to the MetaPost MPXFILE.
+Default MPXFILE is basename of DVIFILE extended with `.mpx'.
+.PP
+\fB\-help\fR                  display this help and exit
+\fB\-version\fR               output version information and exit
+\fB\-kanji=\fR{jis|euc|sjis}  set Japanese encoding
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboraties.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: PDVItoMP is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B PDVItoMP
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B PDVItoMP
+programs are properly installed at your site, the command
+.IP
+.B info PDVItoMP
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/tftopl.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/tftopl.1
@@ -0,0 +1,117 @@
+.TH TFTOPL 1 "17 December 1994" "Web2C 7.3.1"
+.\"=====================================================================
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP\" for troff
+.el .ds OX TeX\" for nroff
+.\" the same but obliqued
+.\" BX definition must follow TX so BX can use TX
+.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
+.if n .ds BX BibTeX
+.\" LX definition must follow TX so LX can use TX
+.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
+.if n .ds LX LaTeX
+.\"=====================================================================
+.SH NAME
+tftopl \- convert TeX font metric (tfm) files to property lists
+.SH SYNOPSIS
+.B tftopl
+[
+.BI \-charcode-format =format
+]
+[
+.B \-verbose
+]
+.I tfm_name[.tfm]
+[
+.I pl_name[.pl]
+]
+.\"=====================================================================
+.SH DESCRIPTION
+This manual page is not meant to be exhaustive.  The complete
+documentation for this version of \*(TX can be found in the info file
+or manual
+.IR "Web2C: A TeX implementation" .
+.PP
+The
+.B tftopl
+program translates a (program-oriented) font metric file to a
+(human-oriented) property list file.  Thus, you can edit the contents of
+the TFM files, if the font designer has not done his or her job
+properly, or if you're encountering strange difficulties, or if you're
+just curious.  It also serves as a TFM-file validating program, i.e., if
+no error messages are given, the input file is correct.
+.PP
+The
+.I pl_name
+is extended with
+.I .pl
+if it lacks a suffix.
+If
+.I pl_name
+is not given, standard output is used. Likewise, 
+.I tfm_name
+is extended with
+.I .tfm
+if it lacks a suffix.  Also, path searching is done for the
+.I .tfm
+file
+using the environment variable TEXFONTS.  If that is not set, 
+.B tftopl
+uses the system default.
+.PP
+See
+.BR tex (1)
+for the details of the searching.
+.\"=====================================================================
+.SH OPTIONS
+The argument
+.I format
+to
+.B \-charcode-format
+specifies how character codes are output in the PL file.  By
+default, only letters and digits are output using the
+.B C
+integer code (i.e., in ASCII); the others are output in octal.  (Unless
+the font's coding scheme starts with
+.B "TeX math sy"
+or
+.BR "TeX math ex" ,
+in which case all character codes are output in octal.)  If
+.I format
+is
+.BR ascii ,
+all character codes that correspond to graphic characters, besides the
+left and right parentheses, are output in ASCII.  Finally, if
+.I format
+is
+.BR octal ,
+all character codes are output in octal.
+.PP
+Without the
+.B \-verbose
+option,
+.B tftopl
+operates silently.  With it, a banner and progress report are printed on
+.IR stdout .
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR pltotf (1),
+.br
+Donald E. Knuth,
+.IR "\*(OXware" .
+.br
+Donald E. Knuth,
+.I "The \*(MFbook"
+(Volume C of
+.IR "Computers and Typesetting" ),
+Addison-Wesley, 1986, ISBN 0-201-13445-4.
+.\"=====================================================================
+.SH AUTHORS
+Donald E. Knuth wrote the program. It was published as
+part of the
+.I \*(OXware
+technical report, available from the \*(TX Users Group.
+Howard Trickey and Pavel Curtis originally ported it to Unix.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/platex.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/platex.1
@@ -0,0 +1,70 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PTEX "1" "December 2007" "pTeX 3.141592-p3.1.10 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+pTeX \- a patched version of TeX which supports Japanese
+.SH SYNOPSIS
+.B ptex
+[\fIoption\fR] \fItexfile\fR
+.SH DESCRIPTION
+.IP
+: ptex [option] &format texfile
+.PP
+\fB\-fmt\fR=\fINAME\fR               use NAME instead of program name or %&format.
+\fB\-halt\-on\-error\fR          stop processing at the first error
+[\-no]\-file\-line\-error   disable/enable file:line:error style messages
+\fB\-ini\fR                    be iniptex.
+\fB\-interaction\fR=\fISTRING\fR     set interaction mode (STRING=batchmode|nonstopmode|
+.IP
+scrollmode|errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR         set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR           set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR  set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+[\-no]\-mktex=FMT         disable/enable mktexFMT generation (FMT=tex/tfm)
+\fB\-mltex\fR                  enable MLTeX extensions such as \echarsubdef
+\fB\-output\-comment\fR=\fISTRING\fR  use STRING for DVI file comment instead of date
+\fB\-output\-directory\fR=\fIDIR\fR   use DIR as the directory to write files to
+[\-no]\-parse\-first\-line  disable/enable parsing of the first line of the
+.IP
+input file
+.PP
+\fB\-progname\fR=\fISTRING\fR        set program (and fmt) name to STRING
+\fB\-recorder\fR               enable filename recorder
+[\-no]\-shell\-escape      disable/enable \ewrite18{SHELL COMMAND}
+\fB\-src\-specials\fR           insert source specials into the DVI file
+\fB\-src\-specials\fR=\fIWHERE\fR     insert source specials in certain places of
+.IP
+the DVI file. WHERE is a comma\-separated value
+list: cr display hbox math par parend vbox
+.PP
+\fB\-translate\-file\fR=\fITCXNAME\fR use the TCX file TCXNAME
+\fB\-help\fR                   print this message and exit.
+\fB\-version\fR                print version information and exit.
+.SH "REPORTING BUGS"
+Email bug reports to www\-ptex@ascii.co.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1999 D.E. Knuth.
+Kpathsea is copyright (C) 1999 Free Software Foundation, Inc.
+There is NO warranty.  Redistribution of this software is
+covered by the terms of both the pTeX copyright and
+the GNU General Public License.
+For more information about these matters, see the files
+named COPYING and the pTeX source.
+Primary author of TeX: D.E. Knuth.
+Kpathsea written by Karl Berry and others.
+.SH "SEE ALSO"
+The full documentation for
+.B pTeX
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B pTeX
+programs are properly installed at your site, the command
+.IP
+.B info pTeX
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/pdvitype.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/pdvitype.1
@@ -0,0 +1,40 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH PDVITOMP "1" "December 2007" "PDVItoMP 0.64/color-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+PDVItoMP \- a patched version of DVItype which supports Japanese
+.SH SYNOPSIS
+.B pdvitomp
+[\fIOPTION\fR]... \fIDVIFILE\fR[\fI.dvi\fR] [\fIMPXFILE\fR[\fI.mpx\fR]]
+.SH DESCRIPTION
+.IP
+Translate DVIFILE to the MetaPost MPXFILE.
+Default MPXFILE is basename of DVIFILE extended with `.mpx'.
+.PP
+\fB\-help\fR                  display this help and exit
+\fB\-version\fR               output version information and exit
+\fB\-kanji=\fR{jis|euc|sjis}  set Japanese encoding
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboraties.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: PDVItoMP is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B PDVItoMP
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B PDVItoMP
+programs are properly installed at your site, the command
+.IP
+.B info PDVItoMP
+.PP
+should give you access to the complete manual.
--- ptex-bin-3.1.11+0.04b.orig/debian/manpages/virjmpost.1
+++ ptex-bin-3.1.11+0.04b/debian/manpages/virjmpost.1
@@ -0,0 +1,82 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
+.TH JMETAPOST "1" "December 2007" "jMetaPost 0.641-0.04 (EUC) (Web2C 7.5.4)" "User Commands"
+.SH NAME
+jMetaPost \- a patched version of MetaPost which supports Japanese
+.SH SYNOPSIS
+.B jmpost
+[\fIOPTION\fR]... [\fIMPNAME\fR[\fI.mp\fR]] [\fICOMMANDS\fR]
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI\FIRST-LINE\fR
+.br
+.B jmpost
+[\fIOPTION\fR]... \fI&MEM ARGS\fR
+.SH DESCRIPTION
+.IP
+Run jMetaPost on MPNAME, usually creating MPNAME.NNN (and perhaps
+MPNAME.tfm), where NNN are the character numbers generated.
+Any remaining COMMANDS are processed as jMetaPost input,
+after MPNAME is read.
+If the first line of MPNAME is %&MEM, and MEM is an existing .mem file,
+use it. Else use `NAME.mem', where NAME is the program
+invocation name, most commonly `jmpost'.
+.IP
+Alternatively, if the first non\-option argument begins with a backslash,
+interpret all non\-option arguments as a line of jMetaPost input.
+.IP
+Alternatively, if the first non\-option argument begins with a &, the
+next word is taken as the MEM to read, overriding all else.  Any
+remaining arguments are processed as above.
+.IP
+If no arguments or options are specified, prompt for input.
+.PP
+\fB\-file\-line\-error\-style\fR   print file:line:error style messages
+\fB\-ini\fR                     be inijmpost, for dumping mems; this is implicitly
+.IP
+true if the program name is `inijmpost'
+.PP
+\fB\-interaction\fR=\fISTRING\fR      set interaction mode (STRING=batchmode/nonstopmode/
+.IP
+scrollmode/errorstopmode)
+.PP
+\fB\-jobname\fR=\fISTRING\fR          set the job name to STRING
+\fB\-kanji\fR=\fISTRING\fR            set Japanese encoding (STRING=euc|jis|sjis)
+\fB\-kpathsea\-debug\fR=\fINUMBER\fR   set path searching debugging flags according to
+.IP
+the bits of NUMBER
+.PP
+\fB\-mem\fR=\fIMEMNAME\fR             use MEMNAME instead of program name or a %& line
+\fB\-output\-directory\fR=\fIDIR\fR    use DIR as the directory to write files to
+\fB\-progname\fR=\fISTRING\fR         set program (and mem) name to STRING
+\fB\-parse\-first\-line\fR        parse of the first line of the input file
+\fB\-recorder\fR                enable filename recorder
+\fB\-tex\fR=\fITEXPROGRAM\fR          use TEXPROGRAM for text labels.
+\fB\-translate\-file\fR=\fITCXNAME\fR  use the TCX file TCXNAME
+\fB\-T\fR, \fB\-troff\fR               set the prologues variable, use `makempx \fB\-troff\fR'
+\fB\-help\fR                    display this help and exit
+\fB\-version\fR                 output version information and exit
+.SH "REPORTING BUGS"
+Email bug reports to hideyuki@sat.t.u\-tokyo.ac.jp.
+.PP
+kpathsea version 3.5.6
+Copyright (C) 1997\-2004 AT&T Bell Laboratories.
+Kpathsea is copyright (C) 1999\-2004 Free Software Foundation, Inc.
+There is NO warranty.  You may redistribute this software
+under the terms of the pTeX copyright.  For more information
+about these matters, see the file named COPYING of pTeX.
+.PP
+Note: jMetaPost is built using Web2C, and Web2C is licensed
+under the GNU General Public Licence.  For more information,
+see the file named COPYING of Web2C.
+.SH "SEE ALSO"
+The full documentation for
+.B jMetaPost
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B jMetaPost
+programs are properly installed at your site, the command
+.IP
+.B info jMetaPost
+.PP
+should give you access to the complete manual.
