Add supplementary files for tex-tetex to generate TeX formats.

This commit is contained in:
minskim 2012-10-14 21:30:33 +00:00
parent 135c035665
commit ec09a48a5e
4 changed files with 88 additions and 2 deletions

View file

@ -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

View file

@ -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

24
print/tex-tetex/format.mk Normal file
View file

@ -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

View file

@ -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.