# -*- 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.030524
revision            0
license             {Artistic-1 GPL}
maintainers         nomaintainer
description         Math::Pari - Perl interface to PARI.
long_description    {*}${description}

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  72b28204ea237d11fc4d0e51a397894406d516db \
                    sha256  995c1ddefa59f299d6bdc1a2cff536ea2f5b934de503ef535635d3906fcf27f3 \
                    size    232938 \
                    ${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}
}
