summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2017-04-13 14:45:12 +0200
committerFabian Groffen <grobian@gentoo.org>2017-04-13 14:46:07 +0200
commit0cc7a7d8a5cd7f5d7c4189060696cec256305994 (patch)
treedf6786ed8ad22620ac7ae83f46daf65713eb29f6 /app-crypt
parentmedia-video/mpv: remove obsolete configure option in 9999 (diff)
downloadgentoo-0cc7a7d8a5cd7f5d7c4189060696cec256305994.tar.gz
gentoo-0cc7a7d8a5cd7f5d7c4189060696cec256305994.tar.bz2
gentoo-0cc7a7d8a5cd7f5d7c4189060696cec256305994.zip
app-crypt/rhash: fixed for Prefix and macOS, keyworded
Package-Manager: Portage-2.3.5-prefix, Repoman-2.3.2
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/rhash/rhash-1.3.4.ebuild22
1 files changed, 20 insertions, 2 deletions
diff --git a/app-crypt/rhash/rhash-1.3.4.ebuild b/app-crypt/rhash/rhash-1.3.4.ebuild
index 3c329cced17e..3a58d6df4345 100644
--- a/app-crypt/rhash/rhash-1.3.4.ebuild
+++ b/app-crypt/rhash/rhash-1.3.4.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc64 ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc64 ~x86 ~x64-macos ~x86-macos"
IUSE="debug nls openssl static-libs"
RDEPEND="openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )"
@@ -25,6 +25,20 @@ src_prepare() {
# 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
+
multilib_copy_sources
}
@@ -39,13 +53,17 @@ multilib_src_compile() {
$(use openssl && echo -ldl)
)
+ [[ ${CHOST} == *-darwin* ]] && 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) "${@}"
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr \
+ LIBDIR='$(PREFIX)'/$(get_libdir) SYSCONFDIR="${EPREFIX}"/etc "${@}"
}
multilib_src_install() {