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

name                py-gmpy2
epoch               1
version             2.2.1
maintainers         {@mndavidoff alluvialsw.com:md14-macports} openmaintainer
license             LGPL-2.1+
description         General multiple precision arithmetic module for Python
long_description \
    GMPY2 is a C-coded Python extension module that supports fast \
    multiple-precision arithmetic.  GMPY2 supports integer and \
    rational arithmetic (using the GMP library), correctly rounded \
    multiple-precision real arithmetic (using the MPFR library), \
    and complex arithmetic (using the MPC library).

homepage            https://github.com/aleaxit/gmpy
checksums           rmd160  8379518f378437d355cc908944fa8febd3010b34 \
                    sha256  e83e07567441b78cb87544910cb3cc4fe94e7da987e93ef7622e76fb96650432 \
                    size    234228

python.versions     39 310 311 312 313 314

if {${name} ne ${subport}} {
    depends_lib-append  port:gmp port:libmpc port:mpfr

    # gmpy2_convert_gmp.c: error: ‘for’ loop initial declaration used outside C99 mode
    patchfiles-append   patch-c99.diff

    post-destroot {
        xinstall -m 0644 -W ${worksrcpath} README.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }
}
