diff --git a/srcpkgs/python-numpy/files/fenv-constants.h b/srcpkgs/python-numpy/files/fenv-constants.h new file mode 100644 index 00000000000..c2c21d2bb23 --- /dev/null +++ b/srcpkgs/python-numpy/files/fenv-constants.h @@ -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 diff --git a/srcpkgs/python-numpy/files/fenv-constants.patch b/srcpkgs/python-numpy/files/fenv-constants.patch new file mode 100644 index 00000000000..987ad4e346f --- /dev/null +++ b/srcpkgs/python-numpy/files/fenv-constants.patch @@ -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) + { diff --git a/srcpkgs/python-numpy/template b/srcpkgs/python-numpy/template index 52308fd2aa6..2d1a1a99f24 100644 --- a/srcpkgs/python-numpy/template +++ b/srcpkgs/python-numpy/template @@ -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}