* cygport: texlive change
@ 2015-06-16 14:24 Ken Brown
2015-06-16 23:52 ` Yaakov Selkowitz
0 siblings, 1 reply; 4+ messages in thread
From: Ken Brown @ 2015-06-16 14:24 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 107 bytes --]
The syntax for 'fmtutil' has changed in TeX Live 2015. The attached
patch accommodates that change.
Ken
[-- Attachment #2: 0001-texlive-fix-calls-to-fmtutil-for-TeX-Live-2015.patch --]
[-- Type: text/plain, Size: 2303 bytes --]
From b2b0d8aa5d773c3da340e1466d280e0507692072 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Tue, 16 Jun 2015 09:47:53 -0400
Subject: [PATCH] texlive: fix calls to fmtutil for TeX Live 2015
The syntax for 'fmtutil --enablefmt/--disablefmt' now requires the
specification of a pair format/engine in case there is more than one
engine with a given format name.
---
cygclass/texlive.cygclass | 2 +-
lib/src_postinst.cygpart | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass
index 8e00001..d059e25 100644
--- a/cygclass/texlive.cygclass
+++ b/cygclass/texlive.cygclass
@@ -209,7 +209,7 @@ texlive_install() {
done
for fmt in $(grep -E 'execute AddFormat' $tlpobj \
- | sed '/mode=disabled/d;s/.* name=\([^ ]*\).*/\1/g')
+ | sed '/mode=disabled/d;s|.* name=\([^ ]*\).* engine=\([^ ]*\).*|\1/\2|')
do
__config_set texlive_fmts "$(__config_get texlive_fmts) $fmt"
done
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 2270b11..9a879bd 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -326,7 +326,7 @@ __prep_mateconf_schemas() {
#****
__prep_texlive() {
- local d fmt fmts map maps
+ local d fmt fmts format formats map maps
local markerdir=/var/lib/texmf/postinstall
dodir /etc/postinstall /etc/preremove ${markerdir}
@@ -352,18 +352,29 @@ __prep_texlive() {
done
echo >> ${D}/etc/preremove/${PN}.sh
fi
+
+ # Each element of $fmts is an expression "format/engine"; we
+ # need to use the entire expression for --enablefmt and
+ # --disablefmt, but only the "format" part for --byfmt.
+ formats=$(for fmt in $fmts; do echo ${fmt%/*}; done | sort -u)
+
if [ -n "${fmts#0}" ]
then
for fmt in $fmts
do
cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
/usr/bin/fmtutil-sys --enablefmt $fmt
- /usr/bin/fmtutil-sys --byfmt $fmt
_EOF
cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
/usr/bin/fmtutil-sys --disablefmt $fmt
_EOF
done
+ for format in $formats
+ do
+ cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
+ /usr/bin/fmtutil-sys --byfmt ${format%/*}
+ _EOF
+ done
fi
for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1}
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygport: texlive change
2015-06-16 14:24 cygport: texlive change Ken Brown
@ 2015-06-16 23:52 ` Yaakov Selkowitz
2015-06-17 1:27 ` Ken Brown
0 siblings, 1 reply; 4+ messages in thread
From: Yaakov Selkowitz @ 2015-06-16 23:52 UTC (permalink / raw)
To: cygwin-apps
On Tue, 2015-06-16 at 10:24 -0400, Ken Brown wrote:
> The syntax for 'fmtutil' has changed in TeX Live 2015. The attached
> patch accommodates that change.
Just curious, what changed? AFAICS the fmtutil-sys in 20140523-2 also
accepts --byfmt.
Also, I'm a bit confused by the use of $formats. It seems to just be a
list of all ${fmt%/*}, but then in the --byfmt call you have ${format
%/*}.
--
Yaakov
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygport: texlive change
2015-06-16 23:52 ` Yaakov Selkowitz
@ 2015-06-17 1:27 ` Ken Brown
2015-08-02 19:43 ` Ken Brown
0 siblings, 1 reply; 4+ messages in thread
From: Ken Brown @ 2015-06-17 1:27 UTC (permalink / raw)
To: cygwin-apps
On 6/16/2015 7:52 PM, Yaakov Selkowitz wrote:
> On Tue, 2015-06-16 at 10:24 -0400, Ken Brown wrote:
>> The syntax for 'fmtutil' has changed in TeX Live 2015. The attached
>> patch accommodates that change.
>
> Just curious, what changed? AFAICS the fmtutil-sys in 20140523-2 also
> accepts --byfmt.
The change is in the --enablefmt/--disablefmt commands. For example, there are
two formats called cont-en, one with engine pdftex and one with engine xetex.
It used to be that you could write
fmtutil-sys --enablefmt cont-en
and both of those formats would be enabled. Now you have to write
fmtutil-sys --enablefmt cont-en/pdftex
or
fmtutil-sys --enablefmt cont-en/xetex
or both. But for --byfmt, you still just use cont-en as before.
> Also, I'm a bit confused by the use of $formats. It seems to just be a
> list of all ${fmt%/*}, but then in the --byfmt call you have ${format
> %/*}.
That's just a careless mistake on my part. Thanks for catching it. I should
have just used $format in the --byfmt call. The point of $formats is that it's
a list of all ${fmt%/*} *without repetitions*; for example, cont-en would occur
twice if I didn't remove repetitions.
Ken
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cygport: texlive change
2015-06-17 1:27 ` Ken Brown
@ 2015-08-02 19:43 ` Ken Brown
0 siblings, 0 replies; 4+ messages in thread
From: Ken Brown @ 2015-08-02 19:43 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
On 6/16/2015 9:27 PM, Ken Brown wrote:
> On 6/16/2015 7:52 PM, Yaakov Selkowitz wrote:
>> On Tue, 2015-06-16 at 10:24 -0400, Ken Brown wrote:
>>> The syntax for 'fmtutil' has changed in TeX Live 2015. The attached
>>> patch accommodates that change.
>>
>> Just curious, what changed? AFAICS the fmtutil-sys in 20140523-2 also
>> accepts --byfmt.
>
> The change is in the --enablefmt/--disablefmt commands. For example, there are
> two formats called cont-en, one with engine pdftex and one with engine xetex. It
> used to be that you could write
>
> fmtutil-sys --enablefmt cont-en
>
> and both of those formats would be enabled. Now you have to write
>
> fmtutil-sys --enablefmt cont-en/pdftex
>
> or
>
> fmtutil-sys --enablefmt cont-en/xetex
>
> or both. But for --byfmt, you still just use cont-en as before.
>
>> Also, I'm a bit confused by the use of $formats. It seems to just be a
>> list of all ${fmt%/*}, but then in the --byfmt call you have ${format
>> %/*}.
>
> That's just a careless mistake on my part. Thanks for catching it. I should
> have just used $format in the --byfmt call. The point of $formats is that it's
> a list of all ${fmt%/*} *without repetitions*; for example, cont-en would occur
> twice if I didn't remove repetitions.
Yaakov,
It looks like you forget this patch for cygport-0.20.2-1. Here it is again,
with the mistake corrected.
Ken
[-- Attachment #2: 0001-texlive-fix-calls-to-fmtutil-for-TeX-Live-2015.patch --]
[-- Type: text/plain, Size: 2300 bytes --]
From e7998bb7fd9c4d06cbd76bc715862e6263901688 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Tue, 16 Jun 2015 09:47:53 -0400
Subject: [PATCH] texlive: fix calls to fmtutil for TeX Live 2015
The syntax for 'fmtutil --enablefmt/--disablefmt' now requires the
specification of a pair format/engine in case there is more than one
engine with a given format name.
---
cygclass/texlive.cygclass | 2 +-
lib/src_postinst.cygpart | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass
index 8e00001..d059e25 100644
--- a/cygclass/texlive.cygclass
+++ b/cygclass/texlive.cygclass
@@ -209,7 +209,7 @@ texlive_install() {
done
for fmt in $(grep -E 'execute AddFormat' $tlpobj \
- | sed '/mode=disabled/d;s/.* name=\([^ ]*\).*/\1/g')
+ | sed '/mode=disabled/d;s|.* name=\([^ ]*\).* engine=\([^ ]*\).*|\1/\2|')
do
__config_set texlive_fmts "$(__config_get texlive_fmts) $fmt"
done
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index 747b564..b28888d 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -329,7 +329,7 @@ __prep_mateconf_schemas() {
#****
__prep_texlive() {
- local d fmt fmts map maps
+ local d fmt fmts format formats map maps
local markerdir=/var/lib/texmf/postinstall
dodir /etc/postinstall /etc/preremove ${markerdir}
@@ -355,18 +355,29 @@ __prep_texlive() {
done
echo >> ${D}/etc/preremove/${PN}.sh
fi
+
+ # Each element of $fmts is an expression "format/engine"; we
+ # need to use the entire expression for --enablefmt and
+ # --disablefmt, but only the "format" part for --byfmt.
+ formats=$(for fmt in $fmts; do echo ${fmt%/*}; done | sort -u)
+
if [ -n "${fmts#0}" ]
then
for fmt in $fmts
do
cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
/usr/bin/fmtutil-sys --enablefmt $fmt
- /usr/bin/fmtutil-sys --byfmt $fmt
_EOF
cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF
/usr/bin/fmtutil-sys --disablefmt $fmt
_EOF
done
+ for format in $formats
+ do
+ cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
+ /usr/bin/fmtutil-sys --byfmt ${format}
+ _EOF
+ done
fi
for d in /usr/share/texmf-dist/fonts/{opentype,truetype,type1}
--
2.4.5
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-02 19:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-16 14:24 cygport: texlive change Ken Brown
2015-06-16 23:52 ` Yaakov Selkowitz
2015-06-17 1:27 ` Ken Brown
2015-08-02 19:43 ` Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).