Subject: [RFC] mk/latex.mk to manage tetex dependencies
To: None <tech-pkg@netbsd.org>
From: Antoine Reilles <Antoine.Reilles@loria.fr>
List: tech-pkg
Date: 11/03/2005 12:07:43
--Apple-Mail-5-237524771
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hi all,

I wrote a while ago a latex.mk makefile fragment to handle  
dependencies over various teTeX versions. It comes from the fact that  
many packages to depends on the teTeX package, which is for tetex2,  
while they could work as well with tetex3. Also, using teTeX3 require  
to take care of it at each update, since  pkg_chk and pkgdepgraph  
will remove the teTeX3 packages, and put teTeX2.

This latex.mk allows one to set LATEX_VERSION_DEFAULT=3 in /etc/ 
mk.conf, to use tetex3.
It also exports LATEX_TEXMFPREFIX and LATEX_LOCALTEXMFPREFIX  
variables, both pointing for now to ${PREFIX}/share/texmf. They can  
be sed in PLIST.
Those could be usefull to help manage packaging latex packages that  
are included in teTeX3, with old versions, they could be installed in  
the local texmf, since teTeX3 supports it (see http://mail- 
index.netbsd.org/tech-pkg/2005/04/06/0013.html and following).

A package using latex.mk can set
LATEX_VERSIONS_ACCEPTED, which is by default "2 3", and also can set
USE_LATEX to "build" to get only a build dependency. The default is  
"run", which causes also buildlink, so print/teTeX/ 
kpathsea.buildlink.mk is no more needed.

Since pkgsrc will probably continue support tetex1,2 and 3, it would  
be usefull to have such a facility, to easy creating packages using  
latex. This could also let us rewrite the print/teTex/ package to use  
it, and install the required teTeX package, handling version.

So far, i've converted locally all packages using latex to this, and  
encountered no problems with those i tested.

Any objections? suggestions? ideas?
antoine


--Apple-Mail-5-237524771
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="latex.mk"
Content-Disposition: attachment;
	filename=latex.mk

# $NetBSD$
#
# A Makefile fragment for tex and latex packages
#
# 	* Determine the version of teTeX to be used.
#     Modify LATEX_VERSION_DEFAULT to change the default version (default to teTeX-2)
#
#	* tex files are installed...
#	  	teTeX-[1-2]
#	  		-> ${PREFIX}/share/texmf
#		  teTeX-3
#	  		->${PREFIX}/share/texmf-local
#   The variables LATEX_TEXMFPREFIX and LATEX_LOCALTEXMFPREFIX defines the main
#   texmf tree, where teTeX should install his own texmf tree, and the local
#   texmf tree, which is the place where other packages should install their
#   latex files, like additional styles.
#   NOTE: before all latex related packages are converted to use these
#   variables, we will keep
#   LATEX_TEXMFPREFIX=LATEX_LOCALTEXMFPREFIX=${PREFIX}/share/texmf
#
#	* Assume each package supports teTeX {2,3} by default.
#	  To change the supported latex versions, define LATEX_VERSIONS_ACCEPTED
#	  explicitly before including mk/latex.mk.  Note that the order is
#	  important.
#
# * Optionally set USE_LATEX to "build" to only add a build-time
#   dependency on Latex. That may be useful for creating documentation
#
# Variables for users:
#
# LATEX_VERSION_DEFAULT
#   Description:
#     The user's favorite latex implementation
#   Possible values:
#     1, 2, 3
#   Default value:
#     2
#
# Variables tex packages can provide:
#
# USE_TETEX1
#  Description:
#    Set if the package wants teTeX1
#  Possible values:
#    <undefined>, <defined>
#  Default value:
#    <undefined>
#
# USE_LATEX
#  Description:
#    Set latex as DEPENDS or BUILD_DEPENDS
#  Possible values:
#    run, build
#  Default value:
#    run
#
# LATEX_VERSIONS_ACCEPTED
#  Description:
#    Versions the package accepts (supports).
#  Possible values:
#    1, 2, 3
#  Default value:
#    2, 3
#
# Variables provided for tex packages:
#
# LATEX_TEXMFPREFIX
#   Description:
#     Path to the directory the standard tex files can be found
#   Possible values:
# 	  ${PREFIX}/share/texmf
# 	  ${PREFIX}/share/texmf-dist
#
# LATEX_LOCALTEXMFPREFIX
#   Description:
#     Path to the directory the tex for extentions should be installed into
#   Possible values:
#   	${PREFIX}/share/texmf
#     ${PREFIX}/share/texmf-local
#
# LATEX_VERSION
#   Description:
#     The version of the used teTeX package
#   Possible values:
#     1.*, 2.*, 3.*
#
# LATEX_PKG_VERSION
#   Description:
#     The full version of the used teTeX package (with PKGREVISION)
#   Possible values:
#     1.*(nb*)?, 2.*(nb*)?, 3.*(nb*)?

.if !defined(LATEX_MK)
LATEX_MK=	# defined

.include "../../mk/bsd.prefs.mk"

USE_LATEX?= run
# Assume only teTeX {2-3} are supported by default.
#
LATEX_VERSION_DEFAULT?=		2
.if !defined(USE_TETEX1)
LATEX_VERSIONS_ACCEPTED?=	2 3
.else
LATEX_VERSIONS_ACCEPTED?=	1
.endif

# set up variables for buildlink or depends
#
BUILDLINK_DEPENDS.teTeX1+=	teTeX-bin>=1.0
BUILDLINK_PKGSRCDIR.teTeX1?=	../../print/teTeX1-bin
BUILDLINK_DEPENDS.teTeX2+=	teTeX-bin>=2.0
BUILDLINK_PKGSRCDIR.teTeX2?=	../../print/teTeX-bin
BUILDLINK_DEPENDS.teTeX3+=	teTeX-bin>=3.0
BUILDLINK_PKGSRCDIR.teTeX3?=	../../print/teTeX3-bin

.for v in ${LATEX_VERSIONS_ACCEPTED}
_LATEX_VERSION_${v}_OK=	yes
.endfor

# Look for teTeX-bin-{1-3}
#
_TMP!=	${PKG_INFO} -e teTeX-bin || ${ECHO}
.if ${_TMP} != ""
_LATEX_VERSION_LATEX_FULL:=	${_TMP}
_LATEX_VERSION_LATEX=	${_LATEX_VERSION_LATEX_FULL:C/^.*-//}
_LATEX_VERSION_LATEX_MAJOR=	${_LATEX_VERSION_LATEX:C/\..*//}
.if ${_LATEX_VERSION_LATEX_MAJOR} == "1"
_LATEX_VERSION_1_INSTALLED=	yes
.elif ${_LATEX_VERSION_LATEX_MAJOR} == "2"
_LATEX_VERSION_2_INSTALLED=	yes
.elif ${_LATEX_VERSION_LATEX_MAJOR} == "3"
_LATEX_VERSION_3_INSTALLED=	yes
.endif
.endif

# Determine the Latex version to be used.
#
.if defined(LATEX_VERSION_REQD)
_LATEX_VERSION=	${LATEX_VERSION_REQD}
.endif
.if !defined(_LATEX_VERSION)
.if defined(_LATEX_VERSION_${LATEX_VERSION_DEFAULT}_OK)
.if defined(_LATEX_VERSION_${LATEX_VERSION_DEFAULT}_INSTALLED)
_LATEX_VERSION=	${LATEX_VERSION_DEFAULT}
.endif
.endif
.endif
.if !defined(_LATEX_VERSION)
.for v in ${LATEX_VERSIONS_ACCEPTED}
.if defined(_LATEX_VERSION_${v}_INSTALLED)
_LATEX_VERSION?=	${v}
.else
_LATEX_VERSION_FIRSTACCEPTED?=	${v}
.endif
.endfor
.endif
.if !defined(_LATEX_VERSION)
.if defined(_LATEX_VERSION_${LATEX_VERSION_DEFAULT}_OK)
_LATEX_VERSION=	${LATEX_VERSION_DEFAULT}
.endif
.endif
.if !defined(_LATEX_VERSION)
_LATEX_VERSION=	${_LATEX_VERSION_FIRSTACCEPTED}
.endif

# Set version specifics.
#
.if ${_LATEX_VERSION} == "3"
LATEX_DEPENDENCY=	${BUILDLINK_DEPENDS.teTeX3}
LATEX_PKGSRCDIR=  ${BUILDLINK_PKGSRCDIR.teTeX3}
#LATEX_TEXMFPREFIX=	${PREFIX}/share/texmf-dist
LATEX_TEXMFPREFIX=	${PREFIX}/share/texmf
#LATEX_LOCALTEXMFPREFIX=	${PREFIX}/share/texmf-local
LATEX_LOCALTEXMFPREFIX=	${PREFIX}/share/texmf
.elif ${_LATEX_VERSION} == "2"
LATEX_DEPENDENCY=	${BUILDLINK_DEPENDS.teTeX2}
LATEX_PKGSRCDIR=  ${BUILDLINK_PKGSRCDIR.teTeX2}
LATEX_TEXMFPREFIX=	${PREFIX}/share/texmf
LATEX_LOCALTEXMFPREFIX=	${PREFIX}/share/texmf
.elif ${_LATEX_VERSION} == "1"
LATEX_DEPENDENCY=	${BUILDLINK_DEPENDS.teTeX1}
LATEX_PKGSRCDIR=  ${BUILDLINK_PKGSRCDIR.teTeX1}
LATEX_TEXMFPREFIX=	${PREFIX}/share/texmf
LATEX_LOCALTEXMFPREFIX=	${PREFIX}/share/texmf
.else
PKG_SKIP_REASON+=	"Accepted versions are: ${LATEX_VERSIONS_ACCEPTED}"
PKG_SKIP_REASON+=	"No valid Latex version installed found"
.endif
.if (${USE_LATEX} == "build")
BUILD_DEPENDS+=	${LATEX_DEPENDENCY}:${LATEX_PKGSRCDIR}
.else
USE_LATEX:= run
# in this case, do a real buildlink
BUILDLINK_DEPTH:=		${BUILDLINK_DEPTH}+
TETEX_BIN_BUILDLINK3_MK:=	${TETEX_BIN_BUILDLINK3_MK}+

.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+=	teTeX-bin
.endif
BUILDLINK_PACKAGES:=	${BUILDLINK_PACKAGES:NteTeX-bin}
BUILDLINK_PACKAGES+=	teTeX-bin
.if !empty(TETEX_BIN_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.teTeX-bin+=	${LATEX_DEPENDENCY}
BUILDLINK_PKGSRCDIR.teTeX-bin?=	${LATEX_PKGSRCDIR}
.endif	# TETEX_BIN_BUILDLINK3_MK
BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}
.endif

# Provide some macro definitions.
#
LATEX_PKG_VERSION=	${_LATEX_VERSION_LATEX_FULL:C|^.*-||}

# strip out nb?
LATEX_VERSION=${LATEX_PKG_VERSION:C|nb[0-9]*$||}
PLIST_SUBST+=	LATEX_VERSION=${LATEX_VERSION}
PLIST_SUBST+=	LATEX_TEXMFPREFIX=${LATEX_TEXMFPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+=	LATEX_LOCALTEXMFPREFIX=${LATEX_LOCALTEXMFPREFIX:C|^${PREFIX}/||}

.endif	# LATEX_MK

--Apple-Mail-5-237524771
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="latex.diff"
Content-Disposition: attachment;
	filename=latex.diff

? mk/latex.mk
Index: benchmarks/skampi/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/skampi/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- benchmarks/skampi/Makefile	16 Jul 2005 01:19:07 -0000	1.12
+++ benchmarks/skampi/Makefile	17 Oct 2005 16:05:34 -0000
@@ -14,7 +14,6 @@
 COMMENT=	MPI (Message Passing Interface) benchmarks
 
 DEPENDS+=	gnuplot>=3.7.1:../../graphics/gnuplot
-DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
@@ -53,4 +52,5 @@
 		${PREFIX}/share/examples/skampi/dot.skampi-dt-short
 
 .include "../../parallel/mpi-ch/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: cad/fastcap/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/cad/fastcap/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- cad/fastcap/Makefile	16 Jun 2005 06:57:41 -0000	1.24
+++ cad/fastcap/Makefile	17 Oct 2005 16:05:34 -0000
@@ -11,13 +11,13 @@
 HOMEPAGE=	http://www.rle.mit.edu/cpg/research_codes.htm
 COMMENT=	Fast 3-D capacitance solver
 
-BUILD_DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 EXTRACT_USING=	gtar	# cannot be extracted with pax as tar
 
 WRKSRC=			${WRKDIR}
 HAS_CONFIGURE=		yes
 CONFIGURE_SCRIPT=	./config
 CONFIGURE_ARGS=		4
+USE_LATEX= build
 
 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
 GCC_REQD+=		2.95.3
@@ -82,4 +82,5 @@
 	${INSTALL_DATA} ${WRKSRC}/doc/ug.ps  ${PREFIX}/share/doc/fastcap
 	${INSTALL_DATA} ${WRKSRC}/README.docs ${PREFIX}/share/doc/fastcap
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: cad/tnt-mmtl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/cad/tnt-mmtl/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- cad/tnt-mmtl/Makefile	22 May 2005 20:07:41 -0000	1.5
+++ cad/tnt-mmtl/Makefile	17 Oct 2005 16:05:34 -0000
@@ -12,13 +12,13 @@
 COMMENT=	Multilayer Multiconductor Transmission Line 2-D and 2.5-D simulator
 
 BUILD_DEPENDS+=	latex2html-*:../../textproc/latex2html
-BUILD_DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 
 PKG_INSTALLATION_TYPES= overwrite pkgviews
 
 GNU_CONFIGURE=	YES
 USE_TOOLS+=	gmake
 USE_LANGUAGES=	c c++ fortran
+USE_LATEX=      build
 
 post-patch:
 	${MV} ${WRKSRC}/tnt ${WRKSRC}/tnt-mmtl
@@ -27,4 +27,5 @@
 .include "../../lang/tcl-itcl-current/buildlink3.mk"
 .include "../../x11/tk/buildlink3.mk"
 .include "../../x11/tk-BWidget/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: converters/bibtex2html/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/converters/bibtex2html/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- converters/bibtex2html/Makefile	16 Jul 2005 01:19:07 -0000	1.11
+++ converters/bibtex2html/Makefile	17 Oct 2005 16:05:34 -0000
@@ -9,7 +9,6 @@
 COMMENT=	Collection of tools for translating from BibTeX to HTML
 
 BUILD_DEPENDS+=	hevea-[0-9]*:../../textproc/hevea
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
 
 GNU_CONFIGURE=	yes
 USE_TOOLS+=	perl:run
@@ -37,4 +36,5 @@
 	${INSTALL_DATA} ${WRKSRC}/manual.ps ${PREFIX}/share/doc/${PKGBASE}
 
 .include "../../lang/ocaml/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: cross/avrdude/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/cross/avrdude/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- cross/avrdude/Makefile	11 Apr 2005 21:45:10 -0000	1.8
+++ cross/avrdude/Makefile	17 Oct 2005 16:05:34 -0000
@@ -11,7 +11,6 @@
 
 USE_GNU_READLINE=	YES
 
-BUILD_DEPENDS+=	teTeX>=1.0:../../print/teTeX
 BUILD_DEPENDS+=	texi2html>=1.76:../../textproc/texi2html
 
 GNU_CONFIGURE=	yes
@@ -21,4 +20,5 @@
 CONFIGURE_ARGS=	--disable-versioned-doc
 
 .include "../../devel/readline/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: devel/cweb/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/cweb/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- devel/cweb/Makefile	16 Jun 2005 06:57:45 -0000	1.21
+++ devel/cweb/Makefile	17 Oct 2005 16:05:35 -0000
@@ -14,7 +14,7 @@
 
 CONFLICTS+=		teTeX-bin>=2.0		# Part of teTeX>=2.0
 
-DEPENDS+= 		teTeX-[0-9]*:../../print/teTeX1
+USE_TETEX1= yes
 
 WRKSRC=			${WRKDIR}
 INSTALLATION_DIRS=	bin man/man1
@@ -43,4 +43,5 @@
 post-install:
 	${PREFIX}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: devel/darcs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/darcs/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- devel/darcs/Makefile	29 Sep 2005 14:28:37 -0000	1.4
+++ devel/darcs/Makefile	17 Oct 2005 16:05:35 -0000
@@ -9,13 +9,14 @@
 HOMEPAGE=		http://abridgegame.org/darcs/
 COMMENT=		Distributed revision control system
 
-BUILD_DEPENDS+=		teTeX-bin>=2.0.2nb1:../../print/teTeX-bin
 BUILD_DEPENDS+=		latex2html>=2002.2.1nb3:../../textproc/latex2html
 
 USE_TOOLS+=		gmake
 MAKEFILE=		GNUmakefile
 GNU_CONFIGURE=		yes
+USE_LATEX=  build
 
 .include "../../www/curl/buildlink3.mk"
 .include "../../lang/ghc/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: devel/doxygen/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/doxygen/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- devel/doxygen/Makefile	13 Oct 2005 12:15:57 -0000	1.37
+++ devel/doxygen/Makefile	17 Oct 2005 16:05:35 -0000
@@ -10,8 +10,6 @@
 HOMEPAGE=	http://www.doxygen.org/
 COMMENT=	Documentation system for C++, Java, IDL and C
 
-DEPENDS+=	teTeX-[0-9]*:../../print/teTeX
-
 WRKSRC=			${WRKDIR}/${PKGNAME_NOREV}
 USE_TOOLS+=		gmake perl flex
 USE_LANGUAGES=		c c++
@@ -38,4 +36,5 @@
 .include "../../graphics/graphviz/buildlink3.mk"
 .include "../../lang/python/application.mk"
 .include "../../mk/ghostscript.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: devel/pvs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/pvs/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- devel/pvs/Makefile	28 Sep 2005 20:52:19 -0000	1.21
+++ devel/pvs/Makefile	17 Oct 2005 16:05:35 -0000
@@ -16,7 +16,6 @@
 HOMEPAGE=		http://pvs.csl.sri.com/
 COMMENT=		The PVS Specification and Verification System
 
-DEPENDS+=		teTeX>=1.0.7:../../print/teTeX
 DEPENDS+=		tk>=8.0:../../x11/tk
 
 WRKSRC=			${WRKDIR}
@@ -64,5 +63,6 @@
 	cd ${WRKSRC} && ${PAX} -s ,^./[.].*,, -rw . ${PREFIX}/pvs
 	${CHMOD} 755 ${PREFIX}/pvs/pvs
 
+.include "../../mk/latex.mk"
 .include "../../mk/emacs.mk"
 .include "../../mk/bsd.pkg.mk"
Index: editors/TeXmacs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/editors/TeXmacs/Makefile,v
retrieving revision 1.47
diff -u -r1.47 Makefile
--- editors/TeXmacs/Makefile	26 Aug 2005 17:21:04 -0000	1.47
+++ editors/TeXmacs/Makefile	17 Oct 2005 16:05:35 -0000
@@ -9,8 +9,6 @@
 HOMEPAGE=	http://www.texmacs.org/
 COMMENT=	GNU TeXmacs (free scientific text editor)
 
-DEPENDS+=	teTeX-bin>=1.0:../../print/teTeX-bin
-
 BUILD_TARGET=	TEXMACS
 
 USE_TOOLS+=		gmake
@@ -29,5 +27,6 @@
 .include "../../lang/guile/buildlink3.mk"
 .include "../../mk/x11.buildlink3.mk"
 .include "../../lang/python/application.mk"
+.include "../../mk/latex.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: editors/lyx-qt/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/editors/lyx-qt/Makefile.common,v
retrieving revision 1.28
diff -u -r1.28 Makefile.common
--- editors/lyx-qt/Makefile.common	7 Sep 2005 17:40:08 -0000	1.28
+++ editors/lyx-qt/Makefile.common	17 Oct 2005 16:05:35 -0000
@@ -12,7 +12,6 @@
 COMMENT=		Graphical frontend for LaTeX
 
 CONFLICTS=		lyx-[0-9]*
-DEPENDS+=		teTeX-[0-9]*:../../print/teTeX
 
 MESSAGE_SRC=		${.CURDIR}/../../editors/lyx-qt/MESSAGE
 DISTINFO_FILE=		${.CURDIR}/../../editors/lyx-qt/distinfo
@@ -82,3 +81,4 @@
 .include "../../textproc/aspell/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/x11.buildlink3.mk"
+.include "../../mk/latex.mk"
Index: fonts/ec-fonts-mftraced/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/ec-fonts-mftraced/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- fonts/ec-fonts-mftraced/Makefile	22 May 2005 20:07:59 -0000	1.5
+++ fonts/ec-fonts-mftraced/Makefile	17 Oct 2005 16:05:35 -0000
@@ -9,7 +9,7 @@
 HOMEPAGE=		http://lilypond.org/
 COMMENT=		EC PostScript Type1 fonts with TFMs for TeX
 
-DEPENDS+=		teTeX>=2.0.2:../../print/teTeX
+LATEX_VERSIONS_ACCEPTED= 2 3
 
 USE_PKGLOCALEDIR=	yes
 HAS_CONFIGURE=		yes
@@ -20,4 +20,5 @@
 	${PREFIX}/bin/mktexlsr
 
 .include "../../fonts/mftrace/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: fonts/mftrace/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/mftrace/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- fonts/mftrace/Makefile	16 Jun 2005 06:57:52 -0000	1.9
+++ fonts/mftrace/Makefile	17 Oct 2005 16:05:35 -0000
@@ -13,7 +13,6 @@
 DEPENDS+=	potrace>=1.5:../../graphics/potrace
 DEPENDS+=	fontforge>=20041115:../../fonts/fontforge
 DEPENDS+=	t1utils>=1.27:../../fonts/t1utils
-DEPENDS+=	teTeX>=2.0.2:../../print/teTeX
 
 USE_TOOLS+=		gmake
 GNU_CONFIGURE=		yes
@@ -22,6 +21,7 @@
 
 PLIST_SUBST+=		PYSITELIB=${PYSITELIB}
 PYTHON_VERSIONS_ACCEPTED=	24 23 22 21
+LATEX_VERSIONS_ACCEPTED= 2 3
 
 INSTALLATION_DIRS=	bin man/man1 ${PYSITELIB}
 
@@ -39,4 +39,5 @@
 	${INSTALL_DATA} ${WRKSRC}/tfm.pyc ${PREFIX}/${PYSITELIB}
 
 .include "../../lang/python/application.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: fonts/ttf2pk/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/ttf2pk/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- fonts/ttf2pk/Makefile	28 Sep 2005 20:52:22 -0000	1.6
+++ fonts/ttf2pk/Makefile	17 Oct 2005 16:05:35 -0000
@@ -23,7 +23,7 @@
 USE_LIBTOOL=		yes
 USE_TOOLS+=		autoconf
 
-TEXMF=			${PREFIX}/share/texmf
+TEXMF=			${LATEX_LOCALTEXMFPREFIX}
 INSTALLATION_DIRS=	bin man/man1
 
 pre-configure:
@@ -55,6 +55,6 @@
 			${PREFIX}/bin/mktexlsr
 
 .include "../../graphics/freetype-lib/buildlink3.mk"
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: fonts/ttf2pk/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/fonts/ttf2pk/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- fonts/ttf2pk/PLIST	9 Oct 2004 14:15:22 -0000	1.1.1.1
+++ fonts/ttf2pk/PLIST	17 Oct 2005 16:05:35 -0000
@@ -3,26 +3,26 @@
 bin/ttf2tfm
 man/man1/ttf2pk.1
 man/man1/ttf2tfm.1
-share/texmf/doc/ttf2pk/BUGS
-share/texmf/doc/ttf2pk/README
-share/texmf/doc/ttf2pk/TODO
-share/texmf/doc/ttf2pk/ttf2pk.doc
-share/texmf/doc/ttf2pk/ttfonts.map
-share/texmf/ttf2pk
-share/texmf/ttf2tfm/base/Big5.sfd
-share/texmf/ttf2tfm/base/ET5.enc
-share/texmf/ttf2tfm/base/EUC.sfd
-share/texmf/ttf2tfm/base/SJIS.sfd
-share/texmf/ttf2tfm/base/T1-WGL4.enc
-share/texmf/ttf2tfm/base/UBg5plus.sfd
-share/texmf/ttf2tfm/base/UBig5.sfd
-share/texmf/ttf2tfm/base/UGB.sfd
-share/texmf/ttf2tfm/base/UGBK.sfd
-share/texmf/ttf2tfm/base/UJIS.sfd
-share/texmf/ttf2tfm/base/UKS.sfd
-share/texmf/ttf2tfm/base/Unicode.sfd
-share/texmf/ttf2tfm/base/VPS.rpl
-share/texmf/ttf2tfm/base/ttfonts.map
+${LATEX_LOCALTEXMFPREFIX}/doc/ttf2pk/BUGS
+${LATEX_LOCALTEXMFPREFIX}/doc/ttf2pk/README
+${LATEX_LOCALTEXMFPREFIX}/doc/ttf2pk/TODO
+${LATEX_LOCALTEXMFPREFIX}/doc/ttf2pk/ttf2pk.doc
+${LATEX_LOCALTEXMFPREFIX}/doc/ttf2pk/ttfonts.map
+${LATEX_LOCALTEXMFPREFIX}/ttf2pk
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/Big5.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/ET5.enc
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/EUC.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/SJIS.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/T1-WGL4.enc
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UBg5plus.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UBig5.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UGB.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UGBK.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UJIS.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/UKS.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/Unicode.sfd
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/VPS.rpl
+${LATEX_LOCALTEXMFPREFIX}/ttf2tfm/base/ttfonts.map
 @dirrm share/texmf/ttf2tfm/base
 @dirrm share/texmf/ttf2tfm
 @dirrm share/texmf/doc/ttf2pk
Index: graphics/xdvipresent/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/xdvipresent/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- graphics/xdvipresent/Makefile	16 Jun 2005 06:57:59 -0000	1.10
+++ graphics/xdvipresent/Makefile	17 Oct 2005 16:05:35 -0000
@@ -36,5 +36,5 @@
 	${INSTALL_DATA} ${WRKSRC}/doc/xdvipresent_html/* ${HTML_DIR}
 	${PREFIX}/bin/texconfig rehash
 
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: math/pari/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/math/pari/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- math/pari/Makefile	8 Sep 2005 08:39:59 -0000	1.28
+++ math/pari/Makefile	17 Oct 2005 16:05:36 -0000
@@ -9,7 +9,7 @@
 HOMEPAGE=	http://pari.math.u-bordeaux.fr/
 COMMENT=	Software package for computer-aided number theory
 
-BUILD_DEPENDS+= 	teTeX-[0-9]*:../../print/teTeX
+USE_LATEX= build
 
 USE_GNU_READLINE=	yes	# rl_save_prompt()
 USE_LIBTOOL=		yes
@@ -28,4 +28,5 @@
 .include "../../devel/ncurses/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
 .include "../../mk/x11.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/advi/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/advi/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- print/advi/Makefile	1 Jun 2005 18:03:08 -0000	1.13
+++ print/advi/Makefile	17 Oct 2005 16:05:37 -0000
@@ -9,7 +9,6 @@
 HOMEPAGE=		http://pauillac.inria.fr/advi/
 COMMENT=		Active-DVI Presenter
 
-DEPENDS+=		teTeX-[0-9]*:../../print/teTeX
 BUILD_DEPENDS+=		ocaml>=3.04:../../lang/ocaml
 
 USE_PKGLOCALEDIR=	yes
@@ -49,5 +48,6 @@
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../x11/lablgtk/buildlink3.mk"
 .include "../../x11/ocaml-graphics/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/auctex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/auctex/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- print/auctex/Makefile	15 Oct 2005 20:09:35 -0000	1.22
+++ print/auctex/Makefile	17 Oct 2005 16:05:37 -0000
@@ -10,7 +10,7 @@
 COMMENT=		Enhanced LaTeX mode for Emacs
 
 .include "../../mk/emacs.mk"
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
+.include "../../mk/latex.mk"
 
 USE_TOOLS+=		gmake
 USE_PKGINSTALL=		yes
Index: print/chktex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/chktex/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- print/chktex/Makefile	16 Jul 2005 19:10:40 -0000	1.11
+++ print/chktex/Makefile	17 Oct 2005 16:05:37 -0000
@@ -1,22 +1,28 @@
 # $NetBSD: Makefile,v 1.11 2005/07/16 19:10:40 jlam Exp $
 #
 
-DISTNAME=	chktex-1.6.1
-PKGREVISION=	3
+DISTNAME=	chktex-1.6.3
 CATEGORIES=	print
-MASTER_SITES=	http://savannah.nongnu.org/download/chktex/chktex.pkg/1.6.1/
+MASTER_SITES=	http://baruch.ev-en.org/proj/chktex/
 
 MAINTAINER=	recht@NetBSD.org
-HOMEPAGE=	http://www.nongnu.org/chktex/
+HOMEPAGE=	http://baruch.ev-en.org/proj/chktex/
 COMMENT=	LaTeX semantic checker
 
 DEPENDS+=	lynx-[0-9]*:../../www/lynx
 
+USE_PKGINSTALL=yes
+EGDIR=      ${PREFIX}/share/examples/chktex
+CONF_FILES=   ${EGDIR}/chktexrc ${PKG_SYSCONFDIR}/chktexrc
+
 USE_TOOLS+=	gmake perl:run
 GNU_CONFIGURE=	YES
 CFLAGS+=	-D__unix__
 CONFIGURE_ENV+=	PERL5="${PERL5}"
-MAKE_ENV+=	INSTALL_SCRIPT="${INSTALL_SCRIPT}"
+MAKE_ENV+=	INSTALL_SCRIPT="${INSTALL_SCRIPT}" EGDIR="${EGDIR}"
+
+pre-install:
+	${INSTALL_DATA_DIR} ${EGDIR}
 
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/chktex/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/print/chktex/PLIST,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 PLIST
--- print/chktex/PLIST	6 Apr 2003 14:37:38 -0000	1.1.1.1
+++ print/chktex/PLIST	17 Oct 2005 16:05:37 -0000
@@ -3,5 +3,5 @@
 bin/chkweb
 bin/deweb
 man/man1/deweb.1
-share/chktex/chktexrc
-@dirrm share/chktex
+share/examples/chktex/chktexrc
+@dirrm share/examples/chktex
Index: print/chktex/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/chktex/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- print/chktex/distinfo	24 Feb 2005 12:51:41 -0000	1.2
+++ print/chktex/distinfo	17 Oct 2005 16:05:37 -0000
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.2 2005/02/24 12:51:41 agc Exp $
 
-SHA1 (chktex-1.6.1.tar.gz) = 8e34753861e7971616145b249383d1de9e673347
-RMD160 (chktex-1.6.1.tar.gz) = 71d99232e517fe5e6059a577589322d63273123e
-Size (chktex-1.6.1.tar.gz) = 178324 bytes
-SHA1 (patch-aa) = 97f116b5cdc60cb100a08291972cf5d935e6c766
+SHA1 (chktex-1.6.3.tar.gz) = 9ae85c99f11fc99a088c3055eca40c9de04e686c
+RMD160 (chktex-1.6.3.tar.gz) = 668178bd03841e66e479aafee48b916e1e879243
+Size (chktex-1.6.3.tar.gz) = 213163 bytes
+SHA1 (patch-aa) = a2f853763427432897235fb09aaadbe5616427bf
Index: print/chktex/patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/print/chktex/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- print/chktex/patches/patch-aa	6 Apr 2003 14:37:38 -0000	1.1.1.1
+++ print/chktex/patches/patch-aa	17 Oct 2005 16:05:37 -0000
@@ -1,16 +1,21 @@
-$NetBSD: patch-aa,v 1.1.1.1 2003/04/06 14:37:38 wiz Exp $
+$NetBSD$
 
---- Makefile.in.orig	2003-04-01 18:13:16.000000000 +0200
-+++ Makefile.in	2003-04-01 18:13:50.000000000 +0200
-@@ -192,8 +192,9 @@
+--- Makefile.in.orig	2005-01-01 21:51:11.000000000 +0100
++++ Makefile.in
+@@ -141,11 +141,13 @@ chktex: $(OBJS)
  
  install: chktex ChkTeX.dvi
- 	$(INSTALL) -d $(bindir)
+ 	$(INSTALL) -d $(DESTDIR)$(bindir)
 -	for program in chktex $(SCRIPTS); do \
--		$(INSTALL_PROGRAM) $$program  $(bindir); \
-+	$(INSTALL_PROGRAM) chktex  $(bindir);
+-		$(INSTALL_PROGRAM) $$program  $(DESTDIR)$(bindir); \
++	$(INSTALL_PROGRAM) chktex  $(DESTDIR)$(bindir);
 +	for program in $(SCRIPTS); do \
-+		$(INSTALL_SCRIPT) $$program  $(bindir); \
++		$(INSTALL_SCRIPT) $$program  $(DESTDIR)$(bindir); \
  	done
- 	$(INSTALL) -d $(datadir)
- 	$(INSTALL_DATA) chktexrc $(datadir)
+ 	$(INSTALL) -d $(DESTDIR)$(sysconfdir)
+-	$(INSTALL_DATA) $(srcdir)/chktexrc $(DESTDIR)$(sysconfdir)
++	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(EGDIR)
++	$(INSTALL_DATA) $(srcdir)/chktexrc $(DESTDIR)$(EGDIR)
+ 	if (eval echo "$(SCRIPTS)") | egrep deweb >/dev/null 2>&1; then \
+ 		$(INSTALL) -d $(DESTDIR)$(mandir); \
+ 		$(INSTALL) -d $(DESTDIR)$(mandir)/man1; \
Index: print/cjk-lyx/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/cjk-lyx/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- print/cjk-lyx/Makefile	16 Jul 2005 01:19:18 -0000	1.16
+++ print/cjk-lyx/Makefile	17 Oct 2005 16:05:37 -0000
@@ -21,7 +21,6 @@
 CONFLICTS=	lyx-[0-9]*
 
 DEPENDS+=	ispell-base-[0-9]*:../../textproc/ispell-base
-DEPENDS+=	teTeX-bin>=1.0.7nb1:../../print/teTeX-bin
 
 USE_LANGUAGES=		c c++
 USE_PKGLOCALEDIR=	yes
@@ -32,5 +31,6 @@
 .include "../../graphics/jpeg/buildlink3.mk"
 .include "../../graphics/xpm/buildlink3.mk"
 .include "../../x11/xforms/buildlink3.mk"
+.include "../../mk/latex.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: print/dvipdfm/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/dvipdfm/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- print/dvipdfm/Makefile	28 Sep 2005 20:52:25 -0000	1.18
+++ print/dvipdfm/Makefile	17 Oct 2005 16:05:37 -0000
@@ -12,6 +12,7 @@
 CONFLICTS+=	dvipdfmx-[0-9]*
 CONFLICTS+=	ja-dvipdfm-[0-9]*
 CONFLICTS+=	teTeX-bin>=2.0			# Part of teTeX>=2.0
+USE_TETEX1= yes
 
 WRKSRC=			${WRKDIR}/dvipdfm
 GNU_CONFIGURE=		yes
@@ -33,6 +34,6 @@
 	mktexlsr
 
 .include "../../graphics/png/buildlink3.mk"
-.include "../../print/teTeX1-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/dvipdfmx/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/dvipdfmx/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- print/dvipdfmx/Makefile	8 Oct 2005 12:00:04 -0000	1.14
+++ print/dvipdfmx/Makefile	17 Oct 2005 16:05:37 -0000
@@ -11,7 +11,7 @@
 COMMENT=	Dvi to pdf converter with CID-keyed font support
 
 DEPENDS+=	adobe-cmaps-[0-9]*:../../fonts/adobe-cmaps
-DEPENDS+=	teTeX-bin>=2.0.2:../../print/teTeX-bin
+LATEX_VERSIONS_ACCEPTED= 2 3
 
 CONFLICTS+=	dvipdfm-[0-9]*
 CONFLICTS+=	ja-dvipdfm-[0-9]*
@@ -24,7 +24,7 @@
 #CONFIGURE_ARGS+=	--datadir=${PREFIX}/share
 
 .include "../../graphics/png/buildlink3.mk"
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/dvipng/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/dvipng/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- print/dvipng/Makefile	11 Apr 2005 21:47:06 -0000	1.15
+++ print/dvipng/Makefile	17 Oct 2005 16:05:37 -0000
@@ -20,6 +20,6 @@
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../graphics/gd/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: print/html2ps/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/html2ps/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- print/html2ps/Makefile	16 Jul 2005 01:19:18 -0000	1.15
+++ print/html2ps/Makefile	17 Oct 2005 16:05:37 -0000
@@ -14,7 +14,6 @@
 DEPENDS+=	jpeg>=6b:../../graphics/jpeg
 DEPENDS+=	p5-PerlMagick-[0-9]*:../../graphics/p5-PerlMagick
 DEPENDS+=	p5-libwww-[0-9]*:../../www/p5-libwww
-DEPENDS+=	teTeX-bin>=1.0.6:../../print/teTeX3-bin
 DEPENDS+=	weblint-[0-9]*:../../www/weblint
 
 USE_TOOLS+=	perl:run
@@ -28,4 +27,5 @@
 	@${INSTALL_DATA} ${WRKSRC}/sample ${PREFIX}/lib/html2ps/sample.rc
 
 .include "../../mk/ghostscript.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/ja-dvipdfm/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/ja-dvipdfm/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- print/ja-dvipdfm/Makefile	28 Sep 2005 20:52:26 -0000	1.13
+++ print/ja-dvipdfm/Makefile	17 Oct 2005 16:05:37 -0000
@@ -16,7 +16,7 @@
 
 CONFLICTS+=	dvipdfm-[0-9]*
 CONFLICTS+=	dvipdfmx-[0-9]*
-CONFLICTS+=	teTeX-bin>=2.0
+USE_TETEX1= yes
 
 WRKSRC=		${WRKDIR}/dvipdfm
 GNU_CONFIGURE=	yes
@@ -35,6 +35,6 @@
 	${PREFIX}/bin/mktexlsr
 
 .include "../../graphics/png/buildlink3.mk"
-.include "../../print/teTeX1-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/ja-ptex-bin/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/ja-ptex-bin/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- print/ja-ptex-bin/Makefile	17 May 2005 22:00:13 -0000	1.17
+++ print/ja-ptex-bin/Makefile	17 Oct 2005 16:05:37 -0000
@@ -27,6 +27,7 @@
 INSTALL_EXTRA_TMPL+=	${.CURDIR}/INSTALL
 DEINSTALL_EXTRA_TMPL+=	${.CURDIR}/DEINSTALL
 
+LATEX_VERSIONS_ACCEPTED= 2
 .include "../../print/teTeX-bin/Makefile.common"
 
 PTEX_VERS=		3.1.2
@@ -112,5 +113,5 @@
 pre-clean:
 	cd ../../print/teTeX-bin && ${MAKE} clean
 
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/ja-ptex-share/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/ja-ptex-share/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- print/ja-ptex-share/Makefile	17 May 2005 22:00:13 -0000	1.12
+++ print/ja-ptex-share/Makefile	17 Oct 2005 16:05:37 -0000
@@ -18,7 +18,7 @@
 HOMEPAGE=	http://www.ascii.co.jp/pb/ptex/
 COMMENT=	Library files for pTeX
 
-DEPENDS+=	teTeX>=2.0.1:../../print/teTeX
+LATEX_VERSIONS_ACCEPTED= 2
 
 WRKSRC=			${WRKDIR}
 DIST_SUBDIR=		teTeX
@@ -41,4 +41,5 @@
 		${MV} ${TEXMFLOCAL}/fonts/$$f/vf ${TEXMFLOCAL}/fonts/vf/$$f; \
 	done
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/ja-vfxdvik/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/ja-vfxdvik/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- print/ja-vfxdvik/Makefile	1 Jun 2005 18:03:20 -0000	1.15
+++ print/ja-vfxdvik/Makefile	17 Oct 2005 16:05:37 -0000
@@ -70,11 +70,7 @@
 do-install:
 	cd ${XDVI_DIR} && ${MAKE_PROGRAM} install
 
-.if defined(USE_TEXFAMILY)
-.include "../../print/teTeX1-bin/kpathsea.buildlink3.mk"
-.else
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
-.endif
+.include "../../mk/latex.mk"
 .include "../../www/libwww/buildlink3.mk"
 .include "../../print/ja-vflib-lib/buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
Index: print/lgrind/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/lgrind/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- print/lgrind/Makefile	29 Sep 2005 14:21:08 -0000	1.22
+++ print/lgrind/Makefile	17 Oct 2005 16:05:37 -0000
@@ -10,8 +10,6 @@
 MAINTAINER=	jwise@NetBSD.org
 COMMENT=	Source pretty printer for LaTeX
 
-DEPENDS+=	teTeX-bin>=1.0:../../print/teTeX-bin
-
 WRKSRC=		${WRKDIR}/lgrind/source
 NO_SRC_ON_FTP=	Already in MASTER_SITE_LOCAL
 NO_CONFIGURE=	yes
@@ -45,4 +43,5 @@
 			> ${BUILDLINK_DIR}/include/malloc.h;	\
 	fi
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/lilypond/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/lilypond/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- print/lilypond/Makefile	22 May 2005 20:08:28 -0000	1.34
+++ print/lilypond/Makefile	17 Oct 2005 16:05:37 -0000
@@ -46,8 +46,8 @@
 .include "../../fonts/mftrace/buildlink3.mk"
 .include "../../lang/guile/buildlink3.mk"
 .include "../../lang/python/application.mk"
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
 .include "../../textproc/scrollkeeper/omf.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/emacs.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/magicfilter/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/magicfilter/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- print/magicfilter/Makefile	18 Jul 2005 02:37:22 -0000	1.42
+++ print/magicfilter/Makefile	17 Oct 2005 16:05:37 -0000
@@ -12,7 +12,6 @@
 #
 DEPENDS+=	a2ps-[0-9]*:../../print/a2ps
 DEPENDS+=	netpbm-[0-9]*:../../graphics/netpbm
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
 DEPENDS+=	papersize-[0-9]*:../../print/papersize
 
 USE_TOOLS+=	gmake gzip
@@ -45,4 +44,5 @@
 	@${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC}
 
 .include "../../mk/ghostscript.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-IEEEtran/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-IEEEtran/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- print/tex-IEEEtran/Makefile	2 Aug 2005 14:48:43 -0000	1.3
+++ print/tex-IEEEtran/Makefile	17 Oct 2005 16:05:37 -0000
@@ -13,8 +13,6 @@
 DIST_SUBDIR=	${DISTNAME}
 DISTFILES= IEEEtran.cls IEEEtran_HOWTO.pdf README bare_conf.tex bare_jrnl.tex
 
-DEPENDS+=       teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 EXTRACT_ONLY=	# nothing
 NO_CONFIGURE=	yes
 NO_BUILD=	yes
@@ -30,4 +28,5 @@
 post-install:
 	${LOCALBASE}/bin/texconfig rehash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-chemarrow/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-chemarrow/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- print/tex-chemarrow/Makefile	16 May 2005 22:30:24 -0000	1.1
+++ print/tex-chemarrow/Makefile	17 Oct 2005 16:05:37 -0000
@@ -11,8 +11,6 @@
 HOMEPAGE=	http://tug.ctan.org/tex-archive/help/Catalogue/entries/chemarrow.html
 COMMENT=	New arrow heads for chemical reaction schemes
 
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 NO_CONFIGURE=	yes
 NO_BUILD=	yes
 
@@ -35,4 +33,5 @@
 	${LOCALBASE}/bin/texconfig rehash
 	${LOCALBASE}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-eurosym/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-eurosym/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- print/tex-eurosym/Makefile	11 Feb 2005 00:57:44 -0000	1.11
+++ print/tex-eurosym/Makefile	17 Oct 2005 16:05:37 -0000
@@ -12,7 +12,7 @@
 COMMENT=	Euro symbols for LaTeX
 
 # included in teTeX[23]
-DEPENDS+=	teTeX-bin-1.0.*:../../print/teTeX1-bin
+LATEX_VERSIONS_ACCEPTED= 1
 CONFLICTS+=	teTeX>1
 
 WRKSRC=		${WRKDIR}/eurosym
@@ -34,4 +34,5 @@
 		${PREFIX}/share/texmf/tex/latex/eurosym
 	${LOCALBASE}/bin/texconfig rehash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-hugelatex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-hugelatex/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- print/tex-hugelatex/Makefile	2 Apr 2005 20:19:02 -0000	1.12
+++ print/tex-hugelatex/Makefile	17 Oct 2005 16:05:37 -0000
@@ -10,14 +10,14 @@
 MAINTAINER=	hubertf@NetBSD.org
 COMMENT=	LaTeX format files with large limits
 
-DEPENDS+=	teTeX>=2:../../print/teTeX
+LATEX_VERSIONS_ACCEPTED= 2 3
 
 WRKSRC=		${WRKDIR}
 EXTRACT_ONLY=	# nothing
 NO_CHECKSUM=	yes
 NO_BUILD=	yes
 
-TEXMF_CNF=	${LOCALBASE}/share/texmf/web2c/texmf.cnf
+TEXMF_CNF=	${LATEX_TEXMFPREFIX}/web2c/texmf.cnf
 
 do-install:
 	${CP} -p ${TEXMF_CNF} ${TEXMF_CNF}-before-hugelatex
@@ -33,4 +33,5 @@
 	${LN} -s latex ${PREFIX}/bin/hugelatex
 	${PREFIX}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-musixtex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-musixtex/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- print/tex-musixtex/Makefile	17 Jun 2005 03:50:31 -0000	1.11
+++ print/tex-musixtex/Makefile	17 Oct 2005 16:05:37 -0000
@@ -11,13 +11,13 @@
 HOMEPAGE=	http://icking-music-archive.sunsite.dk/
 COMMENT=	TeX macros to typeset music
 
-DEPENDS+=       teTeX>=2:../../print/teTeX
+LATEX_VERSIONS_ACCEPTED= 2 3
 
 WRKSRC=		${WRKDIR}/musixtex-T112
 NO_CONFIGURE=	yes
 
-TEXMF=		${LOCALBASE}/share/texmf
-TEXMF_CNF=	${LOCALBASE}/share/texmf/web2c/texmf.cnf
+TEXMF=		${LATEX_TEXMFPREFIX}
+TEXMF_CNF=	${LATEX_TEXMFPREFIX}/web2c/texmf.cnf
 
 .include "../../mk/bsd.prefs.mk"
 .if exists(${LOCALBASE}/bin/initex)
@@ -84,4 +84,5 @@
 		latex  musixdoc ; \
 		dvips musixdoc.dvi -o musixdoc.ps
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-ocrb/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-ocrb/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- print/tex-ocrb/Makefile	28 Sep 2005 14:31:08 -0000	1.7
+++ print/tex-ocrb/Makefile	17 Oct 2005 16:05:37 -0000
@@ -11,8 +11,6 @@
 # HOMEPAGE=
 COMMENT=	OCR-B font for LaTeX
 
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 WRKSRC=		${WRKDIR}/ocr-b
 DIST_SUBDIR=	${DISTNAME}
 DISTFILES= ocrb10.mf ocrb10e.mf ocrb10f.mf ocrb10g.mf ocrb10l.mf \
@@ -38,4 +36,5 @@
 		${PREFIX}/share/texmf/fonts/source/ocrb
 	${LOCALBASE}/bin/texconfig rehash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-prosper/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-prosper/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- print/tex-prosper/Makefile	28 Sep 2005 19:07:49 -0000	1.5
+++ print/tex-prosper/Makefile	17 Oct 2005 16:05:37 -0000
@@ -12,8 +12,6 @@
 HOMEPAGE=	http://prosper.sourceforge.net/
 COMMENT=	LaTeX class for writing transparencies
 
-DEPENDS=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 WRKSRC=		${WRKDIR}/prosper
 NO_CONFIGURE=	yes
 NO_BUILD=	yes
@@ -44,4 +42,5 @@
 .endfor
 	${LOCALBASE}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-textpos/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-textpos/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- print/tex-textpos/Makefile	28 Sep 2005 14:31:08 -0000	1.11
+++ print/tex-textpos/Makefile	17 Oct 2005 16:05:37 -0000
@@ -17,7 +17,7 @@
 DISTFILES=	textpos.ins LICENCE README textpos.dtx VERSION
 
 # included in teTeX3
-DEPENDS+=       teTeX-bin<3.0:../../print/teTeX-bin
+LATEX_VERSIONS_ACCEPTED= 1 2
 CONFLICTS+=	teTeX-bin>=3.0
 
 NO_CONFIGURE=	yes
@@ -36,4 +36,5 @@
 	cd ${PREFIX}/share/texmf/tex/latex/textpos; latex textpos.ins
 	${LOCALBASE}/bin/texconfig rehash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/tex-ucs/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/tex-ucs/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- print/tex-ucs/Makefile	9 Aug 2005 18:33:38 -0000	1.1.1.1
+++ print/tex-ucs/Makefile	17 Oct 2005 16:05:37 -0000
@@ -11,8 +11,6 @@
 HOMEPAGE=		http://www.unruh.de/DniQ/latex/unicode/
 COMMENT=		LaTeX UTF-8 support
 
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 WRKSRC=		${WRKDIR}/ucs
 NO_CONFIGURE=	yes
 NO_BUILD=	yes
@@ -31,4 +29,5 @@
 post-install:
 	${LOCALBASE}/bin/texconfig rehash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: print/texfamily-share/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/texfamily-share/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- print/texfamily-share/Makefile	26 Mar 2004 02:27:52 -0000	1.12
+++ print/texfamily-share/Makefile	17 Oct 2005 16:05:37 -0000
@@ -19,8 +19,6 @@
 MAINTAINER=	kei@NetBSD.org
 COMMENT=	Machine-independent part of TeXfamily (pTeX, JTeX, MuLTeX)
 
-DEPENDS+=	teTeX>=1.0.7nb1:../../print/teTeX
-
 WRKSRC=		${WRKDIR}
 DIST_SUBDIR=	TeXfamily
 EXTRACT_ONLY=	jis${EXTRACT_SUFX} nmin-ngoth${EXTRACT_SUFX} \
@@ -67,4 +65,5 @@
 	 	${ECHO} "@dirrm $$DIR" >>${PLIST_SRC}; \
 	 done
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: textproc/latex2html/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/latex2html/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- textproc/latex2html/Makefile	9 Oct 2005 20:02:29 -0000	1.19
+++ textproc/latex2html/Makefile	17 Oct 2005 16:05:37 -0000
@@ -10,7 +10,6 @@
 HOMEPAGE=	http://www.latex2html.org/
 COMMENT=	LaTeX to HTML converter
 
-DEPENDS+=       teTeX-bin>=1.0.6:../../print/teTeX-bin
 DEPENDS+=	netpbm>=10.29nb2:../../graphics/netpbm
 
 USE_TOOLS+=		perl:run
@@ -20,11 +19,12 @@
 
 CONFIGURE_ARGS+=	--enable-gif	# add support of GIF images
 CONFIGURE_ARGS+=	--enable-png	# add support of PNG images
-CONFIGURE_ARGS+=	--with-texpath=${PREFIX}/share/texmf/tex/latex/html
+CONFIGURE_ARGS+=	--with-texpath=${LATEX_LOCALTEXMFPREFIX}/tex/latex/html
 CONFIGURE_ARGS+=	--shlibdir=${PREFIX}/share/latex2html
 .if defined(LATEX2HTML_ICONPATH)
 CONFIGURE_ARGS+=	--with-iconpath=${LATEX2HTML_ICONPATH}
 .endif
 
+.include "../../mk/latex.mk"
 .include "../../mk/ghostscript.mk"
 .include "../../mk/bsd.pkg.mk"
Index: textproc/latex2html/PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/latex2html/PLIST,v
retrieving revision 1.4
diff -u -r1.4 PLIST
--- textproc/latex2html/PLIST	8 Dec 2002 22:32:07 -0000	1.4
+++ textproc/latex2html/PLIST	17 Oct 2005 16:05:37 -0000
@@ -332,19 +332,19 @@
 share/latex2html/versions/techexpl.pl
 share/latex2html/versions/unicode.pl
 share/latex2html/versions/utf8.pl
-share/texmf/tex/latex/html/floatflt.ins
-share/texmf/tex/latex/html/frames.sty
-share/texmf/tex/latex/html/heqn.sty
-share/texmf/tex/latex/html/hthtml.sty
-share/texmf/tex/latex/html/html.sty
-share/texmf/tex/latex/html/htmllist.sty
-share/texmf/tex/latex/html/justify.sty
-share/texmf/tex/latex/html/latin9.def
-share/texmf/tex/latex/html/ldump.sty
-share/texmf/tex/latex/html/techexplHTML.tex
-share/texmf/tex/latex/html/url.sty
-share/texmf/tex/latex/html/verbatimfiles.sty
-@dirrm share/texmf/tex/latex/html
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/floatflt.ins
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/frames.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/heqn.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/hthtml.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/html.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/htmllist.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/justify.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/latin9.def
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/ldump.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/techexplHTML.tex
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/url.sty
+${LATEX_LOCALTEXMFPREFIX}/tex/latex/html/verbatimfiles.sty
+@dirrm ${LATEX_LOCALTEXMFPREFIX}/tex/latex/html
 @dirrm share/latex2html/versions
 @dirrm share/latex2html/texinputs
 @dirrm share/latex2html/styles
Index: textproc/rubber/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/rubber/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- textproc/rubber/Makefile	18 Jul 2005 13:46:45 -0000	1.6
+++ textproc/rubber/Makefile	17 Oct 2005 16:05:37 -0000
@@ -9,8 +9,6 @@
 HOMEPAGE=		http://www.pps.jussieu.fr/~beffara/soft/rubber/
 COMMENT=		Automated system for building LaTeX documents
 
-DEPENDS+=		teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 USE_PKGLOCALEDIR=	yes
 HAS_CONFIGURE=		yes
 USE_TOOLS+=         gmake
@@ -23,4 +21,5 @@
 			--datadir=${PREFIX}/share
 
 .include "../../lang/python/application.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/p5-SVN-Web/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/p5-SVN-Web/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- www/p5-SVN-Web/Makefile	6 Aug 2005 06:19:40 -0000	1.12
+++ www/p5-SVN-Web/Makefile	17 Oct 2005 16:05:37 -0000
@@ -26,9 +26,9 @@
 DEPENDS+=	p5-XML-Parser>=2.30:../../textproc/p5-XML-Parser
 DEPENDS+=	p5-XML-RSS>=0.9:../../textproc/p5-XML-RSS
 DEPENDS+=	p5-XML-XPath>=1.08:../../textproc/p5-XML-XPath
-DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 
 PERL5_PACKLIST=		auto/SVN/Web/.packlist
 
 .include "../../lang/perl5/module.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/p5-Template-Extract/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/p5-Template-Extract/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/p5-Template-Extract/Makefile	6 Aug 2005 06:19:40 -0000	1.8
+++ www/p5-Template-Extract/Makefile	17 Oct 2005 16:05:37 -0000
@@ -25,9 +25,9 @@
 DEPENDS+=	p5-XML-Parser>=2.30:../../textproc/p5-XML-Parser
 DEPENDS+=	p5-XML-RSS>=0.9:../../textproc/p5-XML-RSS
 DEPENDS+=	p5-XML-XPath>=1.08:../../textproc/p5-XML-XPath
-DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 
 PERL5_PACKLIST=		auto/Template/Extract/.packlist
 
 .include "../../lang/perl5/module.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: www/p5-Template-Generate/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/p5-Template-Generate/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- www/p5-Template-Generate/Makefile	6 Aug 2005 06:19:40 -0000	1.8
+++ www/p5-Template-Generate/Makefile	17 Oct 2005 16:05:37 -0000
@@ -25,9 +25,9 @@
 DEPENDS+=	p5-XML-Parser>=2.30:../../textproc/p5-XML-Parser
 DEPENDS+=	p5-XML-RSS>=0.9:../../textproc/p5-XML-RSS
 DEPENDS+=	p5-XML-XPath>=1.08:../../textproc/p5-XML-XPath
-DEPENDS+=	teTeX>=1.0.7:../../print/teTeX
 
 PERL5_PACKLIST=		auto/Template/Generate/.packlist
 
 .include "../../lang/perl5/module.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/PPower4/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/PPower4/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- wip/PPower4/Makefile	15 Jan 2005 12:50:02 -0000	1.5
+++ wip/PPower4/Makefile	17 Oct 2005 16:07:13 -0000
@@ -11,7 +11,6 @@
 COMMENT=	PDF presentation post processor
 
 BUILD_DEPENDS+=	unzip-[0-9]*:../../archivers/unzip
-DEPENDS+=	teTeX-bin>=1.0.6:../../print/teTeX-bin
 
 # This requires Java 1.2 or better
 USE_JAVA=	run
@@ -44,4 +43,5 @@
 	@${MKTEXLSR_PREFIX}/bin/mktexlsr
 
 .include "../../mk/java-vm.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/cjk-latex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/cjk-latex/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- wip/cjk-latex/Makefile	2 Apr 2005 21:00:07 -0000	1.7
+++ wip/cjk-latex/Makefile	17 Oct 2005 16:07:13 -0000
@@ -9,7 +9,7 @@
 HOMEPAGE=	http://cjk.ffii.org/
 COMMENT=	The CJK (Chinese, Japanese, Korean) package for LaTeX
 
-DEPENDS+=	teTeX-bin>=2:../../print/teTeX-bin
+LATEX_VERSIONS_ACCEPTED= 2 3
 DEPENDS+=	ttf2pk>=1.3.1:../../fonts/ttf2pk
 
 TEXMFMAIN=	${PREFIX}/share/texmf
@@ -41,5 +41,5 @@
 	# Update ls-R
 	@${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
 
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/evince/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/evince/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- wip/evince/Makefile	11 Aug 2005 10:08:22 -0000	1.5
+++ wip/evince/Makefile	17 Oct 2005 16:07:13 -0000
@@ -44,7 +44,7 @@
 .include "../../print/libgnomeprint/buildlink3.mk"
 .include "../../print/libgnomeprintui/buildlink3.mk"
 .include "../../print/poppler/buildlink3.mk"
-.include "../../print/teTeX-bin/kpathsea.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
 .include "../../sysutils/gnome-vfs2/buildlink3.mk"
 .include "../../textproc/intltool/buildlink3.mk"
Index: wip/pointless/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/pointless/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- wip/pointless/Makefile	18 Jul 2005 14:38:41 -0000	1.7
+++ wip/pointless/Makefile	17 Oct 2005 16:07:13 -0000
@@ -11,10 +11,10 @@
 
 DEPENDS+=               a2ps>=4.1:../../print/a2ps
 DEPENDS+=               gnuplot>=3.7:../../graphics/gnuplot
-DEPENDS+=               teTeX>=2.0:../../print/teTeX
 DEPENDS+=               Mesa>=6.0:../../graphics/Mesa
 DEPENDS+=               ghostscript-esp-nox11>=7.0:../../print/ghostscript-esp-nox11
 
+LATEX_VERSIONS_ACCEPTED= 2 3
 USE_PKGLOCALEDIR=       yes
 GNU_CONFIGURE=		yes
 
@@ -24,4 +24,5 @@
 .include "../../graphics/png/buildlink3.mk"
 .include "../../lang/python22/buildlink3.mk"
 .include "../../mk/x11.buildlink3.mk"
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/tex-foiltex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/tex-foiltex/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- wip/tex-foiltex/Makefile	15 Jan 2005 12:50:03 -0000	1.3
+++ wip/tex-foiltex/Makefile	17 Oct 2005 16:07:14 -0000
@@ -10,8 +10,6 @@
 HOMEPAGE=	http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/foiltex.html
 COMMENT=	LaTeX2e class for overhead transparencies
 
-DEPENDS+=	teTeX-bin>=1.0.2:../../print/teTeX-bin
-
 NO_CONFIGURE=	YES
 NO_BUILD=	YES
 
@@ -37,4 +35,5 @@
 post-install:
 	@${MKTEXLSR_PREFIX}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/tex-hlatex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/tex-hlatex/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- wip/tex-hlatex/Makefile	13 Oct 2005 21:32:56 -0000	1.4
+++ wip/tex-hlatex/Makefile	17 Oct 2005 16:07:14 -0000
@@ -13,8 +13,6 @@
 HOMEPAGE=	http://ftp.ktug.or.kr/mirrors/HLaTeX/hlatex.html
 COMMENT=	LaTeX package to use Hangul (UHC/KSX1001)
 
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 TEXMF=		${LOCALBASE}/share/texmf
 
@@ -113,4 +111,5 @@
 	# Part 5: rehash
 	${PREFIX}/bin/texhash
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"
Index: wip/tex-xmltex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc-wip/wip/tex-xmltex/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- wip/tex-xmltex/Makefile	18 Jul 2005 16:27:06 -0000	1.4
+++ wip/tex-xmltex/Makefile	17 Oct 2005 16:07:14 -0000
@@ -12,8 +12,6 @@
 HOMEPAGE=	http://www.dcarlisle.demon.co.uk/xmltex/manual.html
 COMMENT=	Non-validating XML parser implemented in TeX
 
-DEPENDS+=	teTeX-bin-[0-9]*:../../print/teTeX-bin
-
 NO_CONFIGURE=	yes
 
 DIST_SUBDIR=	${PKGBASE}
@@ -26,4 +24,5 @@
 	${INSTALL_DATA} xmltex.fmt pdfxmltex.fmt $$TEXMFMAIN/web2c;
 	${LOCALBASE}/bin/mktexlsr
 
+.include "../../mk/latex.mk"
 .include "../../mk/bsd.pkg.mk"

--Apple-Mail-5-237524771--