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

commit:     742b2aea30f596c0606731ac0eea04428bda17d0
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 22:03:52 2016 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Fri Sep 16 22:03:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=742b2aea

app-crypt/rhash: Install headers, fix librhash.so symlink

Sorry, should have spotted these before the earlier commit.

Package-Manager: portage-2.3.0

 app-crypt/rhash/files/librhash-symlink.patch       | 38 ++++++++++++++++++++++
 ...rhash-1.3.3-r1.ebuild => rhash-1.3.3-r2.ebuild} | 21 +++++++++---
 2 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/app-crypt/rhash/files/librhash-symlink.patch b/app-crypt/rhash/files/librhash-symlink.patch
new file mode 100644
index 00000000..faba2fb
--- /dev/null
+++ b/app-crypt/rhash/files/librhash-symlink.patch
@@ -0,0 +1,38 @@
+From 30c5897a7533b746388f44f3999ad2e23c529364 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Fri, 16 Sep 2016 22:53:51 +0100
+Subject: [PATCH] Handle librhash.so symlink in shared Makefile rules, not
+ static
+
+---
+ librhash/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/librhash/Makefile b/librhash/Makefile
+index a38073f..fc5e5c3 100644
+--- a/librhash/Makefile
++++ b/librhash/Makefile
+@@ -46,18 +46,18 @@ dist-clean: clean
+ install-lib-static: $(LIBRARY) install-headers
+ 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ 	$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/
+-	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ install-lib-shared: $(SONAME)
+ 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+ 	$(INSTALL_SHARED) $(SONAME) $(DESTDIR)$(LIBDIR)/
++	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ uninstall-lib-static: uninstall-headers
+ 	rm -f $(DESTDIR)$(LIBDIR)/$(LIBRARY)
+-	rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ uninstall-lib-shared:
+ 	rm -f $(DESTDIR)$(LIBDIR)/$(SONAME)
++	rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
+ 
+ install-headers:
+ 	$(INSTALL) -d $(DESTDIR)$(INCDIR)
+-- 
+2.8.2
+

diff --git a/app-crypt/rhash/rhash-1.3.3-r1.ebuild b/app-crypt/rhash/rhash-1.3.3-r2.ebuild
similarity index 80%
rename from app-crypt/rhash/rhash-1.3.3-r1.ebuild
rename to app-crypt/rhash/rhash-1.3.3-r2.ebuild
index 585a54a..578f581 100644
--- a/app-crypt/rhash/rhash-1.3.3-r1.ebuild
+++ b/app-crypt/rhash/rhash-1.3.3-r2.ebuild
@@ -20,6 +20,10 @@ RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
 	nls? ( sys-devel/gettext )"
 
+PATCHES=(
+	"${FILESDIR}"/librhash-symlink.patch
+)
+
 src_prepare() {
 	default
 
@@ -46,11 +50,20 @@ multilib_src_compile() {
 		  $(use static-libs && echo lib-static)
 }
 
+myemake() {
+	emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) "${@}"
+}
+
 multilib_src_install() {
-	emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
-		  install-lib-shared $(multilib_is_native_abi && echo install-shared) \
-		  $(use static-libs && echo install-lib-static) \
-		  $(use nls && multilib_is_native_abi && echo install-gmo)
+	myemake install-lib-shared
+	multilib_is_native_abi && myemake install-shared
+	use static-libs && myemake install-lib-static
+}
+
+multilib_src_install_all() {
+	myemake -C librhash install-headers
+	use nls && myemake install-gmo
+	einstalldocs
 }
 
 multilib_src_test() {


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

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

commit:     253b1d93e3d85af187f126ab1e74b0c2dd90bf48
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 16 22:41:18 2016 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 16 22:48:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=253b1d93

app-crypt/rhash: Version bump to 1.3.4

Upstream merged my patch. Always make build-shared as its cheap and
needed for the tests.

Package-Manager: portage-2.3.2

 app-crypt/rhash/Manifest                           |  2 +-
 app-crypt/rhash/files/librhash-symlink.patch       | 38 ----------------------
 .../{rhash-1.3.3-r2.ebuild => rhash-1.3.4.ebuild}  |  9 ++---
 3 files changed, 3 insertions(+), 46 deletions(-)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index a29fefa..13d53c9 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1 +1 @@
-DIST rhash-1.3.3-src.tar.gz 248855 SHA256 5b520b597bd83f933d316fce1382bb90e0b0b87b559b8c9c9a197551c935315a SHA512 0ac1699a0e5718b750610cd6189d9d582186d7e17191e3723a994559c8f9c6ea7e0d34825da0c96fd0fc6be3e14b5f44ce7a21d17156cdfce3f0e3e4ff09389e WHIRLPOOL d2b17c8fd0a121e6d7e853c22bfce0545235e272c48893f13a28a5d424b26bc0cb18a5aa7eb51e07428b677116f4fdae89859a4d4e3e7cdefb4dea62337b558e
+DIST rhash-1.3.4-src.tar.gz 249357 SHA256 406662c4703bd4cb1caae26f32700951a5e12adf39f141d3f40e0b461b1e9e49 SHA512 a78be309011798d5e55023eb93f898c10254a42270288fa5ec68ad446b5f3d001e8c6f893683e5171e3858c86d45ce2ce16eefde1173209e1925420c27a7ff7a WHIRLPOOL 5883dcbf0c2bf51036434d1906b85b615eae65ef2729a68d7ac637e2bea3c494cd3ee7fa9a60d3c4f3241bc4fd5c62c8f7e058c0e53649d50dade241e06dda2e

diff --git a/app-crypt/rhash/files/librhash-symlink.patch b/app-crypt/rhash/files/librhash-symlink.patch
deleted file mode 100644
index faba2fb..00000000
--- a/app-crypt/rhash/files/librhash-symlink.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 30c5897a7533b746388f44f3999ad2e23c529364 Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Fri, 16 Sep 2016 22:53:51 +0100
-Subject: [PATCH] Handle librhash.so symlink in shared Makefile rules, not
- static
-
----
- librhash/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/librhash/Makefile b/librhash/Makefile
-index a38073f..fc5e5c3 100644
---- a/librhash/Makefile
-+++ b/librhash/Makefile
-@@ -46,18 +46,18 @@ dist-clean: clean
- install-lib-static: $(LIBRARY) install-headers
- 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
- 	$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/
--	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
- 
- install-lib-shared: $(SONAME)
- 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
- 	$(INSTALL_SHARED) $(SONAME) $(DESTDIR)$(LIBDIR)/
-+	ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SOLINK)
- 
- uninstall-lib-static: uninstall-headers
- 	rm -f $(DESTDIR)$(LIBDIR)/$(LIBRARY)
--	rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
- 
- uninstall-lib-shared:
- 	rm -f $(DESTDIR)$(LIBDIR)/$(SONAME)
-+	rm -f $(DESTDIR)$(LIBDIR)/$(SOLINK)
- 
- install-headers:
- 	$(INSTALL) -d $(DESTDIR)$(INCDIR)
--- 
-2.8.2
-

diff --git a/app-crypt/rhash/rhash-1.3.3-r2.ebuild b/app-crypt/rhash/rhash-1.3.4.ebuild
similarity index 88%
rename from app-crypt/rhash/rhash-1.3.3-r2.ebuild
rename to app-crypt/rhash/rhash-1.3.4.ebuild
index 578f581..cd33ea8 100644
--- a/app-crypt/rhash/rhash-1.3.3-r2.ebuild
+++ b/app-crypt/rhash/rhash-1.3.4.ebuild
@@ -20,10 +20,6 @@ RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}
 	nls? ( sys-devel/gettext )"
 
-PATCHES=(
-	"${FILESDIR}"/librhash-symlink.patch
-)
-
 src_prepare() {
 	default
 
@@ -46,8 +42,7 @@ multilib_src_compile() {
 
 	emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
 		  ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \
-		  $(multilib_is_native_abi && echo build-shared || echo lib-shared) \
-		  $(use static-libs && echo lib-static)
+		  build-shared $(use static-libs && echo lib-static)
 }
 
 myemake() {
@@ -55,7 +50,7 @@ myemake() {
 }
 
 multilib_src_install() {
-	myemake install-lib-shared
+	myemake -C librhash install-lib-shared install-so-link
 	multilib_is_native_abi && myemake install-shared
 	use static-libs && myemake install-lib-static
 }


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

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/
@ 2018-03-18 21:03 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2018-03-18 21:03 UTC (permalink / raw
  To: gentoo-commits

commit:     2350d67513c290b62f755812407d3d4ffbab2ea2
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 18 20:25:08 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 18 21:03:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2350d675

app-crypt/rhash: Version bump to 1.3.6, new build system

The static Makefiles are now complemented with a hand-written
configure script. :| On the plus side, it does at least deal with all
the portability issues we had to hack around before.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-crypt/rhash/Manifest               |  1 +
 app-crypt/rhash/files/unquote-cc.patch | 26 +++++++++++++
 app-crypt/rhash/rhash-1.3.6.ebuild     | 67 ++++++++++++++++++++++++++++++++++
 3 files changed, 94 insertions(+)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index 8c56d4aa6cb..f3404d7c099 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1 +1,2 @@
 DIST rhash-1.3.5-src.tar.gz 316867 BLAKE2B 3ffbf2ec5aef24ef63455e21c3efcae043a321a78be522a26bd25086111430071a496ab3775ff9b4956da7304df8d8e552a061f3306a7a683be5fc65ea3fd1c4 SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c
+DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6

diff --git a/app-crypt/rhash/files/unquote-cc.patch b/app-crypt/rhash/files/unquote-cc.patch
new file mode 100644
index 00000000000..77ccc9b2c5f
--- /dev/null
+++ b/app-crypt/rhash/files/unquote-cc.patch
@@ -0,0 +1,26 @@
+From 4558d6753611ab1bf21765017e5b451aee8409f6 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 18 Mar 2018 14:23:28 +0000
+Subject: [PATCH] configure: Don't quote $CC when calling it
+
+It might have additional arguments.
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index f480f7b..8ebb929 100755
+--- a/configure
++++ b/configure
+@@ -480,7 +480,7 @@ if test "$(basename $CC)" = "icc" || test "$(basename $CC)" = "ecc"; then
+ else
+   CC_TMP="$CC"
+   for CC in "$CC_TMP" gcc cc ; do
+-    if "$CC" -v >/dev/null 2>&1; then
++    if $CC -v >/dev/null 2>&1; then
+       cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
+       if test "$cc_name_tmp" = "gcc"; then
+         cc_name=$cc_name_tmp
+-- 
+2.16.1
+

diff --git a/app-crypt/rhash/rhash-1.3.6.ebuild b/app-crypt/rhash/rhash-1.3.6.ebuild
new file mode 100644
index 00000000000..5680b2872ad
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.3.6.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs multilib-minimal
+
+DESCRIPTION="Console utility and library for computing and verifying file hash sums"
+HOMEPAGE="http://rhash.anz.ru/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="debug nls openssl static-libs"
+
+RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}
+	nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/RHash-${PV}"
+
+PATCHES=(
+	"${FILESDIR}"/unquote-cc.patch
+)
+
+src_prepare() {
+	default
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	set -- \
+		./configure \
+		--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 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-so-link,-pkg-config} \
+		  $(use nls && echo install-gmo)
+}
+
+multilib_src_test() {
+	emake test
+}


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

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

commit:     1cdc359aa073e986fe37a90047701e541612ca72
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  8 23:10:13 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Aug  8 23:10:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cdc359a

app-crypt/rhash: Fix triplet issues and restore fbsd/macos keywords

I was waiting for upstream to release the fix but that is taking a
while so I've patched it.

Closes: https://bugs.gentoo.org/651334
Package-Manager: Portage-2.3.45, Repoman-2.3.10

 app-crypt/rhash/files/darwin-triplet.patch  | 23 +++++++++++++++++++++++
 app-crypt/rhash/files/freebsd-triplet.patch | 23 +++++++++++++++++++++++
 app-crypt/rhash/rhash-1.3.6-r1.ebuild       |  3 ++-
 3 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/app-crypt/rhash/files/darwin-triplet.patch b/app-crypt/rhash/files/darwin-triplet.patch
new file mode 100644
index 00000000000..49b7e121d81
--- /dev/null
+++ b/app-crypt/rhash/files/darwin-triplet.patch
@@ -0,0 +1,23 @@
+From 35a830d1968465e4ecb079273f032b754bac6c66 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 25 Mar 2018 17:40:49 +0100
+Subject: [PATCH] configure: Add target OS clause for Darwin
+
+These triplets can also have a version number suffix, for example,
+x86_64-apple-darwin16.
+---
+ configure | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure b/configure
+index 5b6b710..2d8ac42 100755
+--- a/configure
++++ b/configure
+@@ -410,6 +410,7 @@ else
+       amigaos) TARGET_OS=AmigaOS ;;
+       mingw32*) TARGET_OS=MINGW32 ;;
+       wine) TARGET_OS=Wine ;;
++      darwin*) TARGET_OS=Darwin ;;
+     esac
+   }
+   TARGET_OS="UNKNOWN"

diff --git a/app-crypt/rhash/files/freebsd-triplet.patch b/app-crypt/rhash/files/freebsd-triplet.patch
new file mode 100644
index 00000000000..94b615824be
--- /dev/null
+++ b/app-crypt/rhash/files/freebsd-triplet.patch
@@ -0,0 +1,23 @@
+From 14db7f9ee87e05450853ba0e1d8e83cc34aef3e4 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@aura-online.co.uk>
+Date: Sat, 24 Mar 2018 13:51:56 +0000
+Subject: [PATCH] configure: Match FreeBSD triplets with versions
+
+Triplets such as x86_64-unknown-freebsd11.1 are common.
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 8ebb929..5b6b710 100755
+--- a/configure
++++ b/configure
+@@ -398,7 +398,7 @@ else
+     part=$(echo $BUILD_TARGET | cut -d '-' -f $component)
+     case "$(echo $part | tr '[A-Z]' '[a-z]')" in
+       linux) TARGET_OS=Linux ;;
+-      freebsd) TARGET_OS=FreeBSD ;;
++      freebsd*) TARGET_OS=FreeBSD ;;
+       gnu/kfreebsd) TARGET_OS=FreeBSD ;;
+       netbsd) TARGET_OS=NetBSD ;;
+       bsd/os) TARGET_OS=BSD/OS ;;

diff --git a/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
index b2d4ec528a7..71e3618548a 100644
--- a/app-crypt/rhash/rhash-1.3.6-r1.ebuild
+++ b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
 IUSE="debug nls libressl ssl static-libs"
 
 RDEPEND="
@@ -28,6 +28,7 @@ S="${WORKDIR}/RHash-${PV}"
 PATCHES=(
 	"${FILESDIR}"/unquote-cc.patch
 	"${FILESDIR}"/${P}-no_echon.patch
+	"${FILESDIR}"/{freebsd,darwin}-triplet.patch
 )
 
 src_prepare() {


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

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/
@ 2020-01-08 14:47 Louis Sautier
  0 siblings, 0 replies; 8+ messages in thread
From: Louis Sautier @ 2020-01-08 14:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f2e931ec5a047e3b15981c02147a42449c101804
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  8 14:07:10 2020 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Wed Jan  8 14:47:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2e931ec

app-crypt/rhash: fix another problem with recursive checks

Bug: https://github.com/rhash/RHash/issues/106
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 .../rhash/files/rhash-1.3.9-rc-segfault.patch      | 243 +++++++++++++++++++--
 ...rhash-1.3.9-r1.ebuild => rhash-1.3.9-r2.ebuild} |   8 +-
 2 files changed, 229 insertions(+), 22 deletions(-)

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
index 90a1efecbb1..a2052c67bbf 100644
--- a/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
+++ b/app-crypt/rhash/files/rhash-1.3.9-rc-segfault.patch
@@ -1,25 +1,230 @@
-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/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..0d18f45 100644
+index 6f593f9..2f0eb2a 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);
+@@ -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 (!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;
+-		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.9-r1.ebuild b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
similarity index 88%
rename from app-crypt/rhash/rhash-1.3.9-r1.ebuild
rename to app-crypt/rhash/rhash-1.3.9-r2.ebuild
index e203d68814e..861a75662e4 100644
--- a/app-crypt/rhash/rhash-1.3.9-r1.ebuild
+++ b/app-crypt/rhash/rhash-1.3.9-r2.ebuild
@@ -32,6 +32,8 @@ 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
 )
 
@@ -69,9 +71,9 @@ multilib_src_configure() {
 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)
+		install{,-lib-headers,-pkg-config} \
+		$(use nls && echo install-gmo) \
+		$(use kernel_Winnt || echo install-lib-so-link)
 }
 
 multilib_src_test() {


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

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/
@ 2022-03-17  9:09 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2022-03-17  9:09 UTC (permalink / raw
  To: gentoo-commits

commit:     4da4d9e965b8d1c2956f965a55254156d836353a
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 09:09:04 2022 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 09:09:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4da4d9e9

app-crypt/rhash: Drop old 1.3.6-r1

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-crypt/rhash/Manifest                         |  1 -
 app-crypt/rhash/files/darwin-triplet.patch       | 23 -------
 app-crypt/rhash/files/freebsd-triplet.patch      | 23 -------
 app-crypt/rhash/files/rhash-1.3.6-no_echon.patch | 54 -----------------
 app-crypt/rhash/files/unquote-cc.patch           | 26 --------
 app-crypt/rhash/rhash-1.3.6-r1.ebuild            | 77 ------------------------
 6 files changed, 204 deletions(-)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index 29794e046d24..c7f090cb2139 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1,2 +1 @@
-DIST rhash-1.3.6-src.tar.gz 328097 BLAKE2B c74993d183f0f2e479f0bd5831a9f653b9bd17bbed4d1ba896f6e33db98b7141175cd3c688dc41dfd8ec4b98acb51255ae5b795435cbc9dfb5ab77573cb25543 SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6
 DIST rhash-1.4.2-src.tar.gz 416853 BLAKE2B 06322825116cb00aa4987b01610d967eb57c94aa29b43348ec2c31f053fd471a900fcee776714263213e9a79eaf389b2e79d7b34a5afd3e98d68198193b5cbe7 SHA512 41df57e8b3f32c93d8e6f2ac668b32aaa23eb2eaf90a83f109e61e511404a5036ea88bcf2854e19c1ade0f61960e0d9edf01f3d82e1c645fed36579e9d7a6a25

diff --git a/app-crypt/rhash/files/darwin-triplet.patch b/app-crypt/rhash/files/darwin-triplet.patch
deleted file mode 100644
index 49b7e121d818..000000000000
--- a/app-crypt/rhash/files/darwin-triplet.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 35a830d1968465e4ecb079273f032b754bac6c66 Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Sun, 25 Mar 2018 17:40:49 +0100
-Subject: [PATCH] configure: Add target OS clause for Darwin
-
-These triplets can also have a version number suffix, for example,
-x86_64-apple-darwin16.
----
- configure | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure b/configure
-index 5b6b710..2d8ac42 100755
---- a/configure
-+++ b/configure
-@@ -410,6 +410,7 @@ else
-       amigaos) TARGET_OS=AmigaOS ;;
-       mingw32*) TARGET_OS=MINGW32 ;;
-       wine) TARGET_OS=Wine ;;
-+      darwin*) TARGET_OS=Darwin ;;
-     esac
-   }
-   TARGET_OS="UNKNOWN"

diff --git a/app-crypt/rhash/files/freebsd-triplet.patch b/app-crypt/rhash/files/freebsd-triplet.patch
deleted file mode 100644
index 94b615824be7..000000000000
--- a/app-crypt/rhash/files/freebsd-triplet.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 14db7f9ee87e05450853ba0e1d8e83cc34aef3e4 Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@aura-online.co.uk>
-Date: Sat, 24 Mar 2018 13:51:56 +0000
-Subject: [PATCH] configure: Match FreeBSD triplets with versions
-
-Triplets such as x86_64-unknown-freebsd11.1 are common.
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 8ebb929..5b6b710 100755
---- a/configure
-+++ b/configure
-@@ -398,7 +398,7 @@ else
-     part=$(echo $BUILD_TARGET | cut -d '-' -f $component)
-     case "$(echo $part | tr '[A-Z]' '[a-z]')" in
-       linux) TARGET_OS=Linux ;;
--      freebsd) TARGET_OS=FreeBSD ;;
-+      freebsd*) TARGET_OS=FreeBSD ;;
-       gnu/kfreebsd) TARGET_OS=FreeBSD ;;
-       netbsd) TARGET_OS=NetBSD ;;
-       bsd/os) TARGET_OS=BSD/OS ;;

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
deleted file mode 100644
index 9b25b29a89f3..000000000000
--- a/app-crypt/rhash/files/rhash-1.3.6-no_echon.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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/files/unquote-cc.patch b/app-crypt/rhash/files/unquote-cc.patch
deleted file mode 100644
index 77ccc9b2c5f7..000000000000
--- a/app-crypt/rhash/files/unquote-cc.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 4558d6753611ab1bf21765017e5b451aee8409f6 Mon Sep 17 00:00:00 2001
-From: James Le Cuirot <chewi@gentoo.org>
-Date: Sun, 18 Mar 2018 14:23:28 +0000
-Subject: [PATCH] configure: Don't quote $CC when calling it
-
-It might have additional arguments.
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index f480f7b..8ebb929 100755
---- a/configure
-+++ b/configure
-@@ -480,7 +480,7 @@ if test "$(basename $CC)" = "icc" || test "$(basename $CC)" = "ecc"; then
- else
-   CC_TMP="$CC"
-   for CC in "$CC_TMP" gcc cc ; do
--    if "$CC" -v >/dev/null 2>&1; then
-+    if $CC -v >/dev/null 2>&1; then
-       cc_name_tmp=$($CC -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
-       if test "$cc_name_tmp" = "gcc"; then
-         cc_name=$cc_name_tmp
--- 
-2.16.1
-

diff --git a/app-crypt/rhash/rhash-1.3.6-r1.ebuild b/app-crypt/rhash/rhash-1.3.6-r1.ebuild
deleted file mode 100644
index 9dfdd81943a2..000000000000
--- a/app-crypt/rhash/rhash-1.3.6-r1.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
-IUSE="debug nls ssl static-libs"
-
-RDEPEND="
-	ssl? (
-		dev-libs/openssl:0=[${MULTILIB_USEDEP}]
-)"
-
-DEPEND="${RDEPEND}
-	nls? ( sys-devel/gettext )"
-
-S="${WORKDIR}/RHash-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/unquote-cc.patch
-	"${FILESDIR}"/${P}-no_echon.patch
-	"${FILESDIR}"/{freebsd,darwin}-triplet.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{,-pkg-config} \
-		  $(use nls && echo install-gmo) \
-		  $(use kernel_Winnt || echo install-lib-so-link)
-
-	emake DESTDIR="${D}" -j1 \
-		  -C lib${PN} install-headers
-}
-
-multilib_src_test() {
-	emake test
-}


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

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/
@ 2023-02-09 21:51 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2023-02-09 21:51 UTC (permalink / raw
  To: gentoo-commits

commit:     e122a052af9717ce76e8e2bd0de17d9ca19bc9a3
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Feb  9 21:51:44 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Feb  9 21:51:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e122a052

app-crypt/rhash: Drop old 1.4.2

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-crypt/rhash/Manifest                      |  1 -
 app-crypt/rhash/files/rhash-1.4.2-clang.patch | 80 -----------------------
 app-crypt/rhash/rhash-1.4.2.ebuild            | 93 ---------------------------
 3 files changed, 174 deletions(-)

diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index 9211a10f3293..e243bbfc4bbc 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1,2 +1 @@
-DIST rhash-1.4.2-src.tar.gz 416853 BLAKE2B 06322825116cb00aa4987b01610d967eb57c94aa29b43348ec2c31f053fd471a900fcee776714263213e9a79eaf389b2e79d7b34a5afd3e98d68198193b5cbe7 SHA512 41df57e8b3f32c93d8e6f2ac668b32aaa23eb2eaf90a83f109e61e511404a5036ea88bcf2854e19c1ade0f61960e0d9edf01f3d82e1c645fed36579e9d7a6a25
 DIST rhash-1.4.3-src.tar.gz 429290 BLAKE2B d225aeae0b3a8fb2e093a9aef50cd07a790c7e9734e91114deef2ca8492c85261b8ed5dea45958e35e049ea888885175608962ea72297bdef48b00c52f51eaca SHA512 d87ffcde28d8f25cf775c279fed457e52d24523ed9b695629dae694b3c22372247d18f6032f8ce13a0b70fa2953be408982e46659daaa7c4ab227ae89eaed9c7

diff --git a/app-crypt/rhash/files/rhash-1.4.2-clang.patch b/app-crypt/rhash/files/rhash-1.4.2-clang.patch
deleted file mode 100644
index 460e73a6ace7..000000000000
--- a/app-crypt/rhash/files/rhash-1.4.2-clang.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-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
deleted file mode 100644
index 85a78659e4d4..000000000000
--- a/app-crypt/rhash/rhash-1.4.2.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic 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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug nls ssl static-libs"
-
-RDEPEND="
-	ssl? (
-		dev-libs/openssl:0=[${MULTILIB_USEDEP}]
-)"
-
-DEPEND="
-	${RDEPEND}
-"
-
-BDEPEND="
-	nls? ( sys-devel/gettext )
-"
-
-S="${WORKDIR}/RHash-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-clang.patch
-)
-
-src_prepare() {
-	default
-
-	if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then
-		# we lack posix_memalign
-		sed -i -e '/if _POSIX_VERSION/s/if .*$/if 0/' \
-			librhash/util.h || die
-	fi
-
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	# ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
-	# https://github.com/gentoo/gentoo/pull/28355
-	# mold needs this too but right now tc-ld-is-mold is also not available
-	if tc-ld-is-lld; then
-		append-ldflags -Wl,--undefined-version
-	fi
-
-	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. :(
-# (note from sam: this might be fixed in >1.4.2?
-#  https://github.com/rhash/RHash/commit/9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261)
-
-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] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/
@ 2023-08-16  6:51 James Le Cuirot
  0 siblings, 0 replies; 8+ messages in thread
From: James Le Cuirot @ 2023-08-16  6:51 UTC (permalink / raw
  To: gentoo-commits

commit:     74c411795d3f134255c42bfcd3f6863eda2a0517
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 16 06:51:09 2023 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 16 06:51:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74c41179

app-crypt/rhash: Apply upstream patch to fix prefix re libintl

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

 app-crypt/rhash/files/rhash-1.4.4-prefix.patch | 22 ++++++++++++++++++++++
 app-crypt/rhash/rhash-1.4.4.ebuild             |  4 ++++
 2 files changed, 26 insertions(+)

diff --git a/app-crypt/rhash/files/rhash-1.4.4-prefix.patch b/app-crypt/rhash/files/rhash-1.4.4-prefix.patch
new file mode 100644
index 000000000000..ce2e72bf149e
--- /dev/null
+++ b/app-crypt/rhash/files/rhash-1.4.4-prefix.patch
@@ -0,0 +1,22 @@
+From c804982d1b24c6533118b3068d2cfdca685076f3 Mon Sep 17 00:00:00 2001
+From: Aleksey Kravchenko <rhash.admin@gmail.com>
+Date: Mon, 7 Aug 2023 01:00:37 +0300
+Subject: [PATCH] Fix #243: Incorrect assigment in the configure script
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 39ef8c1b..63cbd8d0 100755
+--- a/configure
++++ b/configure
+@@ -877,7 +877,7 @@ if test "$OPT_STATIC" = "no"; then
+   RHASH_TEST_OPTIONS=--shared
+   test "$INSTALL_LIB_SHARED" = "auto" && INSTALL_LIB_SHARED=yes
+   test "$INSTALL_LIB_STATIC" = "yes"  && RHASH_BUILD_TARGETS="$RHASH_BUILD_TARGETS \$(LIBRHASH_STATIC)"
+-  RHASH_LDFLAGS=$RHASH_LDFLAGS $GETTEXT_LDFLAGS
++  RHASH_LDFLAGS=$(join_params $RHASH_LDFLAGS $GETTEXT_LDFLAGS)
+ else
+   LIBRHASH_TYPE=static
+   LIBRHASH_PATH="\$(LIBRHASH_STATIC)"

diff --git a/app-crypt/rhash/rhash-1.4.4.ebuild b/app-crypt/rhash/rhash-1.4.4.ebuild
index b56bd78dac70..165ca9e3ba4a 100644
--- a/app-crypt/rhash/rhash-1.4.4.ebuild
+++ b/app-crypt/rhash/rhash-1.4.4.ebuild
@@ -29,6 +29,10 @@ BDEPEND="
 
 S="${WORKDIR}/RHash-${PV}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-prefix.patch
+)
+
 src_prepare() {
 	default
 


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

end of thread, other threads:[~2023-08-16  6:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-08 14:47 [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/files/, app-crypt/rhash/ Louis Sautier
  -- strict thread matches above, loose matches on Subject: below --
2023-08-16  6:51 James Le Cuirot
2023-02-09 21:51 James Le Cuirot
2022-03-17  9:09 James Le Cuirot
2018-08-08 23:11 James Le Cuirot
2018-03-18 21:03 James Le Cuirot
2016-11-16 22:49 James Le Cuirot
2016-09-16 22:03 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