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

name                    php-phalcon2
maintainers             {ryandesign @ryandesign} {mathiesen.info:macintosh @BjarneDMat} openmaintainer
license                 BSD

php.branches            5.3 5.4 5.5 5.6

description             full stack PHP framework written as an extension
long_description \
    Phalcon is an open source full stack framework for PHP, written as a C-extension. \
    Phalcon is optimized for high performance. Its unique architecture allows the framework \
    to always be memory resident, offering its functionality whenever it's needed, without \
    expensive file stats and file reads that traditional PHP frameworks employ.

homepage                https://phalcon.io

if {[vercmp ${php.branch} >= 5.5]} {
    conflicts-append    ${php}-phalcon3
}

if {[vercmp ${php.branch} >= 5.4]} {
    version             2.0.13
    revision            0
    checksums           rmd160  c94dadcf628d8611cbcb44f35b1b536c9b0e3fc9 \
                        sha256  00f7e45282e6e793c37c75742da696ebb031cf5b880d324eefd19039bd27b74e \
                        size    5226597
} elseif {[vercmp ${php.branch} >= 5.3]} {
    version             2.0.9
    revision            0
    checksums           rmd160  3955e097b18c3ea8b29264bb184b70ad2a7eebd7 \
                        sha256  d4607491b801da973796c44eaed9f909787d9a588ec5a7ea7c84d74d43106a46 \
                        size    5072670
}

github.tarball_from     archive
dist_subdir             php-phalcon

if {${name} ne ${subport}} {
    github.setup        phalcon cphalcon ${version} phalcon-v

    # The build/install script makes all sorts of assumptions I don't like
    # so I'm ignoring it.
    set build           build
    if {[string match *64 ${build_arch}]} {
        set build       ${build}/64bits
    } else {
        set build       ${build}/32bits
    }

    worksrcdir          ${worksrcdir}/${build}

    # Separate dir for each arch means using the muniversal portgroup
    # but it doesn't get along with the php portgroup.
    universal_variant   no

    configure.args      --enable-phalcon
}

livecheck.type          none
