# $Id: Portfile 48807 2009-03-29 09:14:57Z ryandesign@macports.org $ PortSystem 1.0 name webdot version 2.22 categories www graphics maintainers ryandesign homepage http://www.graphviz.org/ master_sites ${homepage}pub/graphviz/stable/SOURCES/ platforms darwin use_parallel_build yes description Graphviz web service long_description WebDot is a CGI program that converts a graph \ description from a Graphviz .dot or .gv file into \ an image that can be included on a web page checksums md5 6acbb009daf32dd1ae9a004f6fce7ac7 \ sha1 6278313a41f7fcb337b4ecd6a4b1f1fd5fdc5b93 \ rmd160 c731d2549f185e508329efc9bb6e01fc3acc588e depends_build port:pkgconfig depends_lib path:bin/neato:graphviz depends_run port:ghostscript pre-configure { if {![file exists ${prefix}/lib/graphviz/tcl/libtcldot.dylib]} { set graphviz_port graphviz if {[expr [lindex [split [exec ${prefix}/bin/pkg-config --modversion libgvc] .] 1] % 2]} { set graphviz_port graphviz-devel } ui_msg "${name} requires that ${graphviz_port} first be installed with the +tcl variant." ui_msg "Rebuild ${graphviz_port} using:" ui_msg " sudo port -nf upgrade ${graphviz_port} +tcl" return -code error "${graphviz_port} missing +tcl variant" } } post-configure { reinplace "/^CGI-BIN_DIR=/s|=.*$|=${cgi_bin}|" ${worksrcpath}/Makefile reinplace "/^HTML_DIR=/s|=.*$|=${html_dir}/|" ${worksrcpath}/Makefile reinplace "/^CACHE_DIR=/s|=.*$|=${prefix}/var/cache|" ${worksrcpath}/Makefile reinplace "/^TCLSH_EXECUTABLE=/s|=.*$|=${prefix}/bin/tclsh|" ${worksrcpath}/Makefile reinplace "/^LIBTCLDOT=/s|=.*$|=${prefix}/lib/graphviz/tcl/libtcldot.dylib|" ${worksrcpath}/Makefile reinplace "/^GS=/s|=.*$|=${prefix}/bin/gs|" ${worksrcpath}/Makefile reinplace "/^PS2EPSI=/s|=.*$|=${prefix}/bin/ps2epsi|" ${worksrcpath}/Makefile } platform darwin { post-configure { set www_user www if {${os.major} >= 9} { set www_user _www } reinplace "/^HTTPD-USER-GROUP=/s|=.*$|=${www_user}:${www_user}|" ${worksrcpath}/Makefile } } set www ${prefix}/www set html_dir ${www}/htdocs set cgi_bin ${www}/cgi-bin variant apache_apple description {Install file in Apple's web server directories instead} { set www /Library/WebServer set html_dir ${www}/Documents set cgi_bin ${www}/CGI-Executables } livecheck.check regex livecheck.url ${homepage}Download_source.php livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)\\.tar