# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name            9e
version         1.0
categories      archivers
platforms       darwin
maintainers     toby
description     Plan 9 unarchiver

long_description \
    9e is a program to explode Third Edition Plan 9 \
    and at least some Inferno archives.

homepage        http://www.eecs.harvard.edu/~wkj/Software/9e/
master_sites    ${homepage}
distname        ${name}

checksums       md5 ffb6c9963c6bb61ddfc456fd29f96073 \
                sha1 fc966f51a167e4ed3dc371e399bbc8909f074b54 \
                rmd160 bbcdde8d9b4989a12edd935c6156d80aaf5f8f5e

patchfiles      patch-9e.c patch-Makefile

configure {
    reinplace "s|__CC__|${configure.cc}|" ${worksrcpath}/Makefile
    reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/Makefile
    reinplace "s|__LDFLAGS__|${configure.ldflags}|" ${worksrcpath}/Makefile
}

destroot {
    xinstall -m 775 ${worksrcpath}/9e ${destroot}${prefix}/bin
}

# This software has no version
livecheck.type  none
