# -*- 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               gitlab 1.0
PortGroup               compiler_blacklist_versions 1.0

gitlab.setup            rezozer/forks sympow 2.023.6 v
revision                0

categories              math

# NOTE: SYMPOW has it's own BDS-like licene that requires to point that SYMPOW
# is less-restrictive when linked with GPL code.
# See: https://gitlab.com/rezozer/forks/sympow/-/blob/master/COPYING
license                 BSD

maintainers             {@catap korins.ky:kirill} openmaintainer

# NOTE: this is the last fork which contains all patches from Debian
homepage                https://gitlab.com/rezozer/forks/sympow
description             SYMmetric POWer elliptic curve L-functions
long_description        {*}${description}

checksums               rmd160  335dfe0835fabaa3565316f499ec3d0bc6f1a4a8 \
                        sha256  0638821a4f793eb87eec7c3156644c33097e12c1103dda3e70cb99a1f5b61a22 \
                        size    61537

compiler.c_standard     2011
compiler.cxx_standard   2011

# error: The double precision of your FPU is 53 bits.
compiler.blacklist-append {clang < 600}

configure.cmd           sh ./Configure
configure.env-append    PREFIX=${prefix}
configure.pre_args

depends_build-append    port:help2man
depends_lib-append      port:pari

post-patch {
    reinplace {s|VERBOSE_DEFAULT 1|VERBOSE_DEFAULT 0|} ${worksrcpath}/sympow.h
}

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall    -m 644 -W ${worksrcpath} COPYING README.md ${destroot}${prefix}/share/doc/${name}
}
