# -*- 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 93028 2012-05-14 06:54:37Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               php 1.0

php.setup               svn 1.0.2 pecl
php.branches            5.3 5.4
categories-append       devel
platforms               darwin
maintainers             ryandesign

description             PHP bindings for Subversion

long_description        ${description}

checksums               rmd160  c4991e9a5c4203c0374529c4ddd156b6020af0a8 \
                        sha256  ca0ea834e745a1aae65b456800bb5c5cfd7c4eceff281f7a8e317d30726e48cd

if {${name} != ${subport}} {
    depends_lib-append      port:subversion
    
    patchfiles              patch-hook_emailcommit.php
    
    post-patch {
        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/examples/hook_emailcommit.php
    }
    
    configure.args-append   --with-svn=${prefix} \
                            --with-svn-apr=${prefix}/bin/apr-1-config
    
    post-destroot {
        xinstall -d ${destroot}${prefix}/share/examples
        copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${subport}
    }
}
