# -*- 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

PortSystem          1.0
PortGroup           github 1.0

github.setup        roundcube roundcubemail 1.6.4
github.tarball_from releases
categories          www mail php
license             GPL-3+
maintainers         nomaintainer

description         Roundcube webmail
long_description    This project is a free and open source webmail solution with a desktop-like \
                    user interface which is easy to install/configure and that runs on a standard \
                    LAMPP server. The skins use the latest web standards such as XHTML and CSS 2. \
                    Roundcube includes other sophisticated open-source libraries such as PEAR, \
                    an IMAP library derived from IlohaMail the TinyMCE rich text editor, \
                    Googiespell library for spell checking or the WasHTML sanitizer by Frederic Motte.

homepage            https://roundcube.net/

platforms           darwin freebsd

# The php variants deliberately do not conflict

foreach php {php73 php74 php80 php81 php82} {
    variant ${php} description "Use ${php}" "
        depends_run-append  port:${php}-mbstring \
                            port:${php}-mysql \
                            port:${php}-sockets
        # Also needs dependency on ${php}-web pending resolution of:
        # https://trac.macports.org/ticket/45008
    "
}

if {![variant_isset php73] && ![variant_isset php74] && ![variant_isset php80] && ![variant_isset php81] && ![variant_isset php82]} {
    default_variants +php82
}

checksums           rmd160  8a1c401d8aeb7e440ad8222c7279589484f3e71c \
                    sha256  f116dc5e874ca10e73d04efcb4a5ca90e3ca2a2923c0f0fa5b0f478192677656 \
                    size    3947013

use_configure       no

build               {}
supported_archs     noarch

destroot.violate_mtree yes

destroot {
    set docpath ${destroot}${prefix}/www/${name}
    xinstall -m 755 -d ${docpath}/html
    file copy {*}[glob ${workpath}/${distname}/*] ${docpath}/html
}
