pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/kpathsea Let texmf.mk take care of updating texm...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5832bfa2aa05
branches:  trunk
changeset: 552869:5832bfa2aa05
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Sun Jan 11 09:11:07 2009 +0000

description:
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:

 print/kpathsea/files/config-deinstall.tmpl |  22 ++++++++++++++++++++++
 print/kpathsea/files/config-install.tmpl   |  19 +++++++++++++++++++
 print/kpathsea/texmf.mk                    |  10 +++++++++-
 3 files changed, 50 insertions(+), 1 deletions(-)

diffs (78 lines):

diff -r 8bdf52f314f4 -r 5832bfa2aa05 print/kpathsea/files/config-deinstall.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/kpathsea/files/config-deinstall.tmpl        Sun Jan 11 09:11:07 2009 +0000
@@ -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 -r 8bdf52f314f4 -r 5832bfa2aa05 print/kpathsea/files/config-install.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/kpathsea/files/config-install.tmpl  Sun Jan 11 09:11:07 2009 +0000
@@ -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
diff -r 8bdf52f314f4 -r 5832bfa2aa05 print/kpathsea/texmf.mk
--- a/print/kpathsea/texmf.mk   Sun Jan 11 09:09:09 2009 +0000
+++ b/print/kpathsea/texmf.mk   Sun Jan 11 09:11:07 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: texmf.mk,v 1.1.1.1 2009/01/03 22:12:42 minskim Exp $
+# $NetBSD: texmf.mk,v 1.2 2009/01/11 09:11:07 minskim Exp $
 #
 # This Makefile fragment is intended to be included by packages that
 # install TeX packages.  It rebuilds the ls-R databases at
@@ -9,6 +9,8 @@
 #    TEX_TEXMF_DIRS - A list of texmf directories that need to update ls-R.
 #                     Default: ${PREFIX}/share/texmf-dist
 #
+#    TEX_CONFIG_NAMES - A list of config fragments to add to texmf.cnf.
+#
 
 .if !defined(TEX_TEXMF_MK)
 TEX_TEXMF_MK=          # defined
@@ -22,4 +24,10 @@
 INSTALL_TEMPLATES+=    ../../print/kpathsea/files/texmf-install.tmpl
 DEINSTALL_TEMPLATES+=  ../../print/kpathsea/files/texmf-deinstall.tmpl
 
+.  if !empty(TEX_CONFIG_NAMES)
+FILES_SUBST+=          CONFIG_NAMES=${TEX_CONFIG_NAMES:Q}
+INSTALL_TEMPLATES+=    ../../print/kpathsea/files/config-install.tmpl
+DEINSTALL_TEMPLATES+=  ../../print/kpathsea/files/config-deinstall.tmpl
+.  endif
+
 .endif # TEX_TEXMF_MK



Home | Main Index | Thread Index | Old Index