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

PortSystem      1.0
PortGroup       php 1.1

name            php-http
version         1.7.6
revision        1
categories      php www
platforms       darwin
maintainers     ryandesign openmaintainer
license         BSD

php.branches    5.3 5.4 5.5
php.pecl        yes
php.pecl.name   pecl_http

description     Extended HTTP Support

long_description \
    This HTTP extension aims to provide a convenient and powerful \
    set of functionality for one of PHPs major applications. \
    It eases handling of HTTP urls, dates, redirects, headers and \
    messages, provides means for negotiation of clients preferred \
    language and charset, as well as a convenient way to send any \
    arbitrary data with caching and resuming capabilities. \
    It provides powerful request functionality, if built with CURL \
    support. Parallel requests are available for PHP 5 and greater.

checksums       rmd160  bd873c720f36944b219eac8c3b44fa4b9164c21a \
                sha256  e87207a7dcd713bef0eb3701b552e0d173fbd73dbd52f9d3968851112e899983

if {${name} ne ${subport}} {
    conflicts           ${php}-http2
    
    depends_lib-append  port:curl \
                        port:libmagic \
                        port:zlib
    
    configure.args      --enable-http \
                        --with-http-curl-requests=${prefix} \
                        --with-http-magic-mime=${prefix} \
                        --with-http-zlib-compression=${prefix} \
                        --without-http-curl-libevent
    
    use_parallel_build  yes
}

livecheck.regex {>(1\.[0-9.]+)</a></th>\s*<[^>]+>stable<}