# -*- 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

PortSystem              1.0

name                    php5-simpletest
set real_name           simpletest
set cap_name            SimpleTest
version                 1.1.0
set branch              [join [lrange [split ${version} .] 0 1] .]
categories              php devel
maintainers             nomaintainer
supported_archs         noarch
license                 LGPL-2

homepage                http://simpletest.org/
master_sites            sourceforge:project/simpletest/simpletest/simpletest_${branch}
distname                ${real_name}_${version}
worksrcdir              ${real_name}
platforms               any

checksums               rmd160  a253e6a4424326455a00908e660d7d29a1730f54 \
                        sha256  c9843becf2cec9022e11a05c8e95ae9e8d23624054c5c4e8e2b68f153e98d665

description             unit testing for PHP
long_description \
    SimpleTest is a PHP unit test and web test framework. Users of JUnit will \
    be familiar with most of the interface. The JWebUnit style functionality \
    is more complete now. It has support for SSL, forms, frames, proxies and \
    basic authentication. The idea is that common but fiddly PHP tasks, such \
    as logging into a site, can be tested easily.

depends_lib             path:bin/php:php5

use_configure           no
build                   {}
destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    delete ${worksrcpath}/LICENSE
    delete ${worksrcpath}/VERSION
    foreach d {docs README HELP_MY_TESTS_DONT_WORK_ANYMORE} {
        move ${worksrcpath}/${d} ${docdir}
    }

    xinstall -d ${destroot}${prefix}/lib/php
    file copy ${worksrcpath} ${destroot}${prefix}/lib/php/${cap_name}
}