# -*- 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 92957 2012-05-11 20:09:14Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               php 1.0

php.setup               xcache 2.0.0
php.branches            5.3 5.4
categories-append       www
platforms               darwin
maintainers             ryandesign
license                 BSD

homepage                http://xcache.lighttpd.net/
master_sites            ${homepage}pub/Releases/${version}/
use_bzip2               yes

description             fast, stable PHP opcode cacher

long_description        ${name} is a ${description}.

checksums               rmd160  85c9b41af9a83d6beecd87849ca2fb539572b3f0 \
                        sha256  ca26b0772d8b88223f281f5099a3b7d9f4b6597a87ae857301271c1fd5a3f64a

if {${name} != ${subport}} {
    conflicts           ${php}-apc ${php}-eaccelerator
    
    patchfiles          patch-xcache.ini.diff
    
    # gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
    universal_variant   no
    
    post-destroot {
        set docdir ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${docdir}
        xinstall -W ${worksrcpath} -m 644 AUTHORS COPYING ChangeLog NEWS README THANKS xcache.ini ${docdir}
    }
}

livecheck.type          regex
livecheck.regex         {/Release-([0-9.]+)"}
