diff --git a/1000-numpy-anolis-support-loongarch64.patch b/1000-numpy-anolis-support-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..b7fbf3d0cfcef34ab5195f6a5ee49e63791fc705 --- /dev/null +++ b/1000-numpy-anolis-support-loongarch64.patch @@ -0,0 +1,23 @@ +diff -Nurp numpy-1.19.4.orig/numpy/core/include/numpy/npy_cpu.h numpy-1.19.4/numpy/core/include/numpy/npy_cpu.h +--- numpy-1.19.4.orig/numpy/core/include/numpy/npy_cpu.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.19.4/numpy/core/include/numpy/npy_cpu.h 2021-01-25 04:42:36.910156250 +0000 +@@ -102,6 +102,8 @@ + #define NPY_CPU_SH_BE + #elif defined(__MIPSEL__) + #define NPY_CPU_MIPSEL ++#elif defined(__loongarch64) ++ #define NPY_CPU_LOONGARCH64 + #elif defined(__MIPSEB__) + #define NPY_CPU_MIPSEB + #elif defined(__or1k__) +diff -Nurp numpy-1.19.4.orig/numpy/core/include/numpy/npy_endian.h numpy-1.19.4/numpy/core/include/numpy/npy_endian.h +--- numpy-1.19.4.orig/numpy/core/include/numpy/npy_endian.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.19.4/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) \ + || defined(NPY_CPU_WASM) + #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN diff --git a/numpy.spec b/numpy.spec index a15e87c76154208afcd222da3e61e81f536a2e0b..7be9a8ec6435cb86ec88ba73f8676be8e48af5ee 100644 --- a/numpy.spec +++ b/numpy.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # RHEL8: Tests disabled due to missing dependencies %bcond_with tests @@ -8,7 +9,7 @@ Name: numpy Version: 1.19.4 -Release: 3%{?dist} +Release: 3%{anolis_release}%{?dist} Summary: A fast multidimensional array facility for Python # Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python @@ -19,6 +20,8 @@ Source1: https://numpy.org/doc/1.19/numpy-html.zip Patch0: numpy-1.19.2-FIPS.patch +Patch1000: 1000-numpy-anolis-support-loongarch64.patch + # Exclude i686 arch. Due to a modularity issue it's being added to the # x86_64 compose of CRB, but we don't want to ship it at all. # See: https://projects.engineering.redhat.com/browse/RCM-72605 @@ -200,6 +203,9 @@ fi %changelog +* Thu Oct 20 2022 Liwei Ge - 1.19.4-3.0.1 +- Support loongarch64 platform + * Thu Aug 05 2021 Tomas Orsava - 1.19.4-3 - Adjusted the postun scriptlets to enable upgrading to RHEL 9 - Resolves: rhbz#1933055