# -*- 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 119815 2014-05-07 18:22:27Z sean@macports.org $

PortSystem          1.0
PortGroup           python 1.0
PortGroup           select 1.0
PortGroup           github 1.0

github.setup        Kozea CairoSVG 1.0.7
name                py-cairosvg

categories-append   graphics
license             LGPL-3+
platforms           darwin
supported_archs     noarch
maintainers         sean openmaintainer

description         SVG converter based on Cairo

long_description    CairoSVG is a SVG converter based on Cairo. It can export SVG \
                    files to PDF, PostScript and PNG files.

checksums           rmd160  3bbb0f75ffefdf01bf70fa25eb5cb43505f55a10 \
                    sha256  e29e3b3d3e3bab2aa025f77b5b74b46d3885784631cce5fca2f511e11b0c5779

python.versions     26 27 32 33

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-cairo

    depends_run         port:py-cairosvg_select

    select.group        py-cairosvg
    select.file         ${filespath}/py${python.version}-cairosvg

    livecheck.type      none

    notes "
To make the Python ${python.branch} version of py-cairosvg the one that is run\
when you execute the commands without a version suffix, e.g. 'cairosvg', run:

port select --set ${select.group} [file tail ${select.file}]
"
}
