# -*- 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 92796 2012-05-07 05:08:40Z ryandesign@macports.org $

PortSystem      1.0
PortGroup       php 1.0

php.setup       oauth 1.2.2 pecl
php.branches    5.3 5.4
license         BSD
categories      php devel
platforms       darwin
maintainers     nomaintainer
description     oauth consumer extension

long_description \
    OAuth is an authorization protocol built on top of HTTP which allows \
    applications to securely access data without having to store usernames and \
    passwords.

checksums       sha1    bd74cd7aa150e33db20ac36f0b1459473f1ef070 \
                rmd160  82e172febc68dc15e225fbd96a9d5b40f0741fa4

if {${name} != ${subport}} {
    depends_lib-append \
        port:gettext \
        port:curl
    
    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        set exampledir ${prefix}/share/examples
        xinstall -d ${destroot}${docdir} ${destroot}${exampledir}
        xinstall -m 644 -W ${worksrcpath} LICENSE ${destroot}${docdir}
        copy ${worksrcpath}/examples ${destroot}${exampledir}/${subport}
    }
}
