From e7998bb7fd9c4d06cbd76bc715862e6263901688 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Tue, 16 Jun 2015 09:47:53 -0400 Subject: [PATCH] texlive: fix calls to fmtutil for TeX Live 2015 The syntax for 'fmtutil --enablefmt/--disablefmt' now requires the specification of a pair format/engine in case there is more than one engine with a given format name. --- cygclass/texlive.cygclass | 2 +- lib/src_postinst.cygpart | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass index 8e00001..d059e25 100644 --- a/cygclass/texlive.cygclass +++ b/cygclass/texlive.cygclass @@ -209,7 +209,7 @@ texlive_install() { done for fmt in $(grep -E 'execute AddFormat' $tlpobj \ - | sed '/mode=disabled/d;s/.* name=\([^ ]*\).*/\1/g') + | sed '/mode=disabled/d;s|.* name=\([^ ]*\).* engine=\([^ ]*\).*|\1/\2|') do __config_set texlive_fmts "$(__config_get texlive_fmts) $fmt" done diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart index 747b564..b28888d 100644 --- a/lib/src_postinst.cygpart +++ b/lib/src_postinst.cygpart @@ -329,7 +329,7 @@ __prep_mateconf_schemas() { #**** __prep_texlive() { - local d fmt fmts map maps + local d fmt fmts format formats map maps local markerdir=/var/lib/texmf/postinstall dodir /etc/postinstall /etc/preremove ${markerdir} @@ -355,18 +355,29 @@ __prep_texlive() { done echo >> ${D}/etc/preremove/${PN}.sh fi + + # Each element of $fmts is an expression "format/engine"; we + # need to use the entire expression for --enablefmt and + # --disablefmt, but only the "format" part for --byfmt. + formats=$(for fmt in $fmts; do echo ${fmt%/*}; done | sort -u) + if [ -n "${fmts#0}" ] then for fmt in $fmts do cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF /usr/bin/fmtutil-sys --enablefmt $fmt - /usr/bin/fmtutil-sys --byfmt $fmt _EOF cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF /usr/bin/fmtutil-sys --disablefmt $fmt _EOF done + for format in $formats + do + cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF + /usr/bin/fmtutil-sys --byfmt ${format} + _EOF + done fi for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1} -- 2.4.5