summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-crypt/rhash/Manifest1
-rw-r--r--app-crypt/rhash/rhash-1.4.3.ebuild82
2 files changed, 83 insertions, 0 deletions
diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
index c7f090cb2139..9211a10f3293 100644
--- a/app-crypt/rhash/Manifest
+++ b/app-crypt/rhash/Manifest
@@ -1 +1,2 @@
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/rhash-1.4.3.ebuild b/app-crypt/rhash/rhash-1.4.3.ebuild
new file mode 100644
index 000000000000..3836fca5035c
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.4.3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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 ~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}"
+
+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() {
+ 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"
+}
+
+multilib_src_compile() {
+ emake all \
+ $(multilib_is_native_abi && use nls && echo compile-gmo)
+}
+
+multilib_src_install() {
+ # -j1 needed due to race condition.
+ emake DESTDIR="${D}" -j1 \
+ install{,-lib-headers,-pkg-config} \
+ $(multilib_is_native_abi && use nls && echo install-gmo) \
+ $(use kernel_Winnt || echo install-lib-so-link)
+}
+
+multilib_src_test() {
+ emake test
+}