Skip to content

Commit

Permalink
Mk/**tex.mk: Convert bsd.tex.mk to USES=tex
Browse files Browse the repository at this point in the history
- Update all the consumers to use USES=tex
- USE_TEX=yes is the old way of writing USES=tex which has been removed
  and replaced in all ports
- Almost all of the USE_TEX features remains unchanged
- Some consumers had the same variables defined both in the mk
  infrastructure and also in the ports which have been removed from the
  ports as those are redundant.

In case any of the consumers are failing to build please make sure that
the nexessary USES=tex is there. Unlike previous USE_TEX=yes will no
longer load the required VARS for tex and related dependencies.

Reviewed by:	portmgr
Approved by:	portmgr (blanket)
  • Loading branch information
5u623l20 committed Dec 19, 2022
1 parent 1bcf2a7 commit 721e577
Show file tree
Hide file tree
Showing 129 changed files with 218 additions and 165 deletions.
84 changes: 53 additions & 31 deletions Mk/bsd.tex.mk → Mk/Uses/tex.mk
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -52,6 +49,34 @@ TEX_MAINTAINER= freebsd-tex@FreeBSD.org
# USE_TEX= formats
# USE_TEX= latex:build dvipsk:build

.if !defined(_INCLUDE_USES_TEX_MK)
_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}
. endif
. endfor
. if !empty(_INVALID_TEX_FEATURES)
IGNORE= uses unknown USE_TEX features: ${_INVALID_TEX_FEATURES}
. endif

. if !empty(tex_ARGS)
IGNORE= USES=tex takes no arguments
. endif

# Make each individual feature available as _TEX_FEATURE_<FEATURENAME>
. for var in ${USE_TEX}
_TEX_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g}
. endfor

# default TeX distribution. "texlive"
TEX_DEFAULT?= texlive

Expand All @@ -73,10 +98,6 @@ TEXLIVE_VERSION?= ${TEXLIVE_YEAR}0325
PLIST_SUB+= $V="${$V}"
.endfor

.if !empty(USE_TEX:tu:MTEXLIVE)
IGNORE= "texlive" must not be defined in USE_TEX
.endif

_USE_TEX_TEXMF_DEP= ${LOCALBASE}/${TEXMFDISTDIR}/README
_USE_TEX_TEXMF_PORT= print/${_USE_TEX_TEXMF_PKGNAME}
_USE_TEX_TEXMF_PKGNAME= texlive-texmf
Expand Down Expand Up @@ -186,7 +207,6 @@ _C:= BUILD RUN
. else
_C:= ${_U:C/.*://:S/,/ /g:C/[<>=][^\:]*//g}
. endif
#. warning DEBUG: ${_U}: _VOP=${_VOP}, _C=${_C}
. for _CC in ${_C:tu}
_V:=${_UU:C/[<>=][^\:]*//:C/\:.*$//}
. if defined(_USE_TEX_${_V}_PORT)
Expand All @@ -203,7 +223,7 @@ TEX_${_CC}_DEPENDS+= ${_T}
. endfor
.endfor

.for _C in EXTRACT BUILD LIB RUN
.for _C in EXTRACT BUILD LIB RUN TEST
${_C}_DEPENDS+= ${TEX_${_C}_DEPENDS:O:u}
.endfor

Expand Down Expand Up @@ -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

.endif # !defined(_INCLUDE_USES_TEX_MK)
4 changes: 0 additions & 4 deletions Mk/bsd.port.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1403,10 +1403,6 @@ USE_APACHE:= ${USE_APACHE:S/common/server,/}
USES+= apache:${USE_APACHE:C/2([0-9])/2.\1/g}
. endif

. if defined(USE_TEX)
.include "${PORTSDIR}/Mk/bsd.tex.mk"
. endif

. if defined(USE_GECKO)
.include "${PORTSDIR}/Mk/bsd.gecko.mk"
. endif
Expand Down
2 changes: 1 addition & 1 deletion arabic/arabtex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WWW= http://www2.informatik.uni-stuttgart.de/ivi/bs/research/arab_e.htm

LICENSE= LPPL10

USES= tar:tgz
USES= tar:tgz tex
USE_TEX= base texmf

NO_WRKSUBDIR= yes
Expand Down
2 changes: 1 addition & 1 deletion astro/pp3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WWW= http://pp3.sourceforge.net/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING

USES= tar:bzip2
USES= tar:bzip2 tex
USE_TEX= latex

OPTIONS_DEFINE= DOCS EXAMPLES
Expand Down
2 changes: 1 addition & 1 deletion cad/alliance/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GL_SITE= https://gitlab.lip6.fr
GL_ACCOUNT= vlsi-eda
GL_COMMIT= ebece102e15c110fc79f1da50524c68fd9523f0c

USES= autoreconf:build gmake libtool magick:build motif tar:bz2 xorg
USES= autoreconf:build gmake libtool magick:build motif tar:bz2 tex xorg
USE_GCC= yes
USE_TEX= dvipsk:build latex:build
USE_XORG= ice sm x11 xext xt
Expand Down
1 change: 1 addition & 0 deletions cad/opencascade/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ VIS_LIB_DEPENDS= libftgl.so:graphics/ftgl \
VIS_USE= GL=glesv2

DOXYGEN_IMPLIES= DOCS
DOXYGEN_USES= tex
DOXYGEN_USE= TEX=latex:build
DOXYGEN_BUILD_DEPENDS= bash:shells/bash \
doxygen:devel/doxygen \
Expand Down
1 change: 1 addition & 0 deletions cad/opencascade740/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ VIS_LIB_DEPENDS= libftgl.so:graphics/ftgl \
libfreeimageplus.so:graphics/freeimage

DOXYGEN_IMPLIES= DOCS
DOXYGEN_USES= tex
DOXYGEN_USE= TEX=latex:build
DOXYGEN_BUILD_DEPENDS= bash:shells/bash \
doxygen:devel/doxygen \
Expand Down
2 changes: 1 addition & 1 deletion converters/p5-LaTeXML/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN_DEPENDS= p5-Archive-Zip>=0:archivers/p5-Archive-Zip \
p5-XML-LibXSLT>=1.58:textproc/p5-XML-LibXSLT \
p5-libwww>=0:www/p5-libwww

USES= perl5
USES= perl5 tex
USE_PERL5= configure
USE_TEX= kpathsea
NO_ARCH= yes
Expand Down
1 change: 1 addition & 0 deletions databases/bbdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ NO_ARCH= yes
PLIST_SUB+= BBDB_LISPDIR=${BBDB_LISPDIR}

OPTIONS_DEFINE= DOCS
DOCS_USES= tex
DOCS_USE= TEX=latex:build
DOCS_CONFIGURE_ENABLE= docs

Expand Down
4 changes: 2 additions & 2 deletions deskutils/recoll/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ CHM_LIB_DEPENDS= libchm.so:misc/chmlib
CHM_CONFIGURE_OFF= --disable-python-chm
DJVU_RUN_DEPENDS= djvutxt:graphics/djvulibre
IMAGE_RUN_DEPENDS= exiftool:graphics/p5-Image-ExifTool
LATEX_USE= dvipsk:run \
latex:run
LATEX_USES= tex
LATEX_USE= TEX=dvipsk:run,latex:run
PDF_RUN_DEPENDS= pdftotext:graphics/poppler-utils
PS_RUN_DEPENDS= pstotext:print/pstotext
QT5_USES= gl qt:5
Expand Down
3 changes: 2 additions & 1 deletion deskutils/zim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ GNUPLOT_RUN_DEPENDS= gnuplot:math/gnuplot
GNUR_DESC= Support of plot editor based on GNU R
GNUR_RUN_DEPENDS= R:math/R
GRAPHVIZ_RUN_DEPENDS= fdp:graphics/graphviz
LATEX_USE= tex=latex:run
LATEX_USES= tex
LATEX_USE= TEX=latex:run
MERCURIAL_DESC= Version control for notebooks using hg
MERCURIAL_RUN_DEPENDS= ${PY_MERCURIAL}
SCROT_DESC= Screenshot taking and inserting support
Expand Down
1 change: 1 addition & 0 deletions devel/avr-libc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ OPTIONS_DEFINE= DOXYGEN
.endif

.if ${PORT_OPTIONS:MDOXYGEN}
USES+= tex
USE_TEX= latex:build
BUILD_DEPENDS+= doxygen:devel/doxygen \
fig2dev:print/fig2dev \
Expand Down
2 changes: 1 addition & 1 deletion devel/cl-alexandria/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OPTIONS_DEFINE= DOCS

DOCS_BUILD_DEPENDS= sbcl:lang/sbcl \
texi2pdf:print/texinfo

DOCS_USES= tex
DOCS_USE= TEX=latex:build
DOCS_INFO= doc/${PORTNAME}

Expand Down
3 changes: 2 additions & 1 deletion devel/doxygen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OPTIONS_DEFAULT= GRAPHVIZ
QT5_DESC= Install Doxywizard GUI with Qt5
SEARCH_DESC= Build external search tools (doxysearch and doxyindexer)

DOCS_USES= ghostscript:build
DOCS_USES= ghostscript:build tex
DOCS_USE= TEX=base:build,dvipsk:build,pdftex:build
DOCS_ALL_TARGET= docs
DOCS_BUILD_DEPENDS= dot:graphics/graphviz
Expand All @@ -45,6 +45,7 @@ PORTDOCS= *

GRAPHVIZ_RUN_DEPENDS= dot:graphics/graphviz

LATEX_USES= tex
LATEX_USE= TEX=base,dvipsk,pdftex

QT5_USES= qt:5
Expand Down
1 change: 1 addition & 0 deletions devel/forge-devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf

Expand Down
1 change: 1 addition & 0 deletions devel/forge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf

Expand Down
1 change: 1 addition & 0 deletions devel/gcc-arm-embedded/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ PURE_LIB_DEPENDS_OFF= libexpat.so:textproc/expat2 \
libmpc.so:math/mpc \
libisl.so:devel/isl

PDF_USES= tex
PDF_USE= TEX=base:build,tex:build,dvipsk:build
PDF_BUILD_DEPENDS= texi2dvi:print/texinfo
PYGDB_USES= python
Expand Down
1 change: 1 addition & 0 deletions devel/ghub-devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf
PDF_PLIST_FILES= ${DOCSDIR}/ghub.pdf
Expand Down
1 change: 1 addition & 0 deletions devel/ghub/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf
PDF_PLIST_FILES= ${DOCSDIR}/ghub.pdf
Expand Down
1 change: 1 addition & 0 deletions devel/magit-devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ LIBEGIT2_RUN_DEPENDS= libegit2${EMACS_PKGNAMESUFFIX}>=g20200515:devel/libegit2@
LIBEGIT2_RUN_DEPENDS_OFF= git:devel/git
LIBEGIT2_VARS= MAKE_ENV+=BUILD_MAGIT_LIBGIT=true
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf

Expand Down
1 change: 1 addition & 0 deletions devel/magit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ LIBEGIT2_RUN_DEPENDS= libegit2${EMACS_PKGNAMESUFFIX}>=g20200515:devel/libegit2@
LIBEGIT2_RUN_DEPENDS_OFF= git:devel/git
LIBEGIT2_VARS_OFF= MAKE_ENV+=BUILD_MAGIT_LIBGIT=false
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf

Expand Down
1 change: 1 addition & 0 deletions devel/ragel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ OPTIONS_DEFINE= TEXDOCS EXAMPLES
OPTIONS_SUB= yes
TEXDOCS_CONFIGURE_ENABLE= manual
TEXDOCS_DESC= Build pdf documentation (requires LaTeX)
TEXDOCS_USES= tex
TEXDOCS_USE= TEX=latex:build
TEXDOCS_BUILD_DEPENDS= fig2dev:print/transfig

Expand Down
3 changes: 1 addition & 2 deletions devel/tex-kpathsea/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ COMMENT= Path searching library for TeX

LICENSE= LGPL21+

USES= libtool pathfix tar:xz
USES= libtool pathfix tar:xz tex
USE_LDCONFIG= yes
USE_TEX= yes

GNU_CONFIGURE= yes

Expand Down
3 changes: 1 addition & 2 deletions devel/tex-libtexlua/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ COMMENT= Lua library for TeXLive
LICENSE= MIT
LICENSE_FILE= ${WRKDIR}/LICENSE.MIT

USES= libtool pathfix pkgconfig tar:xz
USES= libtool pathfix pkgconfig tar:xz tex
USE_LDCONFIG= yes
USE_TEX= yes

GNU_CONFIGURE= yes

Expand Down
3 changes: 1 addition & 2 deletions devel/tex-libtexluajit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ BROKEN_powerpc64= Does not build: uninitialized constant Config (NameError)
BROKEN_riscv64= Does not configure: error: Sorry, cannot preprocess lj_arch.h
BROKEN_sparc64= Does not configure: error: Sorry, cannot preprocess lj_arch.h

USES= libtool pathfix pkgconfig tar:xz
USES= libtool pathfix pkgconfig tar:xz tex
USE_LDCONFIG= yes
USE_TEX= yes

GNU_CONFIGURE= yes

Expand Down
2 changes: 1 addition & 1 deletion devel/tex-synctex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WWW= http://itexmac.sourceforge.net/SyncTeX.html
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/synctexdir/README.txt

USES= libtool localbase pathfix pkgconfig tar:xz
USES= libtool localbase pathfix pkgconfig tar:xz tex
USE_LDCONFIG= yes
USE_TEX= kpathsea

Expand Down
2 changes: 1 addition & 1 deletion devel/tex-web2c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LIB_DEPENDS= libgmp.so:math/gmp \
libpng.so:graphics/png \
libzzip.so:devel/zziplib

USES= gnome libtool localbase pathfix pkgconfig tar:xz xorg
USES= gnome libtool localbase pathfix pkgconfig tar:xz tex xorg
USE_GNOME= cairo
USE_LDCONFIG= yes
USE_TEX= kpathsea ptexenc
Expand Down
1 change: 1 addition & 0 deletions devel/transient-devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf
PDF_PLIST_FILES= ${DOCSDIR}/transient.pdf
Expand Down
1 change: 1 addition & 0 deletions devel/transient/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ DOCS_BUILD_DEPENDS= gsed:textproc/gsed
DOCS_ALL_TARGET= html
DOCS_BINARY_ALIAS= sed=gsed
PDF_BUILD_DEPENDS= texi2pdf:print/texinfo
PDF_USES= tex
PDF_USE= TEX=dvipdfmx:build
PDF_ALL_TARGET= pdf
PDF_PLIST_FILES= ${DOCSDIR}/transient.pdf
Expand Down
2 changes: 1 addition & 1 deletion editors/gnome-latex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LIB_DEPENDS= libgee-0.8.so:devel/libgee \
libgspell-1.so:textproc/gspell

USES= compiler:c11 desktop-file-utils gettext gmake gnome \
pkgconfig tar:xz vala:build
pkgconfig tar:xz tex vala:build
GNU_CONFIGURE= yes
USE_GNOME= cairo dconf intltool gtksourceview4
USE_TEX= latex dvipsk
Expand Down
Loading

0 comments on commit 721e577

Please sign in to comment.