--- bmake-20090222.ebuild	2010-07-08 01:49:21.000000000 +0300
+++ bmake-20100618.ebuild	2010-07-08 01:58:30.000000000 +0300
@@ -4,7 +4,7 @@
 
 inherit eutils
 
-MK_VER=20081111
+MK_VER=20100612
 DESCRIPTION="NetBSD's portable make"
 HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html"
 SRC_URI="http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz
@@ -23,22 +23,16 @@
 src_unpack() {
 	unpack ${A}
 	cd "${S}"
-
-	epatch "${FILESDIR}"/${PN}-20080515-makefile.patch
-	epatch "${FILESDIR}"/${PN}-tests.patch
+	sed 's$uname -p 2>/dev/null || uname -m$uname -m || uname -p 2>/dev/null$' -i machine.sh
 }
 
+
 src_compile() {
 	econf --with-mksrc=../mk --with-default-sys-path=/usr/share/mk/${PN} || die "Configure failed"
-	emake -f makefile.boot bootstrap || die "Compile failed"
-}
-
-src_test() {
-	# $A set by portage confuses the tests...
-	env -u A emake -f makefile.boot check || die "Tests failed"
+	sh make-bootstrap.sh || die "Bootstrap and compile failed"
 }
 
 src_install() {
-	emake -f makefile.boot -j1 DESTDIR="${D}" install-bin install-man || die "Install failed"
+	bmake DESTDIR="${D}" install || die "Install failed"
 	FORCE_BSD_MK=1 SYS_MK_DIR=. sh ../mk/install-mk -v -m 644 "${D}"/usr/share/mk/${PN} || die "failed to install mk files"
 }