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: ryoon
Date: Mon May 23 17:28:41 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_distutils_command_config.py
Log Message:
py-numpy: Workaround undefined-symbol errors under NetBSD at least
py-numpy-1.22.4's symbol check mechanism does not work for NetBSD
and the other platforms, because gcc and clang calculate trivial math
functions, for example, log1pl() and expm1l(), with immediate arguments,
for example 0. So compiling 'log1pl(0)' is always successful
even if -lm is not added to the compiler's commandline arguments.
Use GNU autotools style check with ugly workaround.
I have no idea about WASM case. However current mechanism will
not work as expected.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 pkgsrc/math/py-numpy/Makefile
cvs rdiff -u -r1.72 -r1.73 pkgsrc/math/py-numpy/distinfo
cvs rdiff -u -r1.7 -r1.8 \
pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py
cvs rdiff -u -r0 -r1.1 \
pkgsrc/math/py-numpy/patches/patch-numpy_distutils_command_config.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.93 pkgsrc/math/py-numpy/Makefile:1.94
--- pkgsrc/math/py-numpy/Makefile:1.93 Sun May 22 19:14:00 2022
+++ pkgsrc/math/py-numpy/Makefile Mon May 23 17:28:41 2022
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.93 2022/05/22 19:14:00 adam Exp $
+# $NetBSD: Makefile,v 1.94 2022/05/23 17:28:41 ryoon Exp $
DISTNAME= numpy-1.22.4
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= math python
MASTER_SITES= ${MASTER_SITE_PYPI:=n/numpy/}
EXTRACT_SUFX= .zip
Index: pkgsrc/math/py-numpy/distinfo
diff -u pkgsrc/math/py-numpy/distinfo:1.72 pkgsrc/math/py-numpy/distinfo:1.73
--- pkgsrc/math/py-numpy/distinfo:1.72 Sun May 22 19:14:00 2022
+++ pkgsrc/math/py-numpy/distinfo Mon May 23 17:28:41 2022
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.72 2022/05/22 19:14:00 adam Exp $
+$NetBSD: distinfo,v 1.73 2022/05/23 17:28:41 ryoon 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) = 9e2388dd0de7f31994d3b27c10e439acd3ca1a03
+SHA1 (patch-numpy_core_setup.py) = 9f5d5934112d533f44207c2106db75465170d605
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
SHA1 (patch-numpy_distutils_fcompiler_g95.py) = be73b64a3e551df998b6a904d6db762bf28a98ed
SHA1 (patch-numpy_distutils_fcompiler_gnu.py) = 1ab3fd7b3f42328f4094f1b21a65c05ae4d975b7
Index: pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py
diff -u pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.7 pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.8
--- pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py:1.7 Sun May 22 19:14:00 2022
+++ pkgsrc/math/py-numpy/patches/patch-numpy_core_setup.py Mon May 23 17:28:41 2022
@@ -1,9 +1,18 @@
-$NetBSD: patch-numpy_core_setup.py,v 1.7 2022/05/22 19:14:00 adam Exp $
+$NetBSD: patch-numpy_core_setup.py,v 1.8 2022/05/23 17:28:41 ryoon Exp $
Use C language (not F77 from blas_info); fixes library name on Darwin.
---- numpy/core/setup.py.orig 2022-05-20 05:46:10.000000000 +0000
+--- numpy/core/setup.py.orig 2022-05-19 22:46:10.000000000 +0000
+++ numpy/core/setup.py
+@@ -217,7 +217,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])
+- if config.check_func(f, decl=False, call=True, call_args=args,
++ if config.check_func(f, decl=False, call=False, call_args=args,
+ headers=headers):
+ moredefs.append((m, 1))
+
@@ -868,6 +868,7 @@ def configuration(parent_package='',top_
if have_blas:
Added files:
Index: pkgsrc/math/py-numpy/patches/patch-numpy_distutils_command_config.py
diff -u /dev/null pkgsrc/math/py-numpy/patches/patch-numpy_distutils_command_config.py:1.1
--- /dev/null Mon May 23 17:28:42 2022
+++ pkgsrc/math/py-numpy/patches/patch-numpy_distutils_command_config.py Mon May 23 17:28:41 2022
@@ -0,0 +1,69 @@
+$NetBSD: patch-numpy_distutils_command_config.py,v 1.1 2022/05/23 17:28:41 ryoon Exp $
+
+* Workaround for undefined-sysbol errors from graphics/py-matplotlib.
+
+--- numpy/distutils/command/config.py.orig 2022-05-17 10:56:58.000000000 +0000
++++ numpy/distutils/command/config.py
+@@ -321,11 +321,7 @@ class config(old_config):
+ # return a value.
+ self._check_compiler()
+ body = []
+- if decl:
+- if type(decl) == str:
+- body.append(decl)
+- else:
+- body.append("int %s (void);" % func)
++ body.append("int %s (void);" % func)
+ # Handle MSVC intrinsics: force MS compiler to make a function call.
+ # Useful to test for some functions when built with optimization on, to
+ # avoid build error because the intrinsic and our 'fake' test
+@@ -336,15 +332,16 @@ class config(old_config):
+ body.append("int main (void) {")
+ if call:
+ if call_args is None:
++ body.append(" %s(%s);" % (func, call_args))
+ call_args = ''
+- body.append(" %s(%s);" % (func, call_args))
++ body.append(" %s();" % func)
+ else:
+ body.append(" %s;" % func)
+ body.append(" return 0;")
+ body.append("}")
+ body = '\n'.join(body) + "\n"
+
+- return self.try_link(body, headers, include_dirs,
++ return self.try_link(body, None, include_dirs,
+ libraries, library_dirs)
+
+ def check_funcs_once(self, funcs,
+@@ -376,10 +373,8 @@ class config(old_config):
+ """
+ self._check_compiler()
+ body = []
+- if decl:
+- for f, v in decl.items():
+- if v:
+- body.append("int %s (void);" % f)
++ for f in funcs:
++ body.append("int %s (void);" % f)
+
+ # Handle MS intrinsics. See check_func for more info.
+ body.append("#ifdef _MSC_VER")
+@@ -395,7 +390,7 @@ class config(old_config):
+ args = ''
+ else:
+ args = call_args[f]
+- body.append(" %s(%s);" % (f, args))
++ body.append(" %s();" % f)
+ else:
+ body.append(" %s;" % f)
+ else:
+@@ -405,7 +400,7 @@ class config(old_config):
+ body.append("}")
+ body = '\n'.join(body) + "\n"
+
+- return self.try_link(body, headers, include_dirs,
++ return self.try_link(body, None, include_dirs,
+ libraries, library_dirs)
+
+ def check_inline(self):
Home |
Main Index |
Thread Index |
Old Index