From bd7908c6630f38067350d396ac5d18c3cc2434a0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 29 Oct 2017 11:22:34 +0000 Subject: gentoo resync : 29.10.2017 --- dev-python/pyblake2/Manifest | 2 +- dev-python/pyblake2/pyblake2-0.9.3.ebuild | 39 ++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 12 deletions(-) (limited to 'dev-python/pyblake2') diff --git a/dev-python/pyblake2/Manifest b/dev-python/pyblake2/Manifest index 4ebce7309f79..88bc15af405d 100644 --- a/dev-python/pyblake2/Manifest +++ b/dev-python/pyblake2/Manifest @@ -1,3 +1,3 @@ DIST pyblake2-0.9.3.tar.gz 130641 SHA256 626448e1fe1cc01d2197118954bec9f158378577e12686d5b01979f7f0fa2212 SHA512 6336a7f7e79bd3e6ff7f8ff4d279ae170e86f1464b9fa9e7ea7f0dbbac6fcc044caf225111e065f9cd9cdeea0f81fae8d373e1f65be3e418929f53fad063205e WHIRLPOOL 0d8f2aaf35a5eb0ebdedd9219a0ee8b126c93b11ae3e406ef637d8930a34783886b212ce50a33d677b0a19289cd32f40dc3da22a9a9fec108b481268f153d45b -EBUILD pyblake2-0.9.3.ebuild 1066 SHA256 8487f1bd95367c3630a2519430fd81f0c0cd453728d07dd16f59367cb4fe0a99 SHA512 e9cfcdaaa84b37098e01d98dd4b2385614f44d53101ebb6b9a8a029c1105b7b84e06373d68bd5fcc2541d7f305bfe462a5c744e05372454f188ba952e12327d0 WHIRLPOOL 2dc90a66d924ea07dcc2fe7e95f48c9a6a6995dc366a379dbb4379131e3460516d76524d91068561c30f18d1c32b70d31c5fff3c5a43330c29729ff9b3650dc1 +EBUILD pyblake2-0.9.3.ebuild 1349 SHA256 a1c4703ab3fe28fbdddb7532fe008f597d8ffee875354082fce493c119ab6a4d SHA512 5957a643ffab1129b76ee1bfaa284fdb5bd8fe12923d43408ab25e1649528d879becf082b45af7da4b901906267426fe9244a470fe8c2e070409100a3fd154ce WHIRLPOOL 63860ea795d0a7541781d92940d44d4e1197204a7a6074b73bb4fbe89c56bce7d229c9af0e508a9f0b50e7b74d363a6edda0fdb55dc47651c48f389cf9aeba37 MISC metadata.xml 452 SHA256 327935068e4b2311b5db81380ca0323b5bcf8b0769fce733e0407500bcdd58f0 SHA512 28acd5472435f8832eb8cb7587e651f428309e9a37c17cad378fe8f01c47896115c4d42ace1c6125eb99ddd30de562d42503b6dac42432b55b37775cdde7c1ff WHIRLPOOL afc476bc3e3dd531ec5e886e0180bd8a3a78bc274b410c6f54fbb24ab761c0e9bd95ba7bb5507aff0c162fc69c62a12dd4858e688aa21bca0e0b48509f87c3e1 diff --git a/dev-python/pyblake2/pyblake2-0.9.3.ebuild b/dev-python/pyblake2/pyblake2-0.9.3.ebuild index 10da95058c15..619cb27c3cf6 100644 --- a/dev-python/pyblake2/pyblake2-0.9.3.ebuild +++ b/dev-python/pyblake2/pyblake2-0.9.3.ebuild @@ -4,7 +4,7 @@ EAPI=6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy ) -inherit distutils-r1 +inherit distutils-r1 flag-o-matic toolchain-funcs DESCRIPTION="BLAKE2 hash function extension module" HOMEPAGE="https://github.com/dchest/pyblake2 https://pypi.python.org/pypi/pyblake2" @@ -12,19 +12,36 @@ SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz" LICENSE="CC0-1.0" SLOT="0" -KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="cpu_flags_x86_ssse3 cpu_flags_x86_avx cpu_flags_x86_xop" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +blake2_impl() { + local code=' +#if defined(__XOP__) + HAVE_XOP +#elif defined(__AVX__) + HAVE_AVX +#elif defined(__SSSE3__) + HAVE_SSSE3 +#elif defined(__SSE2__) + HAVE_SSE2 +#endif +' + local res=$($(tc-getCC) -E -P ${CFLAGS} - <<<"${code}") + + case ${res} in + *HAVE_XOP*) echo XOP;; + # this does not actually do anything but implicitly enabled SSE4.1... + *HAVE_AVX*) echo AVX;; + *HAVE_SSSE3*) echo SSSE3;; + # note: SSE2 is 2.5x slower than pure REGS, so we ignore it + #*HAVE_SSE2*) echo SSE2;; + *) echo REGS;; + esac +} python_prepare_all() { - local impl=REGS - # note: SSE2 is 2.5x slower than pure REGS, so we ignore it - use cpu_flags_x86_ssse3 && impl=SSSE3 - # this does not actually do anything but implicitly enabled SSE4.1... - use cpu_flags_x86_avx && impl=AVX - use cpu_flags_x86_xop && impl=XOP - # uncomment the implementation of choice - sed -i -e "/BLAKE2_COMPRESS_${impl}/s:^#::" setup.py || die + sed -i -e "/BLAKE2_COMPRESS_$(blake2_impl)/s:^#::" setup.py || die distutils-r1_python_prepare_all } -- cgit v1.2.3