cygport patches for TeX Live
Ken Brown
kbrown@cornell.edu
Thu Jan 15 21:47:00 GMT 2015
On 1/5/2015 12:52 PM, Achim Gratz wrote:
> Ken Brown writes:
>> Do you have an opinion about that? I suggested /etc/texmf/postinstall
>> or /var/lib/texmf/postinstall, but Achim had other ideas. The only
>> precedent we have so far is Achim's new _autorebase, which uses
>> /etc/rebase.
>
> Even for this I think /etc is the wrong place and I'd consider moving it
> elsewhere. Something in /var on the other hand sounds OK to me.
> LSB/FHS seems to suggest /var/lib for this purpose unless there is yet
> another more specific requirement I didn't find while browsing it.
In view of https://cygwin.com/ml/cygwin-apps/2015-01/msg00034.html, I'll use
/var/lib/texmf/postinstall for the postinstall markers. I'm attaching revised
cygport patches.
I'm also attaching, for reference, the corresponding revised perpetual
postinstall scripts.
Ken
-------------- next part --------------
>From 13b65df78a27fde439b263ee3a0dbaf3dbba1c85 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 26 Nov 2014 07:35:13 -0500
Subject: [PATCH 1/3] prep_texlive: remove calls to mktexlsr
Instead create a marker file indicating that mktexlsr should be run by
a perpetual postinstall script.
---
lib/src_postinst.cygpart | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index ba9a8b3..44737a9 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -327,12 +327,11 @@ __prep_mateconf_schemas() {
__prep_texlive() {
local d fmt fmts map maps
+ local markerdir=/var/lib/texmf/postinstall
- dodir /etc/postinstall /etc/preremove
+ dodir /etc/postinstall /etc/preremove ${markerdir}
- cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
- /usr/bin/mktexlsr
- _EOF
+ touch ${D}${markerdir}/${PN}.lsr
fmts=$(__config_get texlive_fmts)
maps=$(__config_get texlive_maps)
@@ -351,7 +350,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 +364,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.4
-------------- next part --------------
>From 3a7b3e72c39e46d78d321e703f0a3f412a934015 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 26 Nov 2014 07:53:29 -0500
Subject: [PATCH 2/3] prep_texlive: remove calls to fc-cache
Instead, create a file 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 44737a9..33cdd36 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -370,8 +370,8 @@ __prep_texlive() {
do
if [ -d ${D}${d} ]
then
- cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
- /usr/bin/fc-cache -f $d
+ cat >> ${D}${markerdir}/${PN}.fc <<-_EOF
+ ${d}
_EOF
fi
done
--
2.1.4
-------------- next part --------------
>From 57832312e6527b596089041b88b11b3f5b38f8c8 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Fri, 28 Nov 2014 10:47:49 -0500
Subject: [PATCH 3/3] 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 a marker directory, 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 33cdd36..a715bc5 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -338,19 +338,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}${markerdir}/${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.4
-------------- next part --------------
#! /bin/dash
markerdir=/var/lib/texmf/postinstall
for f in ${markerdir}/*.lsr
do
if [ -f ${f} ]
then
/usr/bin/mktexlsr
for g in ${markerdir}/*.lsr
do
mv -f ${g} ${g}.done
done
fi
break
done
if [ -f ${markerdir}/texlive.refresh_fmts ]
then
/usr/bin/fmtutil-sys --refresh
mv -f ${markerdir}/texlive.refresh_fmts \
${markerdir}/texlive.refresh_fmts.done
fi
-------------- next part --------------
#! /bin/dash
markerdir=/var/lib/texmf/postinstall
maps=$(cat ${markerdir}/*.map)
if [ -n "${maps}" ]
then
/usr/bin/updmap-sys --nohash --nomkmap ${maps}
for f in ${markerdir}/*.map
do
mv -f ${f} ${f}.done
done
echo y | /usr/bin/updmap-sys --syncwithtrees
/usr/bin/updmap-sys
fi
fc_dirs=$(sort -u ${markerdir}/*.fc)
if [ -n "${fc_dirs}" ]
then
/usr/bin/fc-cache -f ${fc_dirs}
for f in ${markerdir}/*.fc
do
mv -f ${f} ${f}.done
done
fi
More information about the Cygwin-apps
mailing list