pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/py-numpy



Module Name:    pkgsrc
Committed By:   tnn
Date:           Wed May 25 19:09:25 UTC 2022

Modified Files:
        pkgsrc/math/py-numpy: Makefile distinfo
        pkgsrc/math/py-numpy/patches: patch-numpy_core_setup.py
Added Files:
        pkgsrc/math/py-numpy/patches:
            patch-numpy_core_include_numpy_npy__common.h

Log Message:
py-numpy: fix build on macOS and maybe others


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 pkgsrc/math/py-numpy/Makefile
cvs rdiff -u -r1.73 -r1.74 pkgsrc/math/py-numpy/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/math/py-numpy/patches/patch-numpy_core_include_numpy_npy__common.h
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/py-numpy/Makefile
diff -u pkgsrc/math/py-numpy/Makefile:1.94 pkgsrc/math/py-numpy/Makefile:1.95
--- pkgsrc/math/py-numpy/Makefile:1.94  Mon May 23 17:28:41 2022
+++ pkgsrc/math/py-numpy/Makefile       Wed May 25 19:09:25 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.94 2022/05/23 17:28:41 ryoon Exp $
+# $NetBSD: Makefile,v 1.95 2022/05/25 19:09:25 tnn Exp $
 
 DISTNAME=      numpy-1.22.4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
@@ -53,6 +53,9 @@ CPPFLAGS+=            ${BLAS_INCLUDES}
 # Work around it on DragonFly by specifying the classic gnu linker
 MAKE_ENV.DragonFly+=   LDVER=ld.bfd
 
+pre-install:
+       ${RM} -f ${WRKSRC}/numpy/core/include/numpy/npy_common.h.orig
+
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py || ${TRUE}
        cd ${DESTDIR}${PREFIX}/bin && ${RM} f2py3 || ${TRUE}

Index: pkgsrc/math/py-numpy/distinfo
diff -u pkgsrc/math/py-numpy/distinfo:1.73 pkgsrc/math/py-numpy/distinfo:1.74
--- pkgsrc/math/py-numpy/distinfo:1.73  Mon May 23 17:28:41 2022
+++ pkgsrc/math/py-numpy/distinfo       Wed May 25 19:09:25 2022
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.73 2022/05/23 17:28:41 ryoon Exp $
+$NetBSD: distinfo,v 1.74 2022/05/25 19:09:25 tnn Exp $
 
 BLAKE2s (numpy-1.22.4.zip) = 020700e15b661d064377106b6c3ecd5959c524e32cc2f3d1b97739894bbbcff8
 SHA512 (numpy-1.22.4.zip) = bb2993459157c43f8c419de98be1c832f108b4eb6b96e1d20f406eccd782681ad8d0f8653637962ac592abe7d75719c17678ec97f035f6c87d4c7f939a1a8a48
 Size (numpy-1.22.4.zip) = 11458830 bytes
-SHA1 (patch-numpy_core_setup.py) = 9f5d5934112d533f44207c2106db75465170d605
+SHA1 (patch-numpy_core_include_numpy_npy__common.h) = 2560358bbef62b72281f95b8d62b90b6c032f9c5
+SHA1 (patch-numpy_core_setup.py) = 01f90b7eb700cfa51edded31498c2de4c3850848
 SHA1 (patch-numpy_core_src_npymath_npy__math__private.h) = e3b8e751fd0b6b6c6794d714aa5f60dfe9d7f421
 SHA1 (patch-numpy_distutils_command_config.py) = eb37d28482689703e0c1a264f9768409cf8bb4b6
 SHA1 (patch-numpy_distutils_fcompiler_____init____.py) = 49d070da5b48bd9818b37ac3254341fa68503c53

Index: pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py
diff -u pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.8 pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.9
--- pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.8  Mon May 23 17:28:41 2022
+++ pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py      Wed May 25 19:09:25 2022
@@ -1,10 +1,21 @@
-$NetBSD: patch-numpy_core_setup.py,v 1.8 2022/05/23 17:28:41 ryoon Exp $
+$NetBSD: patch-numpy_core_setup.py,v 1.9 2022/05/25 19:09:25 tnn Exp $
 
 Use C language (not F77 from blas_info); fixes library name on Darwin.
+Add configure test for HAVE_XLOCALE_H, used by numpyos.c.
 
---- numpy/core/setup.py.orig   2022-05-19 22:46:10.000000000 +0000
+--- numpy/core/setup.py.orig   2022-05-20 05:46:10.000000000 +0000
 +++ numpy/core/setup.py
-@@ -217,7 +217,7 @@ def check_math_capabilities(config, ext,
+@@ -208,6 +208,9 @@ def check_math_capabilities(config, ext,
+         # It didn't work with xlocale.h, maybe it will work with locale.h?
+         locale_headers[1] = "locale.h"
+         check_funcs(OPTIONAL_LOCALE_FUNCS, headers=locale_headers)
++    st = config.check_header('xlocale.h')
++    if st:
++        moredefs.append(('HAVE_XLOCALE_H', 1))
+ 
+     for tup in OPTIONAL_INTRINSICS:
+         headers = None
+@@ -217,7 +220,7 @@ def check_math_capabilities(config, ext,
              f, args, headers, m = tup[0], tup[1], [tup[2]], fname2def(tup[0])
          else:
              f, args, headers, m = tup[0], tup[1], [tup[2]], fname2def(tup[3])
@@ -13,7 +24,7 @@ Use C language (not F77 from blas_info);
                               headers=headers):
              moredefs.append((m, 1))
  
-@@ -868,6 +868,7 @@ def configuration(parent_package='',top_
+@@ -868,6 +871,7 @@ def configuration(parent_package='',top_
  
      if have_blas:
          extra_info = blas_info

Added files:

Index: pkgsrc/math/py-numpy/patches/patch-numpy_core_include_numpy_npy__common.h
diff -u /dev/null pkgsrc/math/py-numpy/patches/patch-numpy_core_include_numpy_npy__common.h:1.1
--- /dev/null   Wed May 25 19:09:25 2022
+++ pkgsrc/math/py-numpy/patches/patch-numpy_core_include_numpy_npy__common.h   Wed May 25 19:09:25 2022
@@ -0,0 +1,17 @@
+$NetBSD: patch-numpy_core_include_numpy_npy__common.h,v 1.1 2022/05/25 19:09:25 tnn Exp $
+
+Fix build on non-x86:
+The configure test for __builtin_prefetch is broken with clang.
+_configtest.c:6:3: error: builtin functions must be directly called
+
+--- numpy/core/include/numpy/npy_common.h.orig 2022-05-20 05:46:10.000000000 +0000
++++ numpy/core/include/numpy/npy_common.h
+@@ -116,7 +116,7 @@
+ #define NPY_UNLIKELY(x) (x)
+ #endif
+ 
+-#ifdef HAVE___BUILTIN_PREFETCH
++#if !defined(__i386__) && !defined(__x86_64__)
+ /* unlike _mm_prefetch also works on non-x86 */
+ #define NPY_PREFETCH(x, rw, loc) __builtin_prefetch((x), (rw), (loc))
+ #else



Home | Main Index | Thread Index | Old Index