# -*- 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.6
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           any

# The php variants deliberately do not conflict

foreach php {php73 php74 php80 php81 php82 php83} {
    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] && ![variant_isset php82]} {
    default_variants +php83
}

checksums           rmd160  54c8a787b9003b80e05f25539a6582de69e1d58e \
                    sha256  40e4d7505b01f401e757f7439930ed96b1245ffc3863dd326fcf21e0e5847c74 \
                    size    3947110

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
}
