public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
@ 2018-03-19 10:31 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2018-03-19 10:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8659d46e313acd4bbc5515ab9e92a58a22064a69
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 10:30:47 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 10:31:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8659d46e

app-crypt/rhash: Fix missing headers and dash issue

I swear it installed the headers without this line at least some of
the time. Yay for custom build systems.

Closes: https://bugs.gentoo.org/650840
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-crypt/rhash/files/rhash-1.3.6-no_echon.patch   | 54 ++++++++++++++++++++++
 .../{rhash-1.3.6.ebuild => rhash-1.3.6-r1.ebuild}  |  4 ++
 2 files changed, 58 insertions(+)

diff --git a/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch b/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
new file mode 100644
index 00000000000..9b25b29a89f
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
@@ -0,0 +1,54 @@
+From c1776248a0b34a690e99ab9a7a814c34f78088ec Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 19 Mar 2018 10:47:13 +0100
+Subject: [PATCH] "echo -n" cannot be expected to work with every POSIX shell
+
+See "man 1p echo" section APPLICATION USAGE. This patch replaces "echo -n"
+with "printf '%s'".
+---
+ configure | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+diff --git a/configure b/configure
+index f480f7b..2a7d485 100755
+--- a/configure
++++ b/configure
+@@ -22,17 +22,6 @@ INSTALL_LIB_STATIC=auto
+ INSTALL_LIB_SHARED=auto
+ INSTALL_PKGCONFIGDIR="$PKG_INSTALLDIR"
+ 
+-case $(echo -n) in
+-  -n) # SysV style
+-    ECHO_N=
+-    ECHO_C='\c'
+-    ;;
+-  *) # BSD style
+-    ECHO_N='-n '
+-    ECHO_C=
+-    ;;
+-esac
+-
+ # display error message and exit
+ die () {
+   echo
+@@ -235,7 +224,7 @@ trap remove_tmpdir EXIT
+ 
+ str_concat()
+ {
+-  echo ${ECHO_N} $@ ${ECHO_C}
++  printf '%s ' $@
+ }
+ 
+ yn_nonempty()
+@@ -246,7 +235,7 @@ yn_nonempty()
+ # Use this before starting a check
+ start_check() {
+   echo "============ Checking for $1 ============" >> "$TMPLOG"
+-  echo ${ECHO_N} "Checking for $1 ... ${ECHO_C}"
++  printf '%s' "Checking for $1 ... "
+   res_comment=""
+ }
+ 
+-- 
+2.16.2
+

diff --git a/app-crypt/rhash/rhash-1.3.6.ebuild b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
similarity index 94%
rename from app-crypt/rhash/rhash-1.3.6.ebuild
rename to app-crypt/rhash/rhash-1.3.6-r1.ebuild
index 5680b2872ad..affa8241147 100644
--- a/app-crypt/rhash/rhash-1.3.6.ebuild
+++ b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
@@ -23,6 +23,7 @@ S="${WORKDIR}/RHash-${PV}"
 
 PATCHES=(
 	"${FILESDIR}"/unquote-cc.patch
+	"${FILESDIR}"/${P}-no_echon.patch
 )
 
 src_prepare() {
@@ -60,6 +61,9 @@ multilib_src_install() {
 	emake DESTDIR="${D}" -j1 \
 		  install{,-lib-so-link,-pkg-config} \
 		  $(use nls && echo install-gmo)
+
+	emake DESTDIR="${D}" -j1 \
+		  -C lib${PN} install-headers
 }
 
 multilib_src_test() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
@ 2019-12-27 22:11 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2019-12-27 22:11 UTC (permalink / raw
  To: gentoo-commits

commit:     eea541f489c6e763b3b68c127d7abea2d0ad26ee
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 27 22:11:15 2019 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Dec 27 22:11:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eea541f4

app-crypt/rhash: Version bump to 1.3.9

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-crypt/rhash/Manifest                    |  1 +
 app-crypt/rhash/files/rhash-1.3.9-nls.patch | 22 ++++++++
 app-crypt/rhash/rhash-1.3.9.ebuild          | 78 +++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index cc4afd1859b..2e8665c315b 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1,2 +1,3 @@
 DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
 DIST rhash-1.3.8-src.tar.gz 393544 BLAKE2B c326b3fa6dbc5ea2cce40105dc319456fdcc58140a05e8002bf1d92be921d8bbd27bf670370ba7cf2ff2001ff70ddbeb8efc9712869a7b215c5f51a5e493b5c9 SHA512 9dba4fa4dd49d323f2e440c5b93eac1ef62eb4046ec4ef611f0978c12c1739002f1ac1f1ec5e61bd359dc89e9ed612db71be91a795184ac5d5433280d27fa4c1
+DIST rhash-1.3.9-src.tar.gz 403415 BLAKE2B 49f3b9348485b83521f58fa1de30517b05a8265547cbec3276d89c42b46baccc4ea22d41638764600c76669308a5f7d9d3995b7cec51676c9f8492ba740e473c SHA512 6fae0587cdeb42df59d542c58bad734259d1ff39fba92531c10a469b51310644669ffbe0453e72d85c2cf38b176962f6dca9062a121ac019f1b30f207a176e60

diff --git a/app-crypt/rhash/files/rhash-1.3.9-nls.patch b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
new file mode 100644
index 00000000000..a6fb902676f
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
@@ -0,0 +1,22 @@
+From a165520d3f63e976dd3b842c2fbb05f05f1029a8 Mon Sep 17 00:00:00 2001
+From: Aleksey <rhash.admin@gmail.com>
+Date: Sun, 15 Dec 2019 03:35:09 +0300
+Subject: [PATCH] i18n: fix a string in uk.po by adding newline
+
+---
+ po/uk.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/po/uk.po b/po/uk.po
+index 959e47a..d6c0b1d 100644
+--- a/po/uk.po
++++ b/po/uk.po
+@@ -234,7 +234,7 @@ msgstr "Перевірити хеш-файли, вказані у командн
+ 
+ #: parse_cmdline.c:91
+ msgid "Update the specified hash file.\n"
+-msgstr "Оновити вказаний хеш-файл"
++msgstr "Оновити вказаний хеш-файл.\n"
+ 
+ #: parse_cmdline.c:92
+ msgid "Rename files by inserting crc32 sum into name.\n"

diff --git a/app-crypt/rhash/rhash-1.3.9.ebuild b/app-crypt/rhash/rhash-1.3.9.ebuild
new file mode 100644
index 00000000000..2d4c3303cd5
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.3.9.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Console utility and library for computing and verifying file hash sums"
+HOMEPAGE="http://rhash.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+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"
+IUSE="debug nls libressl ssl static-libs"
+
+RDEPEND="
+	ssl? (
+		!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+)"
+
+DEPEND="
+	${RDEPEND}
+"
+
+BDEPEND="
+	nls? ( sys-devel/gettext )
+"
+
+S="${WORKDIR}/RHash-${PV}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-nls.patch
+)
+
+src_prepare() {
+	default
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	set -- \
+		./configure \
+		--target="${CHOST}" \
+		--cc="$(tc-getCC)" \
+		--ar="$(tc-getAR)" \
+		--extra-cflags="${CFLAGS}" \
+		--extra-ldflags="${LDFLAGS}" \
+		--prefix="${EPREFIX}"/usr \
+		--libdir="${EPREFIX}"/usr/$(get_libdir) \
+		--sysconfdir="${EPREFIX}"/etc \
+		--disable-openssl-runtime \
+		--disable-static \
+		--enable-lib-shared \
+		$(use_enable debug) \
+		$(use_enable nls gettext) \
+		$(use_enable ssl openssl) \
+		$(use_enable static-libs lib-static)
+
+	echo "${@}"
+	"${@}" || die "configure failed"
+}
+
+# We would add compile-gmo to the build targets but install-gmo always
+# recompiles unconditionally. :(
+
+multilib_src_install() {
+	# -j1 needed due to race condition.
+	emake DESTDIR="${D}" -j1 \
+		  install{,-lib-headers,-pkg-config} \
+		  $(use nls && echo install-gmo) \
+		  $(use kernel_Winnt || echo install-lib-so-link)
+}
+
+multilib_src_test() {
+	emake test
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
@ 2020-01-02 20:39 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2020-01-02 20:39 UTC (permalink / raw
  To: gentoo-commits

commit:     b29a8eee6d90f689232342e632c2418421217649
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  2 20:38:38 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Jan  2 20:38:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b29a8eee

app-crypt/rhash: Apply upstream patch to fix 1.3.9 -rc segfault

Bug: https://github.com/rhash/RHash/issues/104
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../rhash/files/rhash-1.3.9-rc-segfault.patch      | 25 ++++++++++++++++++++++
 .../{rhash-1.3.9.ebuild => rhash-1.3.9-r1.ebuild}  |  3 ++-
 2 files changed, 27 insertions(+), 1 deletion(-)

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
new file mode 100644
index 00000000000..90a1efecbb1
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
@@ -0,0 +1,25 @@
+From 198e62063ed817357204284a15f95ffc7230044c Mon Sep 17 00:00:00 2001
+From: Aleksey <rhash.admin@gmail.com>
+Date: Thu, 2 Jan 2020 21:16:51 +0300
+Subject: [PATCH] fix segfault on rhash -rc
+
+---
+ file.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/file.c b/file.c
+index 6f593f9..0d18f45 100644
+--- a/file.c
++++ b/file.c
+@@ -361,8 +361,9 @@ int file_init_by_print_path(file_t* file, file_t* prepend_dir, const char* print
+ 		const char* path = make_path(prepend_dir->real_path, print_path, 0);
+ 		file_init(file, path, init_flags & ~FileInitReusePath);
+ 	}
+-	if (!prepend_dir || IS_DOT_STR(prepend_dir->print_path) ||
+-			(!prepend_dir->print_path && opt.path_separator != ALIEN_PATH_SEPARATOR)) {
++	if (!prepend_dir || (prepend_dir->print_path ?
++			IS_DOT_STR(prepend_dir->print_path) :
++			opt.path_separator != ALIEN_PATH_SEPARATOR)) {
+ 		if ((init_flags & FileInitReusePath) != 0) {
+ 			file->print_path = print_path;
+ 			file->mode |= FileDontFreePrintPath;

diff --git a/app-crypt/rhash/rhash-1.3.9.ebuild b/app-crypt/rhash/rhash-1.3.9-r1.ebuild
similarity index 95%
rename from app-crypt/rhash/rhash-1.3.9.ebuild
rename to app-crypt/rhash/rhash-1.3.9-r1.ebuild
index 2d4c3303cd5..e203d68814e 100644
--- a/app-crypt/rhash/rhash-1.3.9.ebuild
+++ b/app-crypt/rhash/rhash-1.3.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -32,6 +32,7 @@ S="${WORKDIR}/RHash-${PV}"
 
 PATCHES=(
 	"${FILESDIR}"/${P}-nls.patch
+	"${FILESDIR}"/${P}-rc-segfault.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
@ 2020-08-17 22:21 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2020-08-17 22:21 UTC (permalink / raw
  To: gentoo-commits

commit:     ce2c13885bd540214bc562479c11457f2d0b318f
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 17 22:20:53 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 17 22:20:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce2c1388

app-crypt/rhash: Drop old 1.3.8 and 1.3.9-r2

Package-Manager: Portage-3.0.3, Repoman-2.3.23
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-crypt/rhash/Manifest                           |   2 -
 app-crypt/rhash/files/rhash-1.3.9-nls.patch        |  22 --
 .../rhash/files/rhash-1.3.9-rc-segfault.patch      | 230 ---------------------
 app-crypt/rhash/rhash-1.3.8.ebuild                 |  80 -------
 app-crypt/rhash/rhash-1.3.9-r2.ebuild              |  81 --------
 5 files changed, 415 deletions(-)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index 7d4e592d996..4836b91f03c 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1,4 +1,2 @@
 DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
-DIST rhash-1.3.8-src.tar.gz 393544 BLAKE2B c326b3fa6dbc5ea2cce40105dc319456fdcc58140a05e8002bf1d92be921d8bbd27bf670370ba7cf2ff2001ff70ddbeb8efc9712869a7b215c5f51a5e493b5c9 SHA512 9dba4fa4dd49d323f2e440c5b93eac1ef62eb4046ec4ef611f0978c12c1739002f1ac1f1ec5e61bd359dc89e9ed612db71be91a795184ac5d5433280d27fa4c1
-DIST rhash-1.3.9-src.tar.gz 403415 BLAKE2B 49f3b9348485b83521f58fa1de30517b05a8265547cbec3276d89c42b46baccc4ea22d41638764600c76669308a5f7d9d3995b7cec51676c9f8492ba740e473c SHA512 6fae0587cdeb42df59d542c58bad734259d1ff39fba92531c10a469b51310644669ffbe0453e72d85c2cf38b176962f6dca9062a121ac019f1b30f207a176e60
 DIST rhash-1.4.0-src.tar.gz 406433 BLAKE2B 2af437cd3a049bb9473825026f8a6476c81b4400a47638c62ee3ecb3d3984f7f9fe97def91488094a2919e5baad967d3f49ec7d95363896e270251ad085bacac SHA512 2f02487fffe8d1bc70c4454829bbd250a15fbd09db5ef85c54d3e8ad1008e84616ea54483292deae45047a27964e27b26d9b3da8447e7c37dac1e2ce18a63a07

diff --git a/app-crypt/rhash/files/rhash-1.3.9-nls.patch b/app-crypt/rhash/files/rhash-1.3.9-nls.patch
deleted file mode 100644
index a6fb902676f..00000000000
--- a/app-crypt/rhash/files/rhash-1.3.9-nls.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From a165520d3f63e976dd3b842c2fbb05f05f1029a8 Mon Sep 17 00:00:00 2001
-From: Aleksey <rhash.admin@gmail.com>
-Date: Sun, 15 Dec 2019 03:35:09 +0300
-Subject: [PATCH] i18n: fix a string in uk.po by adding newline
-
----
- po/uk.po | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/po/uk.po b/po/uk.po
-index 959e47a..d6c0b1d 100644
---- a/po/uk.po
-+++ b/po/uk.po
-@@ -234,7 +234,7 @@ msgstr "Перевірити хеш-файли, вказані у командн
- 
- #: parse_cmdline.c:91
- msgid "Update the specified hash file.\n"
--msgstr "Оновити вказаний хеш-файл"
-+msgstr "Оновити вказаний хеш-файл.\n"
- 
- #: parse_cmdline.c:92
- msgid "Rename files by inserting crc32 sum into name.\n"

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
deleted file mode 100644
index a2052c67bbf..00000000000
--- a/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-diff --git a/ChangeLog b/ChangeLog
-index 8537968..9724c9d 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,7 @@
-+Tue 07 Jan 2020 Aleksey
-+	* Bugfix: restore behavior of 'rhash -rc' to be the same as in v1.3.8
-+	* Bugfix: fix a segfault and memory errors
-+
- Sat 14 Dec 2019 Aleksey
- 	* === Version 1.3.9 ===
- 
-diff --git a/calc_sums.c b/calc_sums.c
-index a76c8c9..0f25224 100644
---- a/calc_sums.c
-+++ b/calc_sums.c
-@@ -535,6 +535,7 @@ int check_hash_file(file_t* file, int chdir)
- 			log_error_msg_file_t(_("file is binary: %s\n"), file);
- 			if (fd != stdin)
- 				fclose(fd);
-+			file_cleanup(&parent_dir);
- 			return -1;
- 		}
- 
-@@ -586,6 +587,7 @@ int check_hash_file(file_t* file, int chdir)
- 			rhash_data.miss++;
- 		rhash_data.processed++;
- 	}
-+	file_cleanup(&parent_dir);
- 	time = rsh_timer_stop(&timer);
- 
- 	if (res >= -1 && (rsh_fprintf(rhash_data.out, "%s\n", str_set(buf, '-', 80)) < 0 ||
-diff --git a/file.c b/file.c
-index 6f593f9..2f0eb2a 100644
---- a/file.c
-+++ b/file.c
-@@ -266,7 +266,7 @@ static int detect_path_encoding(file_t* file, wchar_t* dir_path, const char* pri
- 	int i;
- 	assert(file && !file->real_path);
- 	file->mode &= ~FileMaskStatBits;
--	if (!dir_path && ascii)
-+	if (ascii)
- 		file->mode |= FileIsAsciiPrintPath;
- 	/* detect encoding in two or four steps */
- 	for (i = 0; i < 4; i += step) {
-@@ -333,45 +333,39 @@ int file_init_by_print_path(file_t* file, file_t* prepend_dir, const char* print
- #ifdef _WIN32
- 	{
- 		const char** primary_path;
--		const char* dir_primary_path;
- 		wchar_t* dir_path = (prepend_dir && !IS_DOT_TSTR(prepend_dir->real_path) ? prepend_dir->real_path : NULL);
- 		int encoding = detect_path_encoding(file, dir_path, print_path, init_flags);
- 		if (encoding < 0)
- 			return -1;
- 		if (encoding == 0) {
- 			primary_path = &file->print_path;
--			dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathUtf8) : NULL);
- 		} else {
- 			primary_path = &file->native_path;
--			dir_primary_path = (prepend_dir ? file_get_print_path(prepend_dir, FPathNative) : NULL);
- 		}
--		if ((!dir_primary_path || IS_DOT_TSTR(dir_primary_path)) &&
--				(init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
-+		if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
- 			*primary_path = print_path;
- 			file->mode |= (encoding == 0 ? FileDontFreePrintPath : FileDontFreeNativePath);
- 		} else {
--			*primary_path = make_path(dir_primary_path, print_path, 1);
-+			*primary_path = rsh_strdup(print_path);
- 		}
--		return 0;
- 	}
- #else
- 	if (!prepend_dir || IS_DOT_STR(prepend_dir->real_path)) {
--		file_init(file, print_path, init_flags);
-+		file_init(file, print_path, init_flags & (FileInitReusePath | FileMaskModeBits));
- 	} else {
--		const char* path = make_path(prepend_dir->real_path, print_path, 0);
--		file_init(file, path, init_flags & ~FileInitReusePath);
-+		file->real_path = make_path(prepend_dir->real_path, print_path, 0);
-+		file->mode = init_flags & FileMaskModeBits;
- 	}
--	if (!prepend_dir || IS_DOT_STR(prepend_dir->print_path) ||
--			(!prepend_dir->print_path && opt.path_separator != ALIEN_PATH_SEPARATOR)) {
--		if ((init_flags & FileInitReusePath) != 0) {
--			file->print_path = print_path;
--			file->mode |= FileDontFreePrintPath;
--		} else
--			file->print_path = rsh_strdup(print_path);
-+	assert(file->print_path == NULL);
-+	if ((init_flags & (FileInitReusePath | FileInitUpdatePrintPathLastSlash)) == FileInitReusePath) {
-+		file->print_path = print_path;
-+		file->mode |= FileDontFreePrintPath;
- 	} else {
--		file->print_path = make_path(file_get_print_path(prepend_dir, FPathPrimaryEncoding), print_path, 1);
-+		file->print_path = rsh_strdup(print_path);
- 	}
- #endif
-+	/* note: flag FileInitUpdatePrintPathLastSlash is used only with file_init() */
-+	assert((init_flags & FileInitUpdatePrintPathLastSlash) == 0);
- 	if ((init_flags & (FileInitRunFstat | FileInitRunLstat)) &&
- 			file_stat(file, (init_flags & FileInitRunLstat)) < 0)
- 		return -1;
-@@ -544,9 +538,10 @@ static char* get_modified_path(const char* path, const char* str, int operation)
- 			end_pos = strlen(path);
- 			start_pos = (end_pos > 0 ? end_pos - 1 : 0);
- 			for (; start_pos > 0 && !IS_ANY_SLASH(path[start_pos]); start_pos--);
--			for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
--			if (start_pos == 0)
-+			if (start_pos == 0 && !IS_ANY_SLASH(path[start_pos]))
- 				return rsh_strdup(".");
-+			for (; start_pos > 0 && IS_ANY_SLASH(path[start_pos]); start_pos--);
-+			start_pos++;
- 		} else {
- 			char* point = strrchr(path, '.');
- 			if (!point)
-@@ -580,9 +575,10 @@ static tpath_t get_modified_tpath(ctpath_t path, const char* str, int operation)
- 			end_pos = wcslen(path);
- 			start_pos = (end_pos > 0 ? end_pos - 1 : 0);
- 			for (; start_pos > 0 && !IS_ANY_TSLASH(path[start_pos]); start_pos--);
--			for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
--			if (start_pos == 0)
-+			if (start_pos == 0 && !IS_ANY_TSLASH(path[start_pos]))
- 				return rsh_wcsdup(L".");
-+			for (; start_pos > 0 && IS_ANY_TSLASH(path[start_pos]); start_pos--);
-+			start_pos++;
- 		} else {
- 			rsh_tchar* point = wcsrchr(path, L'.');
- 			if (!point)
-diff --git a/hash_check.c b/hash_check.c
-index 1f9c936..582a09d 100644
---- a/hash_check.c
-+++ b/hash_check.c
-@@ -210,9 +210,9 @@ static int detect_hash_type(char** ptr, char* end, int* p_len)
- 	} else {
- 		/* search backward (but no more then 129 symbols) */
- 		if ((p - end) >= 129) end = p - 129;
--		for (; p >= end && p[-1] == '='; eq_num++, p--)
-+		for (; p > end && p[-1] == '='; eq_num++, p--)
- 			char_type = FmtBase64;
--		for (; p >= end && (next_type &= test_hash_char(p[-1])); len++, p--)
-+		for (; p > end && (next_type &= test_hash_char(p[-1])); len++, p--)
- 			char_type = next_type;
- 	}
- 	if ((char_type & FmtBase64) != 0)
-diff --git a/tests/test_rhash.sh b/tests/test_rhash.sh
-index 8c6e40d..db41b19 100755
---- a/tests/test_rhash.sh
-+++ b/tests/test_rhash.sh
-@@ -84,12 +84,9 @@ remove_tmpdir()
- trap remove_tmpdir EXIT
- 
- # prepare test files
--SUBDIR=$RHASH_TMP/dir1
--mkdir $RHASH_TMP $SUBDIR || die "Unable to create tmp dir."
-+mkdir $RHASH_TMP || die "Unable to create tmp dir."
-+cp "$SCRIPT_DIR/test1K.data" $RHASH_TMP/test1K.data
- cd "$RHASH_TMP"
--cp "$SCRIPT_DIR/test1K.data" test1K.data
--FILE_A=dir1/a.txt
--printf "a" > $FILE_A
- 
- # get the list of supported hash options
- HASHOPT="`$rhash --list-hashes|sed 's/ .*$//;/[^23]-/s/-\([0-9R]\)/\1/'|tr A-Z a-z`"
-@@ -207,14 +204,13 @@ TEST_EXPECTED="(message) 1 E8B7BE43 5c334qy BTAXLOOA6G3KQMODTHRGS5ZGME hvfkN/qlp
- check "$TEST_RESULT" "$TEST_EXPECTED"
- 
- new_test "test %u modifier:           "
--cp $FILE_A "dir1/=@+.txt"
-+mkdir dir1 && printf "a" > "dir1/=@+.txt"
- TEST_RESULT=$( $rhash -p '%uf %Uf %up %Up %uxc %uxC %ubc %ubC\n' "dir1/=@+.txt" )
- 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"
- check "$TEST_RESULT" "$TEST_EXPECTED" .
- TEST_RESULT=$( $rhash -p '%uBc %UBc %Bc %u@c %U@c\n' -m "a" )
- TEST_EXPECTED="6Le%2bQw%3d%3d 6Le%2BQw%3D%3D 6Le+Qw== %e8%b7%beC %E8%B7%BEC"
- check "$TEST_RESULT" "$TEST_EXPECTED"
--rm -f "dir1/=@+.txt"
- 
- new_test "test special characters:    "
- TEST_RESULT=$( $rhash -p '\63\1\277\x0f\x1\t\\ \x34\r' -m "" )
-@@ -252,7 +248,9 @@ TEST_RESULT=$( $rhash --simple -a test1K.data | $rhash -vc - 2>/dev/null | grep
- match "$TEST_RESULT" "^test1K.data *OK"
- 
- new_test "test checking magnet link:  "
--TEST_RESULT=$( $rhash --magnet -a test1K.data | $rhash -vc - 2>&1 | grep test1K.data )
-+# also test that '--check' verifies files in the current directory
-+mkdir magnet_dir && $rhash --magnet -a test1K.data > magnet_dir/t.magnet
-+TEST_RESULT=$( $rhash -vc magnet_dir/t.magnet 2>&1 | grep test1K.data )
- TEST_EXPECTED="^test1K.data *OK"
- match "$TEST_RESULT" "$TEST_EXPECTED"
- 
-@@ -283,6 +281,20 @@ TEST_RESULT=$( $rhash --simple --embed-crc --embed-crc-delimiter=_ 'test.data' 2
- check "$TEST_RESULT" "d3d99e8b  test_[D3D99E8B].data"
- rm 'test_[D3D99E8B].data' 'test_[D3D99E8C].data'
- 
-+new_test "test checking recursively:  "
-+mkdir -p check/a && cp test1K.data check/a/b.data
-+echo "a/b.data B70B4C26" > check/b.sfv
-+TEST_RESULT=$( $rhash -Crc check/ | grep b.data )
-+match "$TEST_RESULT" "^a/b.data *OK" .
-+echo "B70B4C26" > check/a/b.data.crc32
-+TEST_RESULT=$( $rhash --crc-accept=.crc32 -Crc check/a | grep "data.*OK" )
-+match "$TEST_RESULT" "^check/a.b.data *OK" .
-+# test that hash-files specified explicitly by command line are checked
-+# in the current directory even with '--recursive' option
-+echo "test1K.data B70B4C26" > check/t.sfv
-+TEST_RESULT=$( $rhash -Crc check/t.sfv | grep "data.*OK" )
-+match "$TEST_RESULT" "^test1K.data *OK"
-+
- new_test "test wrong sums detection:  "
- $rhash -p '%c\n%m\n%e\n%h\n%g\n%t\n%a\n%w\n' -m WRONG > t.sum
- TEST_RESULT=$( $rhash -vc t.sum 2>&1 | grep 'OK' )
-@@ -290,8 +302,7 @@ check "$TEST_RESULT" ""
- rm t.sum
- 
- new_test "test *accept options:       "
--rm -rf test_dir/
--mkdir -p test_dir && touch test_dir/file.txt test_dir/file.bin
-+mkdir test_dir && touch test_dir/file.txt test_dir/file.bin
- # correctly handle MIGW posix path conversion
- echo "$MSYSTEM" | grep -q '^MINGW[36][24]' && SLASH=// || SLASH="/"
- # test also --path-separator option
-@@ -301,7 +312,6 @@ TEST_RESULT=$( $rhash -rC --simple --accept=.txt --path-separator=\\ test_dir )
- check "$TEST_RESULT" "00000000  test_dir\\file.txt" .
- TEST_RESULT=$( $rhash -rc --crc-accept=.bin test_dir 2>/dev/null | sed -n '/Verifying/s/-//gp' )
- match "$TEST_RESULT" "( Verifying test_dir.file\\.bin )"
--rm -rf test_dir/
- 
- new_test "test ignoring of log files: "
- touch t1.out t2.out

diff --git a/app-crypt/rhash/rhash-1.3.8.ebuild b/app-crypt/rhash/rhash-1.3.8.ebuild
deleted file mode 100644
index 60e1a4eade8..00000000000
--- a/app-crypt/rhash/rhash-1.3.8.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal
-
-DESCRIPTION="Console utility and library for computing and verifying file hash sums"
-HOMEPAGE="http://rhash.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-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"
-IUSE="debug nls libressl ssl static-libs"
-
-RDEPEND="
-	ssl? (
-		!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
-)"
-
-DEPEND="
-	${RDEPEND}
-"
-
-BDEPEND="
-	nls? ( sys-devel/gettext )
-"
-
-S="${WORKDIR}/RHash-${PV}"
-
-src_prepare() {
-	default
-	# fix Solaris detection, upstream:
-	# https://github.com/rhash/RHash/pull/81
-	sed -i -e 's/sunos)/solaris2.*)/' configure || die
-	# fix Cygwin detection, upstream:
-	# https://github.com/rhash/RHash/pull/89
-	sed -i -e '/TARGET_OS=Darwin/acygwin*) TARGET_OS=CYGWIN ;;' configure || die
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	set -- \
-		./configure \
-		--target="${CHOST}" \
-		--cc="$(tc-getCC)" \
-		--ar="$(tc-getAR)" \
-		--extra-cflags="${CFLAGS}" \
-		--extra-ldflags="${LDFLAGS}" \
-		--prefix="${EPREFIX}"/usr \
-		--libdir="${EPREFIX}"/usr/$(get_libdir) \
-		--sysconfdir="${EPREFIX}"/etc \
-		--disable-openssl-runtime \
-		--disable-static \
-		--enable-lib-shared \
-		$(use_enable debug) \
-		$(use_enable nls gettext) \
-		$(use_enable ssl openssl) \
-		$(use_enable static-libs lib-static)
-
-	echo "${@}"
-	"${@}" || die "configure failed"
-}
-
-# We would add compile-gmo to the build targets but install-gmo always
-# recompiles unconditionally. :(
-
-multilib_src_install() {
-	# -j1 needed due to race condition.
-	emake DESTDIR="${D}" -j1 \
-		  install{,-lib-headers,-pkg-config} \
-		  $(use nls && echo install-gmo) \
-		  $(use kernel_Winnt || echo install-lib-so-link)
-}
-
-multilib_src_test() {
-	emake test
-}

diff --git a/app-crypt/rhash/rhash-1.3.9-r2.ebuild b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
deleted file mode 100644
index 861a75662e4..00000000000
--- a/app-crypt/rhash/rhash-1.3.9-r2.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit toolchain-funcs multilib-minimal
-
-DESCRIPTION="Console utility and library for computing and verifying file hash sums"
-HOMEPAGE="http://rhash.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-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"
-IUSE="debug nls libressl ssl static-libs"
-
-RDEPEND="
-	ssl? (
-		!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
-		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
-)"
-
-DEPEND="
-	${RDEPEND}
-"
-
-BDEPEND="
-	nls? ( sys-devel/gettext )
-"
-
-S="${WORKDIR}/RHash-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-nls.patch
-	# Fixes for https://github.com/rhash/RHash/issues/104
-	# and https://github.com/rhash/RHash/issues/106
-	"${FILESDIR}"/${P}-rc-segfault.patch
-)
-
-src_prepare() {
-	default
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	set -- \
-		./configure \
-		--target="${CHOST}" \
-		--cc="$(tc-getCC)" \
-		--ar="$(tc-getAR)" \
-		--extra-cflags="${CFLAGS}" \
-		--extra-ldflags="${LDFLAGS}" \
-		--prefix="${EPREFIX}"/usr \
-		--libdir="${EPREFIX}"/usr/$(get_libdir) \
-		--sysconfdir="${EPREFIX}"/etc \
-		--disable-openssl-runtime \
-		--disable-static \
-		--enable-lib-shared \
-		$(use_enable debug) \
-		$(use_enable nls gettext) \
-		$(use_enable ssl openssl) \
-		$(use_enable static-libs lib-static)
-
-	echo "${@}"
-	"${@}" || die "configure failed"
-}
-
-# We would add compile-gmo to the build targets but install-gmo always
-# recompiles unconditionally. :(
-
-multilib_src_install() {
-	# -j1 needed due to race condition.
-	emake DESTDIR="${D}" -j1 \
-		install{,-lib-headers,-pkg-config} \
-		$(use nls && echo install-gmo) \
-		$(use kernel_Winnt || echo install-lib-so-link)
-}
-
-multilib_src_test() {
-	emake test
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/
@ 2021-10-16 23:10 James Le Cuirot
  0 siblings, 0 replies; 5+ messages in thread
From: James Le Cuirot @ 2021-10-16 23:10 UTC (permalink / raw
  To: gentoo-commits

commit:     0e967160ad4b02b3c8e58c49c5b4004fbeb4e715
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 23:06:53 2021 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 23:07:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e967160

app-crypt/rhash: Fix building 1.4.2 with Clang

Closes: https://bugs.gentoo.org/818379
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-crypt/rhash/files/rhash-1.4.2-clang.patch | 80 +++++++++++++++++++++++++++
 app-crypt/rhash/rhash-1.4.2.ebuild            |  4 ++
 2 files changed, 84 insertions(+)

diff --git a/app-crypt/rhash/files/rhash-1.4.2-clang.patch b/app-crypt/rhash/files/rhash-1.4.2-clang.patch
new file mode 100644
index 00000000000..460e73a6ace
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.4.2-clang.patch
@@ -0,0 +1,80 @@
+From 4dc506066cf1727b021e6352535a8bb315c3f8dc Mon Sep 17 00:00:00 2001
+From: Aleksey <rhash.admin@gmail.com>
+Date: Sat, 17 Jul 2021 18:39:41 +0300
+Subject: [PATCH] configure: fix clang detection on macOS
+
+---
+ configure | 58 +++++++++++++++++++++++++++----------------------------
+ 1 file changed, 28 insertions(+), 30 deletions(-)
+
+diff --git a/configure b/configure
+index 59d432b..111270a 100755
+--- a/configure
++++ b/configure
+@@ -519,38 +519,36 @@ else
+     elif run_cmd "$CC --version"; then
+       cc_name_tmp=$($CC --version 2>&1 | head -n 1 | cut -d ' ' -f 1)
+     fi
+-    if test -n "${cc_name_tmp}"; then
+-      if echo "$cc_name_tmp" | grep -q "gcc"; then
+-        cc_name=$cc_name_tmp
+-        start_check "$CC version"
+-        cc_vendor=gnu
+-        cc_version=$($CC -dumpversion 2>&1)
+-        if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then
+-          cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null)
+-          if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then
+-            cc_version=$cc_v2
+-          fi
++    if echo "$cc_name_tmp" | grep -q "gcc"; then
++      cc_name=$cc_name_tmp
++      start_check "$CC version"
++      cc_vendor=gnu
++      cc_version=$($CC -dumpversion 2>&1)
++      if ! echo $cc_version | grep -q '^[0-9][0-9]*\.[0-9]'; then
++        cc_v2=$($CC -dumpfullversion -dumpversion 2>/dev/null)
++        if echo $cc_v2 | grep -q '^[0-9][0-9]*\.[0-9]'; then
++          cc_version=$cc_v2
+         fi
+-        case $cc_version in
+-          2.96*)
+-            cc_fail=yes
+-            ;;
+-          *)
+-            _cc_major=$(echo $cc_version | cut -d '.' -f 1)
+-            _cc_minor=$(echo $cc_version | cut -d '.' -f 2)
+-            _cc_mini=$(echo $cc_version | cut -d '.' -f 3)
+-            ;;
+-        esac
+-        finish_check "$cc_name $cc_version"
+-        break
+-      fi
+-      if echo "$cc_name_tmp" | grep -q "clang"; then
+-        start_check "$CC version"
+-        cc_vendor=clang
+-        cc_version=$($CC -dumpversion 2>&1)
+-        finish_check "clang $cc_version"
+-        break
+       fi
++      case $cc_version in
++        2.96*)
++          cc_fail=yes
++          ;;
++        *)
++          _cc_major=$(echo $cc_version | cut -d '.' -f 1)
++          _cc_minor=$(echo $cc_version | cut -d '.' -f 2)
++          _cc_mini=$(echo $cc_version | cut -d '.' -f 3)
++          ;;
++      esac
++      finish_check "$cc_name $cc_version"
++      break
++    elif $CC --version 2>&1 | grep -q "clang"; then
++      start_check "$CC version"
++      cc_vendor=clang
++      cc_version=$($CC -dumpversion 2>&1)
++      finish_check "clang $cc_version"
++      break
++    else
+       cc_name_tmp=$($CC -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3)
+       if test "$cc_name_tmp" = "Sun C"; then
+         start_check "$CC version"

diff --git a/app-crypt/rhash/rhash-1.4.2.ebuild b/app-crypt/rhash/rhash-1.4.2.ebuild
index fd42272e981..0aea0acab04 100644
--- a/app-crypt/rhash/rhash-1.4.2.ebuild
+++ b/app-crypt/rhash/rhash-1.4.2.ebuild
@@ -29,6 +29,10 @@ BDEPEND="
 
 S="${WORKDIR}/RHash-${PV}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-clang.patch
+)
+
 src_prepare() {
 	default
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-16 23:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-17 22:21 [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/, app-crypt/rhash/files/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2021-10-16 23:10 James Le Cuirot
2020-01-02 20:39 James Le Cuirot
2019-12-27 22:11 James Le Cuirot
2018-03-19 10:31 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox