1 |
commit: 76f9ac47a4e34c05b9c3a5189d4799938f909843 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 6 00:10:00 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 6 00:10:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f9ac47 |
7 |
|
8 |
dev-python/blosc: fix build on non-amd64/x86 (CPU flags) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/732178 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
dev-python/blosc/blosc-1.10.4.ebuild | 1 + |
14 |
.../blosc/files/blosc-1.10.4-cpu-flags.patch | 22 ++++++++++++++++++++++ |
15 |
2 files changed, 23 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/blosc/blosc-1.10.4.ebuild b/dev-python/blosc/blosc-1.10.4.ebuild |
18 |
index 8acd8a97e75..e8ef10b43d6 100644 |
19 |
--- a/dev-python/blosc/blosc-1.10.4.ebuild |
20 |
+++ b/dev-python/blosc/blosc-1.10.4.ebuild |
21 |
@@ -29,6 +29,7 @@ BDEPEND=" |
22 |
DOCS=( ANNOUNCE.rst README.rst RELEASE_NOTES.rst ) |
23 |
PATCHES=( |
24 |
"${FILESDIR}"/blosc-1.10.0-unbundle.patch |
25 |
+ "${FILESDIR}"/blosc-1.10.4-cpu-flags.patch |
26 |
) |
27 |
|
28 |
python_prepare_all() { |
29 |
|
30 |
diff --git a/dev-python/blosc/files/blosc-1.10.4-cpu-flags.patch b/dev-python/blosc/files/blosc-1.10.4-cpu-flags.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..1e264164613 |
33 |
--- /dev/null |
34 |
+++ b/dev-python/blosc/files/blosc-1.10.4-cpu-flags.patch |
35 |
@@ -0,0 +1,22 @@ |
36 |
+https://github.com/Blosc/python-blosc/commit/70226a70907072be607caee3da472e37a4683bae |
37 |
+https://github.com/Blosc/python-blosc/issues/227 |
38 |
+https://bugs.gentoo.org/732178 |
39 |
+ |
40 |
+From: Graham Inggs <ginggs@××××××.org> |
41 |
+Date: Tue, 3 Aug 2021 17:11:51 +0200 |
42 |
+Subject: [PATCH] Deactivate SSE2 and AVX2 if a CPU has no flags (#242) |
43 |
+ |
44 |
+Fixes #277 |
45 |
+--- a/setup.py |
46 |
++++ b/setup.py |
47 |
+@@ -90,8 +90,8 @@ def cmake_bool(cond): |
48 |
+ platforms = ['any'], |
49 |
+ cmake_args = [ |
50 |
+ '-DBLOSC_DIR:PATH=%s' % os.environ.get('BLOSC_DIR', ''), |
51 |
+- '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])), |
52 |
+- '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])), |
53 |
++ '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('flags' not in cpu_info) or ('sse2' not in cpu_info['flags'])), |
54 |
++ '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('flags' not in cpu_info) or ('avx2' not in cpu_info['flags'])), |
55 |
+ '-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))), |
56 |
+ # Snappy is disabled by default |
57 |
+ '-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))), |