aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2017-04-13 17:58:18 -0700
committerAric Belsito <lluixhi@gmail.com>2017-04-13 17:58:18 -0700
commiteb00fad5a12c231f25191860368166f9f885f61a (patch)
tree02387b591b7753a9b9a3c8cc0b04b232cad82b29 /app-crypt
parentnet-libs/nodejs: version bump to 7.9.0 (diff)
downloadlibressl-eb00fad5a12c231f25191860368166f9f885f61a.tar.gz
libressl-eb00fad5a12c231f25191860368166f9f885f61a.tar.bz2
libressl-eb00fad5a12c231f25191860368166f9f885f61a.zip
app-crypt/rhash: add most recent version
required for cmake >=3.8.0 uses the same USE semantics as net-libs/libsrtp
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/rhash/Manifest1
-rw-r--r--app-crypt/rhash/metadata.xml27
-rw-r--r--app-crypt/rhash/rhash-1.3.4.ebuild94
3 files changed, 122 insertions, 0 deletions
diff --git a/app-crypt/rhash/Manifest b/app-crypt/rhash/Manifest
new file mode 100644
index 0000000..13d53c9
--- /dev/null
+++ b/app-crypt/rhash/Manifest
@@ -0,0 +1 @@
+DIST rhash-1.3.4-src.tar.gz 249357 SHA256 406662c4703bd4cb1caae26f32700951a5e12adf39f141d3f40e0b461b1e9e49 SHA512 a78be309011798d5e55023eb93f898c10254a42270288fa5ec68ad446b5f3d001e8c6f893683e5171e3858c86d45ce2ce16eefde1173209e1925420c27a7ff7a WHIRLPOOL 5883dcbf0c2bf51036434d1906b85b615eae65ef2729a68d7ac637e2bea3c494cd3ee7fa9a60d3c4f3241bc4fd5c62c8f7e058c0e53649d50dade241e06dda2e
diff --git a/app-crypt/rhash/metadata.xml b/app-crypt/rhash/metadata.xml
new file mode 100644
index 0000000..44a7a98
--- /dev/null
+++ b/app-crypt/rhash/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sautier.louis@gmail.com</email>
+ <name>Louis Sautier</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">rhash</remote-id>
+ <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>
+</pkgmetadata>
diff --git a/app-crypt/rhash/rhash-1.3.4.ebuild b/app-crypt/rhash/rhash-1.3.4.ebuild
new file mode 100644
index 0000000..6398323
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.3.4.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2017 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 ~hppa ~ppc64 ~x86 ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="debug nls libressl openssl static-libs"
+
+RDEPEND="
+openssl? (
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0= )
+)"
+
+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
+
+ # Install /etc stuff inside the Prefix
+ sed -i -e 's:\$(DESTDIR)/etc:\$(DESTDIR)/$(SYSCONFDIR):g' Makefile || die
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local ver_script='-Wl,--version-script,exports.sym,-soname,$(SONAME)'
+ local install_name='-install_name $(LIBDIR)/$(SONAME)'
+ sed -i -e '/^\(SONAME\|SHAREDLIB\)/s/\.so\.\([0-9]\+\)/.\1.dylib/' \
+ -e '/^SOLINK/s/\.so/.dylib/' \
+ -e "s:${ver_script}:${install_name}:" \
+ librhash/Makefile \
+ Makefile || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=12548
+ # skip the export.sym for now
+ sed -i -e 's/,--version-script,exports.sym//' librhash/Makefile || die
+ fi
+
+ 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)
+ )
+
+ [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] \
+ && ADDLDFLAGS+=( $(use nls && echo -lintl) )
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" \
+ ADDCFLAGS="${ADDCFLAGS[*]}" ADDLDFLAGS="${ADDLDFLAGS[*]}" \
+ PREFIX="${EPREFIX}"/usr LIBDIR='$(PREFIX)'/$(get_libdir) \
+ build-shared $(use static-libs && echo lib-static)
+}
+
+myemake() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \
+ LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}"
+}
+
+multilib_src_install() {
+ myemake -C librhash install-lib-shared install-so-link
+ 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() {
+ cd tests || die
+ LD_LIBRARY_PATH=$(pwd)/../librhash ./test_rhash.sh --full ../rhash_shared || die "tests failed"
+}