public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/
Date: Fri, 16 Sep 2016 21:27:10 +0000 (UTC)	[thread overview]
Message-ID: <1474061207.c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a.chewi@gentoo> (raw)

commit:     c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 16 21:24:33 2016 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> 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 @@
 		<remote-id type="github">rhash/RHash</remote-id>
 		<bugs-to>https://github.com/rhash/RHash/issues</bugs-to>
 	</upstream>
+	<use>
+		<flag name='openssl'>Add support for hashes from dev-libs/openssl</flag>
+	</use>
 	<longdescription lang="en">
 		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.
 	</longdescription>

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
-}


             reply	other threads:[~2016-09-16 21:27 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 21:27 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-08  1:37 [gentoo-commits] repo/gentoo:master commit in: app-crypt/rhash/ Sam James
2025-02-22 23:48 Sam James
2025-01-30 18:47 Jakov Smolić
2025-01-30 18:47 Jakov Smolić
2025-01-30 10:09 Arthur Zamarin
2025-01-30 10:09 Arthur Zamarin
2025-01-30 10:09 Arthur Zamarin
2025-01-30 10:09 Arthur Zamarin
2024-10-19 21:45 James Le Cuirot
2024-10-08 14:06 James Le Cuirot
2024-10-08 12:50 Sam James
2024-09-24 15:22 Sam James
2024-09-23  7:13 Arthur Zamarin
2024-09-23  6:02 Arthur Zamarin
2024-09-23  6:02 Arthur Zamarin
2024-09-23  6:02 Arthur Zamarin
2024-09-23  0:32 Sam James
2024-09-23  0:32 Sam James
2024-01-03 10:40 Sam James
2023-10-30 11:29 Sam James
2023-09-10 11:38 Fabian Groffen
2023-08-04  8:21 James Le Cuirot
2023-08-03 20:47 James Le Cuirot
2023-06-25 19:17 Sam James
2023-05-30 13:55 Fabian Groffen
2023-02-07  2:53 Sam James
2023-02-04 10:58 Sam James
2023-02-04 10:58 Sam James
2023-02-04 10:58 Sam James
2023-02-04  6:47 Arthur Zamarin
2023-02-04  6:47 Arthur Zamarin
2023-02-04  6:47 Arthur Zamarin
2023-02-04  6:47 Arthur Zamarin
2023-01-14 19:17 Sam James
2022-06-18  8:43 James Le Cuirot
2022-04-29  7:59 WANG Xuerui
2022-03-16 15:18 Sam James
2022-03-06  7:58 Sam James
2022-03-06  7:35 Sam James
2022-02-27 12:29 Jakov Smolić
2022-02-27 12:23 Jakov Smolić
2021-11-19  8:34 Sam James
2021-10-16 23:10 James Le Cuirot
2021-09-20 14:09 James Le Cuirot
2021-07-17  7:02 James Le Cuirot
2021-07-17  7:02 James Le Cuirot
2021-05-02 17:22 Mikle Kolyada
2021-01-28 19:31 Fabian Groffen
2021-01-07 21:48 James Le Cuirot
2021-01-06 12:55 Fabian Groffen
2020-12-18 14:49 Fabian Groffen
2020-08-17 22:21 James Le Cuirot
2019-08-05 23:55 Göktürk Yüksek
2019-08-04 18:42 James Le Cuirot
2019-08-04 18:42 James Le Cuirot
2019-06-13 13:07 Michael Haubenwallner
2019-06-13 13:07 Michael Haubenwallner
2019-03-03 10:43 James Le Cuirot
2019-01-14 18:32 Fabian Groffen
2019-01-13 20:01 James Le Cuirot
2019-01-13 16:35 James Le Cuirot
2019-01-09 15:12 Michael Haubenwallner
2018-12-01 15:05 Sergei Trofimovich
2018-11-13 20:23 Sergei Trofimovich
2018-09-13 21:35 James Le Cuirot
2018-09-13 19:23 Tobias Klausmann
2018-08-21 10:06 Mart Raudsepp
2018-08-17  0:33 Mikle Kolyada
2018-08-17  0:33 Mikle Kolyada
2018-08-16  0:39 Thomas Deutschmann
2018-08-11 18:55 Sergei Trofimovich
2018-08-08 22:04 Mikle Kolyada
2018-06-03 18:01 Mikle Kolyada
2018-04-28 22:27 Aaron Bauman
2018-03-25 18:53 James Le Cuirot
2018-03-24  8:28 Michał Górny
2018-03-22 21:07 James Le Cuirot
2018-03-02 16:09 Mart Raudsepp
2018-01-09  7:56 Fabian Groffen
2017-12-05  5:44 Markus Meier
2017-11-26 17:06 James Le Cuirot
2017-11-08 21:33 James Le Cuirot
2017-10-23 12:30 Michael Palimaka
2017-10-21 13:25 Tobias Klausmann
2017-10-15 22:27 Manuel Rüger
2017-10-14 17:20 Sergei Trofimovich
2017-10-13 12:03 Sergei Trofimovich
2017-10-13 11:31 Sergei Trofimovich
2017-09-12  7:26 Sergei Trofimovich
2017-09-12  7:26 Sergei Trofimovich
2017-09-02 12:58 James Le Cuirot
2017-09-02 12:38 James Le Cuirot
2017-09-02 12:38 James Le Cuirot
2017-08-17 21:12 James Le Cuirot
2017-08-10 20:34 Sergei Trofimovich
2017-06-30  7:08 Sergei Trofimovich
2017-06-20 12:48 Fabian Groffen
2017-06-15 14:23 Anthony G. Basile
2017-06-15 11:26 Alexis Ballier
2017-04-13 18:34 Fabian Groffen
2017-04-13 12:46 Fabian Groffen
2017-02-14 13:28 Jeroen Roovers
2017-02-14 13:28 Jeroen Roovers
2017-02-14 10:42 Tobias Klausmann
2017-02-10 21:11 James Le Cuirot
2017-02-10 21:11 James Le Cuirot
2016-09-16 21:27 James Le Cuirot
2016-07-21 16:19 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474061207.c7c3e65f4e8bf5529ba68964106ec22cdba3eb2a.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox