git: ff8050cc28d8 - 2023Q3 - graphics/graphviz: migrate to USES=ghostscript:lib

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Thu, 06 Jul 2023 20:44:41 UTC
The branch 2023Q3 has been updated by rene:

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

commit ff8050cc28d8c6e2a467d903d5f27605508da25b
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2023-07-06 20:03:09 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2023-07-06 20:43:11 +0000

    graphics/graphviz: migrate to USES=ghostscript:lib
    
    PR:             270989
    (cherry picked from commit dbbf45e73697231a124b467b90dc2f111c3f5cda)
---
 graphics/graphviz/Makefile | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/graphics/graphviz/Makefile b/graphics/graphviz/Makefile
index bf9a8bf286f5..135cca7a76cf 100644
--- a/graphics/graphviz/Makefile
+++ b/graphics/graphviz/Makefile
@@ -90,7 +90,6 @@ GTK2_USES=	gnome xorg
 GTK2_USE=	XORG=sm,ice,xext,xinerama,xi,xrandr,xcursor,xfixes GNOME=gtk20
 SMYRNA_USES=	gnome gl
 SMYRNA_USE=	GNOME=libglade2,pangox-compat,gdkpixbuf2 GL=glut,glu,gl
-GHOSTSCRIPT_USES=ghostscript
 PERL_USES=	perl5
 PHP_USES=	php:build gnome
 PHP_USE=	GNOME=libxml2
@@ -100,7 +99,7 @@ RUBY_USES=	ruby
 LUA_USES=	lua
 TK_USES=	tk:build
 GO_USES=	go:no_targets
-DOCS_USES=	ghostscript:build groff
+DOCS_USES=	groff
 
 POPPLER_LIB_DEPENDS=	libpoppler-glib.so:graphics/poppler-glib
 ANN_LIB_DEPENDS=	libann.so:math/ann
@@ -112,7 +111,6 @@ GUILE_LIB_DEPENDS=	libguile-2.2.so:lang/guile2 \
 			libgc-threaded.so:devel/boehm-gc-threaded
 PHP_LIB_DEPENDS=	libpcre.so:devel/pcre \
 			libargon2.so:security/libargon2
-GHOSTSCRIPT_LIB_DEPENDS=	libgs.so:print/${_GS_PORT}
 
 XPM_CONFIGURE_WITH=		x
 XPM_CONFIGURE_ENV=		ac_cv_header_sys_inotify_h=no
@@ -225,6 +223,18 @@ CONFIGURE_ARGS+=	--disable-swig
 CONFIGURE_ENV+=		SWIG="/nonexistent"
 .endif
 
+.if ${PORT_OPTIONS:MGHOSTSCRIPT}
+USES_GHOSTSCRIPT_ARGS+=	lib
+.endif
+
+.if ${PORT_OPTIONS:MDOCS}
+USES_GHOSTSCRIPT_ARGS+=	build
+.endif
+
+.if defined(USES_GHOSTSCRIPT_ARGS)
+USES+=	ghostscript:${USES_GHOSTSCRIPT_ARGS:ts,}
+.endif
+
 .include <bsd.port.pre.mk>
 
 post-patch: