Index | Thread | Search

From:
Caspar Schutijser <caspar@schutijser.com>
Subject:
math/py-pygraphviz should LIB_DEPEND on math/graphviz
To:
ports@openbsd.org
Cc:
Lucas Gabriel Vuotto <lucas@sexy.is>
Date:
Tue, 17 Jun 2025 18:24:33 +0200

Download raw body.

Thread
Hi,

$ dnsviz print             
pygraphviz is required, but not installed

This happens when math/py-pygraphviz is installed but math/graphviz
isn't.
/usr/local/lib/python3.12/site-packages/pygraphviz/_graphviz.cpython-312.so
needs libraries provided by math/graphviz at runtime too, not just at
buildtime.

I think this is the way to fix it.

Comments or OKs?

Caspar


Index: Makefile
===================================================================
RCS file: /cvs/ports/math/py-pygraphviz/Makefile,v
diff -u -p -r1.1.1.1 Makefile
--- Makefile	9 Jun 2025 18:47:40 -0000	1.1.1.1
+++ Makefile	17 Jun 2025 16:16:09 -0000
@@ -4,18 +4,21 @@ MODPY_DISTV =	1.14
 DISTNAME =	pygraphviz-${MODPY_DISTV}
 PKGNAME =	py-${DISTNAME}
 CATEGORIES =	math
+REVISION =	0
 
 HOMEPAGE =	https://pygraphviz.github.io/
 
 # BSD
 PERMIT_PACKAGE =	Yes
 
+WANTLIB += cdt cgraph gvc
+
 MODULES =	lang/python
 
 MODPY_PI =	Yes
 MODPY_PYBUILD =	setuptools
 
-BUILD_DEPENDS +=	math/graphviz
+LIB_DEPENDS +=	math/graphviz
 
 CFLAGS +=	-I${LOCALBASE}/include
 LDFLAGS +=	-L${LOCALBASE}/lib