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
--- 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

--
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

Reply via email to