# -*- 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 91800 2012-04-10 22:53:54Z ryandesign@macports.org $

PortSystem          1.0

name                synfigstudio
version             0.63.05
categories          graphics
platforms           darwin
maintainers         ryandesign
license             GPL-2+

description         synfig animation studio

long_description    ${name} is the animation studio for synfig and provides \
                    a GUI to create synfig animations which are saved in \
                    synfig .sif or .sifz format.

homepage            http://www.synfig.org/
master_sites        sourceforge:project/synfig/synfigstudio/${version}

checksums           rmd160  a1c5cf7e90b0c6610fa38eb7d3ee0e559880bc25 \
                    sha256  72a5beb62f850b5058526b629133b77dd0a040c6312b985333558063c148af73

depends_build       port:pkgconfig

depends_lib         port:gtkmm \
                    port:synfig

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        ABOUT-NLS \
        AUTHORS \
        COPYING \
        ChangeLog \
        ChangeLog.old \
        NEWS \
        README \
        TODO \
        ${docdir}
    
    foreach f [glob ${destroot}${prefix}/share/mime/*] {
        if {[file isfile ${f}]} {
            delete ${f}
        }
    }
}

post-activate {
    system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
}

post-deactivate {
    system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
}

livecheck.name      synfig
livecheck.type      sourceforge
livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
