update and cleanup patches
Norbert Preining
8 years ago
0 | --- | |
1 | info/terminal.c | 2 +- | |
2 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
3 | ||
4 | --- texinfo.orig/info/terminal.c | |
5 | +++ texinfo/info/terminal.c | |
6 | @@ -76,7 +76,7 @@ | |
7 | VFunction *terminal_scroll_terminal_hook = NULL; | |
8 | ||
9 | /* User variable 'mouse'. Values can be MP_* constants in terminal.h. */ | |
10 | -int mouse_protocol = MP_NORMAL_TRACKING; | |
11 | +int mouse_protocol = MP_NONE; | |
12 | ||
13 | /* **************************************************************** */ | |
14 | /* */ |
3 | 3 | |
4 | 4 | --- texinfo.orig/configure |
5 | 5 | +++ texinfo/configure |
6 | @@ -4148,13 +4148,13 @@ | |
6 | @@ -3979,13 +3979,13 @@ | |
7 | 7 | |
8 | 8 | # Some tools Automake needs. |
9 | 9 |
4 | 4 | |
5 | 5 | --- texinfo.orig/doc/Makefile.in |
6 | 6 | +++ texinfo/doc/Makefile.in |
7 | @@ -279,14 +279,16 @@ | |
7 | @@ -265,14 +265,16 @@ | |
8 | 8 | am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) |
9 | 9 | am__v_texidevnull_0 = > /dev/null |
10 | 10 | am__v_texidevnull_1 = |
11 | -INFO_DEPS = texinfo.info info-stnd.info info.info | |
12 | +#INFO_DEPS = texinfo.info info-stnd.info info.info | |
11 | -INFO_DEPS = texinfo.info info-stnd.info | |
12 | +#INFO_DEPS = texinfo.info info-stnd.info | |
13 | 13 | +INFO_DEPS = |
14 | 14 | TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex |
15 | 15 | am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux |
16 | DVIS = texinfo.dvi info-stnd.dvi info.dvi | |
17 | PDFS = texinfo.pdf info-stnd.pdf info.pdf | |
18 | PSS = texinfo.ps info-stnd.ps info.ps | |
19 | HTMLS = texinfo.html info-stnd.html info.html | |
20 | -TEXINFOS = texinfo.texi info-stnd.texi info.texi | |
21 | +#TEXINFOS = texinfo.texi info-stnd.texi info.texi | |
16 | DVIS = texinfo.dvi info-stnd.dvi | |
17 | PDFS = texinfo.pdf info-stnd.pdf | |
18 | PSS = texinfo.ps info-stnd.ps | |
19 | HTMLS = texinfo.html info-stnd.html | |
20 | -TEXINFOS = texinfo.texi info-stnd.texi | |
21 | +#TEXINFOS = texinfo.texi info-stnd.texi | |
22 | 22 | +TEXINFOS = |
23 | 23 | TEXI2DVI = texi2dvi |
24 | 24 | TEXI2PDF = $(TEXI2DVI) --pdf --batch |
25 | 25 | MAKEINFOHTML = $(MAKEINFO) --html |
26 | @@ -1470,8 +1472,10 @@ | |
26 | @@ -1204,8 +1206,10 @@ | |
27 | top_builddir = @top_builddir@ | |
28 | top_srcdir = @top_srcdir@ | |
27 | 29 | SUBDIRS = tp_api |
28 | ||
29 | # Put the Texinfo manual first because that's the most important. | |
30 | -info_TEXINFOS = texinfo.texi info-stnd.texi info.texi | |
31 | -DISTCLEANFILES = texinfo.info* info*.info* | |
32 | +#info_TEXINFOS = texinfo.texi info-stnd.texi info.texi | |
33 | +#DISTCLEANFILES = texinfo.info* info*.info* | |
30 | -info_TEXINFOS = texinfo.texi info-stnd.texi | |
31 | -DISTCLEANFILES = texinfo.info* info-stnd.info* | |
32 | +#info_TEXINFOS = texinfo.texi info-stnd.texi | |
33 | +#DISTCLEANFILES = texinfo.info* info-stnd.info* | |
34 | 34 | +info_TEXINFOS = |
35 | 35 | +DISTCLEANFILES = |
36 | ||
37 | # Use the programs built in our distribution, taking account of possible | |
38 | # cross-compiling. | |
36 | MAKEINFO_ENVIRONMENT = TEXINFO_DEV_SOURCE=1 ; export TEXINFO_DEV_SOURCE ; \ | |
37 | top_srcdir="$(top_srcdir)" ; export top_srcdir ; \ | |
38 | top_builddir="$(top_builddir)" ; export top_builddir ; |
0 | Upstream patch to implement follow remain strategy | |
1 | Respective changelogs: | |
2 | 2015-08-05 Gavin Smith <gavinsmith0123@gmail.com> | |
3 | ||
4 | * info/variables.c (info_variables): New user variable | |
5 | "follow-strategy". | |
6 | * info/nodes.c (info_get_node_with_defaults): If | |
7 | follow-strategy=remain (the default), try to remain within the | |
8 | same directory as the node we're coming from. | |
9 | ||
10 | To disable it, set the "follow-strategy" variable to "path" in .infokey. | |
11 | --- | |
12 | info/nodes.c | 36 ++++++++++++++++++++++++++++++++++-- | |
13 | info/variables.c | 6 ++++++ | |
14 | info/variables.h | 1 + | |
15 | 3 files changed, 41 insertions(+), 2 deletions(-) | |
16 | ||
17 | --- texinfo.orig/info/nodes.c | |
18 | +++ texinfo/info/nodes.c | |
19 | @@ -895,6 +895,11 @@ | |
20 | return i - binding->start; | |
21 | } | |
22 | ||
23 | +#define FOLLOW_REMAIN 0 | |
24 | +#define FOLLOW_PATH 1 | |
25 | + | |
26 | +int follow_strategy; | |
27 | + | |
28 | /* Return a pointer to a NODE structure for the Info node (FILENAME)NODENAME, | |
29 | using DEFAULTS for defaults. If DEFAULTS is null, the defaults are: | |
30 | - If FILENAME is NULL, `dir' is used. | |
31 | @@ -928,8 +933,35 @@ | |
32 | goto cleanup_and_exit; | |
33 | } | |
34 | ||
35 | - /* Find the correct info file, or give up. */ | |
36 | - file_buffer = info_find_file (filename); | |
37 | + | |
38 | + if (follow_strategy == FOLLOW_REMAIN | |
39 | + && defaults && defaults->fullpath) | |
40 | + { | |
41 | + /* Find the directory in the filename for defaults, and look in | |
42 | + that directory first. */ | |
43 | + char *file_in_same_dir; | |
44 | + char saved_char, *p; | |
45 | + | |
46 | + p = defaults->fullpath + strlen (defaults->fullpath); | |
47 | + while (p > defaults->fullpath && !IS_SLASH (*p)) | |
48 | + p--; | |
49 | + | |
50 | + if (p > defaults->fullpath) | |
51 | + { | |
52 | + saved_char = *p; | |
53 | + *p = 0; | |
54 | + | |
55 | + file_in_same_dir = info_add_extension (defaults->fullpath, | |
56 | + filename, 0); | |
57 | + if (file_in_same_dir) | |
58 | + file_buffer = info_find_file (file_in_same_dir); | |
59 | + free (file_in_same_dir); | |
60 | + *p = saved_char; | |
61 | + } | |
62 | + } | |
63 | + | |
64 | + if (!file_buffer) | |
65 | + file_buffer = info_find_file (filename); | |
66 | ||
67 | if (file_buffer) | |
68 | { | |
69 | --- texinfo.orig/info/variables.c | |
70 | +++ texinfo/info/variables.c | |
71 | @@ -36,6 +36,8 @@ | |
72 | ||
73 | static char *mouse_choices[] = { "Off", "normal-tracking", NULL }; | |
74 | ||
75 | +static char *follow_strategy_choices[] = { "remain", "path", NULL }; | |
76 | + | |
77 | /* Choices used by the completer when reading a value for the user-visible | |
78 | variable "scroll-behaviour". */ | |
79 | static char *info_scroll_choices[] = { "Continuous", "Next Only", | |
80 | @@ -124,6 +126,10 @@ | |
81 | N_("Method to use to track mouse events"), | |
82 | &mouse_protocol, (char **)mouse_choices }, | |
83 | ||
84 | + { "follow-strategy", | |
85 | + N_("Method to use to track mouse events"), | |
86 | + &follow_strategy, (char **)follow_strategy_choices }, | |
87 | + | |
88 | { NULL } | |
89 | }; | |
90 | ||
91 | --- texinfo.orig/info/variables.h | |
92 | +++ texinfo/info/variables.h | |
93 | @@ -82,6 +82,7 @@ | |
94 | extern int key_time; | |
95 | extern int highlight_searches_p; | |
96 | extern int mouse_protocol; | |
97 | +extern int follow_strategy; | |
98 | ||
99 | ||
100 | #endif /* not INFO_VARIABLES_H */ |
0 | fix some .po files that have wrong references | |
1 | --- | |
2 | po/ro.po | 2 +- | |
3 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
4 | ||
5 | --- texinfo.orig/po/ro.po | |
6 | +++ texinfo/po/ro.po | |
7 | @@ -1900,7 +1900,7 @@ | |
8 | ||
9 | #: info/session.c:5312 | |
10 | msgid "Internally used by \\[universal-argument]" | |
11 | -msgstr "Folosit intern de \\[argument-universal]" | |
12 | +msgstr "Folosit intern de \\[universal-argument]" | |
13 | ||
14 | #: info/session.c:5388 | |
15 | msgid "Show full file name of node being displayed" |
6 | 6 | |
7 | 7 | --- texinfo.orig/util/texi2dvi |
8 | 8 | +++ texinfo/util/texi2dvi |
9 | @@ -1837,7 +1837,7 @@ | |
9 | @@ -1951,7 +1951,7 @@ | |
10 | 10 | $SED "s,^$orig_pwd/,,;s,^\./,,;s,/,!,g"` |
11 | 11 | esac |
12 | 12 | # Remove it at exit if clean mode. |
0 | 0 | warn_missing_tex |
1 | 1 | numerical-signal-names |
2 | #info_universal_argument | |
3 | 2 | dont_build_info |
4 | 3 | info-manpage-mentiones-nonfree |
5 | 4 | do-not-require-automake-1.15 |
6 | upstream-svn6390-index-deterministic | |
7 | #texinfo-make-index-deterministic | |
8 | slash-in-dir-entry | |
9 | follow-strategy-remain-svn6502 | |
10 | disable-mouse-svn6715 |
0 | allow for info files and dir entries with subdirs | |
1 | patch by Gavin Smith on the bug-texinfo and debbug 792328 | |
2 | --- | |
3 | ChangeLog | 16 ++++++++++++++++ | |
4 | info/filesys.c | 31 +++++++++++++++++++++---------- | |
5 | info/info.c | 29 ++++++++++++++++++++++++----- | |
6 | info/nodes.c | 3 ++- | |
7 | 4 files changed, 63 insertions(+), 16 deletions(-) | |
8 | ||
9 | --- texinfo.orig/ChangeLog | |
10 | +++ texinfo/ChangeLog | |
11 | @@ -1,3 +1,19 @@ | |
12 | +2015-07-15 Gavin Smith <gavinsmith0123@gmail.com> | |
13 | + | |
14 | + * info/nodes.c (info_find_file): If filename has slash, look for | |
15 | + it in search path if it does not begin "./". | |
16 | + * info/filesys.c (info_find_fullpath): Don't look for a filename | |
17 | + beginning "./" in the search path, but otherwise look for the | |
18 | + filename in the search path even if it contains a slash. | |
19 | + (info_file_find_next_in_path): Prefix returned path with "./" if | |
20 | + it is relative to the current directory. | |
21 | + (info_add_extension): Allow second argument to be null. | |
22 | + | |
23 | + * info/info.c (main) <--file or slash in argument>: If argument | |
24 | + not an absolute path, prefix it with "./". Call | |
25 | + info_add_extension instead of info_find_fullpath for arguments | |
26 | + other than simple filenames. | |
27 | + | |
28 | 2015-07-05 Patrice Dumas <pertusus@free.fr> | |
29 | ||
30 | * tp/Texinfo/Structuring.pm (_sort_index_entries, | |
31 | --- texinfo.orig/info/filesys.c | |
32 | +++ texinfo/info/filesys.c | |
33 | @@ -77,8 +77,7 @@ | |
34 | { NULL, NULL } | |
35 | }; | |
36 | ||
37 | -/* Expand the filename in PARTIAL to make a real name for this operating | |
38 | - system. This looks in INFOPATH in order to find the correct file. | |
39 | +/* Look for the filename PARTIAL in INFOPATH in order to find the correct file. | |
40 | Return file name and set *FINFO with information about file. If it | |
41 | can't find the file, it returns NULL, and sets filesys_error_number. | |
42 | Return value should be freed by caller. */ | |
43 | @@ -101,7 +100,8 @@ | |
44 | /* IS_SLASH and IS_ABSOLUTE defined in ../system.h. */ | |
45 | ||
46 | /* If path is absolute already, see if it needs an extension. */ | |
47 | - if (IS_ABSOLUTE (partial)) | |
48 | + if (IS_ABSOLUTE (partial) | |
49 | + || partial[0] == '.' && IS_SLASH(partial[1])) | |
50 | { | |
51 | fullpath = info_add_extension (0, partial, finfo); | |
52 | } | |
53 | @@ -113,12 +113,6 @@ | |
54 | fullpath = info_add_extension (0, partial, finfo); | |
55 | } | |
56 | ||
57 | - /* If filename has a slash in it (for example, begins with "./" or "../", or | |
58 | - if there are intermediate directories) interpret it as relative to current | |
59 | - directory. This may be from the command line, or in the subfiles table of | |
60 | - a split file. */ | |
61 | - else if (HAS_SLASH (partial)) | |
62 | - fullpath = info_add_extension (0, partial, finfo); | |
63 | /* If just a simple name element, look for it in the path. */ | |
64 | else | |
65 | fullpath = info_file_in_path (partial, finfo); | |
66 | @@ -168,11 +162,24 @@ | |
67 | with_extension = info_add_extension (dirname, filename, finfo); | |
68 | ||
69 | if (with_extension) | |
70 | - return with_extension; | |
71 | + { | |
72 | + if (!IS_ABSOLUTE (with_extension)) | |
73 | + { | |
74 | + /* Prefix "./" to it. */ | |
75 | + char *s; | |
76 | + asprintf (&s, "%s%s", "./", with_extension); | |
77 | + free (with_extension); | |
78 | + return s; | |
79 | + } | |
80 | + else | |
81 | + return with_extension; | |
82 | + } | |
83 | } | |
84 | return NULL; | |
85 | } | |
86 | ||
87 | +/* Return full path of first Info file known as FILENAME in | |
88 | + search path. If relative to current directory, precede it with './'. */ | |
89 | static char * | |
90 | info_file_in_path (char *filename, struct stat *finfo) | |
91 | { | |
92 | @@ -189,6 +196,10 @@ | |
93 | { | |
94 | char *try_filename; | |
95 | register int i, pre_suffix_length = 0; | |
96 | + struct stat dummy; | |
97 | + | |
98 | + if (!finfo) | |
99 | + finfo = &dummy; | |
100 | ||
101 | if (dirname) | |
102 | pre_suffix_length += strlen (dirname); | |
103 | --- texinfo.orig/info/info.c | |
104 | +++ texinfo/info/info.c | |
105 | @@ -825,7 +825,7 @@ | |
106 | for a matching entry. */ | |
107 | if (!user_filename && argv[0] && HAS_SLASH (argv[0])) | |
108 | { | |
109 | - user_filename = argv[0]; | |
110 | + user_filename = xstrdup (argv[0]); | |
111 | argv++; /* Advance past first remaining argument. */ | |
112 | argc--; | |
113 | } | |
114 | @@ -873,7 +873,7 @@ | |
115 | /* --all */ | |
116 | if (!user_filename && argv[0]) | |
117 | { | |
118 | - user_filename = argv[0]; | |
119 | + user_filename = xstrdup (argv[0]); | |
120 | argv++; argc--; | |
121 | } | |
122 | else if (!user_filename) | |
123 | @@ -904,9 +904,28 @@ | |
124 | /* User used "--file". */ | |
125 | if (user_filename) | |
126 | { | |
127 | - initial_file = info_find_fullpath (user_filename, 0); | |
128 | - if (!initial_file && filesys_error_number) | |
129 | - error = filesys_error_string (user_filename, filesys_error_number); | |
130 | + if (!IS_ABSOLUTE(user_filename) && HAS_SLASH(user_filename) | |
131 | + && !(user_filename[0] == '.' && IS_SLASH(user_filename[1]))) | |
132 | + { | |
133 | + /* Prefix "./" to the filename to prevent a lookup | |
134 | + in INFOPATH. */ | |
135 | + char *s; | |
136 | + asprintf (&s, "%s%s", "./", user_filename); | |
137 | + free (user_filename); | |
138 | + user_filename = s; | |
139 | + } | |
140 | + if (IS_ABSOLUTE(user_filename) || HAS_SLASH(user_filename)) | |
141 | + initial_file = info_add_extension (0, user_filename, 0); | |
142 | + else | |
143 | + initial_file = info_find_fullpath (user_filename, 0); | |
144 | + | |
145 | + if (!initial_file) | |
146 | + { | |
147 | + if (!filesys_error_number) | |
148 | + filesys_error_number = ENOENT; | |
149 | + error = filesys_error_string (user_filename, | |
150 | + filesys_error_number); | |
151 | + } | |
152 | else | |
153 | add_pointer_to_array (info_new_reference (initial_file, "Top"), | |
154 | ref_index, ref_list, ref_slots, 2); | |
155 | --- texinfo.orig/info/nodes.c | |
156 | +++ texinfo/info/nodes.c | |
157 | @@ -559,7 +559,8 @@ | |
158 | int is_fullpath; | |
159 | ||
160 | /* If full path to the file has been given, we must find it exactly. */ | |
161 | - is_fullpath = IS_ABSOLUTE (filename) || HAS_SLASH (filename); | |
162 | + is_fullpath = IS_ABSOLUTE (filename) | |
163 | + || filename[0] == '.' && IS_SLASH(filename[1]); | |
164 | ||
165 | /* First try to find the file in our list of already loaded files. */ | |
166 | if (info_loaded_files) |
0 | Make texino indices reproducible by genrating deterministic order | |
1 | From Debian #790065 | |
2 | While working on the "reproducible builds" effort [1], we have noticed | |
3 | that texinfo generates indices in a non-deterministic order. | |
4 | ||
5 | This appears to happen because the index sort is not stable with respect | |
6 | to the line number, resulting in output non-determinstically changing | |
7 | from: | |
8 | ||
9 | * Entry (line 1) | |
10 | * Entry (line 2) | |
11 | ||
12 | and | |
13 | ||
14 | * Entry (line 2) | |
15 | * Entry (line 1) | |
16 | ||
17 | .. when the entry is the same string. | |
18 | ||
19 | The attached patch adds the line number to the sort comparator. Once | |
20 | applied, (some) packages using texinfo can be built reproducibly in | |
21 | our reproducible toolchain. | |
22 | ||
23 | Patch by Chris Lamb | |
24 | --- | |
25 | tp/Texinfo/Structuring.pm | 4 ++++ | |
26 | 1 file changed, 4 insertions(+) | |
27 | ||
28 | --- texinfo.orig/tp/Texinfo/Structuring.pm | |
29 | +++ texinfo/tp/Texinfo/Structuring.pm | |
30 | @@ -1984,6 +1984,9 @@ | |
31 | if ($res == 0) { | |
32 | $res = ($key1->{'number'} <=> $key2->{'number'}); | |
33 | } | |
34 | + if ($res == 0) { | |
35 | + $res = ($key1->{'line_nr'} <=> $key2->{'line_nr'}); | |
36 | + } | |
37 | return $res; | |
38 | } | |
39 | ||
40 | @@ -2016,6 +2019,7 @@ | |
41 | foreach my $index_name (keys(%$index_entries)) { | |
42 | foreach my $entry (@{$index_entries->{$index_name}}) { | |
43 | $entry->{'in_code'} = $index_names->{$entry->{'index_name'}}->{'in_code'}; | |
44 | + $entry->{'line_nr'} = $entry->{'command'}->{'line_nr'}->{'line_nr'}; | |
45 | $options->{'code'} = $entry->{'in_code'}; | |
46 | $entry->{'key'} = Texinfo::Convert::Text::convert( | |
47 | {'contents' => $entry->{'content'}}, $options); |