# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name graphviz-oldgui conflicts graphviz-gui graphviz-gui-devel version 16 categories graphics maintainers ryandesign homepage http://www.pixelglow.com/graphviz/ master_sites http://www.pixelglow.com/downloads/ platforms macosx use_parallel_build no dist_subdir graphviz distname graphviz-1.13-v${version} extract.suffix .tgz universal_variant no supported_archs ppc description Mac OS X Aqua GUI for viewing and exporting \ Graphviz graphs long_description ${description}. checksums md5 a3278f993ef3ce021043a17b16a9fd5f \ sha1 87ee05a99088a98aef4937d72c3bb6cf488e3074 \ rmd160 35eac7c7013bddc0d1f107fcaf8e9c7d1e078231 depends_build port:pkgconfig \ port:libiconv depends_run path:bin/dot:graphviz pre-fetch { if {${os.major} >= 9} { set newport graphviz-gui if {[expr [lindex [split [exec ${prefix}/bin/pkg-config --modversion libgvc] .] 1] % 2]} { set newport graphviz-gui-devel } ui_msg "Consider installing ${newport} instead of ${name}." } } post-extract { # Rename worksrcpath so it doesn't contain spaces; some phases have problems otherwise. move "${workpath}/Graphviz 1.13 (v16)" ${worksrcpath} # The frameworks are v1.13 frameworks that aren't applicable anymore. delete ${worksrcpath}/Graphviz.app/Contents/Frameworks # Remove the .DS_Store files that we don't really want to install. fs-traverse item ${worksrcpath} { if {[file tail ${item}] eq ".DS_Store" && [file isfile ${item}]} { delete ${item} } } # Convert the strings from UTF-16 to UTF-8 so that we can patch them. system -W ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj "${prefix}/bin/iconv -f utf-16 -t utf-8 InfoPlist.strings > InfoPlist.strings.utf8" } patchfiles patch-version.diff \ patch-gv-extension.diff post-patch { # Convert the strings back to UTF-16 which is what Mac OS X expects. system -W ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj "${prefix}/bin/iconv -f utf-8 -t utf-16 InfoPlist.strings.utf8 > InfoPlist.strings" delete ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj/InfoPlist.strings.utf8 } use_configure no build { # Replace the v1.13 executables with symlinks to a wrapper script that # calls the new executables in ${prefix}/bin. The wrapper is necessary # to emulate the -Tepdf option which was specific to Pixelglow's fork. set dispatcher graphviz-dispatcher.php set macospath ${worksrcpath}/Graphviz.app/Contents/MacOS 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} } } destroot { set apppath ${destroot}${applications_dir} xinstall -d ${apppath} copy ${worksrcpath}/Graphviz.app ${apppath} } livecheck.type none