pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/print/texlive-tetex Add a Makefile fragment and templa...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e4a76a627d88
branches: trunk
changeset: 555685:e4a76a627d88
user: minskim <minskim%pkgsrc.org@localhost>
date: Fri Mar 06 18:12:59 2009 +0000
description:
Add a Makefile fragment and templates to install/deinstall hyphenation
patterns.
diffstat:
print/texlive-tetex/files/hyphen-deinstall.tmpl | 26 +++++++++++++++
print/texlive-tetex/files/hyphen-install.tmpl | 43 +++++++++++++++++++++++++
print/texlive-tetex/hyphen.mk | 26 +++++++++++++++
3 files changed, 95 insertions(+), 0 deletions(-)
diffs (107 lines):
diff -r d4bda639eb99 -r e4a76a627d88 print/texlive-tetex/files/hyphen-deinstall.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/texlive-tetex/files/hyphen-deinstall.tmpl Fri Mar 06 18:12:59 2009 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: hyphen-deinstall.tmpl,v 1.1 2009/03/06 18:13:00 minskim Exp $
+#
+# Deinstall hyphenation patterns.
+#
+
+LANGUAGE_DAT=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.dat
+LANGUAGE_DEF=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.def
+
+case ${STAGE} in
+DEINSTALL)
+ ${AWK} "\
+BEGIN { do_print=1; } \
+/^%%% BEGIN @PKGBASE@\$/ { do_print=0; } \
+{ if (do_print) print \$0; } \
+/^%%% END @PKGBASE@\$/ { do_print=1; }" ${LANGUAGE_DAT} > ${LANGUAGE_DAT}.tmp &&
+ ${MV} ${LANGUAGE_DAT}.tmp ${LANGUAGE_DAT}
+ ${AWK} "\
+BEGIN { do_print=1; } \
+/^%%% BEGIN @PKGBASE@\$/ { do_print=0; } \
+{ if (do_print) print \$0; } \
+/^%%% END @PKGBASE@\$/ { do_print=1; }" ${LANGUAGE_DEF} > ${LANGUAGE_DEF}.tmp &&
+ ${MV} ${LANGUAGE_DEF}.tmp ${LANGUAGE_DEF}
+ ;;
+*)
+ ;;
+esac
diff -r d4bda639eb99 -r e4a76a627d88 print/texlive-tetex/files/hyphen-install.tmpl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/texlive-tetex/files/hyphen-install.tmpl Fri Mar 06 18:12:59 2009 +0000
@@ -0,0 +1,43 @@
+# $NetBSD: hyphen-install.tmpl,v 1.1 2009/03/06 18:13:00 minskim Exp $
+#
+# Install hyphenation patterns.
+#
+
+LANGUAGE_DAT=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.dat
+LANGUAGE_DEF=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.def
+
+case ${STAGE} in
+POST-INSTALL)
+ hyphen_dat="@HYPHEN_DAT@"
+ set -- dummy $hyphen_dat; shift;
+ ${ECHO} "%%% BEGIN @PKGBASE@" >> ${LANGUAGE_DAT}
+ while ${TEST} $# -gt 0; do
+ cmd="$1"; arg="$2"
+ shift; shift
+ if ${TEST} $cmd = "="; then
+ ${ECHO} "$cmd$arg" >> ${LANGUAGE_DAT}
+ else
+ ${ECHO} "$cmd $arg" >> ${LANGUAGE_DAT}
+ fi
+ done
+ ${ECHO} "%%% END @PKGBASE@" >> ${LANGUAGE_DAT}
+ @FMTUTIL_SYS@ --byhyphen ${LANGUAGE_DAT}
+ hyphen_def="@HYPHEN_DEF@"
+ ${AWK} "\
+BEGIN { f=\"${LANGUAGE_DEF}.tmp\"; } \
+/^%%% No changes/ { f=\"${LANGUAGE_DEF}.post\"; } \
+{ print>f; }" ${LANGUAGE_DEF} &&
+ set -- dummy $hyphen_def; shift;
+ ${ECHO} "%%% BEGIN @PKGBASE@" >> ${LANGUAGE_DEF}.tmp
+ for line in $hyphen_def ; do
+ echo "${line}" >> ${LANGUAGE_DEF}.tmp
+ done
+ ${ECHO} "%%% END @PKGBASE@" >> ${LANGUAGE_DEF}.tmp
+ ${CAT} ${LANGUAGE_DEF}.post >> ${LANGUAGE_DEF}.tmp
+ ${RM} ${LANGUAGE_DEF}.post
+ ${MV} ${LANGUAGE_DEF}.tmp ${LANGUAGE_DEF}
+ @FMTUTIL_SYS@ --byhyphen ${LANGUAGE_DEF}
+ ;;
+*)
+ ;;
+esac
diff -r d4bda639eb99 -r e4a76a627d88 print/texlive-tetex/hyphen.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/print/texlive-tetex/hyphen.mk Fri Mar 06 18:12:59 2009 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: hyphen.mk,v 1.1 2009/03/06 18:12:59 minskim Exp $
+#
+# This Makefile fragment is intended to be included by packages that
+# install TeX hyphenation pattens. It updates format files at
+# (de)installation time.
+#
+# The following variable can be defined:
+#
+# TEX_HYPHEN_DAT - A list of hyphenation entries for language.dat.
+# TEX_HYPHEN_DEF - A list of hyphenation entries for language.def.
+#
+
+.if !defined(TEX_HYPHEN_MK)
+TEX_HYPHEN_MK= # defined
+
+DEPENDS+= texlive-tetex>=2008:../../print/texlive-tetex
+DEPENDS+= tex-hyphen-base-[0-9]*:../../print/tex-hyphen-base
+
+EVAL_PREFIX+= TETEX_PREFIX=texlive-tetex
+FILES_SUBST+= FMTUTIL_SYS=${TETEX_PREFIX:Q}/bin/fmtutil-sys
+FILES_SUBST+= HYPHEN_DAT=${TEX_HYPHEN_DAT:Q}
+FILES_SUBST+= HYPHEN_DEF=${TEX_HYPHEN_DEF:Q}
+INSTALL_TEMPLATES+= ../../print/texlive-tetex/files/hyphen-install.tmpl
+DEINSTALL_TEMPLATES+= ../../print/texlive-tetex/files/hyphen-deinstall.tmpl
+
+.endif # TEX_HYPHEN_MK
Home |
Main Index |
Thread Index |
Old Index