# -*- 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: Portfile 88000 2011-12-15 18:28:38Z dports@macports.org $

PortSystem          1.0

name                dot2tex
version             2.8.7
revision            1
categories          graphics print python
platforms           darwin
license             MIT
maintainers         snc openmaintainer
description         Convert graphs generated by Graphviz to LaTeX friendly formats
long_description \
   The purpose of dot2tex is to give graphs generated by Graphviz a more \
   LaTeX friendly look and feel. This is accomplished by converting xdot \
   output from Graphviz to a series of PSTricks or PGF/TikZ commands.

homepage            http://www.fauskes.net/code/dot2tex
master_sites        googlecode

checksums           rmd160  b57981fc01ce151da101c6d8c46702a14d733a54 \
                    sha256  899168d976faff8768115648a1371bcb92c81e14cf371cafec056eff398d56d7

livecheck.regex     <a href="http://dot2tex.googlecode.com/files/dot2tex-(.*)\.tar\.gz"

depends_run         bin:dot:graphviz bin:latex:texlive bin:pdflatex:texlive

if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
	default_variants    +python27
}

PortGroup python 1.0

variant python25 conflicts python26 python27 {
    python.default_version 25
    depends_lib-append  port:py25-parsing
}

variant python26 conflicts python25 python27 {
    python.default_version 26
    depends_lib-append  port:py26-parsing
}

variant python27 conflicts python25 python26 {
    python.default_version 27
    depends_lib-append  port:py27-parsing
}

post-extract {
    fs-traverse dir ${workpath} {
        if {[file isdirectory ${dir}]} {
            file attributes ${dir} -permissions 0755
        }
    }
}

python.link_binaries_suffix

livecheck.url       ${homepage}/download/
livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)${extract.suffix}
