cygport: texlive change

Ken Brown kbrown@cornell.edu
Tue Jun 16 14:24:00 GMT 2015


The syntax for 'fmtutil' has changed in TeX Live 2015.  The attached 
patch accommodates that change.

Ken
-------------- next part --------------
From b2b0d8aa5d773c3da340e1466d280e0507692072 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
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 2270b11..9a879bd 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -326,7 +326,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}
@@ -352,18 +352,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.1.4



More information about the Cygwin-apps mailing list