# $Id: Portfile 92990 2012-05-13 16:17:35Z mfeiri@macports.org $

PortSystem          1.0

name                bmake
version             20120424
set mkversion       20120420
categories          devel
platforms           darwin
license             BSD
maintainers         mfeiri openmaintainer
homepage            http://www.crufty.net/help/sjg/bmake.html
master_sites        http://www.crufty.net/ftp/pub/sjg/

description         Portable NetBSD make
long_description    bmake is the portable version of NetBSD make.

distfiles           ${distname}${extract.suffix} \
                    mk-${mkversion}${extract.suffix}
checksums           ${distname}${extract.suffix} \
                    rmd160  c8dbab56622bd5bdd78298542efa78a6b12b6780 \
                    sha256  2e34a3e3e63a5c444177241ca6233662021d8f9a73c16fbfe340f64cb2c98a47 \
                    mk-${mkversion}${extract.suffix} \
                    rmd160  b793c8ae6c973055080b22a63286acac9794db79 \
                    sha256  86762e94ee3b11a74e960512bf3ab4bdad2d936ac7e68250cee3ce58d101754f

use_configure       no
worksrcdir          ${name}
build.cmd           ./boot-strap
build.args          --with-default-sys-path="${prefix}/share/mk" CC=${configure.cc}
build.target        

destroot {
    file copy ${worksrcpath}/Darwin/bmake ${destroot}${prefix}/bin
    file copy ${worksrcpath}/bmake.cat1 ${destroot}${prefix}/share/man/cat1/bmake.1
    file mkdir ${destroot}${prefix}/share/mk
    system "${workpath}/mk/install-mk ${destroot}${prefix}/share/mk"
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${name}-(\[\\d\]+)${extract.suffix}"
