Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
Date: Mon, 17 Aug 2020 22:21:15
Message-Id: 1597702853.ce2c13885bd540214bc562479c11457f2d0b318f.chewi@gentoo
1 commit: ce2c13885bd540214bc562479c11457f2d0b318f
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 17 22:20:53 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 17 22:20:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce2c1388
7
8 app-crypt/rhash: Drop old 1.3.8 and 1.3.9-r2
9
10 Package-Manager: Portage-3.0.3, Repoman-2.3.23
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 app-crypt/rhash/Manifest | 2 -
14 app-crypt/rhash/files/rhash-1.3.9-nls.patch | 22 --
15 .../rhash/files/rhash-1.3.9-rc-segfault.patch | 230 ---------------------
16 app-crypt/rhash/rhash-1.3.8.ebuild | 80 -------
17 app-crypt/rhash/rhash-1.3.9-r2.ebuild | 81 --------
18 5 files changed, 415 deletions(-)
19
20 diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
21 index 7d4e592d996..4836b91f03c 100644
22 --- a/app-crypt/rhash/Manifest
23 +++ b/app-crypt/rhash/Manifest
24 @@ -1,4 +1,2 @@
25 DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
26 -DIST rhash-1.3.8-src.tar.gz 393544 BLAKE2B c326b3fa6dbc5ea2cce40105dc319456fdcc58140a05e8002bf1d92be921d8bbd27bf670370ba7cf2ff2001ff70ddbeb8efc9712869a7b215c5f51a5e493b5c9 SHA512 9dba4fa4dd49d323f2e440c5b93eac1ef62eb4046ec4ef611f0978c12c1739002f1ac1f1ec5e61bd359dc89e9ed612db71be91a795184ac5d5433280d27fa4c1
27 -DIST rhash-1.3.9-src.tar.gz 403415 BLAKE2B 49f3b9348485b83521f58fa1de30517b05a8265547cbec3276d89c42b46baccc4ea22d41638764600c76669308a5f7d9d3995b7cec51676c9f8492ba740e473c SHA512 6fae0587cdeb42df59d542c58bad734259d1ff39fba92531c10a469b51310644669ffbe0453e72d85c2cf38b176962f6dca9062a121ac019f1b30f207a176e60
28 DIST rhash-1.4.0-src.tar.gz 406433 BLAKE2B 2af437cd3a049bb9473825026f8a6476c81b4400a47638c62ee3ecb3d3984f7f9fe97def91488094a2919e5baad967d3f49ec7d95363896e270251ad085bacac SHA512 2f02487fffe8d1bc70c4454829bbd250a15fbd09db5ef85c54d3e8ad1008e84616ea54483292deae45047a27964e27b26d9b3da8447e7c37dac1e2ce18a63a07
29
30 diff --git a/app-crypt/rhash/files/rhash-1.3.9-nls.patch b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
31 deleted file mode 100644
32 index a6fb902676f..00000000000
33 --- a/app-crypt/rhash/files/rhash-1.3.9-nls.patch
34 +++ /dev/null
35 @@ -1,22 +0,0 @@
36 -From a165520d3f63e976dd3b842c2fbb05f05f1029a8 Mon Sep 17 00:00:00 2001
37 -From: Aleksey <rhash.admin@×××××.com>
38 -Date: Sun, 15 Dec 2019 03:35:09 +0300
39 -Subject: [PATCH] i18n: fix a string in uk.po by adding newline
40 -
41 ----
42 - po/uk.po | 2 +-
43 - 1 file changed, 1 insertion(+), 1 deletion(-)
44 -
45 -diff --git a/po/uk.po b/po/uk.po
46 -index 959e47a..d6c0b1d 100644
47 ---- a/po/uk.po
48 -+++ b/po/uk.po
49 -@@ -234,7 +234,7 @@ msgstr "Перевірити хеш-файли, вказані у командн
50 -
51 - #: parse_cmdline.c:91
52 - msgid "Update the specified hash file.\n"
53 --msgstr "Оновити вказаний хеш-файл"
54 -+msgstr "Оновити вказаний хеш-файл.\n"
55 -
56 - #: parse_cmdline.c:92
57 - msgid "Rename files by inserting crc32 sum into name.\n"
58
59 diff --git a/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch b/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
60 deleted file mode 100644
61 index a2052c67bbf..00000000000
62 --- a/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
63 +++ /dev/null
64 @@ -1,230 +0,0 @@
65 -diff --git a/ChangeLog b/ChangeLog
66 -index 8537968..9724c9d 100644
67 ---- a/ChangeLog
68 -+++ b/ChangeLog
69 -@@ -1,3 +1,7 @@
70 -+Tue 07 Jan 2020 Aleksey
71 -+ * Bugfix: restore behavior of 'rhash -rc' to be the same as in v1.3.8
72 -+ * Bugfix: fix a segfault and memory errors
73 -+
74 - Sat 14 Dec 2019 Aleksey
75 - * === Version 1.3.9 ===
76 -
77 -diff --git a/calc_sums.c b/calc_sums.c
78 -index a76c8c9..0f25224 100644
79 ---- a/calc_sums.c
80 -+++ b/calc_sums.c
81 -@@ -535,6 +535,7 @@ int check_hash_file(file_t* file, int chdir)
82 - log_error_msg_file_t(_("file is binary: %s\n"), file);
83 - if (fd != stdin)
84 - fclose(fd);
85 -+ file_cleanup(&parent_dir);
86 - return -1;
87 - }
88 -
89 -@@ -586,6 +587,7 @@ int check_hash_file(file_t* file, int chdir)
90 - rhash_data.miss++;
91 - rhash_data.processed++;
92 - }
93 -+ file_cleanup(&parent_dir);
94 - time = rsh_timer_stop(&timer);
95 -
96 - if (res >= -1 && (rsh_fprintf(rhash_data.out, "%s\n", str_set(buf, '-', 80)) < 0 ||
97 -diff --git a/file.c b/file.c
98 -index 6f593f9..2f0eb2a 100644
99 ---- a/file.c
100 -+++ b/file.c
101 -@@ -266,7 +266,7 @@ static int detect_path_encoding(file_t* file, wchar_t* dir_path, const char* pri
102 - int i;
103 - assert(file && !file->real_path);
104 - file->mode &= ~FileMaskStatBits;
105 -- if (!dir_path && ascii)
106 -+ if (ascii)
107 - file->mode |= FileIsAsciiPrintPath;
108 - /* detect encoding in two or four steps */
109 - for (i = 0; i < 4; i += step) {
110 -@@ -333,45 +333,39 @@ int file_init_by_print_path(file_t* file, file_t* prepend_dir, const char* print
111 - #ifdef _WIN32
112 - {
113 - const char** primary_path;
114 -- const char* dir_primary_path;
115 - wchar_t* dir_path = (prepend_dir && !IS_DOT_TSTR(prepend_dir->real_path) ? prepend_dir->real_path : NULL);
116 - int encoding = detect_path_encoding(file, dir_path, print_path, init_flags);
117 - if (encoding < 0)
118 - return -1;
119 - if (encoding == 0) {
120 - primary_path = &file->print_path;
121 -- dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathUtf8) : NULL);
122 - } else {
123 - primary_path = &file->native_path;
124 -- dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathNative) : NULL);
125 - }
126 -- if ((!dir_primary_path || IS_DOT_TSTR(dir_primary_path)) &&
127 -- (init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
128 -+ if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
129 - *primary_path = print_path;
130 - file->mode |= (encoding == 0 ? FileDontFreePrintPath : FileDontFreeNativePath);
131 - } else {
132 -- *primary_path = make_path(dir_primary_path, print_path, 1);
133 -+ *primary_path = rsh_strdup(print_path);
134 - }
135 -- return 0;
136 - }
137 - #else
138 - if (!prepend_dir || IS_DOT_STR(prepend_dir->real_path)) {
139 -- file_init(file, print_path, init_flags);
140 -+ file_init(file, print_path, init_flags & (FileInitReusePath | FileMaskModeBits));
141 - } else {
142 -- const char* path = make_path(prepend_dir->real_path, print_path, 0);
143 -- file_init(file, path, init_flags & ~FileInitReusePath);
144 -+ file->real_path = make_path(prepend_dir->real_path, print_path, 0);
145 -+ file->mode = init_flags & FileMaskModeBits;
146 - }
147 -- if (!prepend_dir || IS_DOT_STR(prepend_dir->print_path) ||
148 -- (!prepend_dir->print_path && opt.path_separator != ALIEN_PATH_SEPARATOR)) {
149 -- if ((init_flags & FileInitReusePath) != 0) {
150 -- file->print_path = print_path;
151 -- file->mode |= FileDontFreePrintPath;
152 -- } else
153 -- file->print_path = rsh_strdup(print_path);
154 -+ assert(file->print_path == NULL);
155 -+ if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
156 -+ file->print_path = print_path;
157 -+ file->mode |= FileDontFreePrintPath;
158 - } else {
159 -- file->print_path = make_path(file_get_print_path(prepend_dir, FPathPrimaryEncoding), print_path, 1);
160 -+ file->print_path = rsh_strdup(print_path);
161 - }
162 - #endif
163 -+ /* note: flag FileInitUpdatePrintPathLastSlash is used only with file_init() */
164 -+ assert((init_flags & FileInitUpdatePrintPathLastSlash) == 0);
165 - if ((init_flags & (FileInitRunFstat | FileInitRunLstat)) &&
166 - file_stat(file, (init_flags & FileInitRunLstat)) < 0)
167 - return -1;
168 -@@ -544,9 +538,10 @@ static char* get_modified_path(const char* path, const char* str, int operation)
169 - end_pos = strlen(path);
170 - start_pos = (end_pos > 0 ? end_pos - 1 : 0);
171 - for (; start_pos > 0 && !IS_ANY_SLASH(path[start_pos]); start_pos--);
172 -- for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
173 -- if (start_pos == 0)
174 -+ if (start_pos == 0 && !IS_ANY_SLASH(path[start_pos]))
175 - return rsh_strdup(".");
176 -+ for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
177 -+ start_pos++;
178 - } else {
179 - char* point = strrchr(path, '.');
180 - if (!point)
181 -@@ -580,9 +575,10 @@ static tpath_t get_modified_tpath(ctpath_t path, const char* str, int operation)
182 - end_pos = wcslen(path);
183 - start_pos = (end_pos > 0 ? end_pos - 1 : 0);
184 - for (; start_pos > 0 && !IS_ANY_TSLASH(path[start_pos]); start_pos--);
185 -- for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
186 -- if (start_pos == 0)
187 -+ if (start_pos == 0 && !IS_ANY_TSLASH(path[start_pos]))
188 - return rsh_wcsdup(L".");
189 -+ for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
190 -+ start_pos++;
191 - } else {
192 - rsh_tchar* point = wcsrchr(path, L'.');
193 - if (!point)
194 -diff --git a/hash_check.c b/hash_check.c
195 -index 1f9c936..582a09d 100644
196 ---- a/hash_check.c
197 -+++ b/hash_check.c
198 -@@ -210,9 +210,9 @@ static int detect_hash_type(char** ptr, char* end, int* p_len)
199 - } else {
200 - /* search backward (but no more then 129 symbols) */
201 - if ((p - end) >= 129) end = p - 129;
202 -- for (; p >= end && p[-1] == '='; eq_num++, p--)
203 -+ for (; p > end && p[-1] == '='; eq_num++, p--)
204 - char_type = FmtBase64;
205 -- for (; p >= end && (next_type &= test_hash_char(p[-1])); len++, p--)
206 -+ for (; p > end && (next_type &= test_hash_char(p[-1])); len++, p--)
207 - char_type = next_type;
208 - }
209 - if ((char_type & FmtBase64) != 0)
210 -diff --git a/tests/test_rhash.sh b/tests/test_rhash.sh
211 -index 8c6e40d..db41b19 100755
212 ---- a/tests/test_rhash.sh
213 -+++ b/tests/test_rhash.sh
214 -@@ -84,12 +84,9 @@ remove_tmpdir()
215 - trap remove_tmpdir EXIT
216 -
217 - # prepare test files
218 --SUBDIR=$RHASH_TMP/dir1
219 --mkdir $RHASH_TMP $SUBDIR || die "Unable to create tmp dir."
220 -+mkdir $RHASH_TMP || die "Unable to create tmp dir."
221 -+cp "$SCRIPT_DIR/test1K.data" $RHASH_TMP/test1K.data
222 - cd "$RHASH_TMP"
223 --cp "$SCRIPT_DIR/test1K.data" test1K.data
224 --FILE_A=dir1/a.txt
225 --printf "a" > $FILE_A
226 -
227 - # get the list of supported hash options
228 - HASHOPT="`$rhash --list-hashes|sed 's/ .*$//;/[^23]-/s/-\([0-9R]\)/\1/'|tr A-Z a-z`"
229 -@@ -207,14 +204,13 @@ TEST_EXPECTED="(message) 1 E8B7BE43 5c334qy BTAXLOOA6G3KQMODTHRGS5ZGME hvfkN/qlp
230 - check "$TEST_RESULT" "$TEST_EXPECTED"
231 -
232 - new_test "test %u modifier: "
233 --cp $FILE_A "dir1/=@+.txt"
234 -+mkdir dir1 && printf "a" > "dir1/=@+.txt"
235 - TEST_RESULT=$( $rhash -p '%uf %Uf %up %Up %uxc %uxC %ubc %ubC\n' "dir1/=@+.txt" )
236 - TEST_EXPECTED="%3d%40%2b.txt %3D%40%2B.txt dir1%2f%3d%40%2b.txt dir1%2F%3D%40%2B.txt e8b7be43 E8B7BE43 5c334qy 5C334QY"
237 - check "$TEST_RESULT" "$TEST_EXPECTED" .
238 - TEST_RESULT=$( $rhash -p '%uBc %UBc %Bc %u@c %U@c\n' -m "a" )
239 - TEST_EXPECTED="6Le%2bQw%3d%3d 6Le%2BQw%3D%3D 6Le+Qw== %e8%b7%beC %E8%B7%BEC"
240 - check "$TEST_RESULT" "$TEST_EXPECTED"
241 --rm -f "dir1/=@+.txt"
242 -
243 - new_test "test special characters: "
244 - TEST_RESULT=$( $rhash -p '\63\1\277\x0f\x1\t\\ \x34\r' -m "" )
245 -@@ -252,7 +248,9 @@ TEST_RESULT=$( $rhash --simple -a test1K.data | $rhash -vc - 2>/dev/null | grep
246 - match "$TEST_RESULT" "^test1K.data *OK"
247 -
248 - new_test "test checking magnet link: "
249 --TEST_RESULT=$( $rhash --magnet -a test1K.data | $rhash -vc - 2>&1 | grep test1K.data )
250 -+# also test that '--check' verifies files in the current directory
251 -+mkdir magnet_dir && $rhash --magnet -a test1K.data > magnet_dir/t.magnet
252 -+TEST_RESULT=$( $rhash -vc magnet_dir/t.magnet 2>&1 | grep test1K.data )
253 - TEST_EXPECTED="^test1K.data *OK"
254 - match "$TEST_RESULT" "$TEST_EXPECTED"
255 -
256 -@@ -283,6 +281,20 @@ TEST_RESULT=$( $rhash --simple --embed-crc --embed-crc-delimiter=_ 'test.data' 2
257 - check "$TEST_RESULT" "d3d99e8b test_[D3D99E8B].data"
258 - rm 'test_[D3D99E8B].data' 'test_[D3D99E8C].data'
259 -
260 -+new_test "test checking recursively: "
261 -+mkdir -p check/a && cp test1K.data check/a/b.data
262 -+echo "a/b.data B70B4C26" > check/b.sfv
263 -+TEST_RESULT=$( $rhash -Crc check/ | grep b.data )
264 -+match "$TEST_RESULT" "^a/b.data *OK" .
265 -+echo "B70B4C26" > check/a/b.data.crc32
266 -+TEST_RESULT=$( $rhash --crc-accept=.crc32 -Crc check/a | grep "data.*OK" )
267 -+match "$TEST_RESULT" "^check/a.b.data *OK" .
268 -+# test that hash-files specified explicitly by command line are checked
269 -+# in the current directory even with '--recursive' option
270 -+echo "test1K.data B70B4C26" > check/t.sfv
271 -+TEST_RESULT=$( $rhash -Crc check/t.sfv | grep "data.*OK" )
272 -+match "$TEST_RESULT" "^test1K.data *OK"
273 -+
274 - new_test "test wrong sums detection: "
275 - $rhash -p '%c\n%m\n%e\n%h\n%g\n%t\n%a\n%w\n' -m WRONG > t.sum
276 - TEST_RESULT=$( $rhash -vc t.sum 2>&1 | grep 'OK' )
277 -@@ -290,8 +302,7 @@ check "$TEST_RESULT" ""
278 - rm t.sum
279 -
280 - new_test "test *accept options: "
281 --rm -rf test_dir/
282 --mkdir -p test_dir && touch test_dir/file.txt test_dir/file.bin
283 -+mkdir test_dir && touch test_dir/file.txt test_dir/file.bin
284 - # correctly handle MIGW posix path conversion
285 - echo "$MSYSTEM" | grep -q '^MINGW[36][24]' && SLASH=// || SLASH="/"
286 - # test also --path-separator option
287 -@@ -301,7 +312,6 @@ TEST_RESULT=$( $rhash -rC --simple --accept=.txt --path-separator=\\ test_dir )
288 - check "$TEST_RESULT" "00000000 test_dir\\file.txt" .
289 - TEST_RESULT=$( $rhash -rc --crc-accept=.bin test_dir 2>/dev/null | sed -n '/Verifying/s/-//gp' )
290 - match "$TEST_RESULT" "( Verifying test_dir.file\\.bin )"
291 --rm -rf test_dir/
292 -
293 - new_test "test ignoring of log files: "
294 - touch t1.out t2.out
295
296 diff --git a/app-crypt/rhash/rhash-1.3.8.ebuild b/app-crypt/rhash/rhash-1.3.8.ebuild
297 deleted file mode 100644
298 index 60e1a4eade8..00000000000
299 --- a/app-crypt/rhash/rhash-1.3.8.ebuild
300 +++ /dev/null
301 @@ -1,80 +0,0 @@
302 -# Copyright 1999-2019 Gentoo Authors
303 -# Distributed under the terms of the GNU General Public License v2
304 -
305 -EAPI=7
306 -
307 -inherit toolchain-funcs multilib-minimal
308 -
309 -DESCRIPTION="Console utility and library for computing and verifying file hash sums"
310 -HOMEPAGE="http://rhash.sourceforge.net/"
311 -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
312 -
313 -LICENSE="MIT"
314 -SLOT="0"
315 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
316 -IUSE="debug nls libressl ssl static-libs"
317 -
318 -RDEPEND="
319 - ssl? (
320 - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
321 - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
322 -)"
323 -
324 -DEPEND="
325 - ${RDEPEND}
326 -"
327 -
328 -BDEPEND="
329 - nls? ( sys-devel/gettext )
330 -"
331 -
332 -S="${WORKDIR}/RHash-${PV}"
333 -
334 -src_prepare() {
335 - default
336 - # fix Solaris detection, upstream:
337 - # https://github.com/rhash/RHash/pull/81
338 - sed -i -e 's/sunos)/solaris2.*)/' configure || die
339 - # fix Cygwin detection, upstream:
340 - # https://github.com/rhash/RHash/pull/89
341 - sed -i -e '/TARGET_OS=Darwin/acygwin*) TARGET_OS=CYGWIN ;;' configure || die
342 - multilib_copy_sources
343 -}
344 -
345 -multilib_src_configure() {
346 - set -- \
347 - ./configure \
348 - --target="${CHOST}" \
349 - --cc="$(tc-getCC)" \
350 - --ar="$(tc-getAR)" \
351 - --extra-cflags="${CFLAGS}" \
352 - --extra-ldflags="${LDFLAGS}" \
353 - --prefix="${EPREFIX}"/usr \
354 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
355 - --sysconfdir="${EPREFIX}"/etc \
356 - --disable-openssl-runtime \
357 - --disable-static \
358 - --enable-lib-shared \
359 - $(use_enable debug) \
360 - $(use_enable nls gettext) \
361 - $(use_enable ssl openssl) \
362 - $(use_enable static-libs lib-static)
363 -
364 - echo "${@}"
365 - "${@}" || die "configure failed"
366 -}
367 -
368 -# We would add compile-gmo to the build targets but install-gmo always
369 -# recompiles unconditionally. :(
370 -
371 -multilib_src_install() {
372 - # -j1 needed due to race condition.
373 - emake DESTDIR="${D}" -j1 \
374 - install{,-lib-headers,-pkg-config} \
375 - $(use nls && echo install-gmo) \
376 - $(use kernel_Winnt || echo install-lib-so-link)
377 -}
378 -
379 -multilib_src_test() {
380 - emake test
381 -}
382
383 diff --git a/app-crypt/rhash/rhash-1.3.9-r2.ebuild b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
384 deleted file mode 100644
385 index 861a75662e4..00000000000
386 --- a/app-crypt/rhash/rhash-1.3.9-r2.ebuild
387 +++ /dev/null
388 @@ -1,81 +0,0 @@
389 -# Copyright 1999-2020 Gentoo Authors
390 -# Distributed under the terms of the GNU General Public License v2
391 -
392 -EAPI=7
393 -
394 -inherit toolchain-funcs multilib-minimal
395 -
396 -DESCRIPTION="Console utility and library for computing and verifying file hash sums"
397 -HOMEPAGE="http://rhash.sourceforge.net/"
398 -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
399 -
400 -LICENSE="MIT"
401 -SLOT="0"
402 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
403 -IUSE="debug nls libressl ssl static-libs"
404 -
405 -RDEPEND="
406 - ssl? (
407 - !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
408 - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
409 -)"
410 -
411 -DEPEND="
412 - ${RDEPEND}
413 -"
414 -
415 -BDEPEND="
416 - nls? ( sys-devel/gettext )
417 -"
418 -
419 -S="${WORKDIR}/RHash-${PV}"
420 -
421 -PATCHES=(
422 - "${FILESDIR}"/${P}-nls.patch
423 - # Fixes for https://github.com/rhash/RHash/issues/104
424 - # and https://github.com/rhash/RHash/issues/106
425 - "${FILESDIR}"/${P}-rc-segfault.patch
426 -)
427 -
428 -src_prepare() {
429 - default
430 - multilib_copy_sources
431 -}
432 -
433 -multilib_src_configure() {
434 - set -- \
435 - ./configure \
436 - --target="${CHOST}" \
437 - --cc="$(tc-getCC)" \
438 - --ar="$(tc-getAR)" \
439 - --extra-cflags="${CFLAGS}" \
440 - --extra-ldflags="${LDFLAGS}" \
441 - --prefix="${EPREFIX}"/usr \
442 - --libdir="${EPREFIX}"/usr/$(get_libdir) \
443 - --sysconfdir="${EPREFIX}"/etc \
444 - --disable-openssl-runtime \
445 - --disable-static \
446 - --enable-lib-shared \
447 - $(use_enable debug) \
448 - $(use_enable nls gettext) \
449 - $(use_enable ssl openssl) \
450 - $(use_enable static-libs lib-static)
451 -
452 - echo "${@}"
453 - "${@}" || die "configure failed"
454 -}
455 -
456 -# We would add compile-gmo to the build targets but install-gmo always
457 -# recompiles unconditionally. :(
458 -
459 -multilib_src_install() {
460 - # -j1 needed due to race condition.
461 - emake DESTDIR="${D}" -j1 \
462 - install{,-lib-headers,-pkg-config} \
463 - $(use nls && echo install-gmo) \
464 - $(use kernel_Winnt || echo install-lib-so-link)
465 -}
466 -
467 -multilib_src_test() {
468 - emake test
469 -}