cygport patch for texlive

Ken Brown kbrown@cornell.edu
Mon Jun 6 17:11:00 GMT 2016


The attached patch, which I think is self-explanatory, was used for 
building TeX Live 2016.

Ken
-------------- next part --------------
From e75531985e354eb8d98eac8dd842b1fbed548533 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 2 May 2016 09:22:32 -0400
Subject: [PATCH] texlive: support generation of language files

Up to now, language files have not been updated to reflect the
languages available in a TeX Live installation.  As a result, format
generation can fail due to missing hyphenation files.  This commit
provides the support needed by the texlive perpetual postinstall
scripts to keep the language files up to date.
---
 cygclass/texlive.cygclass | 10 +++++++++-
 lib/src_postinst.cygpart  | 23 ++++++++++++++++++++++-
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass
index b8a06d5..ce247e4 100644
--- a/cygclass/texlive.cygclass
+++ b/cygclass/texlive.cygclass
@@ -137,10 +137,11 @@ ARCH=noarch
 #  queues the necessary postinstall steps.
 #****
 texlive_install() {
-	local f pkg pkgs tlpobj dst src fmt map perm
+	local f pkg pkgs tlpobj dst src fmt map perm lang
 
 	__config_set texlive_fmts
 	__config_set texlive_maps
+	__config_set texlive_langs
 
 	for pkg in ${TEXLIVE_TEXMF_PKGS//,/ }
 	do
@@ -223,6 +224,13 @@ texlive_install() {
 		do
 			__config_set texlive_maps "$(__config_get texlive_maps) $map"
 		done
+
+		for lang in $(grep -E 'execute AddHyphen' $tlpobj \
+		             | sed 's/.*[ \t]name=\([^ \t]*\).*/\1/')
+		do
+			__config_set texlive_langs "$(__config_get texlive_langs) $lang"
+		done
+
 	done
 }
 
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 10d4174..b607ea0 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -228,7 +228,7 @@ __prep_gtk_icon_theme() {
 #****
 
 __prep_texlive() {
-	local fmt fmts format formats map maps tlp tlps
+	local fmt fmts format formats map maps tlp tlps lang langs
 	local markerdir=/var/lib/texmf/postinstall
 
 	dodir /etc/postinstall /etc/preremove ${markerdir}
@@ -240,6 +240,7 @@ __prep_texlive() {
 
 	fmts=$(__config_get texlive_fmts)
 	maps=$(__config_get texlive_maps)
+	langs=$(__config_get texlive_langs)
 
 	if [ -n "${maps#0}" ]
 	then
@@ -274,12 +275,32 @@ __prep_texlive() {
 				/usr/bin/fmtutil-sys --disablefmt $fmt
 			_EOF
 		done
+		cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
+			if [ ! -f ${markerdir}/texlive.rebuild_all_fmts ]
+			then
+		_EOF
 		for format in $formats
 		do
 			cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
 				/usr/bin/fmtutil-sys --byfmt ${format}
 			_EOF
 		done
+		cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
+			fi
+		_EOF
+	fi
+
+	if [ -n "${langs#0}" ]
+	then
+		cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
+			/usr/bin/touch ${markerdir}/${PN}_rm.lang
+		_EOF
+		for lang in $langs
+		do
+			cat >> ${D}${markerdir}/${PN}.lang <<-_EOF
+				$lang
+			_EOF
+		done
 	fi
 
 	if [ -d ${D}/usr/share/tlpkg/tlpobj ]
-- 
2.8.3



More information about the Cygwin-apps mailing list