From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 93A7E138331 for ; Fri, 16 Sep 2016 21:27:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8FFBAE0B22; Fri, 16 Sep 2016 21:27:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2ECC1E0B5A for ; Fri, 16 Sep 2016 21:27:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32048340BE0 for ; Fri, 16 Sep 2016 21:27:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 644152485 for ; Fri, 16 Sep 2016 21:27:10 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1474061207.c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/rhash/metadata.xml app-crypt/rhash/rhash-1.3.3-r1.ebuild app-crypt/rhash/rhash-1.3.3.ebuild X-VCS-Directories: app-crypt/rhash/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a X-VCS-Branch: master Date: Fri, 16 Sep 2016 21:27:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2c62f7bf-0e36-4f71-a41e-07280eb51046 X-Archives-Hash: c11955817d169c3994ac81d81ac2e5b5 commit: c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a Author: James Le Cuirot gentoo org> AuthorDate: Fri Sep 16 21:24:33 2016 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Fri Sep 16 21:26:47 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7c3e65f app-crypt/rhash: Install libs, respect flags, nls, openssl, tests * Install the shared and (optionally) static libraries. * Multilib support for the libraries. * Respect CC, CFLAGS, LDFLAGS. * gettext support via nls flag. * Additional hash support via openssl. * Passing test suite. * Disable debug by default. These changes were made with sbraz's blessing. Thanks to Raimonds Cicans for the initial work behind this. Package-Manager: portage-2.3.0 app-crypt/rhash/metadata.xml | 3 ++ app-crypt/rhash/rhash-1.3.3-r1.ebuild | 59 +++++++++++++++++++++++++++++++++++ app-crypt/rhash/rhash-1.3.3.ebuild | 19 ----------- 3 files changed, 62 insertions(+), 19 deletions(-) diff --git a/app-crypt/rhash/metadata.xml b/app-crypt/rhash/metadata.xml index f9ec359..44a7a98 100644 --- a/app-crypt/rhash/metadata.xml +++ b/app-crypt/rhash/metadata.xml @@ -18,6 +18,9 @@ rhash/RHash https://github.com/rhash/RHash/issues + + Add support for hashes from dev-libs/openssl + RHash is a console utility for calculation and verification of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru. diff --git a/app-crypt/rhash/rhash-1.3.3-r1.ebuild b/app-crypt/rhash/rhash-1.3.3-r1.ebuild new file mode 100644 index 00000000..585a54a --- /dev/null +++ b/app-crypt/rhash/rhash-1.3.3-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="~amd64 ~x86" +IUSE="debug nls openssl static-libs" + +RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )" + +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +src_prepare() { + default + + # Exit on test failure or src_test will always succeed. + sed -i "s/return 1/exit 1/g" tests/test_rhash.sh || die + + multilib_copy_sources +} + +multilib_src_compile() { + local ADDCFLAGS=( + $(use debug || echo -DNDEBUG) + $(use nls && echo -DUSE_GETTEXT) + $(use openssl && echo -DOPENSSL_RUNTIME -rdynamic) + ) + + local ADDLDFLAGS=( + $(use openssl && echo -ldl) + ) + + 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) +} + +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) +} + +multilib_src_test() { + cd tests || die + ./test_rhash.sh --full ../rhash_shared || die "tests failed" +} diff --git a/app-crypt/rhash/rhash-1.3.3.ebuild b/app-crypt/rhash/rhash-1.3.3.ebuild deleted file mode 100644 index b11f9cf..00000000 --- a/app-crypt/rhash/rhash-1.3.3.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -DESCRIPTION="Console utility for computing and verifying hash sums of files" -HOMEPAGE="http://rhash.anz.ru/" -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -src_install() { - emake DESTDIR="${D}" PREFIX=/usr install - einstalldocs -}