diff options
author | minskim <minskim@pkgsrc.org> | 2012-10-14 21:30:33 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2012-10-14 21:30:33 +0000 |
commit | ec09a48a5e39376b7dee5c4a241ac00cb1be7089 (patch) | |
tree | 59d4c8756b59ed35ec0f4999394ea631b8d5a50d /print | |
parent | 135c035665bbe54004e775d84fc45d1c9dd0fb2e (diff) | |
download | pkgsrc-ec09a48a5e39376b7dee5c4a241ac00cb1be7089.tar.gz |
Add supplementary files for tex-tetex to generate TeX formats.
Diffstat (limited to 'print')
-rw-r--r-- | print/tex-tetex/files/format-deinstall.tmpl | 40 | ||||
-rw-r--r-- | print/tex-tetex/files/format-install.tmpl | 22 | ||||
-rw-r--r-- | print/tex-tetex/format.mk | 24 | ||||
-rw-r--r-- | print/texlive/package.mk | 4 |
4 files changed, 88 insertions, 2 deletions
diff --git a/print/tex-tetex/files/format-deinstall.tmpl b/print/tex-tetex/files/format-deinstall.tmpl new file mode 100644 index 00000000000..eb560d6a60b --- /dev/null +++ b/print/tex-tetex/files/format-deinstall.tmpl @@ -0,0 +1,40 @@ +# $NetBSD: format-deinstall.tmpl,v 1.1 2012/10/14 21:30:33 minskim Exp $ +# +# Delete format files. +# + +FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf + +case ${STAGE} in +DEINSTALL) + formats=@FORMATS@ + if [ "$formats" != "" ]; then + @PRINTF@ "$formats" | + while read format engine junk; do + ${GREP} -v "^${format}[[:space:]][[:space:]]*${engine}[[:space:]]" ${FMTUTIL_CNF} > \ + ${FMTUTIL_CNF}.tmp && + ${MV} ${FMTUTIL_CNF}.tmp ${FMTUTIL_CNF} + case "$engine" in + mpost) + fmtfile="$format.mem" + texengine=metapost + ;; + mf*) + fmtfile="$format.base" + texengine=metafont + ;; + *) + fmtfile="$format.fmt" + texengine=$engine + ;; + esac + @RM@ -f @VARBASE@/lib/texmf/web2c/$texengine/$fmtfile + @RM@ -f @VARBASE@/lib/texmf/web2c/$texengine/$format.log + done + fi + @FIND@ @VARBASE@/lib/texmf -depth -type d -exec @RMDIR@ {} \; 2>/dev/null + @MKTEXLSR@ @VARBASE@/lib/texmf + ;; +*) + ;; +esac diff --git a/print/tex-tetex/files/format-install.tmpl b/print/tex-tetex/files/format-install.tmpl new file mode 100644 index 00000000000..09b1eeacdca --- /dev/null +++ b/print/tex-tetex/files/format-install.tmpl @@ -0,0 +1,22 @@ +# $NetBSD: format-install.tmpl,v 1.1 2012/10/14 21:30:33 minskim Exp $ +# +# Create format files. +# + +FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf + +case ${STAGE} in +POST-INSTALL) + formats=@FORMATS@ + if [ "$formats" != "" ]; then + @PRINTF@ "$formats" >> ${FMTUTIL_CNF} + @PRINTF@ "$formats" | + while read format engine junk; do + @FMTUTIL_SYS@ --byfmt $format + done + fi + @MKTEXLSR@ @VARBASE@/lib/texmf + ;; +*) + ;; +esac diff --git a/print/tex-tetex/format.mk b/print/tex-tetex/format.mk new file mode 100644 index 00000000000..2242a94a153 --- /dev/null +++ b/print/tex-tetex/format.mk @@ -0,0 +1,24 @@ +# $NetBSD: format.mk,v 1.1 2012/10/14 21:30:33 minskim Exp $ +# +# This Makefile fragment is intended to be included by packages that +# install TeX format files. It creates format files at +# (de)installation time. +# +# The following variable can be defined: +# +# TEX_FORMATS - A list of parameters to build formats +# + +.if !defined(TEX_FORMAT_MK) +TEX_FORMAT_MK= # defined + +DEPENDS+= tex-tetex>=3.0.27774:../../print/tex-tetex + +EVAL_PREFIX+= TETEX_PREFIX=tex-tetex +FILES_SUBST+= FMTUTIL_SYS=${TETEX_PREFIX:Q}/bin/fmtutil-sys +FILES_SUBST+= FORMATS=${TEX_FORMATS:Q} +FILES_SUBST+= PRINTF=${PRINTF:Q} +INSTALL_TEMPLATES+= ../../print/tex-tetex/files/format-install.tmpl +DEINSTALL_TEMPLATES+= ../../print/tex-tetex/files/format-deinstall.tmpl + +.endif # TEX_FORMAT_MK diff --git a/print/texlive/package.mk b/print/texlive/package.mk index 1ea085afd41..0a51f435153 100644 --- a/print/texlive/package.mk +++ b/print/texlive/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.17 2012/10/14 17:48:34 minskim Exp $ +# $NetBSD: package.mk,v 1.18 2012/10/14 21:30:33 minskim Exp $ # # This Makefile fragment is intended to be included by packages that build # TeX Live packages. @@ -9,7 +9,7 @@ # A list of texlua scripts to be installed, relative to ${WRKSRC}. # # TEX_FORMATS -# See ../../print/texlive-tetex/format.mk. +# See ../../print/tex-tetex/format.mk. # # TEX_HYPHEN_DAT # See ../../print/texlive-tetex/hyphen.mk. |