PortSystem      1.0

name            ecm
version         1.0
revision        0
categories      archivers
maintainers     nomaintainer
license         GPL-2+
description     CD image file error code modeler

long_description \
    ECM (Error Code Modeler) lets you prepare CD image files - \
    such as BIN, CDI, NRG, CCD, or similar - so that they'll compress \
    far better.

homepage        https://web.archive.org/web/20130502135203/http://www.neillcorlett.com/ecm/
master_sites    macports_distfiles
distname        ecm100
use_zip         yes

checksums       rmd160 04110dd50d7609e0337e71ab7587fb3d0d05eefb \
                sha256 1d0d19666f46d9a2fc7e534f52475e80a274e93bdd3c010a75fe833f8188b425 \
                size   24150

extract.mkdir   yes

use_configure   no

build {
    foreach bin {ecm unecm} {
        system "cd ${worksrcpath} && \
            ${configure.cc} ${configure.cflags} [get_canonical_archflags] ${bin}.c -o ${bin}"
    }
}

destroot {
    xinstall -W ${worksrcpath} ecm unecm ${destroot}${prefix}/bin

    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 {*}[glob ${worksrcpath}/*.txt] ${destroot}${docdir}
}

variant universal {}

livecheck.type  none
