# -*- 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           github 1.0
PortGroup           makefile 1.0

github.setup        datajerk c2d 0.57 v
revision            0
checksums           rmd160  60cbec32e9544127230849beec941e8af3910dd3 \
                    sha256  f6437d3bbd43fb638ef8378232b2453d1c75f5e5ed7f85adc47565596f940cc1 \
                    size    201911

categories          devel
maintainers         {ryandesign @ryandesign} openmaintainer
license             Permissive

description         command line tool for creating Apple II disk images

long_description    ${name} is a command line utility that will read Apple II \
                    binary and monitor text files and output a DOS-ordered \
                    disk image that will boot your code quickly.

github.tarball_from archive

patchfiles          Makefile.patch \
                    strict-prototypes.patch

# Don't extract the pre-compiled binaries; we'll compile them ourselves.
extract.post_args-append \
                    --exclude ${worksrcdir}/bin

post-extract {
    file mkdir ${worksrcpath}/bin
}

set docdir          ${prefix}/share/doc/${subport}

destroot {
    xinstall -W ${worksrcpath}/bin c2d page2text text2page ${destroot}${prefix}/bin
    xinstall -d ${destroot}${docdir}
    xinstall -W ${worksrcpath} -m 0644 README.md ${destroot}${docdir}
}
