# -*- 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 107250 2013-06-24 07:22:19Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               php 1.1

name                    php-opcache
version                 7.0.2
platforms               darwin
maintainers             ryandesign
license                 PHP-3.01

# As of PHP 5.5 this extension is bundled with PHP.
php.branches            5.3 5.4
php.pecl                yes
php.pecl.name           ZendOpcache
php.pecl.prerelease     yes
php.extensions.zend     opcache

description             OPcache improves PHP performance by storing precompiled \
                        script bytecode in shared memory, thereby removing the \
                        need for PHP to load and parse scripts on each request.

long_description        ${description}

distname                zendopcache-${version}

checksums               rmd160  66b600cdd9dff122f88ac2641e1535a9b1fcc1cd \
                        sha256  4aea4f0242dc50a5a68e7a170c3c537716e5da03b2a7b322349f211c09d90f44

if {${name} != ${subport}} {
    configure.args-append --enable-opcache
    
    post-destroot {
        set docdir ${destroot}${prefix}/share/doc/${subport}
        xinstall -d ${docdir}
        xinstall -W ${worksrcpath} -m 644 LICENSE README ${docdir}
    }
}
