1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs multilib-minimal
8 DESCRIPTION="Console utility and library for computing and verifying file hash sums"
9 HOMEPAGE="http://rhash.anz.ru/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
14 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
15 IUSE="debug nls libressl ssl static-libs"
19 !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
20 libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
24 nls? ( sys-devel/gettext )"
26 S="${WORKDIR}/RHash-${PV}"
29 "${FILESDIR}"/unquote-cc.patch
30 "${FILESDIR}"/${P}-no_echon.patch
31 "${FILESDIR}"/{freebsd,darwin}-triplet.patch
39 multilib_src_configure() {
45 --extra-cflags="${CFLAGS}" \
46 --extra-ldflags="${LDFLAGS}" \
47 --prefix="${EPREFIX}"/usr \
48 --libdir="${EPREFIX}"/usr/$(get_libdir) \
49 --sysconfdir="${EPREFIX}"/etc \
50 --disable-openssl-runtime \
54 $(use_enable nls gettext) \
55 $(use_enable ssl openssl) \
56 $(use_enable static-libs lib-static)
59 "${@}" || die "configure failed"
62 # We would add compile-gmo to the build targets but install-gmo always
63 # recompiles unconditionally. :(
65 multilib_src_install() {
66 # -j1 needed due to race condition.
67 emake DESTDIR="${D}" -j1 \
68 install{,-pkg-config} \
69 $(use nls && echo install-gmo) \
70 $(use kernel_Winnt || echo install-lib-so-link)
72 emake DESTDIR="${D}" -j1 \
73 -C lib${PN} install-headers