aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-13 20:19:02 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-07-13 20:19:02 +0000
commit67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62 (patch)
treeb699772d9c5bed655ccc560571ccbcba8849c228
parent2db969b4413e91ca9c4ff0a323184fd618e80dec (diff)
downloadports-67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62.tar.gz
ports-67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62.zip
math/py-faiss: Fix build with swig 4.2.0+
-rw-r--r--math/py-faiss/files/patch-swig21
1 files changed, 21 insertions, 0 deletions
diff --git a/math/py-faiss/files/patch-swig b/math/py-faiss/files/patch-swig
new file mode 100644
index 000000000000..1aa5f58bcbd8
--- /dev/null
+++ b/math/py-faiss/files/patch-swig
@@ -0,0 +1,21 @@
+Obtained from: https://github.com/facebookresearch/faiss/commit/d6854136afa3b987defb2c8e8108bad76ebdb949
+
+--- swigfaiss.swig.orig 2024-02-29 21:24:50 UTC
++++ swigfaiss.swig
+@@ -1022,14 +1022,14 @@ PyObject *swig_ptr (PyObject *a)
+ return SWIG_NewPointerObj(data, SWIGTYPE_p_bool, 0);
+ }
+ if(PyArray_TYPE(ao) == NPY_UINT64) {
+-#ifdef SWIGWORDSIZE64
++#if (__SIZEOF_LONG__ == 8)
+ return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0);
+ #else
+ return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long_long, 0);
+ #endif
+ }
+ if(PyArray_TYPE(ao) == NPY_INT64) {
+-#ifdef SWIGWORDSIZE64
++#if (__SIZEOF_LONG__ == 8)
+ return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0);
+ #else
+ return SWIG_NewPointerObj(data, SWIGTYPE_p_long_long, 0);