# -*- 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.8
revision            0

checksums           rmd160 e976a0774029d2ec00f67cb6f0c775baf6dd5605 \
                    sha256 8bd24b4f23a3065d6e5b26e98aba9ce783ea4fd781069c1b35d149694e90ca3e \
                    size   317739

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+)
