git: 5793cc4d68a3 - main - math/py-igraph: Update to 0.10.6

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Wed, 30 Aug 2023 19:18:36 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5793cc4d68a34d1d90ecda4f35a5416e6c837579

commit 5793cc4d68a34d1d90ecda4f35a5416e6c837579
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-08-30 03:29:19 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-08-30 19:18:32 +0000

    math/py-igraph: Update to 0.10.6
    
    * Switch to DISTVERSION
    * Always use Flex from ports
    * Use available dependencies in tree instead of vendored
      This is also consistent with math/igraph
    
    Changelog:
    https://github.com/igraph/python-igraph/releases/tag/0.10.6
    
    PR:             273168
    Reviewed by:    lwhsu (maintainer)
    Sponsored by:   Blinkinblox
---
 math/py-igraph/Makefile             | 20 ++++++++++++++++----
 math/py-igraph/distinfo             |  6 +++---
 math/py-igraph/files/patch-setup.py | 24 ++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/math/py-igraph/Makefile b/math/py-igraph/Makefile
index 41c46f383d55..a2418c9a2506 100644
--- a/math/py-igraph/Makefile
+++ b/math/py-igraph/Makefile
@@ -1,8 +1,9 @@
 PORTNAME=	igraph
-DISTVERSION=	0.10.4
+DISTVERSION=	0.10.6
 CATEGORIES=	math python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DIST_SUBDIR=	python-igraph
 
 MAINTAINER=	lwhsu@FreeBSD.org
 COMMENT=	High performance graph data structures and algorithms
@@ -10,8 +11,15 @@ WWW=		https://igraph.org/python/
 
 LICENSE=	GPLv2
 
-BUILD_DEPENDS=	cmake:devel/cmake-core
-LIB_DEPENDS=	libigraph.so:math/igraph
+BUILD_DEPENDS=	cmake:devel/cmake-core \
+		${LOCALBASE}/bin/flex:textproc/flex
+LIB_DEPENDS=	libigraph.so:math/igraph \
+		libarpack.so:math/arpack-ng \
+		libblas.so:math/blas \
+		libglpk.so:math/glpk \
+		libgmp.so:math/gmp \
+		liblapack.so:math/lapack \
+		libopenblas.so:math/openblas
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}texttable>=1.6.2:textproc/py-texttable@${PY_FLAVOR}	\
 		${PYTHON_PKGNAMEPREFIX}cairocffi>0:graphics/py-cairocffi@${PY_FLAVOR}
 TEST_DEPENDS=	py.test:devel/py-pytest@${PY_FLAVOR}
@@ -20,8 +28,12 @@ USES=		bison gnome pkgconfig python
 USE_PYTHON=	distutils concurrent autoplist
 USE_GNOME=	libxml2
 
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+	    ${PATCH_WRKSRC}/setup.py
+
 post-install:
-	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/igraph/_igraph${PYTHON_EXT_SUFFIX}.so
+	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/igraph/_igraph*.so
 
 do-test: install
 	(cd ${WRKSRC} && py.test)
diff --git a/math/py-igraph/distinfo b/math/py-igraph/distinfo
index 3a7cc08d64d3..92d43956c400 100644
--- a/math/py-igraph/distinfo
+++ b/math/py-igraph/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1684430156
-SHA256 (igraph-0.10.4.tar.gz) = 4786e05919ee93f6479fe8ca697d68537edfe47549ed09dfb33bda4daced1fb9
-SIZE (igraph-0.10.4.tar.gz) = 4209850
+TIMESTAMP = 1692030616
+SHA256 (python-igraph/igraph-0.10.6.tar.gz) = 76f7aad294514412f835366a7d9a9c1e7a34c3e6ef0a6c3a1a835234323228e8
+SIZE (python-igraph/igraph-0.10.6.tar.gz) = 4233333
diff --git a/math/py-igraph/files/patch-setup.py b/math/py-igraph/files/patch-setup.py
new file mode 100644
index 000000000000..c45c6da41642
--- /dev/null
+++ b/math/py-igraph/files/patch-setup.py
@@ -0,0 +1,24 @@
+--- setup.py.orig	2023-07-13 11:49:16 UTC
++++ setup.py
+@@ -281,7 +281,7 @@ class IgraphCCoreCMakeBuilder:
+ 
+         # Build the Python interface with vendored libraries
+         for deps in "ARPACK BLAS GLPK GMP LAPACK".split():
+-            args.append("-DIGRAPH_USE_INTERNAL_" + deps + "=ON")
++            args.append("-DIGRAPH_USE_INTERNAL_" + deps + "=OFF")
+ 
+         # -fPIC is needed on Linux so we can link to a static igraph lib from a
+         # Python shared library
+@@ -289,6 +289,12 @@ class IgraphCCoreCMakeBuilder:
+ 
+         # No need to build tests
+         args.append("-DBUILD_TESTING=OFF")
++
++        # Always use flex from ports
++        args.append("-DFLEX_EXECUTABLE:FILEPATH=%%LOCALBASE%%/bin/flex")
++	
++        # Don't try to use git
++        args.append("-DCMAKE_DISABLE_FIND_PACKAGE_Git:BOOL=True")
+         
+         # Do not treat compilation warnings as errors in case someone is trying
+         # to "pip install" igraph in an environment for which we don't provide