X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.7 required=5.0	tests=BAYES_50,SPF_NEUTRAL,TW_FC,TW_MK,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F59314E.2070806@cornell.edu>
Date: Thu, 08 Mar 2012 17:23:10 -0500
From: Ken Brown <kbrown@cornell.edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cygport: How to suppress automatic postinstall script additions
References: <4F54E12C.4040502@cornell.edu>		 <1330962952.6988.1.camel@YAAKOV04> <1330968741.6988.13.camel@YAAKOV04>	 <4F54FEF3.4010704@cornell.edu> <1330982609.6988.22.camel@YAAKOV04> <4F554322.4060704@cornell.edu> <4F56030B.3020101@cornell.edu> <4F564C16.6030504@cornell.edu> <4F58CA70.1040703@cornell.edu>
In-Reply-To: <4F58CA70.1040703@cornell.edu>
Content-Type: multipart/mixed; boundary="------------090500000406050406030005"
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown@cornell.edu - Thu Mar  8 17:23:12 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------090500000406050406030005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 3/8/2012 10:04 AM, Ken Brown wrote:
> there's one other thing I thought of
> that the TeX Live postinstall scripts should be doing. Shouldn't they
> call fc-cache whenever fonts are installed into
> usr/share/texmf-dist/fonts/opentype,
> usr/share/texmf-dist/fonts/truetype, or usr/share/texmf-dist/fonts/type1?

I've made an attempt to do this, although there may well be a better 
way.  The attached patch replaces my previous one and includes the call 
to fc-cache.

Yaakov, I'll try to refrain from replying to this thread again until 
you've had a chance to look at this.

Ken

--------------090500000406050406030005
Content-Type: text/plain;
 name="YA_src_postinst.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="YA_src_postinst.patch"

--- src_postinst.cygpart.orig	2012-03-05 12:27:39.000000000 -0500
+++ src_postinst.cygpart	2012-03-08 16:44:51.470581100 -0500
@@ -262,22 +262,41 @@
 
 __prep_texlive() {
 	dodir /etc/postinstall
+	local texfontsdir=/usr/share/texmf-dist/fonts
+	local fcdirs
+	for d in opentype truetype type1
+	do
+		if [ -d ${D}${texfontsdir}/${d} ]
+		then
+			fcdirs+="${texfontsdir}/${d} "
+		fi
+	done
 	cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-		if [ -x /usr/bin/mktexlsr ] && \\
-		   [ ! -f /usr/share/texmf-dist/ls-R -o \\
+		if [ -n "${fcdirs}" ]
+		then
+		    /usr/bin/fc-cache -f ${fcdirs}
+		fi
+		if [ ! -f /usr/share/texmf-dist/ls-R -o \\
 		     \$(find /usr/share/texmf{,-dist} -mindepth 2 -type f -cnewer /usr/share/texmf-dist/ls-R 2>/dev/null | wc -l) -gt 0 ]
 		then
+		    runfmtutil=1
 		    /usr/bin/mktexlsr
-		    if test -f /etc/texmf/web2c/updmap.cfg; then
-		      /usr/bin/sed -i -e 's/^#! //g' /etc/texmf/web2c/updmap.cfg
-		    fi
 		    /usr/bin/updmap-sys --syncwithtrees
+		fi
+		for map in $(__config_get texlive_updmaps)
+		do
+		    /usr/bin/updmap-sys --nomkmap --nohash --enable \$map
+		done
+		if [ -n "\$map" ]
+		then
 		    /usr/bin/updmap-sys --nohash
 		    /usr/bin/mktexlsr
+		fi
+		if [ -n "\$runfmtutil" ]
+		then
 		    /usr/bin/fmtutil-sys --all
 		    /usr/bin/mktexlsr
 		fi
-
 	_EOF
 }
 # end of conditional __prepetc helpers


--------------090500000406050406030005
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------090500000406050406030005--
