diff options
author | minskim <minskim@pkgsrc.org> | 2010-11-07 17:22:24 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2010-11-07 17:22:24 +0000 |
commit | 748fd2acbdd58b3d5cdee2377b3d7ca9228dd45d (patch) | |
tree | cd84aa47eada3f33e0b6e9a70ad94ea0896e05b4 | |
parent | e358c61239ba258a98a6326fae2d917db43fdbbe (diff) | |
download | pkgsrc-748fd2acbdd58b3d5cdee2377b3d7ca9228dd45d.tar.gz |
Allow tex-hyphen-* packages to install hyphenation patterns for luatex.
-rw-r--r-- | print/texlive-tetex/files/hyphen-deinstall.tmpl | 10 | ||||
-rw-r--r-- | print/texlive-tetex/files/hyphen-install.tmpl | 18 | ||||
-rw-r--r-- | print/texlive-tetex/hyphen.mk | 4 |
3 files changed, 29 insertions, 3 deletions
diff --git a/print/texlive-tetex/files/hyphen-deinstall.tmpl b/print/texlive-tetex/files/hyphen-deinstall.tmpl index d18214f72e3..90d7a88a2a6 100644 --- a/print/texlive-tetex/files/hyphen-deinstall.tmpl +++ b/print/texlive-tetex/files/hyphen-deinstall.tmpl @@ -1,10 +1,11 @@ -# $NetBSD: hyphen-deinstall.tmpl,v 1.2 2009/04/15 05:01:28 minskim Exp $ +# $NetBSD: hyphen-deinstall.tmpl,v 1.3 2010/11/07 17:22:24 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) @@ -22,6 +23,13 @@ BEGIN { do_print=1; } \ /^%%% 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} ;; *) ;; diff --git a/print/texlive-tetex/files/hyphen-install.tmpl b/print/texlive-tetex/files/hyphen-install.tmpl index 7dc873be725..611680d0f65 100644 --- a/print/texlive-tetex/files/hyphen-install.tmpl +++ b/print/texlive-tetex/files/hyphen-install.tmpl @@ -1,10 +1,11 @@ -# $NetBSD: hyphen-install.tmpl,v 1.1 2009/03/06 18:13:00 minskim Exp $ +# $NetBSD: hyphen-install.tmpl,v 1.2 2010/11/07 17:22:24 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) @@ -37,6 +38,21 @@ BEGIN { f=\"${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 "\t${line}" >> ${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} ;; *) ;; diff --git a/print/texlive-tetex/hyphen.mk b/print/texlive-tetex/hyphen.mk index 83ec7cba87d..f3826148018 100644 --- a/print/texlive-tetex/hyphen.mk +++ b/print/texlive-tetex/hyphen.mk @@ -1,4 +1,4 @@ -# $NetBSD: hyphen.mk,v 1.1 2009/03/06 18:12:59 minskim Exp $ +# $NetBSD: hyphen.mk,v 1.2 2010/11/07 17:22:24 minskim Exp $ # # This Makefile fragment is intended to be included by packages that # install TeX hyphenation pattens. It updates format files at @@ -8,6 +8,7 @@ # # 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) @@ -20,6 +21,7 @@ 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} +FILES_SUBST+= HYPHEN_LUA=${TEX_HYPHEN_LUA:Q} INSTALL_TEMPLATES+= ../../print/texlive-tetex/files/hyphen-install.tmpl DEINSTALL_TEMPLATES+= ../../print/texlive-tetex/files/hyphen-deinstall.tmpl |