ports/176399: [PATCH] bsd.tex.mk to hold common part of TeX-related ports
Hiroki Sato
hrs at freebsd.org
Sun Feb 24 19:10:00 UTC 2013
>Number: 176399
>Category: ports
>Synopsis: [PATCH] bsd.tex.mk to hold common part of TeX-related ports
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 24 19:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Hiroki Sato
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
Tokyo Institute of Technology
>Environment:
System: FreeBSD alph.allbsd.org 9.1-RELEASE FreeBSD 9.1-RELEASE #3 r245350: Sun Jan 20 19:29:27 JST 2013 hrs at alph.allbsd.org:/usr/obj/usr/src/sys/ALPH amd64
>Description:
I would like to commit Mk/bsd.tex.mk to hold the common part
of newly-created TeX ports which are based on TeXLive. This
simplifies complex dependency specification as well as
migration from print/teTeX.
>How-To-Repeat:
N/A
>Fix:
The patch of bsd.tex.mk is below. This can also be found at:
http://people.allbsd.org/~hrs/FreeBSD/bsd.tex.mk-20130225-1.diff
and ports which use this are the following:
http://people.allbsd.org/~hrs/FreeBSD/devel_kpathsea-20130225-1.diff
http://people.allbsd.org/~hrs/FreeBSD/devel_web2c-20130225-1.diff
http://people.allbsd.org/~hrs/FreeBSD/print_ptexenc-20130225-1.diff
http://people.allbsd.org/~hrs/FreeBSD/print_texlive-texmf-20130225-1.diff
Index: Mk/bsd.tex.mk
===================================================================
--- Mk/bsd.tex.mk (revision 0)
+++ Mk/bsd.tex.mk (working copy)
@@ -0,0 +1,82 @@
+# $FreeBSD$
+#
+# Common part for TeX related ports
+#
+TEX_MAINTAINER= hrs at FreeBSD.org
+
+TEXMFDIR?= share/texmf
+TEXMFDISTDIR?= share/texmf-dist
+TEXMFLOCALDIR?= share/texmf-local
+TEXHASHDIRS?= ${TEXMFDIR} ${TEXMFDISTDIR} ${TEXMFLOCALDIR}
+
+PLIST_SUB+= TEXMFDIR=${TEXMFDIR} TEXMFDISTDIR=${TEXMFDISTDIR}
+CONFLICTS_INSTALL+= teTeX-[0-9]* *-teTeX-[0-9]* \
+ teTeX-*-[0-9]* *-teTeX-*-[0-9]* \
+ latex2e-[0-9]*
+
+.if !empty(USE_TEX:Mweb2c) || !empty(USE_TEX:Mtexlive)
+_USE_TEX_WEB2C= weave:${PORTSDIR}/devel/web2c
+.endif
+.if !empty(USE_TEX:Mkpathsea) || !empty(USE_TEX:Mtexlive)
+_USE_TEX_KPATHSEA= kpathsea:${PORTSDIR}/devel/kpathsea
+.endif
+.if !empty(USE_TEX:Mptexenc) || !empty(USE_TEX:Mtexlive)
+_USE_TEX_PTEXENC= ptexenc:${PORTSDIR}/print/tex-ptexenc
+.endif
+.if !empty(USE_TEX:Mdvipsk) || !empty(USE_TEX:Mtexlive)
+_USE_TEX_DVIPSK= dvips:${PORTSDIR}/print/dvipsk
+.endif
+.if !empty(USE_TEX:Mxdvik) || !empty(USE_TEX:Mtexlive)
+_USE_TEX_XDVIK= xdvi:${PORTSDIR}/print/xdvik
+.endif
+.if !empty(USE_TEX:Mtexlive-base) || !empty(USE_TEX:Mtexlive)
+_USE_TEXLIVE_BASE= tex:${PORTSDIR}/print/texlive-base
+.endif
+.if !empty(USE_TEX:Mtexlive-texmf) || !empty(USE_TEX:Mtexlive)
+_USE_TEXLIVE_TEXMF= ${LOCALBASE}/${TEXMFDIR}/web2c/fmtutil.cnf:${PORTSDIR}/print/texlive-texmf
+.endif
+
+.for D in TEX_WEB2C TEXLIVE_BASE TEXLIVE_TEXMF TEX_XDVIK TEX_DVIPSK
+RUN_DEPENDS+= ${_USE_${D}}
+.endfor
+.for D in TEX_WEB2C TEXLIVE_BASE TEXLIVE_TEXMF
+BUILD_DEPENDS+= ${_USE_${D}}
+.endfor
+.for D in TEX_KPATHSEA TEX_PTEXENC
+LIB_DEPENDS+= ${_USE_${D}}
+.endfor
+
+.ORDER: do-texhash do-fmtutil do-updmap
+
+.if !empty(USE_TEX:Mtexhash) || !empty(USE_TEX:Mfmtutil) || !empty(USE_TEX:Mupdmap)
+.PHONY: do-texhash
+do-texhash:
+ ${LOCALBASE}/bin/mktexlsr ${TEXHASHDIRS:S,^,${PREFIX}/,}
+post-install: do-texhash
+PLIST_SUB+= EXEC_TEXHASH="@exec ${LOCALBASE}/bin/mktexlsr ${TEXHASHDIRS:S,^,${PREFIX}/,}" \
+ UNEXEC_TEXHASH="@unexec ${LOCALBASE}/bin/mktexlsr ${TEXHASHDIRS:S,^,${PREFIX}/,}"
+.else
+PLIST_SUB+= EXEC_TEXHASH="@comment" UNEXEC_TEXHASH="@comment"
+.endif
+
+.if !empty(USE_TEX:Mfmtutil)
+.PHONY: do-fmtutil
+do-fmtutil:
+ ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/fmtutil-sys --all
+post-install: do-fmtutil
+PLIST_SUB+= EXEC_FMTUTIL="@exec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/fmtutil-sys --all" \
+ UNEXEC_FMTUTIL="@exec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/fmtutil-sys --all"
+.else
+PLIST_SUB+= EXEC_FMTUTIL="@comment" UNEXEC_FMTUTIL="@comment"
+.endif
+
+.if !empty(USE_TEX:Mupdmap)
+.PHONY: do-updmap
+do-updmap:
+ ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/updmap-sys
+post-install: do-updmap
+PLIST_SUB+= EXEC_UPDMAP="@exec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/updmap-sys" \
+ UNEXEC_UPDMAP="@exec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} ${LOCALBASE}/bin/updmap-sys"
+.else
+PLIST_SUB+= EXEC_UPDMAP="@comment" UNEXEC_UPDMAP="@comment"
+.endif
Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk (revision 310651)
+++ Mk/bsd.port.mk (working copy)
@@ -439,6 +439,8 @@
# USE_RUBY - If set, this port relies on the Ruby language.
# Implies inclusion of bsd.ruby.mk. (Also see
# that file for more information on USE_RUBY_*).
+# USE_TEX - Set to a list of TeX dependencies.
+# Implies inclusion of bsd.tex.mk.
# USE_GNUSTEP - If set, this port relies on the GNUstep system.
# Implies the inclusion of bsd.gnustep.mk.
# (Also see that file for more information on
@@ -1447,6 +1449,10 @@
.include "${PORTSDIR}/Mk/bsd.tcl.mk"
.endif
+.if defined(USE_TEX)
+.include "${PORTSDIR}/Mk/bsd.tex.mk"
+.endif
+
.if defined(USE_APACHE) || defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN)
.include "${PORTSDIR}/Mk/bsd.apache.mk"
.endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list