git: 368835dffef9 - main - math/py-scikit-umfpack: fix with math/suitesparse-umfpack >= 6
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Oct 2023 17:52:56 UTC
The branch main has been updated by thierry:
URL: https://cgit.FreeBSD.org/ports/commit/?id=368835dffef91f7b67e482eb39a463f9a55def33
commit 368835dffef91f7b67e482eb39a463f9a55def33
Author: Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-10-16 17:27:01 +0000
Commit: Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-10-17 17:52:54 +0000
math/py-scikit-umfpack: fix with math/suitesparse-umfpack >= 6
Patch from <https://github.com/scikit-umfpack/scikit-umfpack/pull/80/files>.
Also add dependencies on gfortran and cblas.
PR: 274518
Approved by: yuri (maintainer)
---
math/py-scikit-umfpack/Makefile | 7 +-
.../files/patch-scikits_umfpack_umfpack.i | 97 ++++++++++++++++++++++
2 files changed, 100 insertions(+), 4 deletions(-)
diff --git a/math/py-scikit-umfpack/Makefile b/math/py-scikit-umfpack/Makefile
index ee9e48d76bc5..d89e731dbdb7 100644
--- a/math/py-scikit-umfpack/Makefile
+++ b/math/py-scikit-umfpack/Makefile
@@ -1,6 +1,6 @@
PORTNAME= scikit-umfpack
DISTVERSION= 0.3.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= math python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,18 +12,17 @@ WWW= https://scikit-umfpack.github.io/scikit-umfpack/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN= does not build with SuiteSparse 6 # https://github.com/scikit-umfpack/scikit-umfpack/issues/78
-
BUILD_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} \
swig:devel/swig
LIB_DEPENDS= libamd.so:math/suitesparse-amd \
+ libcblas.so:math/cblas \
libopenblas.so:math/openblas \
libumfpack.so:math/suitesparse-umfpack
RUN_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
-USES= python
+USES= fortran python
USE_PYTHON= distutils cython autoplist pytest # tests fail, see https://github.com/scikit-umfpack/scikit-umfpack/issues/77
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
diff --git a/math/py-scikit-umfpack/files/patch-scikits_umfpack_umfpack.i b/math/py-scikit-umfpack/files/patch-scikits_umfpack_umfpack.i
new file mode 100644
index 000000000000..40fc3b86b101
--- /dev/null
+++ b/math/py-scikit-umfpack/files/patch-scikits_umfpack_umfpack.i
@@ -0,0 +1,97 @@
+--- scikits/umfpack/umfpack.i.orig 2017-10-25 11:44:24 UTC
++++ scikits/umfpack/umfpack.i
+@@ -6,6 +6,8 @@
+ /*
+ See umfpack.py for more information.
+
++ Patched from <https://github.com/scikit-umfpack/scikit-umfpack/pull/80/files>
++
+ Created by: Robert Cimrman
+ */
+
+@@ -218,18 +220,21 @@ CONF_IN( UMFPACK_INFO )
+ };
+
+ %include <umfpack.h>
+-%include <umfpack_solve.h>
+-%include <umfpack_defaults.h>
+-%include <umfpack_triplet_to_col.h>
+-%include <umfpack_col_to_triplet.h>
+-%include <umfpack_transpose.h>
+-%include <umfpack_scale.h>
+
+-%include <umfpack_report_symbolic.h>
+-%include <umfpack_report_numeric.h>
+-%include <umfpack_report_info.h>
+-%include <umfpack_report_control.h>
++#if UMFPACK_MAIN_VERSION < 6
++ %include <umfpack_solve.h>
++ %include <umfpack_defaults.h>
++ %include <umfpack_triplet_to_col.h>
++ %include <umfpack_col_to_triplet.h>
++ %include <umfpack_transpose.h>
++ %include <umfpack_scale.h>
+
++ %include <umfpack_report_symbolic.h>
++ %include <umfpack_report_numeric.h>
++ %include <umfpack_report_info.h>
++ %include <umfpack_report_control.h>
++#endif
++
+ /*
+ The order is important below!
+ */
+@@ -240,21 +245,22 @@ OPAQUE_ARGOUT( void * )
+ void **Numeric
+ }
+
+-%include <umfpack_symbolic.h>
+-%include <umfpack_numeric.h>
++#if UMFPACK_MAIN_VERSION < 6
++ %include <umfpack_symbolic.h>
++ %include <umfpack_numeric.h>
++#endif
+
+-
+ OPAQUE_ARGINOUT( void * )
+ %apply void ** opaque_arginout {
+ void **Symbolic,
+ void **Numeric
+ }
+
+-%include <umfpack_free_symbolic.h>
+-%include <umfpack_free_numeric.h>
++#if UMFPACK_MAIN_VERSION < 6
++ %include <umfpack_free_symbolic.h>
++ %include <umfpack_free_numeric.h>
++#endif
+
+-
+-
+ /*
+ * wnbell - attempt to get L,U,P,Q out
+ */
+@@ -280,8 +286,11 @@ OPAQUE_ARGINOUT( void * )
+ SuiteSparse_long *n_col,
+ SuiteSparse_long *nz_udiag
+ };
+-%include <umfpack_get_lunz.h>
+
++#if UMFPACK_MAIN_VERSION < 6
++ %include <umfpack_get_lunz.h>
++#endif
++
+ ARRAY_IN( double, double, DOUBLE )
+ %apply double *array {
+ double Lx [ ],
+@@ -326,6 +335,8 @@ ARRAY_IN( SuiteSparse_long, SuiteSparse_long, INT64 )
+ };
+ %apply long *OUTPUT { SuiteSparse_long *do_recip};
+
+-%include <umfpack_get_numeric.h>
+-
++#if UMFPACK_MAIN_VERSION < 6
++ %include <umfpack_get_numeric.h>
+ #endif
++
++#endif // SWIGPYTHON