pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/math/py-scipy
Module Name: pkgsrc
Committed By: gdt
Date: Tue Jan 14 18:18:06 UTC 2025
Modified Files:
pkgsrc/math/py-scipy: Makefile distinfo
Added Files:
pkgsrc/math/py-scipy/patches: patch-scipy_special_stirling2.h
Log Message:
math/py-scipy: Add patch for proper use of <complex> in C++ mode
Patch originally by Patrick Welche, munged and tested by me.
To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 pkgsrc/math/py-scipy/Makefile
cvs rdiff -u -r1.57 -r1.58 pkgsrc/math/py-scipy/distinfo
cvs rdiff -u -r0 -r1.4 \
pkgsrc/math/py-scipy/patches/patch-scipy_special_stirling2.h
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-scipy/Makefile
diff -u pkgsrc/math/py-scipy/Makefile:1.93 pkgsrc/math/py-scipy/Makefile:1.94
--- pkgsrc/math/py-scipy/Makefile:1.93 Tue Jan 14 18:06:55 2025
+++ pkgsrc/math/py-scipy/Makefile Tue Jan 14 18:18:06 2025
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.93 2025/01/14 18:06:55 gdt Exp $
+# $NetBSD: Makefile,v 1.94 2025/01/14 18:18:06 gdt Exp $
DISTNAME= scipy-1.15.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= math python
MASTER_SITES= ${MASTER_SITE_PYPI:=s/scipy/}
Index: pkgsrc/math/py-scipy/distinfo
diff -u pkgsrc/math/py-scipy/distinfo:1.57 pkgsrc/math/py-scipy/distinfo:1.58
--- pkgsrc/math/py-scipy/distinfo:1.57 Tue Jan 14 08:10:40 2025
+++ pkgsrc/math/py-scipy/distinfo Tue Jan 14 18:18:06 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.57 2025/01/14 08:10:40 adam Exp $
+$NetBSD: distinfo,v 1.58 2025/01/14 18:18:06 gdt Exp $
BLAKE2s (scipy-1.15.1.tar.gz) = 5ec6b4743ca6bfab9c01acb2ac0a6eef61688904c3af6b18c85395c6a82bf705
SHA512 (scipy-1.15.1.tar.gz) = 92cb6a2cdb5a305eef0aa81baea4b90c14c0084c09ffbf62f2d6ee8dd5a08791a838838e2d4907356b5b07d0b4f74a81a8e861f81628bd9e5c7e0216e3f77b17
@@ -9,6 +9,7 @@ SHA1 (patch-scipy_spatial_ckdtree_src_ck
SHA1 (patch-scipy_special_Faddeeva.hh) = 9f6c0bb808fc9be0a1c1b7e65395d29f13821233
SHA1 (patch-scipy_special_boost__special__functions.h) = 9a345a5e81c090d16c6394e641624c504efbf4ea
SHA1 (patch-scipy_special_meson.build) = db22da79b31a0fb8dbdac96f398463f4d24adfe0
+SHA1 (patch-scipy_special_stirling2.h) = 0aee0ba3de639f7bb87ecb6ae5bf9bd6d583d2b0
SHA1 (patch-scipy_special_wright.hh) = 56d65f9ed4bec96f0b927bbe42edd30fc6546454
SHA1 (patch-scipy_special_xsf_amos_amos.h) = 4d757b98ab6c98bac2d6e3b6f01f4ad5d02c2afb
SHA1 (patch-scipy_special_xsf_specfun_specfun.h) = 67fa2ad7980bb836a0d490a8bc7891b535c9bf35
Added files:
Index: pkgsrc/math/py-scipy/patches/patch-scipy_special_stirling2.h
diff -u /dev/null pkgsrc/math/py-scipy/patches/patch-scipy_special_stirling2.h:1.4
--- /dev/null Tue Jan 14 18:18:06 2025
+++ pkgsrc/math/py-scipy/patches/patch-scipy_special_stirling2.h Tue Jan 14 18:18:06 2025
@@ -0,0 +1,40 @@
+$NetBSD: patch-scipy_special_stirling2.h,v 1.4 2025/01/14 18:18:06 gdt Exp $
+
+On NetBSD 10, scipy fails to build with many errors like:
+
+ FAILED: scipy/special/_ufuncs_cxx.so.p/meson-generated__ufuncs_cxx.cpp.o
+c++ -Iscipy/special/_ufuncs_cxx.so.p -Iscipy/special -I../scipy/special -I../scipy/_lib/boost_math/include -Iscipy/_lib -I../scipy/_lib -I../scipy/_build_utils/src
-I../../../../../../../usr/pkg/lib/python3.11/site-packages/numpy/_core/include -I/usr/pkg/include/python3.11 -I/usr/pkg/include -I/usr/include -fvisibility=hidden -fvisibility-inlines-hidden
-fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O3 -O2 -D__STDC_FORMAT_MACROS -fPIC -DSP_SPECFUN_ERROR -DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION
-DCYTHON_CCOMPLEX=0 -DBOOST_MATH_STANDALONE=1 '-DCYTHON_EXTERN_C=extern "C"' -MD -MQ scipy/special/_ufuncs_cxx.so.p/meson-generated__ufuncs_cxx.cpp.o -MF
scipy/special/_ufuncs_cxx.so.p/meson-generated__ufuncs_cxx.cpp.o.d -o scipy/special/_ufuncs_cxx.so.p/meson-generated__ufuncs_cxx.cpp.o -c scipy/special/_ufuncs_cxx.so.p/_ufuncs_cxx.cpp
+In file included from ../scipy/special/stirling2.h:9,
+ from scipy/special/_ufuncs_cxx_defs.h:112,
+ from scipy/special/_ufuncs_cxx.so.p/_ufuncs_cxx.cpp:1246:
+../scipy/special/xsf/evalpoly.h:26:29: error: expected unqualified-id before '_Complex'
+ 26 | XSF_HOST_DEVICE inline std::complex<double> cevalpoly(const double *coeffs, int degree, std::complex<double> z) {
+ | ^~~~~~~
+
+
+C++ documentation implies that one should use <complex>, and therefore
+that <complex.h> is only appropriate in C mode. Using C++ headers in
+C++ mode resolves the build failure. Therefore, switch to that
+approach.
+
+Not yet sent upstream.
+
+--- scipy/special/stirling2.h.orig 2025-01-13 23:39:01.039575715 +0000
++++ scipy/special/stirling2.h
+@@ -3,11 +3,13 @@
+
+ #if defined(__cplusplus)
+ #include <cmath>
++#include <complex>
+ using std::isinf;
+-#endif
+-
+-#include <complex.h>
++#else /* __cplusplus */
+ #include <math.h>
++#include <complex.h>
++#endif /* __cplusplus */
++
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
Home |
Main Index |
Thread Index |
Old Index