[32991] trunk/dports/graphics/graphviz

ryandesign at macports.org ryandesign at macports.org
Tue Jan 15 21:50:34 PST 2008


Revision: 32991
          http://trac.macosforge.org/projects/macports/changeset/32991
Author:   ryandesign at macports.org
Date:     2008-01-15 21:50:32 -0800 (Tue, 15 Jan 2008)

Log Message:
-----------
graphviz: enable installation of the Pixelglow Graphviz GUI, patched to use the newer Graphviz binaries from MacPorts

Modified Paths:
--------------
    trunk/dports/graphics/graphviz/Portfile

Added Paths:
-----------
    trunk/dports/graphics/graphviz/files/graphviz-dispatcher.php.in

Modified: trunk/dports/graphics/graphviz/Portfile
===================================================================
--- trunk/dports/graphics/graphviz/Portfile	2008-01-16 02:43:14 UTC (rev 32990)
+++ trunk/dports/graphics/graphviz/Portfile	2008-01-16 05:50:32 UTC (rev 32991)
@@ -8,7 +8,6 @@
 categories          graphics
 maintainers         ryandesign
 homepage            http://www.graphviz.org/
-master_sites        ${homepage}pub/graphviz/ARCHIVE/
 platforms           darwin
 
 description \
@@ -26,10 +25,15 @@
 	programs (for non-interactive use) can use the +no_x11 \
 	variant to build graphviz without its display routines.
 
+master_sites \
+	${homepage}pub/graphviz/ARCHIVE/:source \
+	http://www.pixelglow.com/downloads/:guiapp
+
 checksums \
-	md5 8952fb2a627b38e38ed429a3a9d5cc5c \
-	sha1 46b704bd9b81922bcd17167c88f3278a9645e894 \
-	rmd160 6d0f23fa176a1bef7ee0ca48cf1b700fe6cbfb42
+	${distname}${extract.suffix} \
+		md5 8952fb2a627b38e38ed429a3a9d5cc5c \
+		sha1 46b704bd9b81922bcd17167c88f3278a9645e894 \
+		rmd160 6d0f23fa176a1bef7ee0ca48cf1b700fe6cbfb42
 
 platform darwin 6 {
 	pre-fetch {
@@ -211,6 +215,29 @@
 		--without-x
 }
 
+variant gui description {Include the Pixelglow Graphviz GUI} {
+	distfiles-append \
+		graphviz-1.13-v16.tgz:guiapp
+	checksums-append \
+		graphviz-1.13-v16.tgz \
+			md5 a3278f993ef3ce021043a17b16a9fd5f \
+			sha1 87ee05a99088a98aef4937d72c3bb6cf488e3074 \
+			rmd160 35eac7c7013bddc0d1f107fcaf8e9c7d1e078231
+	post-destroot {
+		set apppath ${destroot}/Applications/MacPorts
+		set macospath ${apppath}/Graphviz.app/Contents/MacOS
+		set dispatcher graphviz-dispatcher.php
+		xinstall -d ${apppath}
+		file copy "${workpath}/Graphviz 1.13 (v16)/Graphviz.app" ${apppath}
+		xinstall -m 755 ${filespath}/${dispatcher}.in ${macospath}/${dispatcher}
+		reinplace "s%@PREFIX@%${prefix}%g" ${macospath}/${dispatcher}
+		foreach prog {acyclic bcomps ccomps circo cvtgxl dijkstra dot gc gvcolor gvpack gvpr neato nop sccmap tred twopi unflatten} {
+			delete ${macospath}/${prog}
+			ln -s ${dispatcher} ${macospath}/${prog}
+		}
+	}
+}
+
 # Make the configuration file that makes the plugins work:
 post-activate {
 	system "dot -c"

Added: trunk/dports/graphics/graphviz/files/graphviz-dispatcher.php.in
===================================================================
--- trunk/dports/graphics/graphviz/files/graphviz-dispatcher.php.in	                        (rev 0)
+++ trunk/dports/graphics/graphviz/files/graphviz-dispatcher.php.in	2008-01-16 05:50:32 UTC (rev 32991)
@@ -0,0 +1,26 @@
+#!/usr/bin/php
+<?php
+
+# Graphviz Dispatcher by Ryan Schmidt
+
+define('GRAPHVIZ_DIR', '@PREFIX@/bin');
+
+$args = $_SERVER['argv'];
+
+$prog = basename(array_shift($args));
+if ('cvtgxl' == $prog) $prog = 'dot2gxl';
+
+$cmd = escapeshellarg(GRAPHVIZ_DIR . '/' . $prog);
+foreach ($args as $arg) {
+	if ('-Tepdf' == $arg) {
+		$arg = '-Tpdf';
+		$cmd .= ' -Gmargin="0,0"';
+		$cmd .= ' -Gdpi=96';
+	}
+	$cmd .= ' ' . escapeshellarg($arg);
+}
+
+passthru($cmd, $return_code);
+exit($return_code);
+
+?>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080115/f86af236/attachment.html


More information about the macports-changes mailing list