1 |
commit: a457ca66361ff3b68cd39b0ed38e770077de0db0 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 31 17:54:15 2022 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 17:54:15 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a457ca66 |
7 |
|
8 |
app-crypt/shash: update EAPI 6 -> 8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/871258 |
11 |
Closes: https://bugs.gentoo.org/874942 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
|
14 |
app-crypt/shash/files/0.2.6-manpage-fixes.patch | 5 +- |
15 |
app-crypt/shash/files/shash-0.2.6-C99-decls.patch | 195 +++++++++++++++++++++ |
16 |
.../shash/files/shash-0.2.6-binary-files.patch | 4 +- |
17 |
.../shash/files/shash-0.2.6-format-security.patch | 4 +- |
18 |
...shash-0.2.6-r3.ebuild => shash-0.2.6-r4.ebuild} | 17 +- |
19 |
5 files changed, 213 insertions(+), 12 deletions(-) |
20 |
|
21 |
diff --git a/app-crypt/shash/files/0.2.6-manpage-fixes.patch b/app-crypt/shash/files/0.2.6-manpage-fixes.patch |
22 |
index 0376e15c3572..111730c57823 100644 |
23 |
--- a/app-crypt/shash/files/0.2.6-manpage-fixes.patch |
24 |
+++ b/app-crypt/shash/files/0.2.6-manpage-fixes.patch |
25 |
@@ -1,6 +1,5 @@ |
26 |
-diff -pruN shash-0.2.6/doc/shash.1 shash-0.2.6-r1/doc/shash.1 |
27 |
---- shash-0.2.6/doc/shash.1 2004-09-18 09:51:04.004647112 +0100 |
28 |
-+++ shash-0.2.6-r1/doc/shash.1 2004-09-18 09:57:26.062565480 +0100 |
29 |
+--- a/doc/shash.1 |
30 |
++++ b/doc/shash.1 |
31 |
@@ -31,7 +31,7 @@ Because of this shash also supports HMAC |
32 |
a mechanism for message authentication using cryptographic hash functions. |
33 |
So shash can use a key with a hash algorithm to produce hashes that can only |
34 |
|
35 |
diff --git a/app-crypt/shash/files/shash-0.2.6-C99-decls.patch b/app-crypt/shash/files/shash-0.2.6-C99-decls.patch |
36 |
new file mode 100644 |
37 |
index 000000000000..bf2f3ab79d85 |
38 |
--- /dev/null |
39 |
+++ b/app-crypt/shash/files/shash-0.2.6-C99-decls.patch |
40 |
@@ -0,0 +1,195 @@ |
41 |
+--- a/src/environ.c |
42 |
++++ b/src/environ.c |
43 |
+@@ -4,7 +4,7 @@ |
44 |
+ #endif |
45 |
+ #include "environ.h" |
46 |
+ |
47 |
+-int check_env() |
48 |
++int check_env(void) |
49 |
+ { |
50 |
+ |
51 |
+ if (getenv(SHASH_KEY) != NULL |
52 |
+@@ -15,7 +15,7 @@ |
53 |
+ } |
54 |
+ |
55 |
+ char * |
56 |
+- get_env_key() |
57 |
++ get_env_key(void) |
58 |
+ { |
59 |
+ |
60 |
+ if (getenv(SHASH_KEY) != NULL) { |
61 |
+@@ -26,7 +26,7 @@ |
62 |
+ |
63 |
+ } |
64 |
+ |
65 |
+-char *get_env_bit_mode() |
66 |
++char *get_env_bit_mode(void) |
67 |
+ { |
68 |
+ |
69 |
+ return getenv(SHASH_KEYMODE); |
70 |
+--- a/src/environ.h |
71 |
++++ b/src/environ.h |
72 |
+@@ -3,7 +3,7 @@ |
73 |
+ #define SHASH_KEY "SHASH_KEY" |
74 |
+ #define SHASH_KEYMODE "SHASH_KEYMODE" |
75 |
+ |
76 |
+-int check_env(); |
77 |
+-char * get_env_key(); |
78 |
+-char * get_env_bit_mode(); |
79 |
++int check_env(void); |
80 |
++char * get_env_key(void); |
81 |
++char * get_env_bit_mode(void); |
82 |
+ |
83 |
+--- a/src/errors.c |
84 |
++++ b/src/errors.c |
85 |
+@@ -1,5 +1,7 @@ |
86 |
+ #include <defines.h> |
87 |
+ |
88 |
++#include <stdio.h> |
89 |
++ |
90 |
+ extern int quiet; |
91 |
+ |
92 |
+ void err_quit(char *errmsg) |
93 |
+--- a/src/extra.c |
94 |
++++ b/src/extra.c |
95 |
+@@ -1,5 +1,10 @@ |
96 |
+ #include <defines.h> |
97 |
+ |
98 |
++#include <pwd.h> |
99 |
++#include <stdlib.h> |
100 |
++#include <string.h> |
101 |
++#include <sys/stat.h> |
102 |
++ |
103 |
+ #ifdef HAVE_STAT |
104 |
+ |
105 |
+ int check_file(char *filename) |
106 |
+--- a/src/gaaout.c |
107 |
++++ b/src/gaaout.c |
108 |
+@@ -11,6 +11,11 @@ |
109 |
+ #endif |
110 |
+ #endif |
111 |
+ |
112 |
++void hash_license(void); |
113 |
++void hash_version(void); |
114 |
++void list_keygen_algorithms(void); |
115 |
++int hash_list(void); |
116 |
++ |
117 |
+ void* gaa_malloc( size_t size) { |
118 |
+ void* ret; |
119 |
+ ret = malloc(size); |
120 |
+--- a/src/random.c |
121 |
++++ b/src/random.c |
122 |
+@@ -24,7 +24,7 @@ |
123 |
+ static FILE *ffd; |
124 |
+ |
125 |
+ word32 |
126 |
+-get_rand32() |
127 |
++get_rand32(void) |
128 |
+ { |
129 |
+ int fd, x; |
130 |
+ word32 rand_data; |
131 |
+@@ -46,7 +46,7 @@ |
132 |
+ |
133 |
+ |
134 |
+ word8 |
135 |
+-get_rand8() |
136 |
++get_rand8(void) |
137 |
+ { |
138 |
+ |
139 |
+ int fd, x; |
140 |
+@@ -69,7 +69,7 @@ |
141 |
+ |
142 |
+ |
143 |
+ word32 |
144 |
+-get_safe_rand32() |
145 |
++get_safe_rand32(void) |
146 |
+ { |
147 |
+ int fd, x; |
148 |
+ word32 rand_data; |
149 |
+@@ -91,7 +91,7 @@ |
150 |
+ |
151 |
+ |
152 |
+ word8 |
153 |
+-get_safe_rand8() |
154 |
++get_safe_rand8(void) |
155 |
+ { |
156 |
+ |
157 |
+ int fd, x; |
158 |
+@@ -131,13 +131,13 @@ |
159 |
+ return 0; |
160 |
+ } |
161 |
+ |
162 |
+-void close_rand() |
163 |
++void close_rand(void) |
164 |
+ { |
165 |
+ fclose(ffd); |
166 |
+ } |
167 |
+ |
168 |
+ word32 |
169 |
+-get_o_rand32() |
170 |
++get_o_rand32(void) |
171 |
+ { |
172 |
+ int x; |
173 |
+ word32 rand_data; |
174 |
+@@ -152,7 +152,7 @@ |
175 |
+ } |
176 |
+ |
177 |
+ word8 |
178 |
+-get_o_rand8() |
179 |
++get_o_rand8(void) |
180 |
+ { |
181 |
+ |
182 |
+ int x; |
183 |
+--- a/src/random.h |
184 |
++++ b/src/random.h |
185 |
+@@ -1,14 +1,14 @@ |
186 |
+ |
187 |
+ #ifdef HAVE_DEV_RANDOM |
188 |
+ |
189 |
+-word32 get_rand32(); |
190 |
+-word8 get_rand8(); |
191 |
+-word32 get_safe_rand32(); |
192 |
+-word8 get_safe_rand8(); |
193 |
++word32 get_rand32(void); |
194 |
++word8 get_rand8(void); |
195 |
++word32 get_safe_rand32(void); |
196 |
++word8 get_safe_rand8(void); |
197 |
+ |
198 |
+ int open_rand(int); |
199 |
+-void close_rand(); |
200 |
+-word32 get_o_rand32(); |
201 |
+-word8 get_o_rand8(); |
202 |
++void close_rand(void); |
203 |
++word32 get_o_rand32(void); |
204 |
++word8 get_o_rand8(void); |
205 |
+ |
206 |
+ #endif |
207 |
+--- a/src/shash.c |
208 |
++++ b/src/shash.c |
209 |
+@@ -485,7 +485,7 @@ |
210 |
+ } |
211 |
+ } |
212 |
+ |
213 |
+-int hash_list() |
214 |
++int hash_list(void) |
215 |
+ { |
216 |
+ hashid i; |
217 |
+ char *y; |
218 |
+@@ -715,7 +715,7 @@ |
219 |
+ return counter; |
220 |
+ } |
221 |
+ |
222 |
+-void hash_license() |
223 |
++void hash_license(void) |
224 |
+ { |
225 |
+ fprintf(stdout, ("\nCopyright (C) 1999,2001,2002 Nikos Mavroyanopoulos\n" |
226 |
+ "This program is free software; you can redistribute it and/or modify \n" |
227 |
+@@ -733,7 +733,7 @@ |
228 |
+ "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n")); |
229 |
+ } |
230 |
+ |
231 |
+-void hash_version() |
232 |
++void hash_version(void) |
233 |
+ { |
234 |
+ fprintf(stderr, ("shash v.%s (%s-%s-%s)\n"), VERSION, T_CPU, |
235 |
+ T_VENDOR, T_OS); |
236 |
|
237 |
diff --git a/app-crypt/shash/files/shash-0.2.6-binary-files.patch b/app-crypt/shash/files/shash-0.2.6-binary-files.patch |
238 |
index 1eb0cba17613..9cb5a7dc4c09 100644 |
239 |
--- a/app-crypt/shash/files/shash-0.2.6-binary-files.patch |
240 |
+++ b/app-crypt/shash/files/shash-0.2.6-binary-files.patch |
241 |
@@ -1,5 +1,5 @@ |
242 |
---- shash-0.2.6/src/shash.c |
243 |
-+++ shash-0.2.6/src/shash.c |
244 |
+--- a/src/shash.c |
245 |
++++ b/src/shash.c |
246 |
@@ -631,11 +631,11 @@ |
247 |
|
248 |
if (nosalt == FALSE && hmac == 1) { |
249 |
|
250 |
diff --git a/app-crypt/shash/files/shash-0.2.6-format-security.patch b/app-crypt/shash/files/shash-0.2.6-format-security.patch |
251 |
index 4e46639e2807..20f850316ccc 100644 |
252 |
--- a/app-crypt/shash/files/shash-0.2.6-format-security.patch |
253 |
+++ b/app-crypt/shash/files/shash-0.2.6-format-security.patch |
254 |
@@ -1,5 +1,5 @@ |
255 |
---- shash-0.2.6/src/errors.c |
256 |
-+++ shash-0.2.6/src/errors.c |
257 |
+--- a/src/errors.c |
258 |
++++ b/src/errors.c |
259 |
@@ -4,7 +4,7 @@ |
260 |
|
261 |
void err_quit(char *errmsg) |
262 |
|
263 |
diff --git a/app-crypt/shash/shash-0.2.6-r3.ebuild b/app-crypt/shash/shash-0.2.6-r4.ebuild |
264 |
similarity index 79% |
265 |
rename from app-crypt/shash/shash-0.2.6-r3.ebuild |
266 |
rename to app-crypt/shash/shash-0.2.6-r4.ebuild |
267 |
index f2730ac61dc3..2094f2880276 100644 |
268 |
--- a/app-crypt/shash/shash-0.2.6-r3.ebuild |
269 |
+++ b/app-crypt/shash/shash-0.2.6-r4.ebuild |
270 |
@@ -1,9 +1,9 @@ |
271 |
# Copyright 1999-2022 Gentoo Authors |
272 |
# Distributed under the terms of the GNU General Public License v2 |
273 |
|
274 |
-EAPI=6 |
275 |
+EAPI=8 |
276 |
|
277 |
-inherit bash-completion-r1 |
278 |
+inherit autotools bash-completion-r1 |
279 |
|
280 |
DESCRIPTION="Generate or check digests or MACs of files" |
281 |
HOMEPAGE="http://mcrypt.hellug.gr/shash/" |
282 |
@@ -14,7 +14,8 @@ SLOT="0" |
283 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" |
284 |
IUSE="static" |
285 |
|
286 |
-DEPEND=">=app-crypt/mhash-0.8.18-r1 |
287 |
+DEPEND=" |
288 |
+ >=app-crypt/mhash-0.8.18-r1 |
289 |
static? ( app-crypt/mhash[static-libs(+)] )" |
290 |
RDEPEND="${DEPEND}" |
291 |
|
292 |
@@ -22,14 +23,20 @@ PATCHES=( |
293 |
"${FILESDIR}"/${PV}-manpage-fixes.patch |
294 |
"${FILESDIR}"/${P}-binary-files.patch |
295 |
"${FILESDIR}"/${P}-format-security.patch |
296 |
+ "${FILESDIR}"/${P}-C99-decls.patch |
297 |
) |
298 |
|
299 |
+src_prepare() { |
300 |
+ default |
301 |
+ eautoreconf |
302 |
+} |
303 |
+ |
304 |
src_configure() { |
305 |
econf $(use_enable static static-link) |
306 |
} |
307 |
|
308 |
src_install() { |
309 |
- emake install DESTDIR="${D}" |
310 |
- dodoc AUTHORS ChangeLog INSTALL NEWS doc/sample.shashrc doc/FORMAT |
311 |
+ default |
312 |
+ dodoc doc/sample.shashrc doc/FORMAT |
313 |
newbashcomp "${FILESDIR}"/shash.bash-completion ${PN} |
314 |
} |