# -*- 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                memtester
version             4.7.1
categories          sysutils
maintainers         nomaintainer
license             GPL-2
description         A userspace utility for testing the memory subsystem for \
                    faults.
long_description    {*}${description}

homepage            https://pyropus.ca./software/memtester/
master_sites        ${homepage}old-versions \
                    https://fossies.org/linux/misc/

checksums           rmd160 16d56d5465363d76122e17ac6826eee76d633d9c \
                    sha256 e427de663f7bd22d1ebee8af12506a852c010bd4fcbca1e0e6b02972d298b5bb \
                    size   24590

use_configure       no

variant universal {}

pre-patch {
    reinplace "s|/usr/local|${destroot}${prefix}|" ${worksrcpath}/Makefile
    reinplace "s|man/man|share/man/man|" ${worksrcpath}/Makefile
    reinplace "s|^cc|${configure.cc} [get_canonical_archflags cc]|g" ${worksrcpath}/conf-cc ${worksrcpath}/conf-ld
}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} BUGS CHANGELOG COPYING README \
        README.tests ${destroot}${prefix}/share/doc/${name}
}

livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
