# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       makefile 1.0
PortGroup       github 1.0

github.setup    ColinIanKing stress-ng 0.22.02 V
github.tarball_from \
                archive
revision        0
categories      benchmarks sysutils
maintainers     {i0ntempest @i0ntempest} openmaintainer
license         GPL-2

checksums       rmd160  760e082c4929bde39bbbc68c74dce2c489826568 \
                sha256  860004ce7484311b3296fc52796fbbc34dfb7f644a769bbd4e03935b7a1b0ccb \
                size    9789500

description     System stress test utility 
long_description \
                stress-ng will stress test a computer system in various selectable ways. \
                It was designed to exercise various physical subsystems of a computer as \
                well as the various operating system kernel interfaces.

depends_lib-append \
                port:mesa \
                path:lib/libjpeg.dylib:libjpeg-turbo \
                port:zlib \
                port:judy

post-patch {
    reinplace "s|BINDIR=/usr/bin|BINDIR=${prefix}/bin|" ${worksrcpath}/Makefile
    reinplace "s|MANDIR=/usr/share/man/man1|MANDIR=${prefix}/share/man/man1|" ${worksrcpath}/Makefile
    reinplace "s|JOBDIR=/usr/share/stress-ng/example-jobs|JOBDIR=${prefix}/share/stress-ng/example-jobs|" ${worksrcpath}/Makefile
    reinplace "s|BASHDIR=/usr/share/bash-completion/completions|BASHDIR=${prefix}/share/bash-completion/completions|" ${worksrcpath}/Makefile
}
