diff options
author | Fabian Groffen <grobian@gentoo.org> | 2020-11-30 09:02:54 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2020-11-30 09:03:06 +0100 |
commit | b28c7994d243c031ce0ffc19cb05f075fdf31f04 (patch) | |
tree | 36b369ae82c84da5c3d5247cdf3650f66ccef0a5 /dev-python/cryptography | |
parent | profiles/prefix/darwin/macos/package.mask: re-mask gettext (diff) | |
download | gentoo-b28c7994d243c031ce0ffc19cb05f075fdf31f04.tar.gz gentoo-b28c7994d243c031ce0ffc19cb05f075fdf31f04.tar.bz2 gentoo-b28c7994d243c031ce0ffc19cb05f075fdf31f04.zip |
dev-python/cryptography-3.2.1: fix build for macOS using GCC
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'dev-python/cryptography')
-rw-r--r-- | dev-python/cryptography/cryptography-3.2.1.ebuild | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dev-python/cryptography/cryptography-3.2.1.ebuild b/dev-python/cryptography/cryptography-3.2.1.ebuild index 84171c54122d..72bc0fbfd3a1 100644 --- a/dev-python/cryptography/cryptography-3.2.1.ebuild +++ b/dev-python/cryptography/cryptography-3.2.1.ebuild @@ -46,6 +46,20 @@ RDEPEND+=${DEPEND} DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst ) +src_prepare() { + default + + # work around availability macros not supported in GCC (yet) + if [[ ${CHOST} == *-darwin ]] ; then + local darwinok=0 + if [[ ${CHOST##*-darwin} -ge 16 ]] ; then + darwinok=1 + fi + sed -i -e 's/__builtin_available(macOS 10\.12, \*)/'"${darwinok}"'/' \ + src/_cffi_src/openssl/src/osrandom_engine.c + fi +} + python_test() { local -x PYTHONPATH=${PYTHONPATH}:${WORKDIR}/${VEC_P} pytest -vv -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" || |