# $Id: Portfile 62727 2010-01-15 04:25:25Z nox@macports.org $

PortSystem      1.0
PortGroup       archcheck 1.0
PortGroup       php5extension 1.0

php5extension.setup enchant 1.1.0 pecl
license         PHP
categories      php textproc devel
platforms       darwin
maintainers     nox openmaintainer
description     libenchant binder, support near all spelling tools

long_description \
    Enchant is a binder for libenchant. Libenchant provides a common API for \
    many spell libraries.

checksums       md5     88a9ebc2fed2f568181c55bd61e12e03 \
                sha1    8f70603a5ab438450ce19516e5f3a9ed81ad9740 \
                rmd160  89cfb0e304ceb637d3a91ba28bf2a712fbe291df

depends_lib-append \
    port:enchant

archcheck.files \
    lib/libenchant.dylib

configure.args \
    --with-enchant=${prefix}

test.run yes

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} CREDITS ${destroot}${docdir}

    set examplesdir ${prefix}/share/examples/${name}
    xinstall -d ${destroot}${examplesdir}
    xinstall -m 644 ${worksrcpath}/docs/examples/example1.php \
        ${destroot}${examplesdir}
}
