Bug 118094

Summary: [PATCH]graphics/graphviz: misc. problems
Product: Ports & Packages Reporter: bf <bf2006a>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description bf 2007-11-17 01:40:01 UTC
Several minor problems exist with current port:

1) WITH_TCL doesn't build WITHOUT_TK on my system, and the extra pkg-plist files for the two options are conflated. Also, it seems that WITH_TK should set USE_TK instead of USE_TK_BUILD.  As a crude fix, combine the two options.

2) The port's configure script picks up hidden dependencies on ming and libgnomeui if these are installed within the search path, and installs extra files not in the pkg-plist if ming is present.  Make these dependencies explicit with options. Xpm is also autoconfigured: recognize this.

3) Pangocairo support shouldn't require the gtk plugin.  Separate the two.

4) Enable some lneato options (*COLA options).

2.16.x is out, but I thought it best to submit these proposed changes now because of the freeze.  The resulting patch is a bit larger than the actual changes require, because I sorted the original options for my own convenience.  Sorry about the mess:

diff -ruN graphviz.orig/Makefile graphviz/Makefile
--- graphviz.orig/Makefile	Thu Nov 15 18:55:33 2007
+++ graphviz/Makefile	Thu Nov 15 22:32:38 2007
@@ -7,7 +7,7 @@
 
 PORTNAME=	graphviz
 PORTVERSION=	2.14.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics tk84
 MASTER_SITES=	http://www.graphviz.org/pub/graphviz/ARCHIVE/ \
 		http://mirror.inerd.com/FreeBSD/distfiles/${PORTNAME}/
@@ -67,82 +67,135 @@
 
 USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}
 
-OPTIONS=	TK "Build with TK support" on \
-		XPM "Build with XPM support" on \
+OPTIONS=	DIGCOLA "DIGCOLA features in neato layout engine" off \
+		GNOMEUI  "build with libgnomeui support" off \
+		GTK "build with gtk plugin" off \
+		GUILE "Guile bindings (swig)" off \
 		ICONV "Build with ICONV support" on \
-		NLS "Build with gettext support" on \
-		PANGOCAIRO "build with pangocairo support (gtk)" off \
+		IPSEPCOLA "IPSEPCOLA features in neato layout engine" off \
+		LUA "Lua bindings (swig)" off \
+		MING "Build with ming plugin" off \
+		NLS "Build with gettext support" off \
+		PANGOCAIRO "build with pangocairo support" off \
 		PERL "Perl bindings (swig)" off \
 		PHP "PHP bindings (swig)" off \
 		PYTHON "Python bindings (swig)" off \
 		RUBY "Ruby bindings (swig)" off \
-		LUA "Lua bindings (swig)" off \
-		TCL "TCL bindings (swig)" off \
-		GUILE "Guile bindings (swig)" off
+		TK "Build with TK support (swig)" off \
+		XPM "Build with XPM support" off
 
 .include <bsd.port.pre.mk>
 
 CONFIGURE_ARGS+=	--program-transform-name="s/x/x/" \
-		--enable-dependency-tracking \
-		--with-libgd \
-		--with-fontconfigincludedir=${X11BASE}/include \
-		--with-fontconfiglibdir=${X11BASE}/lib \
-		--disable-io --disable-ocaml --disable-java \
-		--disable-sharp
+			--enable-dependency-tracking \
+			--with-libgd \
+			--with-fontconfigincludedir=${X11BASE}/include \
+			--with-fontconfiglibdir=${X11BASE}/lib \
+			--disable-io --disable-ocaml --disable-java \
+			--disable-sharp
 
 CONFIGURE_ENV+=	CFLAGS="${CFLAGS}" \
 		CPPFLAGS="${CPPFLAGS}" \
 		LDFLAGS="${LDFLAGS}" \
 		MISSING=${TRUE}
 
-.if !defined(WITHOUT_TK)
-USE_TK_BUILD=	84
-.include "${PORTSDIR}/Mk/bsd.tcl.mk"
-CONFIGURE_ARGS+=	--with-tclsh=${TCLSH} \
-		--with-wish=${WISH}
-CONFIGURE_ENV+=	TCLCONFIG="${TCL_LIBDIR}/tclConfig.sh" \
-		TKCONFIG="${TK_LIBDIR}/tkConfig.sh"
-MANN=		gdtclft.n tcldot.n tkspline.n
+.if defined(WITH_DIGCOLA)
+CONFIGURE_ARGS+=	--with-digcola
 .else
-.if defined(WITH_TCL)
-USE_TCL_BUILD=	84
-.include "${PORTSDIR}/Mk/bsd.tcl.mk"
-CONFIGURE_ARGS+=	--with-tclsh=${TCLSH}
-CONFIGURE_ENV+=	TCLCONFIG="${TCL_LIBDIR}/tclConfig.sh"
+CONFIGURE_ARGS+=	--without-digcola
+.if defined(WITH_IPSEPCOLA)
+IGNORE= 		option WITH_DIGCOLA is required for option WITH_IPSEPCOLA
 .endif
 .endif
 
-.if !defined(WITHOUT_ICONV)
+.if defined(WITH_IPSEPCOLA)
+CONFIGURE_ARGS+=	--with-ipsepcola
+.else
+CONFIGURE_ARGS+=	--without-ipsepcola
+.endif
+
+.if defined(WITH_ICONV)
 USE_ICONV=	yes
-CONFIGURE_ARGS+=	--with-iconvlibdir=${LOCALBASE}/lib
+CONFIGURE_ARGS+=	--with-iconvlibdir=${LOCALBASE}/lib \
+			--with-iconvincludedir=${LOCALBASE}/include
+.else
+CONFIGURE_ARGS+=	--without-libiconv-prefix
 .endif
 
-.if !defined(WITHOUT_XPM)
-USE_XPM=	yes
-MAN1+=		lefty.1
-PLIST_SUB+=	WITH_XPM=""
+.if defined(WITH_MING)
+CONFIGURE_ARGS+=	--with-ming
+PLIST_SUB+=		WITH_MING=""
+LIB_DEPENDS+=		ming.4:${PORTSDIR}/graphics/ming
 .else
-PLIST_SUB+=	WITH_XPM="@comment "
+CONFIGURE_ARGS+=	--without-ming
+PLIST_SUB+=		WITH_MING="@comment "
 .endif
 
-.if !defined(WITHOUT_NLS)
+.if defined(WITH_NLS)
 USE_GETTEXT=	yes
 .else
 CONFIGURE_ARGS+=	--disable-nls
 .endif
 
 .if defined(WITH_PANGOCAIRO)
-CONFIGURE_ARGS+=	--with-gtk --with-pangocairo
+CONFIGURE_ARGS+=	--with-pangocairo
 PLIST_SUB+=		WITH_PANGOCAIRO=""
-USE_GNOME=	gtk20 pango
+USE_GNOME=		pango
 .include "${PORTSDIR}/Mk/bsd.gnome.mk"
 .else
-CONFIGURE_ARGS+=	--with-pangocairo=no
+CONFIGURE_ARGS+=	--without-pangocairo
 PLIST_SUB+=		WITH_PANGOCAIRO="@comment "
+.if defined(WITH_GTK)
+IGNORE= 		option WITH_PANGOCAIRO is required for option WITH_GTK
+.endif
+.endif
+
+.if defined(WITH_GTK)
+CONFIGURE_ARGS+=	--with-gtk
+PLIST_SUB+=		WITH_GTK=""
+USE_GNOME+=		gtk20
+.else
+CONFIGURE_ARGS+=	--without-gtk
+PLIST_SUB+=		WITH_GTK="@comment "
+.if defined(WITH_GNOMEUI)
+IGNORE=			option WITH_GTK is required for option WITH_GNOMEUI
+.endif
+.endif
+
+.if defined(WITH_GNOMEUI)
+CONFIGURE_ARGS+=	--with-gnomeui
+USE_GNOME+=		libgnomeui
+.else
+CONFIGURE_ARGS+=	--without-gnomeui
+.endif
+
+.if defined(WITH_TK)
+USE_TK= 84
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+CONFIGURE_ARGS+=	--with-tclsh=${TCLSH} \
+			--with-wish=${WISH} \
+			--enable-tcl
+CONFIGURE_ENV+=	TCLCONFIG="${TCL_LIBDIR}/tclConfig.sh" \
+		TKCONFIG="${TK_LIBDIR}/tkConfig.sh"
+MANN+=		gdtclft.n tcldot.n tkspline.n gv_tcl.n
+PLIST_SUB+=		WITH_TK=""
+.else
+CONFIGURE_ARGS+=	--without-tclsh \
+			--without-wish \
+			--disable-tcl
+PLIST_SUB+=		WITH_TK="@comment "
+.endif
+
+.if exists(${LOCALBASE}/lib/libXpm.so) || defined(WITH_XPM)
+USE_XPM=	yes
+MAN1+=		lefty.1
+PLIST_SUB+=	WITH_XPM=""
+.else
+PLIST_SUB+=	WITH_XPM="@comment "
 .endif
 
 .if defined(WITH_PERL) || defined(WITH_PHP) || defined(WITH_PYTHON) || \
-    defined(WITH_RUBY) || defined(WITH_LUA) || defined(WITH_TCL) || defined(WITH_GUILE)
+    defined(WITH_RUBY) || defined(WITH_LUA) || defined(WITH_TK) || defined(WITH_GUILE)
 BUILD_DEPENDS+=		swig1.3:${PORTSDIR}/devel/swig13
 RUN_DEPENDS+=		swig1.3:${PORTSDIR}/devel/swig13
 CONFIGURE_ARGS+=	--enable-swig
@@ -152,82 +205,73 @@
 CONFIGURE_ENV+=		SWIG="/nonexistent"
 .endif
 
-. if !defined(WITH_PERL)
-CONFIGURE_ARGS+=	--disable-perl
-PLIST_SUB+=		WITH_PERL="@comment "
-. else
+.if defined(WITH_GUILE)
+CONFIGURE_ARGS+=	--enable-guile
+PLIST_SUB+=		WITH_GUILE=""
+LIB_DEPENDS+=		guile.15:${PORTSDIR}/lang/guile
+MANN+=			gv_guile.n
+.else
+CONFIGURE_ARGS+=	--disable-guile
+PLIST_SUB+=		WITH_GUILE="@comment "
+.endif
+
+.if defined(WITH_LUA)
+CONFIGURE_ARGS+=	--enable-lua
+PLIST_SUB+=		WITH_LUA=""
+USE_LUA=		yes
+.include "${PORTSDIR}/Mk/bsd.lua.mk"
+CFLAGS+=		-I${LUA_INCDIR}
+LDFLAGS+=		-L${LUA_LIBDIR} -lm
+CONFIGURE_ENV+=		LUA="${LUA_BINDIR}/lua"
+MANN+=			gv_lua.n
+.else
+CONFIGURE_ARGS+=	--disable-lua
+PLIST_SUB+=		WITH_LUA="@comment "
+.endif
+
+.if defined(WITH_PERL)
 CONFIGURE_ARGS+=	--enable-perl
 PLIST_SUB+=		WITH_PERL=""
-USE_PERL5=	yes
+USE_PERL5=		yes
 MANN+=			gv_perl.n
-. endif
+.else
+CONFIGURE_ARGS+=	--disable-perl
+PLIST_SUB+=		WITH_PERL="@comment "
+.endif
 
-. if !defined(WITH_PHP)
-CONFIGURE_ARGS+=	--disable-php
-PLIST_SUB+=		WITH_PHP="@comment "
-. else
+.if defined(WITH_PHP)
 CONFIGURE_ARGS+=	--enable-php
 PLIST_SUB+=		WITH_PHP=""
-USE_PHP=	yes
-USE_PHP_BUILD=	yes
+USE_PHP=		yes
+USE_PHP_BUILD=		yes
 CPPFLAGS+=		-I${LOCALBASE}/include/php/Zend
 MANN+=			gv_php.n
-. endif
+.else
+CONFIGURE_ARGS+=	--disable-php
+PLIST_SUB+=		WITH_PHP="@comment "
+.endif
 
-. if !defined(WITH_PYTHON)
-CONFIGURE_ARGS+=	--disable-python
-PLIST_SUB+=		WITH_PYTHON="@comment "
-. else
+.if defined(WITH_PYTHON)
 CONFIGURE_ARGS+=	--enable-python
 PLIST_SUB+=		WITH_PYTHON=""
 USE_PYTHON_BUILD=	yes
 .include "${PORTSDIR}/Mk/bsd.python.mk"
 LDFLAGS+=		"-L${PYTHON_LIBDIR}"
 MANN+=			gv_python.n
-. endif
+.else
+CONFIGURE_ARGS+=	--disable-python
+PLIST_SUB+=		WITH_PYTHON="@comment "
+.endif
 
-. if !defined(WITH_RUBY)
-CONFIGURE_ARGS+=	--disable-ruby
-PLIST_SUB+=		WITH_RUBY="@comment "
-. else
+.if defined(WITH_RUBY)
 CONFIGURE_ARGS+=	--enable-ruby
 PLIST_SUB+=		WITH_RUBY=""
-USE_RUBY=	yes
+USE_RUBY=		yes
 .include "${PORTSDIR}/Mk/bsd.ruby.mk"
-. endif
-
-. if !defined(WITH_LUA)
-CONFIGURE_ARGS+=	--disable-lua
-PLIST_SUB+=		WITH_LUA="@comment "
-. else
-CONFIGURE_ARGS+=	--enable-lua
-PLIST_SUB+=		WITH_LUA=""
-USE_LUA=		yes
-.include "${PORTSDIR}/Mk/bsd.lua.mk"
-CFLAGS+=		-I${LUA_INCDIR}
-LDFLAGS+=		-L${LUA_LIBDIR} -lm
-CONFIGURE_ENV+=		LUA="${LUA_BINDIR}/lua"
-MANN+=			gv_lua.n
-. endif
-
-. if !defined(WITH_TCL)
-CONFIGURE_ARGS+=	--disable-tcl
-PLIST_SUB+=		WITH_TCL="@comment "
-. else
-CONFIGURE_ARGS+=	--enable-tcl
-PLIST_SUB+=		WITH_TCL=""
-MANN+=			gv_tcl.n
-. endif
-
-. if !defined(WITH_GUILE)
-CONFIGURE_ARGS+=	--disable-guile
-PLIST_SUB+=		WITH_GUILE="@comment "
-. else
-CONFIGURE_ARGS+=	--enable-guile
-PLIST_SUB+=		WITH_GUILE=""
-LIB_DEPENDS+=		guile.15:${PORTSDIR}/lang/guile
-MANN+=			gv_guile.n
-. endif
+.else
+CONFIGURE_ARGS+=	--disable-ruby
+PLIST_SUB+=		WITH_RUBY="@comment "
+.endif
 
 pre-patch:
 	@${FIND} ${WRKSRC} -name Makefile.in | \
@@ -254,7 +298,7 @@
 	@${REINPLACE_CMD} -e "s|/usr/include/php|${LOCALBASE}/include/php|g" \
 		-e "s|-lruby|-lruby${RUBY_SUFFIX}|g" ${WRKSRC}/configure
 
-.if !defined(WITHOUT_TK)
+.if defined(WITH_TK)
 post-install-script:
 	${INSTALL_MAN} \
 		${WRKSRC}/tclpkg/gdtclft/gdtclft.n \
diff -ruN graphviz.orig/pkg-plist graphviz/pkg-plist
--- graphviz.orig/pkg-plist	Thu Nov 15 18:55:33 2007
+++ graphviz/pkg-plist	Thu Nov 15 21:28:07 2007
@@ -110,10 +110,10 @@
 lib/graphviz/libgvplugin_gd.so.4
 lib/graphviz/libgvplugin_gd.la
 lib/graphviz/libgvplugin_gd.a
-%%WITH_PANGOCAIRO%%lib/graphviz/libgvplugin_gtk.a
-%%WITH_PANGOCAIRO%%lib/graphviz/libgvplugin_gtk.la
-%%WITH_PANGOCAIRO%%lib/graphviz/libgvplugin_gtk.so
-%%WITH_PANGOCAIRO%%lib/graphviz/libgvplugin_gtk.so.4
+%%WITH_GTK%%lib/graphviz/libgvplugin_gtk.a
+%%WITH_GTK%%lib/graphviz/libgvplugin_gtk.la
+%%WITH_GTK%%lib/graphviz/libgvplugin_gtk.so
+%%WITH_GTK%%lib/graphviz/libgvplugin_gtk.so.4
 lib/graphviz/libgvplugin_neato_layout.so
 lib/graphviz/libgvplugin_neato_layout.so.4
 lib/graphviz/libgvplugin_neato_layout.la
@@ -130,6 +130,12 @@
 %%WITH_GUILE%%lib/graphviz/guile/libgv_guile.la
 %%WITH_GUILE%%lib/graphviz/guile/libgv_guile.so
 %%WITH_GUILE%%lib/graphviz/guile/libgv_guile.so.0
+%%WITH_MING%%lib/graphviz/Bitstream_Vera_Sans.fdb
+%%WITH_MING%%lib/graphviz/Bitstream_Vera_Serif.fdb
+%%WITH_MING%%lib/graphviz/libgvplugin_ming.a
+%%WITH_MING%%lib/graphviz/libgvplugin_ming.la
+%%WITH_MING%%lib/graphviz/libgvplugin_ming.so
+%%WITH_MING%%lib/graphviz/libgvplugin_ming.so.4
 %%WITH_PHP%%lib/graphviz/php/gv.php
 %%WITH_PHP%%lib/graphviz/php/libgv_php.a
 %%WITH_PHP%%lib/graphviz/php/libgv_php.la
@@ -137,30 +143,30 @@
 %%WITH_PHP%%lib/graphviz/php/libgv_php.so.0
 %%WITH_PHP%%lib/graphviz/php/php_gv.h
 lib/graphviz/tcl/gv.so
-%%WITH_TCL%%lib/graphviz/tcl/libgdtclft.a
-%%WITH_TCL%%lib/graphviz/tcl/libgdtclft.la
-%%WITH_TCL%%lib/graphviz/tcl/libgdtclft.so
-%%WITH_TCL%%lib/graphviz/tcl/libgdtclft.so.0
-%%WITH_TCL%%lib/graphviz/tcl/libgv_tcl.a
-%%WITH_TCL%%lib/graphviz/tcl/libgv_tcl.la
-%%WITH_TCL%%lib/graphviz/tcl/libgv_tcl.so
-%%WITH_TCL%%lib/graphviz/tcl/libgv_tcl.so.0
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot.a
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot.la
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot.so
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot.so.0
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot_builtin.a
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot_builtin.la
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot_builtin.so
-%%WITH_TCL%%lib/graphviz/tcl/libtcldot_builtin.so.0
-%%WITH_TCL%%lib/graphviz/tcl/libtclplan.a
-%%WITH_TCL%%lib/graphviz/tcl/libtclplan.la
-%%WITH_TCL%%lib/graphviz/tcl/libtclplan.so
-%%WITH_TCL%%lib/graphviz/tcl/libtclplan.so.0
-%%WITH_TCL%%lib/graphviz/tcl/libtkspline.a
-%%WITH_TCL%%lib/graphviz/tcl/libtkspline.la
-%%WITH_TCL%%lib/graphviz/tcl/libtkspline.so
-%%WITH_TCL%%lib/graphviz/tcl/libtkspline.so.0
+%%WITH_TK%%lib/graphviz/tcl/libgdtclft.a
+%%WITH_TK%%lib/graphviz/tcl/libgdtclft.la
+%%WITH_TK%%lib/graphviz/tcl/libgdtclft.so
+%%WITH_TK%%lib/graphviz/tcl/libgdtclft.so.0
+%%WITH_TK%%lib/graphviz/tcl/libgv_tcl.a
+%%WITH_TK%%lib/graphviz/tcl/libgv_tcl.la
+%%WITH_TK%%lib/graphviz/tcl/libgv_tcl.so
+%%WITH_TK%%lib/graphviz/tcl/libgv_tcl.so.0
+%%WITH_TK%%lib/graphviz/tcl/libtcldot.a
+%%WITH_TK%%lib/graphviz/tcl/libtcldot.la
+%%WITH_TK%%lib/graphviz/tcl/libtcldot.so
+%%WITH_TK%%lib/graphviz/tcl/libtcldot.so.0
+%%WITH_TK%%lib/graphviz/tcl/libtcldot_builtin.a
+%%WITH_TK%%lib/graphviz/tcl/libtcldot_builtin.la
+%%WITH_TK%%lib/graphviz/tcl/libtcldot_builtin.so
+%%WITH_TK%%lib/graphviz/tcl/libtcldot_builtin.so.0
+%%WITH_TK%%lib/graphviz/tcl/libtclplan.a
+%%WITH_TK%%lib/graphviz/tcl/libtclplan.la
+%%WITH_TK%%lib/graphviz/tcl/libtclplan.so
+%%WITH_TK%%lib/graphviz/tcl/libtclplan.so.0
+%%WITH_TK%%lib/graphviz/tcl/libtkspline.a
+%%WITH_TK%%lib/graphviz/tcl/libtkspline.la
+%%WITH_TK%%lib/graphviz/tcl/libtkspline.so
+%%WITH_TK%%lib/graphviz/tcl/libtkspline.so.0
 lib/graphviz/lua/gv.so
 %%WITH_LUA%%lib/graphviz/lua/libgv_lua.a
 %%WITH_LUA%%lib/graphviz/lua/libgv_lua.la
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-11-17 01:40:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2007-11-18 12:28:15 UTC
State Changed
From-To: open->suspended

- ports are frozen since Tue, 30 Oct 2007 13:09:01
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-12-11 20:38:48 UTC
dinoex      2007-12-11 20:38:40 UTC

  FreeBSD ports repository

  Modified files:
    graphics/graphviz    Makefile pkg-plist 
  Log:
  - new options: WITH_GTK WITH_GNOMEUI WITH_DIGCOLA WITH_IPSEPCOLA WITH_MING
  PR:             118094
  Submitted by:   bf <bf2006a@yahoo.com>
  
  Revision  Changes    Path
  1.84      +115 -52   ports/graphics/graphviz/Makefile
  1.38      +10 -4     ports/graphics/graphviz/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2007-12-12 17:58:05 UTC
State Changed
From-To: suspended->patched

partly committed, thanks.
Comment 5 Dirk Meyer freebsd_committer freebsd_triage 2008-03-28 19:08:00 UTC
State Changed
From-To: patched->closed

A final fix for WITHOUT_TK has been commited.