# -*- 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
PortGroup           legacysupport 1.1

name                rw
version             1.0
categories          sysutils
platforms           darwin
maintainers         nomaintainer
license             ISC

description         a simple replacement for dd(1)

long_description \
    Sortix rw is a program that reads blocks from the standard input and copies \
    them to the standard output until the end of the standard input. rw(1) is \
    designed to be a replacement for dd(1), providing only the the core \
    blockwise I/O. It has a standard command line interface with dashed \
    options, useful and efficient defaults.

homepage            https://sortix.org/rw/
master_sites        https://sortix.org/rw/release/
distname            rw-portable-${version}

checksums           rmd160  271db6bea10b0ef28ec3d0d4b99167709c8f31a5 \
                    sha256  50009730e36991dfe579716f91f4f616f5ba05ffb7bf69c03d41bf305ed93b6d \
                    size    12993

use_configure no
build.env-append    "CC=${configure.cc} [get_canonical_archflags cc]" \
                    "CPPFLAGS=${configure.cppflags} \${MACPORTS_LEGACY_SUPPORT_CPPFLAGS}" \
                    "CFLAGS=${configure.cflags}" \
                    "LDFLAGS=${configure.ldflags} \${MACPORTS_LEGACY_SUPPORT_LDFLAGS}"

destroot.args       PREFIX=${prefix}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/rw
    xinstall -m 0644 -W ${worksrcpath} README LICENSE ${destroot}${prefix}/share/doc/rw
}

livecheck.type      regex
livecheck.regex     {rw-portable-(\d+(?:\.\d+)*)\.tar}
