# -*- 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           active_variants 1.1
PortGroup           python 1.0

name                py-rpy2
version             3.4.5
revision            1
categories-append   math science
license             {MPL-1.1 LGPL-2.1+}

python.versions     39

maintainers         {stromnov @stromnov} openmaintainer

description         A simple and efficient access to R from Python

long_description    rpy2 is a redesign and rewrite of rpy. It is providing a \
                    low-level interface to R, a proposed high-level interface, \
                    including wrappers to graphical libraries, as well as R-like \
                    structures and functions.

homepage            http://rpy.sourceforge.net/rpy2.html

checksums           rmd160  dfbd04d1ae48ac7fe1cd17b57c6ce7800fc68e69 \
                    sha256  5d31a5ea43f5a59f6dec30faca87edb01fc9b8affa0beae96a99be923bd7dab3 \
                    size    194433

if {${name} ne ${subport}} {
    depends_lib-append  port:py${python.version}-cffi \
                        port:py${python.version}-pytest \
                        port:py${python.version}-jinja2 \
                        port:py${python.version}-tz \
                        port:py${python.version}-simplegeneric \
                        port:py${python.version}-tzlocal

    # To continue using your custom R installation instead of MacPorts' R,
    # you must remove this dependency line and make sure that your R
    # is in MacPorts' binpath, see your macports.conf for details.
    depends_lib-append  port:R

    # https://trac.macports.org/ticket/61327
    variant openmp description {enable parallelism support using OpenMP} {
        # Please mirror the version used in math/R/Portfile
        compiler.openmp_version 4.5

        require_active_variants R openmp

        notes-append "
            Support OpenMP, mirroring the R port."
    }
    # Please mirror the default used in math/R/Portfile
    default_variants +openmp
}
