diff options
author | minskim <minskim@pkgsrc.org> | 2013-11-15 06:08:51 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2013-11-15 06:08:51 +0000 |
commit | a84e6ce9d551676af84464f214825f8c1a448b7b (patch) | |
tree | f51e67da9f9b3d3331a23d0eb3538d714c06a22b /print/tex-tetex | |
parent | 60127bf3f1699285cd6f69f868270fc52c921076 (diff) | |
download | pkgsrc-a84e6ce9d551676af84464f214825f8c1a448b7b.tar.gz |
Move files required to generate TeX hyphenation patterns from
texlive-tetex to tex-tetex. print/texlive-tetex will be removed in
TeX Live 2013.
Diffstat (limited to 'print/tex-tetex')
-rw-r--r-- | print/tex-tetex/files/hyphen-deinstall.tmpl | 36 | ||||
-rw-r--r-- | print/tex-tetex/files/hyphen-install.tmpl | 59 | ||||
-rw-r--r-- | print/tex-tetex/hyphen.mk | 28 |
3 files changed, 123 insertions, 0 deletions
diff --git a/print/tex-tetex/files/hyphen-deinstall.tmpl b/print/tex-tetex/files/hyphen-deinstall.tmpl new file mode 100644 index 00000000000..f53e7640f47 --- /dev/null +++ b/print/tex-tetex/files/hyphen-deinstall.tmpl @@ -0,0 +1,36 @@ +# $NetBSD: hyphen-deinstall.tmpl,v 1.1 2013/11/15 06:08:51 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 +LANGUAGE_LUA=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.dat.lua + +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} + @FMTUTIL_SYS@ --byhyphen ${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} + @FMTUTIL_SYS@ --byhyphen ${LANGUAGE_DEF} + ${AWK} "\ +BEGIN { do_print=1; } \ +/^--- BEGIN @PKGBASE@\$/ { do_print=0; } \ +{ if (do_print) print \$0; } \ +/^--- END @PKGBASE@\$/ { do_print=1; }" ${LANGUAGE_LUA} > ${LANGUAGE_LUA}.tmp && + ${MV} ${LANGUAGE_LUA}.tmp ${LANGUAGE_LUA} + @FMTUTIL_SYS@ --byhyphen ${LANGUAGE_LUA} + ;; +*) + ;; +esac diff --git a/print/tex-tetex/files/hyphen-install.tmpl b/print/tex-tetex/files/hyphen-install.tmpl new file mode 100644 index 00000000000..45f2c4f90d2 --- /dev/null +++ b/print/tex-tetex/files/hyphen-install.tmpl @@ -0,0 +1,59 @@ +# $NetBSD: hyphen-install.tmpl,v 1.1 2013/11/15 06:08:51 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 +LANGUAGE_LUA=${PKG_SYSCONFBASE}/texmf/tex/generic/config/language.dat.lua + +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} + hyphen_lua="@HYPHEN_LUA@" + ${AWK} "\ +BEGIN { f=\"${LANGUAGE_LUA}.tmp\"; } \ +/^-- END of language/ { f=\"${LANGUAGE_LUA}.post\"; } \ +{ print>f; }" ${LANGUAGE_LUA} && + set -- dummy $hyphen_lua; shift; + ${ECHO} "--- BEGIN @PKGBASE@" >> ${LANGUAGE_LUA}.tmp + for line in $hyphen_lua ; do + ${ECHO} "${line}" | ${SED} -e 'y/+/ /' -e 's/^\([a-z]\)/ \1/' -e 's/^/ /' >> ${LANGUAGE_LUA}.tmp + done + ${ECHO} "--- END @PKGBASE@" >> ${LANGUAGE_LUA}.tmp + ${CAT} ${LANGUAGE_LUA}.post >> ${LANGUAGE_LUA}.tmp + ${RM} ${LANGUAGE_LUA}.post + ${MV} ${LANGUAGE_LUA}.tmp ${LANGUAGE_LUA} + @FMTUTIL_SYS@ --byhyphen ${LANGUAGE_LUA} + ;; +*) + ;; +esac diff --git a/print/tex-tetex/hyphen.mk b/print/tex-tetex/hyphen.mk new file mode 100644 index 00000000000..863906ba623 --- /dev/null +++ b/print/tex-tetex/hyphen.mk @@ -0,0 +1,28 @@ +# $NetBSD: hyphen.mk,v 1.1 2013/11/15 06:08:51 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. +# TEX_HYPHEN_LUA - A list of hyphenation entries for language.dat.lua. +# + +.if !defined(TEX_HYPHEN_MK) +TEX_HYPHEN_MK= # defined + +DEPENDS+= tex-hyphen-base>=2010nb1:../../print/tex-hyphen-base +DEPENDS+= tex-tetex>=3.0.27774nb1:../../print/tex-tetex + +EVAL_PREFIX+= TETEX_PREFIX=tex-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} +FILES_SUBST+= HYPHEN_LUA=${TEX_HYPHEN_LUA:Q} +INSTALL_TEMPLATES+= ../../print/tex-tetex/files/hyphen-install.tmpl +DEINSTALL_TEMPLATES+= ../../print/tex-tetex/files/hyphen-deinstall.tmpl + +.endif # TEX_HYPHEN_MK |