On 12/16/2014 6:08 PM, Ken Brown wrote:
Sorry, there was a stupid mistake in one of the patches.  The corrected
one is attached.

This is embarrassing, but there was a mistake in a second patch also. I'm reattaching the complete set of cygport patches, corrected.

I had made some minor changes after testing, and foolishly didn't bother testing again before sending the patches.

Sorry

Ken

>From 9cb676f9e1e062f49d1364e7e60d8eb44be78907 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Tue, 25 Nov 2014 09:27:52 -0500
Subject: [PATCH 1/4] prep_texlive: remove references to /usr/share/texmf

This is no longer used as of TeX Live 2013.
---
 lib/src_postinst.cygpart | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 9963b63..03311b9 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -371,7 +371,7 @@ __prep_texlive() {
                _EOF
        fi
 
-       for d in /usr/share/texmf{-dist,}/fonts/{opentype,truetype,type1}
+       for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1}
        do
                if [ -d ${D}${d} ]
                then
@@ -655,14 +655,10 @@ __prepetc() {
                __prep_freedesktop_mime || error "Shared Mime Info postinstall 
failed"
        fi
 
-       for d in /usr/share/texmf{,-dist}
-       do
-               if [ -d ${D}${d} ]
-               then
-                       __prep_texlive
-                       break
-               fi
-       done
+       if [ -d /usr/share/texmf-dist ]
+       then
+           __prep_texlive
+       fi
 
        if [ -d ${D}/usr/share/xsessions ]
        then
-- 
2.1.1

>From 83b5ab484f9fe5e2550f6851cfa074d730d4b8bb Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Wed, 26 Nov 2014 07:35:13 -0500
Subject: [PATCH 2/4] prep_texlive: remove calls to mktexlsr

Instead create a marker file in /etc/texmf/postinstall indicating that
mktexlsr should be run by a perpetual postinstall script.
---
 lib/src_postinst.cygpart | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 03311b9..9e4a910 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -328,11 +328,9 @@ __prep_mateconf_schemas() {
 __prep_texlive() {
        local d fmt fmts map maps
 
-       dodir /etc/postinstall /etc/preremove
+       dodir /etc/postinstall /etc/preremove /etc/texmf/postinstall
 
-       cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-               /usr/bin/mktexlsr
-       _EOF
+       touch ${D}/etc/texmf/postinstall/${PN}.lsr
 
        fmts=$(__config_get texlive_fmts)
        maps=$(__config_get texlive_maps)
@@ -351,7 +349,6 @@ __prep_texlive() {
                cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
                        /usr/bin/updmap-sys --nohash --syncwithtrees
                        /usr/bin/updmap-sys --nohash
-                       /usr/bin/mktexlsr
                _EOF
        fi
        if [ -n "${fmts#0}" ]
@@ -366,9 +363,6 @@ __prep_texlive() {
                                /usr/bin/fmtutil-sys --disablefmt $fmt
                        _EOF
                done
-               cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-                       /usr/bin/mktexlsr
-               _EOF
        fi
 
        for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1}
-- 
2.1.1

>From 5a2d076c5b55014342104d5327b80b62b9cf6f06 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Wed, 26 Nov 2014 07:53:29 -0500
Subject: [PATCH 3/4] prep_texlive: remove calls to fc-cache

Instead, create a file in /etc/texmf/postinstall listing the font
directories on which fc-cache should be run by a perpetual postinstall
script.
---
 lib/src_postinst.cygpart | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 9e4a910..a486d44 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -369,8 +369,8 @@ __prep_texlive() {
        do
                if [ -d ${D}${d} ]
                then
-                       cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-                               /usr/bin/fc-cache -f $d
+                       cat >> ${D}/etc/texmf/postinstall/${PN}.fc <<-_EOF
+                               ${d}
                        _EOF
                fi
        done
-- 
2.1.1

>From 547c70536ad878aa04b77b97cf7b4e7d8db758da Mon Sep 17 00:00:00 2001
From: Ken Brown <kbr...@cornell.edu>
Date: Fri, 28 Nov 2014 10:47:49 -0500
Subject: [PATCH 4/4] prep_texlive: group enable/disable commands in calls to
 updmap

In postinstall scripts we remove the updmap calls completely and
instead create a file of commands in /etc/texmf/postinstall, to be run
by a perpetual postinstall script.  In preremove scripts we just group
the commands into a single call to updmap, since setup.exe doesn't yet
support perpetual preremove scripts.
---
 lib/src_postinst.cygpart | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index a486d44..0fb3a48 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -337,19 +337,19 @@ __prep_texlive() {
 
        if [ -n "${maps#0}" ]
        then
+               cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
+                       /usr/bin/updmap-sys --nohash --nomkmap \\
+               _EOF
                for map in $maps
                do
-                       cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-                               /usr/bin/updmap-sys --nohash --nomkmap --enable 
$map
-                       _EOF
                        cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
-                               /usr/bin/updmap-sys --nohash --nomkmap 
--disable ${map#*=}
+                               --disable ${map#*=} \\
+                       _EOF
+                       cat >> ${D}/etc/texmf/postinstall/${PN}.map <<-_EOF
+                               --enable $map
                        _EOF
                done
-               cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
-                       /usr/bin/updmap-sys --nohash --syncwithtrees
-                       /usr/bin/updmap-sys --nohash
-               _EOF
+               echo >> ${D}/etc/preremove/${PN}.sh
        fi
        if [ -n "${fmts#0}" ]
        then
-- 
2.1.1

Reply via email to