# -*- 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
PortGroup       php 1.1

name            php-oauth
license         BSD
categories      php devel
platforms       darwin
maintainers     {ryandesign @ryandesign} openmaintainer

php.branches    5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3
php.pecl        yes

if {[vercmp ${php.branch} 7] >= 0} {
    version     2.0.3
    checksums   rmd160  cc2c8311f40d3a84d75d10315184ec06c7bb2abd \
                sha256  cb4b65bed8854f01bdf741e23f0a27cdc29618d588d8222a7bb0519b0332b4ae \
                size    49413
} else {
    version     1.2.3
    checksums   rmd160  506f0644b22323a4d1ad6794433768d83357b5ba \
                sha256  86bb5ee37afe672d4532ad784c7f711855c79f0dabf0acacafd5344ab6cf0195 \
                size    45531
}

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.


if {${name} ne ${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 0644 -W ${worksrcpath} LICENSE ${destroot}${docdir}
        copy ${worksrcpath}/examples ${destroot}${exampledir}/${subport}
    }
}