# -*- 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.3.0
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/gmpy2/gmpy2
checksums           rmd160  876fec2956773d6a9df92e0cf69efce56c0cdaa9 \
                    sha256  2d943cc9051fcd6b15b2a09369e2f7e18c526bc04c210782e4da61b62495eb4a \
                    size    302252

python.versions     39 310 311 312 313 314

if {${name} ne ${subport}} {
    depends_build-append \
                        port:py${python.version}-setuptools_scm

    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
    patchfiles-append   patch-pyproject.toml.diff

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