[BACK]Return to hyphen-install.tmpl CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / print / texlive-tetex / files

File: [cvs.NetBSD.org] / pkgsrc / print / texlive-tetex / files / Attic / hyphen-install.tmpl (download)

Revision 1.4, Wed Nov 10 17:55:27 2010 UTC (9 years, 3 months ago) by minskim
Branch: MAIN
CVS Tags: pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4
Changes since 1.3: +2 -2 lines

Escape whitespace in updating LuaTeX's configuration file.

# $NetBSD: hyphen-install.tmpl,v 1.4 2010/11/10 17:55:27 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