summaryrefslogtreecommitdiff
path: root/app-crypt/rhash/rhash-1.4.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-08-03 22:54:31 +0100
commitb0ebd12de22226fd7b69140ccd700efda3eb5fa6 (patch)
treeefcf8d59607e53b8bf2fb453629b05bea28cc3ce /app-crypt/rhash/rhash-1.4.4.ebuild
parent99547b97ff461f107e03ed5323b6286a66677bce (diff)
gentoo auto-resync : 03:08:2023 - 22:54:30
Diffstat (limited to 'app-crypt/rhash/rhash-1.4.4.ebuild')
-rw-r--r--app-crypt/rhash/rhash-1.4.4.ebuild89
1 files changed, 89 insertions, 0 deletions
diff --git a/app-crypt/rhash/rhash-1.4.4.ebuild b/app-crypt/rhash/rhash-1.4.4.ebuild
new file mode 100644
index 000000000000..7992769880b4
--- /dev/null
+++ b/app-crypt/rhash/rhash-1.4.4.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic 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/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-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() {
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ 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) \
+ install-lib-so-link
+}
+
+multilib_src_test() {
+ emake test
+}