delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/08/17:23:33

X-Recipient: archive-cygwin AT delorie DOT 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 AT cornell DOT 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 AT cygwin DOT com
Subject: Re: cygport: How to suppress automatic postinstall script additions
References: <4F54E12C DOT 4040502 AT cornell DOT edu> <1330962952 DOT 6988 DOT 1 DOT camel AT YAAKOV04> <1330968741 DOT 6988 DOT 13 DOT camel AT YAAKOV04> <4F54FEF3 DOT 4010704 AT cornell DOT edu> <1330982609 DOT 6988 DOT 22 DOT camel AT YAAKOV04> <4F554322 DOT 4060704 AT cornell DOT edu> <4F56030B DOT 3020101 AT cornell DOT edu> <4F564C16 DOT 6030504 AT cornell DOT edu> <4F58CA70 DOT 1040703 AT cornell DOT edu>
In-Reply-To: <4F58CA70.1040703@cornell.edu>
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown AT cornell DOT edu - Thu Mar 8 17:23:12 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019