# -*- 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
# $Id: Portfile 119425 2014-04-25 07:23:08Z ryandesign@macports.org $

PortSystem      1.0
PortGroup       php 1.1

name            php-http2
version         2.0.6
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.

dist_subdir     php5-http

checksums       rmd160  62257d34ae93ce2652a402566eaf5894be0e10a9 \
                sha256  73f3b28bb5accda65b2d7e120542d76783117b145cbbc54ea514749cc464d648

if {${name} ne ${subport}} {
    conflicts           ${php}-event \
                        ${php}-http

    depends_lib-append  port:curl \
                        port:${php}-iconv \
                        port:${php}-propro \
                        port:${php}-raphf \
                        port:zlib
    
    configure.args      --with-http \
                        --with-http-libcurl-dir=${prefix} \
                        --with-http-shared-deps \
                        --with-http-zlib-dir=${prefix} \
                        --without-http-libevent-dir
    
    configure.cppflags-append -DHAVE_ICONV

    use_parallel_build  yes
}
