ports/155114: [patch] graphics/graphviz: Fails to build ruby plugin (w/ruby19)

Scot Hetzel swhetzel at gmail.com
Mon Feb 28 09:00:21 UTC 2011


>Number:         155114
>Category:       ports
>Synopsis:       [patch] graphics/graphviz: Fails to build ruby plugin (w/ruby19)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 28 09:00:20 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Scot Hetzel
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD vbox.hetzel.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r218879M: Sun Feb 20 08:46:49 UTC 2011
root at vbox.hetzel.local:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
When building the graphviz port with the ruby plugin, the configure script fails to locate the ruby program.

The problem is that the configure script expects the ruby program to be named 'ruby'.  But the lang/ruby19 port installs the program as ruby19.

To fix this issue, I added RUBY=${RUBY} to CONFIGURE_ENV.  This then resulted in the configure script failing to find the ruby.h header files.  This is failing due to ruby19 now has the header files in the include dir instead of the lib directory.
>How-To-Repeat:
Install lang/ruby19
# cd /usr/ports/graphics/graphviz
# make clean ; make config

  Choose the RUBY option

# make install
# pkg_info -g `make -V PKGNAME`
Information for graphviz-2.26.3_3:

Mismatched Checksums:
pkg_info: /usr/local/man/man3/gv.3ruby.gz doesn't exist
pkg_info: /usr/local/lib/graphviz/ruby/gv.so doesn't exist
pkg_info: /usr/local/lib/graphviz/ruby/libgv_ruby.a doesn't exist
pkg_info: /usr/local/lib/graphviz/ruby/libgv_ruby.la doesn't exist
pkg_info: /usr/local/lib/graphviz/ruby/libgv_ruby.so doesn't exist
pkg_info: /usr/local/lib/ruby/site_ruby/1.9/amd64-freebsd9/gv.so doesn't exist
pkg_info: /usr/local/share/graphviz/demo/modgraph.rb doesn't exist

>Fix:
The attached patch fixes these problem.

Changed files:
  Makefile
  files/patch-configure

NOTE: This patch hasn't been tested with lang/ruby18.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/graphviz/Makefile,v
retrieving revision 1.131
diff -u -r1.131 Makefile
--- Makefile	4 Dec 2010 07:31:59 -0000	1.131
+++ Makefile	28 Feb 2011 06:39:25 -0000
@@ -331,6 +331,7 @@
 
 .if defined(WITH_RUBY)
 CONFIGURE_ARGS+=	--enable-ruby
+CONFIGURE_ENV+=		RUBY="${RUBY}"
 PLIST_SUB+=		WITH_RUBY=""
 USE_RUBY=		yes
 .include "${PORTSDIR}/Mk/bsd.ruby.mk"
Index: files/patch-configure
===================================================================
RCS file: /home/ncvs/ports/graphics/graphviz/files/patch-configure,v
retrieving revision 1.9
diff -u -r1.9 patch-configure
--- files/patch-configure	15 Mar 2009 13:20:55 -0000	1.9
+++ files/patch-configure	28 Feb 2011 06:36:57 -0000
@@ -1,6 +1,6 @@
---- configure.orig	2008-10-08 01:54:55.000000000 +0200
-+++ configure	2009-02-27 11:12:03.000000000 +0100
-@@ -6481,6 +6481,9 @@
+--- configure.orig	2010-01-26 16:01:10.000000000 +0000
++++ configure	2011-02-28 06:36:25.156165774 +0000
+@@ -6917,6 +6917,9 @@
  	        *-apple-darwin* )
  	            CFLAGS="${CFLAGS} -fno-common -Wall"
  	            ;;
@@ -10,7 +10,7 @@
  	        *-freebsd* )
  	            CFLAGS="${CFLAGS} -Wstrict-prototypes -Wpointer-arith -Wall -ffast-math"
  		    ;;
-@@ -26247,7 +26250,9 @@
+@@ -24803,7 +24806,9 @@
  
          LUA_INCLUDES=""
          LUA_LIBS=""
@@ -21,3 +21,19 @@
  
          if test -n "$lua_inc"; then
             CFLAGS="$CFLAGS -I$lua_inc"
+@@ -27574,7 +27579,14 @@
+       if test "x$RUBY" = "x"; then
+ 	use_ruby="No (ruby not available)"
+       else
+-        RUBY_INCLUDES="-I`$RUBY $srcdir/config/config_ruby.rb INCLUDES`"
++	RUBY_VER="`$RUBY -rrbconfig -e \"puts Config::CONFIG['ruby_version']\"`"
++	if test "x$RUBY_VER" = "x1.8"; then
++        	RUBY_INCLUDES="-I`$RUBY $srcdir/config/config_ruby.rb INCLUDES`"
++	else
++        	RUBY_INC="`$RUBY -rrbconfig -e \"puts Config::CONFIG['rubyhdrdir']\"`"
++		RUBY_ARCH="`$RUBY -rrbconfig -e \"puts Config::CONFIG['arch']\"`"
++		RUBY_INCLUDES="-I$RUBY_INC -I$RUBY_INC/$RUBY_ARCH"
++	fi
+ 	# hack for powerpc-darwin8 (10.4)
+ 	RUBY_INCLUDES=`echo $RUBY_INCLUDES | sed 's/powerpc/universal/'`
+         RUBY_LIBS="-L`$RUBY $srcdir/config/config_ruby.rb lib` `$RUBY -rrbconfig -e \"puts Config::CONFIG['LIBRUBYARG_SHARED']\"`"


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list