]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
35f324c4aebadcc9c5ba6bf8621a9d4f2e4af9b5
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From e2220ed33e69d8bc6504e3f6279894afe33a99a5 Mon Sep 17 00:00:00 2001
2 From: Paul Eggert <eggert@cs.ucla.edu>
3 Date: Wed, 29 Mar 2023 12:59:09 -0700
4 Subject: [PATCH 02/29] build: run "make fetch", which updated these:
5
6 * build-aux/texinfo.tex: Update from texinfo.
7 * lib/Autom4te/FileUtils.pm: Update from automake.
8
9 Upstream-Status: Backport
10 Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 ---
12 build-aux/texinfo.tex | 50 +++++++++++++++++++++------------------
13 lib/Autom4te/FileUtils.pm | 5 +++-
14 2 files changed, 31 insertions(+), 24 deletions(-)
15
16 diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
17 index d25161109..55a002d27 100644
18 --- a/build-aux/texinfo.tex
19 +++ b/build-aux/texinfo.tex
20 @@ -3,7 +3,7 @@
21 % Load plain if necessary, i.e., if running under initex.
22 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
23 %
24 -\def\texinfoversion{2023-03-21.06}
25 +\def\texinfoversion{2023-03-27.21}
26 %
27 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
28 %
29 @@ -1102,27 +1102,33 @@ where each line of input produces a line of output.}
30
31 % Output page labels information.
32 % See PDF reference v.1.7 p.594, section 8.3.1.
33 +% Page label ranges must be increasing.
34 \ifpdf
35 \def\pagelabels{%
36 \def\title{0 << /P (T-) /S /D >>}%
37 - \edef\roman{\the\romancount << /S /r >>}%
38 - \edef\arabic{\the\arabiccount << /S /D >>}%
39 %
40 - % Page label ranges must be increasing. Remove any duplicates.
41 - % (There is a slight chance of this being wrong if e.g. there is
42 - % a @contents but no @titlepage, etc.)
43 - %
44 - \ifnum\romancount=0 \def\roman{}\fi
45 - \ifnum\arabiccount=0 \def\title{}%
46 - \else
47 - \ifnum\romancount=\arabiccount \def\roman{}\fi
48 - \fi
49 - %
50 - \ifnum\romancount<\arabiccount
51 - \pdfcatalog{/PageLabels << /Nums [\title \roman \arabic ] >> }\relax
52 + % support @contents at very end of document
53 + \ifnum\contentsendcount=\pagecount
54 + \ifnum\arabiccount<\romancount
55 + \pdfcatalog{/PageLabels << /Nums
56 + [\title
57 + \the\arabiccount << /S /D >>
58 + \the\romancount << /S /r >>
59 + ] >> }\relax
60 + \fi
61 + % no contents in document
62 + \else\ifnum\contentsendcount=0
63 + \pdfcatalog{/PageLabels << /Nums
64 + [\title
65 + \the\arabiccount << /S /D >>
66 + ] >> }\relax
67 \else
68 - \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
69 - \fi
70 + \pdfcatalog{/PageLabels << /Nums
71 + [\title
72 + \the\romancount << /S /r >>
73 + \the\contentsendcount << /S /D >>
74 + ] >> }\relax
75 + \fi\fi
76 }
77 \else
78 \let\pagelabels\relax
79 @@ -1131,6 +1137,8 @@ where each line of input produces a line of output.}
80 \newcount\pagecount \pagecount=0
81 \newcount\romancount \romancount=0
82 \newcount\arabiccount \arabiccount=0
83 +\newcount\contentsendcount \contentsendcount=0
84 +
85 \ifpdf
86 \let\ptxadvancepageno\advancepageno
87 \def\advancepageno{%
88 @@ -6809,12 +6817,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
89 % Get ready to use Arabic numerals again
90 \def\contentsendroman{%
91 \lastnegativepageno = \pageno
92 - \global\pageno = \savepageno
93 - %
94 - % If \romancount > \arabiccount, the contents are at the end of the
95 - % document. Otherwise, advance where the Arabic numerals start for
96 - % the page numbers.
97 - \ifnum\romancount>\arabiccount\else\global\arabiccount=\pagecount\fi
98 + \global\pageno=1
99 + \contentsendcount = \pagecount
100 }
101
102 % Typeset the label for a chapter or appendix for the short contents.
103 diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
104 index ab58b9de4..2468fe6d8 100644
105 --- a/lib/Autom4te/FileUtils.pm
106 +++ b/lib/Autom4te/FileUtils.pm
107 @@ -39,9 +39,12 @@ use strict;
108 use warnings FATAL => 'all';
109
110 use Exporter;
111 -use Time::HiRes qw(stat);
112 use IO::File;
113
114 +# use sub-second resolution timestamps if available,
115 +# carry on with one-second resolution timestamps if that is all we have
116 +BEGIN { eval { require Time::HiRes; import Time::HiRes qw(stat) } }
117 +
118 use Autom4te::Channels;
119 use Autom4te::ChannelDefs;
120
121 --
122 2.41.0
123