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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Math-Pari 2.030523
revision            1
license             {Artistic-1 GPL}
maintainers         nomaintainer
description         perl interface to pari.
long_description    ${description}

platforms           darwin

master_sites-append http://pari.math.u-bordeaux.fr/pub/pari/OLD/2.3/:pari

dist_subdir         pari

if {${perl5.major} != ""} {
# 2.3.5, though old, is the newest version of pari
# supported by p5-math-pari 2.03050*, according to the README.
set pari_version    2.3.5
set pari_distfile   pari-${pari_version}.tar.gz

# Let the p5-math-pari configure process extract and patch the pari distfile.
    set p5_distfile ${distfiles}
    extract.only    ${p5_distfile}

    checksums       ${p5_distfile} \
                    rmd160  07f8bb76ad4eb7a10cc2b0cc2e49cb1c76128988 \
                    sha256  ed660da310b91f766c5b9f6348415ed7d7c2edddeef8b8bb38c6fe42112c254d \
                    size    230001 \
                    ${pari_distfile} \
                    rmd160  488adf3af5398d0ab5390eb86b65cd79bd1044c5 \
                    sha256  47ddae1af73b4476660d2a89338483949067a97ffb8758c82e8189dfa4c89d88 \
                    size    2018097

    distfiles-append    ${pari_distfile}:pari

    use_parallel_build  no
    
    # The configure process will extract *and patch* this distfile.
    configure.args-append pari_tgz=${distpath}/${pari_distfile}
}
