diff options
author | James Le Cuirot <chewi@gentoo.org> | 2017-08-17 22:11:34 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2017-08-17 22:12:13 +0100 |
commit | a1adcb8b57981d655468a651d7a51aa641f4c3c3 (patch) | |
tree | 495bdd3e35638679a168d0d0557249564cf46279 /app-crypt/rhash/rhash-1.3.5.ebuild | |
parent | app-vim/vimagit: version bump to 1.7.2 (diff) | |
download | gentoo-a1adcb8b57981d655468a651d7a51aa641f4c3c3.tar.gz gentoo-a1adcb8b57981d655468a651d7a51aa641f4c3c3.tar.bz2 gentoo-a1adcb8b57981d655468a651d7a51aa641f4c3c3.zip |
app-crypt/rhash: Version bump to 1.3.5, fixes bug #617548
My BSD build fixes were merged upstream.
Package-Manager: Portage-2.3.8, Repoman-2.3.2
Diffstat (limited to 'app-crypt/rhash/rhash-1.3.5.ebuild')
-rw-r--r-- | app-crypt/rhash/rhash-1.3.5.ebuild | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/app-crypt/rhash/rhash-1.3.5.ebuild b/app-crypt/rhash/rhash-1.3.5.ebuild new file mode 100644 index 000000000000..e1ea23cd4fc4 --- /dev/null +++ b/app-crypt/rhash/rhash-1.3.5.ebuild @@ -0,0 +1,89 @@ +# 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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="debug nls openssl static-libs" + +RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )" + +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +S="${WORKDIR}/RHash-${PV}" + +src_prepare() { + default + + # 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" +} |