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

name                    crlibm
version                 1.0beta5
revision                0
categories              devel
platforms               darwin
maintainers             nomaintainer
license                 LGPL-2.1+

description             An efficient and proven correctly-rounded \
                        mathematical library

long_description        {*}${description}

homepage                https://web.archive.org/web/20170128033523/http://lipforge.ens-lyon.fr/www/crlibm/
master_sites            https://web.archive.org/web/20170324061214/http://lipforge.ens-lyon.fr/frs/download.php/166/
extract.suffix          .tgz

checksums               rmd160  e7744c03755955c9ecfd88c9a97a9af9830fd5c6 \
                        sha256  42c8cfe7717c31ad8f28a9f19915cdcbef5b247c2ed50eb2bbdb43729acae98a \
                        size    2603950

worksrcdir              ${name}

patchfiles              patch-configure.diff

platform darwin 10 powerpc {
    # Otherwise Rosetta build fails:
    # test_perf.c: error: unknown register name ‘edx’ in ‘asm’
    configure.args-append \
                        powerpc-apple-darwin${os.major}
}

livecheck.type          regex
livecheck.url           http://lipforge.ens-lyon.fr/frs/?group_id=8
livecheck.regex         "crlibm-(\\d+(?:\\.\\d+)*(?:\[a-z\]+\\d*)?)\.\[tz\]"