# -*- 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 118026 2014-03-19 19:38:38Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           github 1.0
PortGroup           php 1.1

github.setup        iliaal php_excel 0.9.9
revision            1
name                php-excel
categories-append   textproc
platforms           darwin
maintainers         ryandesign openmaintainer
license             PHP-3.01

php.branches        5.3 5.4 5.5

description         PHP interface to LibXL for reading and writing \
                    Microsoft Excel spreadsheets

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

checksums           rmd160  14174fe07dbad8edd0d9321f6af7faed3f4fd5ce \
                    sha256  b4cfa1b38d44c871593330888d2c893ef3d1e8d12d7a21b69a117ab09d25c064

if {${name} ne ${subport}} {
    depends_lib-append  port:libxl
    
    patchfiles          patch-libxl-3.5.4.diff
    
    # libxl is Intel-only
    supported_archs     i386 x86_64
    configure.universal_archs i386 x86_64
    
    configure.args      --with-libxl-incdir=${prefix}/include/libxl-c \
                        --with-libxl-libdir=${prefix}/lib
    
    post-destroot {
        xinstall -d ${destroot}${prefix}/share/doc
        copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 644 -W ${worksrcpath} CREDITS ChangeLog README.markdown ${destroot}${prefix}/share/doc/${subport}
    }
}
