summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorminskim <minskim>2010-01-29 01:58:13 +0000
committerminskim <minskim>2010-01-29 01:58:13 +0000
commiteb28666e257a94efc57e851ab336dfa068580f98 (patch)
tree87d15211aae8e7a8de164192e0bca4ad6ba72cfe /print
parent0e9a279bab6102a6a7f8661321d0d4cf0e3a46bf (diff)
downloadpkgsrc-eb28666e257a94efc57e851ab336dfa068580f98.tar.gz
Let format.mk generate TeX formats for TeX Live 2009 packages.
Diffstat (limited to 'print')
-rw-r--r--print/texlive-tetex/files/format-deinstall.tmpl27
-rw-r--r--print/texlive-tetex/files/format-install.tmpl10
-rw-r--r--print/texlive-tetex/format.mk7
-rw-r--r--print/texlive/package.mk12
4 files changed, 46 insertions, 10 deletions
diff --git a/print/texlive-tetex/files/format-deinstall.tmpl b/print/texlive-tetex/files/format-deinstall.tmpl
index 7d0c2e765b1..1e4a3532a9e 100644
--- a/print/texlive-tetex/files/format-deinstall.tmpl
+++ b/print/texlive-tetex/files/format-deinstall.tmpl
@@ -1,4 +1,4 @@
-# $NetBSD: format-deinstall.tmpl,v 1.3 2010/01/28 22:37:33 minskim Exp $
+# $NetBSD: format-deinstall.tmpl,v 1.4 2010/01/29 01:58:13 minskim Exp $
#
# Delete format files.
#
@@ -7,6 +7,31 @@ FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf
case ${STAGE} in
DEINSTALL)
+ formats=@FORMATS@
+ if [ "$formats" != "" ]; then
+ ${ECHO} $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
format_names="@FORMAT_NAMES@"
for f in $format_names ; do
@CAT@ @PREFIX@/share/texmf/fmtutil/format.$f.cnf |
diff --git a/print/texlive-tetex/files/format-install.tmpl b/print/texlive-tetex/files/format-install.tmpl
index 7ab9a67db1f..fec5d3227dc 100644
--- a/print/texlive-tetex/files/format-install.tmpl
+++ b/print/texlive-tetex/files/format-install.tmpl
@@ -1,4 +1,4 @@
-# $NetBSD: format-install.tmpl,v 1.1.1.1 2009/01/26 21:04:33 minskim Exp $
+# $NetBSD: format-install.tmpl,v 1.2 2010/01/29 01:58:13 minskim Exp $
#
# Create format files.
#
@@ -7,6 +7,14 @@ FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf
case ${STAGE} in
POST-INSTALL)
+ formats=@FORMATS@
+ if [ "$formats" != "" ]; then
+ ${ECHO} $formats >> ${FMTUTIL_CNF}
+ ${ECHO} $formats |
+ while read format engine junk; do
+ @FMTUTIL_SYS@ --byfmt $format
+ done
+ fi
format_names="@FORMAT_NAMES@"
for f in $format_names ; do
${GREP} -v "^#" @PREFIX@/share/texmf/fmtutil/format.$f.cnf |
diff --git a/print/texlive-tetex/format.mk b/print/texlive-tetex/format.mk
index 7cca8d9a7e0..a787fc0588b 100644
--- a/print/texlive-tetex/format.mk
+++ b/print/texlive-tetex/format.mk
@@ -1,4 +1,4 @@
-# $NetBSD: format.mk,v 1.2 2010/01/28 22:37:32 minskim Exp $
+# $NetBSD: format.mk,v 1.3 2010/01/29 01:58:13 minskim Exp $
#
# This Makefile fragment is intended to be included by packages that
# install TeX format files. It creates format files at
@@ -6,7 +6,9 @@
#
# The following variable can be defined:
#
-# TEX_FORMAT_NAMES - A list of format names.
+# TEX_FORMATS - A list of parameters to build formats
+#
+# TEX_FORMAT_NAMES (for TeX Live 2008 only) - A list of format names.
#
.if !defined(TEX_FORMAT_MK)
@@ -19,6 +21,7 @@ TEX_TEXMF_DIRS+= ${VARBASE}/lib/texmf
EVAL_PREFIX+= TETEX_PREFIX=texlive-tetex
FILES_SUBST+= FMTUTIL_SYS=${TETEX_PREFIX:Q}/bin/fmtutil-sys
FILES_SUBST+= FORMAT_NAMES=${TEX_FORMAT_NAMES:Q}
+FILES_SUBST+= FORMATS=${TEX_FORMATS:Q}
INSTALL_TEMPLATES+= ../../print/texlive-tetex/files/format-install.tmpl
DEINSTALL_TEMPLATES+= ../../print/texlive-tetex/files/format-deinstall.tmpl
diff --git a/print/texlive/package.mk b/print/texlive/package.mk
index 11f818fe54c..61f07f5d359 100644
--- a/print/texlive/package.mk
+++ b/print/texlive/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.3 2010/01/28 21:57:17 minskim Exp $
+# $NetBSD: package.mk,v 1.4 2010/01/29 01:58:13 minskim Exp $
#
# This Makefile fragment is inteded to be included by packages that build
# TeX Live packages.
@@ -8,7 +8,7 @@
# REPLACE_TEXLUA
# A list of texlua scripts to be installed, relative to ${WRKSRC}.
#
-# TEX_FORMAT_NAMES
+# TEX_FORMATS
# See ../../print/texlive-tetex/format.mk.
#
# TEX_HYPHEN_DAT
@@ -121,12 +121,12 @@ _texlive-install:
done; \
fi
-.if empty(TEX_TEXMF_DIRS) || ${TEX_TEXMF_DIRS} != "none"
-.include "../../print/kpathsea/texmf.mk"
-.endif
-.if !empty(TEX_FORMAT_NAMES)
+.if !empty(TEX_FORMATS) || !empty(TEX_FORMAT_NAMES)
. include "../../print/texlive-tetex/format.mk"
.endif
+.if empty(TEX_TEXMF_DIRS) || ${TEX_TEXMF_DIRS} != "none"
+. include "../../print/kpathsea/texmf.mk"
+.endif
.if !empty(TEX_HYPHEN_DAT) || !empty(TEX_HYPHEN_DEF)
. include "../../print/texlive-tetex/hyphen.mk"
.endif