# -*- 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 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem          1.0
PortGroup           perl5 1.0

perl5.setup         CSS 1.08
revision            2
platforms           darwin
maintainers         gmail.com:ejshamow
license             {Artistic GPL}
supported_archs     noarch

description         Object oriented access to Cascading Style Sheets (CSS)

long_description    This module can be used to parse CSS data and represent \
                    it as a tree of objects, which can then be transformed \
                    into other formats.

checksums           sha1    6b0dff68227cbc9acc8df87350bdfac0163741d1 \
                    rmd160  7b234dbc8d06ab69a7d168da0ad2c742878bac4e

if {${perl5.major} != ""} {
depends_lib-append  port:p${perl5.major}-parse-recdescent

post-configure {
    ui_debug "Recompiling CSS::Parse::CompiledGrammar (see https://rt.cpan.org/Public/Bug/Display.html?id=53948)"
    system "cd ${worksrcpath} && ${perl5.bin} -I${worksrcpath} ${filespath}/build-grammar.pl"
    move -force ${worksrcpath}/CompiledGrammar.pm ${worksrcpath}/CSS/Parse
}

post-destroot {
    set examplesdir ${destroot}${prefix}/share/examples/${name}
    xinstall -d ${examplesdir}
    eval xinstall -m 644 [glob ${worksrcpath}/examples/*] \
        ${examplesdir}
}
}
