# -*- 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                npth
version             1.7
revision            0

checksums           rmd160  14ddac15f845ff146eabeac3cc4f13a76ad824a4 \
                    sha256  8589f56937b75ce33b28d312fccbf302b3b71ec3f3945fde6aaa74027914ad05 \
                    size    313213

categories          devel
license             LGPL-3+ GPL-2+
maintainers         nomaintainer

description         The New GNU Portable Threads Library

long_description    This is a library to provide the GNU Pth API \
                    and thus a non-preemptive threads implementation.

homepage            https://gnupg.org/related_software/npth/
master_sites        gnupg:npth

use_bzip2           yes

platform darwin {
    if {${os.major} < 10 || (${os.major} == 10 && ${configure.build_arch} eq "ppc")} {
        post-extract {
            copy ${filespath}/darwin_compat.h ${worksrcpath}/src/
            copy ${filespath}/darwin_compat.c ${worksrcpath}/src/
        }
        patchfiles-append   use-darwin-compat.diff
        use_autoreconf      yes
        autoreconf.args     -fvi
    }
}

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       https://gnupg.org/ftp/gcrypt/${name}/
livecheck.regex     ${name}-(\\d+\.\\d+)
