# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 74826 2011-01-03 10:28:48Z nox@macports.org $

PortSystem      1.0
PortGroup       archcheck 1.0
PortGroup       php5extension 1.0

php5extension.setup html_parse 1.0.0 pecl
license         PHP
categories      php textproc devel
platforms       darwin
maintainers     nomaintainer
description     HTML parser extension

long_description \
    HTML parser extension based on the ekhtml library.

checksums       md5     d19772cb926d775313af0fda207e2a90 \
                sha1    a287944c9d1e79bed2b9c180f2c76b99cda954ad \
                rmd160  6e476ca31f0d85eb70bf4f9ce194f7e811d58d4d

depends_lib-append \
    port:ekhtml

archcheck.files \
    lib/libekhtml.dylib

configure.args  --with-ekhtml=${prefix}

use_parallel_build yes

test.run        yes
test.env        TEST_PHP_EXECUTABLE=${prefix}/bin/php
test.cmd        php run-tests.php
test.args       -q
test.target

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