python-numpy: fix armv5tel-musl.
Uses the same patch and file from python3-numpy so we just use that from python3-numpy's files directory. Closes: #24988 [via git-merge-pr]
This commit is contained in:
parent
23b1f238bc
commit
9ec90e5ce5
3 changed files with 34 additions and 1 deletions
10
srcpkgs/python-numpy/files/fenv-constants.h
Normal file
10
srcpkgs/python-numpy/files/fenv-constants.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#define FE_INVALID 1
|
||||
#define FE_DIVBYZERO 2
|
||||
#define FE_OVERFLOW 4
|
||||
#define FE_UNDERFLOW 8
|
||||
#define FE_INEXACT 16
|
||||
#define FE_ALL_EXCEPT 31
|
||||
#define FE_TONEAREST 0
|
||||
#define FE_DOWNWARD 0x800000
|
||||
#define FE_UPWARD 0x400000
|
||||
#define FE_TOWARDZERO 0xc00000
|
11
srcpkgs/python-numpy/files/fenv-constants.patch
Normal file
11
srcpkgs/python-numpy/files/fenv-constants.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- numpy/core/src/npymath/ieee754.c.src 2020-09-20 14:53:51.998825328 +1000
|
||||
+++ numpy/core/src/npymath/ieee754.c.src 2020-09-20 14:54:03.611889518 +1000
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "npy_math_private.h"
|
||||
#include "numpy/utils.h"
|
||||
|
||||
+#include "fenv-constants.h"
|
||||
+
|
||||
#ifndef HAVE_COPYSIGN
|
||||
double npy_copysign(double x, double y)
|
||||
{
|
|
@ -4,7 +4,6 @@ version=1.16.5
|
|||
revision=1
|
||||
wrksrc="numpy-${version}"
|
||||
build_style=python2-module
|
||||
pycompile_module="numpy"
|
||||
hostmakedepends="python-setuptools python-Cython gcc-fortran"
|
||||
makedepends="python-devel lapack-devel cblas-devel"
|
||||
short_desc="Fast and sophisticated array facility to Python2"
|
||||
|
@ -15,6 +14,19 @@ distfiles="https://github.com/numpy/numpy/archive/v${version}.tar.gz"
|
|||
checksum=3c82a9b8616e3096a79a2af9c288d8ed4013a10fc7baf3eaf54655309734dadd
|
||||
alternatives="numpy:f2py:/usr/bin/f2py2"
|
||||
|
||||
post_patch() {
|
||||
case "${XBPS_TARGET_MACHINE}" in
|
||||
armv5tel-musl)
|
||||
cp "${FILESDIR}/fenv-constants.h" numpy/core/src/npymath/
|
||||
patch -Np0 -i "${FILESDIR}/fenv-constants.patch"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
make_build_args+=" ${makejobs}"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
# create compat symlinks for .h files
|
||||
vmkdir ${py2_inc}
|
||||
|
|
Loading…
Reference in a new issue