1 |
commit: a3af03bb17aa0f106c97032355aa2c7e63f58b02 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 9 19:23:28 2021 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 9 19:23:57 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3af03bb |
7 |
|
8 |
sys-apps/texinfo: Fix build with glibc-2.34 (using RH patch) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/803485 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Andreas K. Huettel <dilfridge <AT> gentoo.org> |
13 |
|
14 |
.../files/texinfo-6.8-undo-gnulib-nonnul.patch | 186 +++++++++++++++++++++ |
15 |
sys-apps/texinfo/texinfo-6.8.ebuild | 4 + |
16 |
2 files changed, 190 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/texinfo/files/texinfo-6.8-undo-gnulib-nonnul.patch b/sys-apps/texinfo/files/texinfo-6.8-undo-gnulib-nonnul.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..60f2e63b7ce |
21 |
--- /dev/null |
22 |
+++ b/sys-apps/texinfo/files/texinfo-6.8-undo-gnulib-nonnul.patch |
23 |
@@ -0,0 +1,186 @@ |
24 |
+ |
25 |
+Patch by Vitezslav Crhonek <vcrhonek@××××××.com> |
26 |
+Source: https://src.fedoraproject.org/rpms/texinfo/c/9b2cca4817fa4bd8d520fed05e9560fc7183dcdf?branch=rawhide |
27 |
+ |
28 |
+diff -up texinfo-6.8/gnulib/lib/cdefs.h.orig texinfo-6.8/gnulib/lib/cdefs.h |
29 |
+--- texinfo-6.8/gnulib/lib/cdefs.h.orig 2021-03-11 19:57:53.000000000 +0100 |
30 |
++++ texinfo-6.8/gnulib/lib/cdefs.h 2021-07-19 12:26:46.985176475 +0200 |
31 |
+@@ -321,15 +321,15 @@ |
32 |
+ |
33 |
+ /* The nonnull function attribute marks pointer parameters that |
34 |
+ must not be NULL. */ |
35 |
+-#ifndef __attribute_nonnull__ |
36 |
++#ifndef __nonnull |
37 |
+ # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) |
38 |
+-# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params)) |
39 |
++# define __nonnull(params) __attribute__ ((__nonnull__ params)) |
40 |
+ # else |
41 |
+-# define __attribute_nonnull__(params) |
42 |
++# define __nonnull(params) |
43 |
+ # endif |
44 |
+-#endif |
45 |
+-#ifndef __nonnull |
46 |
+-# define __nonnull(params) __attribute_nonnull__ (params) |
47 |
++#elif !defined __GLIBC__ |
48 |
++# undef __nonnull |
49 |
++# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) |
50 |
+ #endif |
51 |
+ |
52 |
+ /* If fortification mode, we warn about unused results of certain |
53 |
+diff -up texinfo-6.8/gnulib/lib/libc-config.h.orig texinfo-6.8/gnulib/lib/libc-config.h |
54 |
+--- texinfo-6.8/gnulib/lib/libc-config.h.orig 2021-03-11 19:57:54.000000000 +0100 |
55 |
++++ texinfo-6.8/gnulib/lib/libc-config.h 2021-07-19 12:27:58.810590975 +0200 |
56 |
+@@ -33,9 +33,9 @@ |
57 |
+ #include <config.h> |
58 |
+ |
59 |
+ /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines |
60 |
+- _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and |
61 |
+- DragonFlyBSD 5.9 it includes <sys/cdefs.h> which defines __nonnull. |
62 |
+- Elsewhere it is harmless. */ |
63 |
++ _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it |
64 |
++ includes <sys/cdefs.h> which defines __nonnull. Elsewhere it |
65 |
++ is harmless. */ |
66 |
+ #include <errno.h> |
67 |
+ |
68 |
+ /* From glibc <errno.h>. */ |
69 |
+diff -up texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c |
70 |
+--- texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c.orig 2021-03-11 19:57:54.000000000 +0100 |
71 |
++++ texinfo-6.8/gnulib/lib/malloc/dynarray-skeleton.c 2021-07-19 12:24:46.878419397 +0200 |
72 |
+@@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DY |
73 |
+ |
74 |
+ /* Initialize a dynamic array object. This must be called before any |
75 |
+ use of the object. */ |
76 |
+-__attribute_nonnull__ ((1)) |
77 |
++__nonnull ((1)) |
78 |
+ static void |
79 |
+ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) |
80 |
+ { |
81 |
+@@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_ST |
82 |
+ } |
83 |
+ |
84 |
+ /* Deallocate the dynamic array and its elements. */ |
85 |
+-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
86 |
++__attribute_maybe_unused__ __nonnull ((1)) |
87 |
+ static void |
88 |
+ DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) |
89 |
+ { |
90 |
+@@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *l |
91 |
+ } |
92 |
+ |
93 |
+ /* Return true if the dynamic array is in an error state. */ |
94 |
+-__attribute_nonnull__ ((1)) |
95 |
++__nonnull ((1)) |
96 |
+ static inline bool |
97 |
+ DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) |
98 |
+ { |
99 |
+@@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct |
100 |
+ |
101 |
+ /* Mark the dynamic array as failed. All elements are deallocated as |
102 |
+ a side effect. */ |
103 |
+-__attribute_nonnull__ ((1)) |
104 |
++__nonnull ((1)) |
105 |
+ static void |
106 |
+ DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) |
107 |
+ { |
108 |
+@@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNA |
109 |
+ |
110 |
+ /* Return the number of elements which have been added to the dynamic |
111 |
+ array. */ |
112 |
+-__attribute_nonnull__ ((1)) |
113 |
++__nonnull ((1)) |
114 |
+ static inline size_t |
115 |
+ DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) |
116 |
+ { |
117 |
+@@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNAR |
118 |
+ |
119 |
+ /* Return a pointer to the array element at INDEX. Terminate the |
120 |
+ process if INDEX is out of bounds. */ |
121 |
+-__attribute_nonnull__ ((1)) |
122 |
++__nonnull ((1)) |
123 |
+ static inline DYNARRAY_ELEMENT * |
124 |
+ DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) |
125 |
+ { |
126 |
+@@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRU |
127 |
+ /* Return a pointer to the first array element, if any. For a |
128 |
+ zero-length array, the pointer can be NULL even though the dynamic |
129 |
+ array has not entered the failure state. */ |
130 |
+-__attribute_nonnull__ ((1)) |
131 |
++__nonnull ((1)) |
132 |
+ static inline DYNARRAY_ELEMENT * |
133 |
+ DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) |
134 |
+ { |
135 |
+@@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_S |
136 |
+ /* Return a pointer one element past the last array element. For a |
137 |
+ zero-length array, the pointer can be NULL even though the dynamic |
138 |
+ array has not entered the failure state. */ |
139 |
+-__attribute_nonnull__ ((1)) |
140 |
++__nonnull ((1)) |
141 |
+ static inline DYNARRAY_ELEMENT * |
142 |
+ DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) |
143 |
+ { |
144 |
+@@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_S |
145 |
+ /* Add ITEM at the end of the array, enlarging it by one element. |
146 |
+ Mark *LIST as failed if the dynamic array allocation size cannot be |
147 |
+ increased. */ |
148 |
+-__attribute_nonnull__ ((1)) |
149 |
++__nonnull ((1)) |
150 |
+ static inline void |
151 |
+ DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) |
152 |
+ { |
153 |
+@@ -348,8 +348,7 @@ DYNARRAY_NAME (emplace__) (struct DYNARR |
154 |
+ /* Allocate a place for a new element in *LIST and return a pointer to |
155 |
+ it. The pointer can be NULL if the dynamic array cannot be |
156 |
+ enlarged due to a memory allocation failure. */ |
157 |
+-__attribute_maybe_unused__ __attribute_warn_unused_result__ |
158 |
+-__attribute_nonnull__ ((1)) |
159 |
++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) |
160 |
+ static |
161 |
+ /* Avoid inlining with the larger initialization code. */ |
162 |
+ #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) |
163 |
+@@ -373,7 +372,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY |
164 |
+ existing size, new elements are added (which can be initialized). |
165 |
+ Otherwise, the list is truncated, and elements are freed. Return |
166 |
+ false on memory allocation failure (and mark *LIST as failed). */ |
167 |
+-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
168 |
++__attribute_maybe_unused__ __nonnull ((1)) |
169 |
+ static bool |
170 |
+ DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) |
171 |
+ { |
172 |
+@@ -418,7 +417,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_ |
173 |
+ } |
174 |
+ |
175 |
+ /* Remove the last element of LIST if it is present. */ |
176 |
+-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
177 |
++__attribute_maybe_unused__ __nonnull ((1)) |
178 |
+ static void |
179 |
+ DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) |
180 |
+ { |
181 |
+@@ -435,7 +434,7 @@ DYNARRAY_NAME (remove_last) (struct DYNA |
182 |
+ |
183 |
+ /* Remove all elements from the list. The elements are freed, but the |
184 |
+ list itself is not. */ |
185 |
+-__attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
186 |
++__attribute_maybe_unused__ __nonnull ((1)) |
187 |
+ static void |
188 |
+ DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) |
189 |
+ { |
190 |
+@@ -453,8 +452,7 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_S |
191 |
+ stored in *RESULT if LIST refers to an empty list. On success, the |
192 |
+ pointer in *RESULT is heap-allocated and must be deallocated using |
193 |
+ free. */ |
194 |
+-__attribute_maybe_unused__ __attribute_warn_unused_result__ |
195 |
+-__attribute_nonnull__ ((1, 2)) |
196 |
++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1, 2)) |
197 |
+ static bool |
198 |
+ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, |
199 |
+ DYNARRAY_FINAL_TYPE *result) |
200 |
+@@ -485,8 +483,7 @@ DYNARRAY_NAME (finalize) (struct DYNARRA |
201 |
+ have a sentinel at the end). If LENGTHP is not NULL, the array |
202 |
+ length is written to *LENGTHP. *LIST is re-initialized and can be |
203 |
+ reused. */ |
204 |
+-__attribute_maybe_unused__ __attribute_warn_unused_result__ |
205 |
+-__attribute_nonnull__ ((1)) |
206 |
++__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) |
207 |
+ static DYNARRAY_ELEMENT * |
208 |
+ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) |
209 |
+ { |
210 |
|
211 |
diff --git a/sys-apps/texinfo/texinfo-6.8.ebuild b/sys-apps/texinfo/texinfo-6.8.ebuild |
212 |
index 3f25e559213..b11292240a9 100644 |
213 |
--- a/sys-apps/texinfo/texinfo-6.8.ebuild |
214 |
+++ b/sys-apps/texinfo/texinfo-6.8.ebuild |
215 |
@@ -32,6 +32,10 @@ RDEPEND=" |
216 |
DEPEND="${RDEPEND}" |
217 |
BDEPEND="nls? ( >=sys-devel/gettext-0.19.6 )" |
218 |
|
219 |
+PATCHES=( |
220 |
+ "${FILESDIR}/${P}-undo-gnulib-nonnul.patch" |
221 |
+) |
222 |
+ |
223 |
src_prepare() { |
224 |
default |