diff options
author | minskim <minskim@pkgsrc.org> | 2009-01-11 09:11:07 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2009-01-11 09:11:07 +0000 |
commit | 4699108686c0972562f619d49f4dea180f06fa15 (patch) | |
tree | 1f61a600526f53f4a6849658bd31435d6b91884b /print/kpathsea/files | |
parent | 02c38f606c93bd4f5bd18a263ec9a1a5275b81ca (diff) | |
download | pkgsrc-4699108686c0972562f619d49f4dea180f06fa15.tar.gz |
Let texmf.mk take care of updating texmf.cnf.
Packages modifying texmf.cnf (e.g., tex-hugelatex and tex-jadetex) can
use this instead of inventing their own way.
Diffstat (limited to 'print/kpathsea/files')
-rw-r--r-- | print/kpathsea/files/config-deinstall.tmpl | 22 | ||||
-rw-r--r-- | print/kpathsea/files/config-install.tmpl | 19 |
2 files changed, 41 insertions, 0 deletions
diff --git a/print/kpathsea/files/config-deinstall.tmpl b/print/kpathsea/files/config-deinstall.tmpl new file mode 100644 index 00000000000..81abc005356 --- /dev/null +++ b/print/kpathsea/files/config-deinstall.tmpl @@ -0,0 +1,22 @@ +# $NetBSD: config-deinstall.tmpl,v 1.1 2009/01/11 09:11:07 minskim Exp $ +# +# Remove config fragments from texmf.cnf. +# + +TEXMF_CNF=${PKG_SYSCONFBASE}/texmf/texmf.cnf + +case ${STAGE} in +DEINSTALL) + config_names="@CONFIG_NAMES@" + for c in $config_names; do + ${AWK} "\ +BEGIN { do_print=1; } \ +/^%%% BEGIN $c\$/ { do_print=0; } \ +{ if (do_print) print \$0; } \ +/^%%% END $c\$/ { do_print=1; }" ${TEXMF_CNF} > ${TEXMF_CNF}.tmp && + ${MV} ${TEXMF_CNF}.tmp ${TEXMF_CNF} + done + ;; +*) + ;; +esac diff --git a/print/kpathsea/files/config-install.tmpl b/print/kpathsea/files/config-install.tmpl new file mode 100644 index 00000000000..550a971d35d --- /dev/null +++ b/print/kpathsea/files/config-install.tmpl @@ -0,0 +1,19 @@ +# $NetBSD: config-install.tmpl,v 1.1 2009/01/11 09:11:07 minskim Exp $ +# +# Add config fragments to texmf.cnf +# + +TEXMF_CNF=${PKG_SYSCONFBASE}/texmf/texmf.cnf + +case ${STAGE} in +POST-INSTALL) + config_names="@CONFIG_NAMES@" + for c in $config_names; do + ${ECHO} "%%% BEGIN $c" >> ${TEXMF_CNF} + ${CAT} @PREFIX@/share/texmf/web2c/texmf.$c.cnf >> ${TEXMF_CNF} + ${ECHO} "%%% END $c" >> ${TEXMF_CNF} + done + ;; +*) + ;; +esac |