diff --git a/1000-numpy-anolis-support-loongarch64.patch b/1000-numpy-anolis-support-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..358990016981e072731d1da20076f4778accee5c --- /dev/null +++ b/1000-numpy-anolis-support-loongarch64.patch @@ -0,0 +1,23 @@ +diff -Nurp numpy-1.17.3.orig/numpy/core/include/numpy/npy_cpu.h numpy-1.17.3/numpy/core/include/numpy/npy_cpu.h +--- numpy-1.17.3.orig/numpy/core/include/numpy/npy_cpu.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.17.3/numpy/core/include/numpy/npy_cpu.h 2021-01-25 04:42:36.910156250 +0000 +@@ -102,6 +102,8 @@ + #define NPY_CPU_ARCEB + #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 + #define NPY_CPU_RISCV64 ++#elif defined(__loongarch64) ++ #define NPY_CPU_LOONGARCH64 + #else + #error Unknown CPU, please report this to numpy maintainers with \ + information about your platform (OS, CPU and compiler) +diff -Nurp numpy-1.17.3.orig/numpy/core/include/numpy/npy_endian.h numpy-1.17.3/numpy/core/include/numpy/npy_endian.h +--- numpy-1.17.3.orig/numpy/core/include/numpy/npy_endian.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.17.3/numpy/core/include/numpy/npy_endian.h 2021-01-25 04:42:36.910156250 +0000 +@@ -48,6 +48,7 @@ + || defined(NPY_CPU_MIPSEL) \ + || defined(NPY_CPU_PPC64LE) \ + || defined(NPY_CPU_ARCEL) \ ++ || defined(NPY_CPU_LOONGARCH64) \ + || defined(NPY_CPU_RISCV64) + #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN + #elif defined(NPY_CPU_PPC) \ diff --git a/numpy.spec b/numpy.spec index 8e972b8a9a92205f892a2bfd566244aba18d718d..13091be15b39e4de20a44056dace85e9d9766ef8 100644 --- a/numpy.spec +++ b/numpy.spec @@ -5,6 +5,8 @@ %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif +%define anolis_release .0.1 + #uncomment next line for a release candidate or a beta #%%global relc rc1 @@ -12,7 +14,7 @@ Name: numpy Version: 1.14.2 -Release: 16%{?dist} +Release: 16%{anolis_release}%{?dist} Epoch: 1 Summary: A fast multidimensional array facility for Python @@ -25,6 +27,8 @@ Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.13.0.zip Patch0: numpy-1.14.2-float128.patch Patch1: numpy-1.14.2-CVE-2019-6446.patch +Patch1000: 1000-numpy-anolis-support-loongarch64.patch + BuildRequires: python2-devel lapack-devel python2-setuptools gcc-gfortran python2-nose BuildRequires: /usr/bin/sed BuildRequires: python2-Cython @@ -137,6 +141,7 @@ This package provides the complete documentation for NumPy. #%setup -q -n numpy-cc2b04 %patch0 -p1 %patch1 -p1 +%patch1000 -p1 # workaround for rhbz#849713 # http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html @@ -341,6 +346,9 @@ popd &> /dev/null %changelog +* Thu Nov 4 2021 Liwei Ge - 1:1.14.2-16.0.1 +- Support loongarch64 platform + * Fri Jan 08 2021 Nikola Forró - 1:1.14.2-16 - Fix include path - Related: rhbz#1907601