--- Portfile.orig	2007-09-10 10:30:58.000000000 -0400
+++ Portfile	2007-10-17 20:29:45.000000000 -0400
@@ -2,8 +2,8 @@
 
 PortSystem 1.0
 name		octave
-version		2.9.9
-revision	5
+version		2.9.15
+revision	1
 categories	math science
 maintainers     stechert@macports.org
 platforms	darwin
@@ -20,14 +20,15 @@
 master_sites	ftp://ftp.octave.org/pub/octave/bleeding-edge/
 
 use_bzip2	yes
-checksums	md5 a76a6d88f414285472896a63e4282b7f
+checksums	md5 c7c0449a5e1418479bebbdd565eb9cc2
 
 patch.args	-p1
-patchfiles	patch-configure patch-configure-2 patch-configure-3 \
-		patch-dynamic-ld-cc patch-glpk patch-glpk.m
+patchfiles	patch-configure patch-configure-2 \
+		patch-dynamic-ld-cc
 
 depends_build   bin:texinfo:texinfo	\
-		bin:tex:teTeX
+		bin:tex:teTeX \
+		port:gawk port:gsed
 
 depends_lib     port:readline			\
 		port:hdf5			\
@@ -46,6 +47,11 @@
 		--without-mpi	\
 		--with-blas="-framework Accelerate"
 
+configure.env-append AWK="${prefix}/bin/gawk"
+configure.env-append SED="${prefix}/bin/gnused"
+build.env-append     AWK="${prefix}/bin/gawk" 
+build.env-append     SED="${prefix}/bin/gnused"
+
 post-patch {
 	# Avoid using heimdal's broken fnmatch.h
 	reinplace "s|<\\(fnmatch\.h\\)>|\"/usr/include/\\1\"|" ${worksrcpath}/liboctave/glob-match.cc

