@ -1,37 +1,34 @@
# bsd.tex.mk - Common part for TeX related ports
#
TEX_MAINTAINER = freebsd-tex@FreeBSD.org
# Feature: tex
# Usage: USES=tex
# Valid ARGS: (none)
# MAINTAINER: tex@FreeBSD.org
#
# Ports which depend on TeX should use USE_TEX.
#
# USE_TEX= yes
# imports variables only, and
# USE_TEX= full
# This imports variables only, and USE_TEX= full
# means full TeXLive dependency except for documentation and source.
#
# The other valid keywords
# USE_TEX is used to enable additional specific features and
# fnctionalities for tex.
#
# base: base part
# texmf: texmf tree (except for documentation and source)
# source: source
# docs: documentation
#
# web2c: WEB2C toolchain and TeX engines
# Valid keywords for USE_TEX are as following:
# base: base part
# texmf: texmf tree (except for documentation and source)
# source: source
# docs: documentation
# web2c: WEB2C toolchain and TeX engines
# kpathsea: kpathsea library
# ptexenc: character code conversion library for pTeX
# basic: basic TeX engines including tex and pdftex
# tlmgr: tlmgr dependency (Perl modules)
# texlua: texlua53 library
# ptexenc: character code conversion library for pTeX
# basic: basic TeX engines including tex and pdftex
# tlmgr: tlmgr dependency (Perl modules)
# texlua: texlua53 library
# texluajit: texluajit library
# synctex: synctex library
# synctex: synctex library
# xpdfopen: pdfopen/pdfclose utility
#
# dvipsk: dvipsk
# dvipsk: dvipsk
# dvipdfmx: DVIPDFMx
# xdvik: XDvi
# xdvik: XDvi
# gbklatex: gbklatex
#
# formats: TeX, LaTeX, AMSTeX, ConTeXT, EplainTeX,
# CSplainTeX, METAFONT, MLTeX, PDFTeX, TeXsis
# tex: TeX
@ -52,6 +49,34 @@ TEX_MAINTAINER= freebsd-tex@FreeBSD.org
# USE_TEX= formats
# USE_TEX= latex:build dvipsk:build
. i f ! d e f i n e d ( _ I N C L U D E _ U S E S _ T E X _ M K )
_INCLUDE_USES_TEX_MK = yes
# List all valid USE_TEX features here
_VALID_TEX_FEATURES = base texmf source docs web2c kpathsea ptexenc basic \
tlmgr texlua texluajit synctex xpdfopen dvipsk dvipdfmx \
xdvik gbklatex formats tex latex pdftex jadetex luatex \
ptex xetex xmltex texhash texhash-bootstrap updmap fmtutil full
_INVALID_TEX_FEATURES =
. for var in ${USE_TEX : O :u :C /:(build | extract | lib | run | test )$//}
. if empty(_VALID_TEX_FEATURES : M ${var })
_INVALID_TEX_FEATURES += ${ var }
. e n d i f
. e n d f o r
. i f ! e m p t y ( _ I N V A L I D _ T E X _ F E A T U R E S )
IGNORE = uses unknown USE_TEX features: ${ _INVALID_TEX_FEATURES }
. e n d i f
. i f ! e m p t y ( t e x _ A R G S )
IGNORE = USES = tex takes no arguments
. e n d i f
# Make each individual feature available as _TEX_FEATURE_<FEATURENAME>
. f o r v a r i n $ { U S E _ T E X }
_TEX_FEATURE_${var : C /=.*$//:tu }= ${var :C /.*=//:S /, / /g }
. e n d f o r
# default TeX distribution. "texlive"
TEX_DEFAULT ?= texlive
@ -73,10 +98,6 @@ TEXLIVE_VERSION?= ${TEXLIVE_YEAR}0325
PLIST_SUB += $V = " ${ $V } "
. e n d f o r
.if !empty(USE_TEX : tu :MTEXLIVE )
IGNORE = "texlive" must not be defined in USE_TEX
. e n d i f
_USE_TEX_TEXMF_DEP = ${ LOCALBASE } /${ TEXMFDISTDIR } /README
_USE_TEX_TEXMF_PORT = print/${ _USE_TEX_TEXMF_PKGNAME }
_USE_TEX_TEXMF_PKGNAME = texlive-texmf
@ -186,7 +207,6 @@ _C:= BUILD RUN
. e l s e
_C := ${ _U : C /.* : // : S /,/ /g : C /[<>=][^ \: ]*//g }
. e n d i f
#. warning DEBUG: ${_U}: _VOP=${_VOP}, _C=${_C}
. for _CC in ${_C : tu }
_V := ${ _UU : C /[<>=][^ \: ]*// : C / \: .* $// }
. i f d e f i n e d ( _ U S E _ T E X _ $ { _ V } _ P O R T )
@ -203,7 +223,7 @@ TEX_${_CC}_DEPENDS+= ${_T}
. e n d f o r
. e n d f o r
. f o r _ C i n E X T R A C T B U I L D L I B R U N
. f o r _ C i n E X T R A C T B U I L D L I B R U N T E S T
${_C}_DEPENDS += ${ TEX_ ${ _C } _DEPENDS : O : u }
. e n d f o r
@ -626,3 +646,5 @@ TEX_FORMAT_XMLTEX_DIRS= \
post-install-xmltex :
${ LN } -sf pdftex ${ STAGEDIR } ${ PREFIX } /bin/xmltex
${ LN } -sf pdftex ${ STAGEDIR } ${ PREFIX } /bin/pdfxmltex
. e n d i f # !defined(_INCLUDE_USES_TEX_MK)