diff -Naur /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/proctools/Portfile ./Portfile
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/proctools/Portfile	2008-05-31 11:11:52.000000000 +0200
+++ ./Portfile	2008-06-01 10:41:42.000000000 +0200
@@ -23,3 +23,13 @@
 build.type          bsd
 
 destroot.destdir    PREFIX=${destroot}${prefix} MANDIR=${destroot}${prefix}/share/man/man
+
+platform darwin 9 {
+	pre-fetch {
+		if {[file exists "/Developer/SDKs/MacOSX10.4u.sdk/usr/include/kvm.h"] != 1} {
+			return -code error "${name} requires Mac OS X 10.4 SDK on Leopard. You can install this when you install Developer Tools."
+		}
+	}
+	patchfiles				patch-lkvm.patch
+	build.post_args		CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/usr/include"
+}
diff -Naur /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/proctools/files/patch-lkvm.patch ./files/patch-lkvm.patch
--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/sysutils/proctools/files/patch-lkvm.patch	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-lkvm.patch	2008-06-01 10:40:21.000000000 +0200
@@ -0,0 +1,171 @@
+diff -Naur ../proctools-0.4pre1/pfind/Makefile ./pfind/Makefile
+--- pfind/Makefile	2003-12-06 10:18:37.000000000 +0100
++++ pfind/Makefile	2008-06-01 10:27:02.000000000 +0200
+@@ -1,11 +1,6 @@
+ PROG= pfind
+ DPADD+= ../proctools/libproctools.a
+-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm
++LDADD= -L${MAKEOBJDIR} -lproctools
+ CLEANFILES+= pfind.cat1
+ 
+-.if defined(OLDKVM)
+-BINGRP= kmem
+-BINMODE= 2555
+-.endif
+-
+ .include <bsd.prog.mk>
+diff -Naur ../proctools-0.4pre1/pgrep/Makefile ./pgrep/Makefile
+--- pgrep/Makefile	2003-12-06 10:18:38.000000000 +0100
++++ pgrep/Makefile	2008-06-01 10:23:38.000000000 +0200
+@@ -1,11 +1,6 @@
+ PROG= pgrep
+ DPADD+= ../proctools/libproctools.a
+-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm
++LDADD= -L${MAKEOBJDIR} -lproctools
+ CLEANFILES+= pgrep.cat1
+ 
+-.if defined(OLDKVM)
+-BINGRP= kmem
+-BINMODE= 2555
+-.endif
+-
+ .include <bsd.prog.mk>
+diff -Naur ../proctools-0.4pre1/pkill/Makefile ./pkill/Makefile
+--- pkill/Makefile	2003-12-06 10:18:39.000000000 +0100
++++ pkill/Makefile	2008-06-01 10:27:40.000000000 +0200
+@@ -1,11 +1,6 @@
+ PROG=   pkill
+ DPADD+= ../proctools/libproctools.a
+-LDADD= -L${MAKEOBJDIR} -lproctools -lkvm
++LDADD= -L${MAKEOBJDIR} -lproctools
+ CLEANFILES+= pkill.cat1
+ 
+-.if defined(OLDKVM)
+-BINGRP= kmem
+-BINMODE= 2555
+-.endif
+-
+ .include <bsd.prog.mk>
+diff -Naur ../proctools-0.4pre1/proctools/Makefile ./proctools/Makefile
+--- proctools/Makefile	2003-12-06 10:18:40.000000000 +0100
++++ proctools/Makefile	2008-06-01 10:37:20.000000000 +0200
+@@ -4,10 +4,6 @@
+ NOPIC=	yes
+ NOLINT=	yes
+ 
+-.if defined(OLDKVM)
+-CFLAGS= -DUSE_KVM
+-.endif
+-
+ install:
+ 
+ .include <bsd.lib.mk>
+
+diff -Naur ../proctools-0.4pre1/proctools/fmt.c ./proctools/fmt.c
+--- proctools/fmt.c	2003-12-06 11:13:20.000000000 +0100
++++ proctools/fmt.c	2008-06-01 10:19:49.000000000 +0200
+@@ -7,7 +7,6 @@
+ #include <sys/sysctl.h>
+ #include <sys/user.h>
+ 
+-#include <kvm.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -27,30 +26,6 @@
+ 	return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0);
+ }
+ 
+-void
+-fmt_argv(kd, ki)
+-	kvm_t *kd;
+-	struct kinfo_proc *ki;
+-{
+-	int left = -1; /* no termwidth! */
+-	char **argv, **p;
+-	if (kd != NULL) {
+-		argv = kvm_getargv(kd, ki, 0);
+-		if ((p = argv) != NULL) {
+-			while (*p) {
+-				fmt_puts(*p, &left);
+-				p++;
+-				fmt_putc(' ', &left);
+-			}
+-		}
+-	}
+-	if (argv == NULL || argv[0] == '\0' ||
+-		strcmp(cmdpart(argv[0]), ki->kp_proc.p_comm)) {
+-		fmt_putc('(', &left);
+-		fmt_puts(ki->kp_proc.p_comm, &left);
+-		fmt_putc(')', &left);
+-	}
+-}
+ 
+ void
+ fmt_puts(s, leftp)
+diff -Naur ../proctools-0.4pre1/proctools/proctools.c ./proctools/proctools.c
+--- proctools/proctools.c	2003-12-06 12:41:26.000000000 +0100
++++ proctools/proctools.c	2008-06-01 10:22:14.000000000 +0200
+@@ -23,7 +23,6 @@
+ 
+ extern char *cmdpart(char *);
+ extern void  fmt_puts(char *, int *);
+-extern void  fmt_argv(kvm_t *kd, struct kinfo_proc *ki);
+ 
+ static char  dbuf[DUMPBUFSZ];
+ 
+@@ -1088,18 +1087,6 @@
+ static void
+ printProcInfoNative(struct baton *baton, const struct proctoolslist *proctoolslist)
+ {
+-#if defined(USE_KVM)
+-	kvm_t *kd = baton->kd;
+-	struct kinfo_proc *ki;
+-	int nproc;
+-	if (kd == NULL) {
+-		printf("(null)");
+-	}
+-	ki = kvm_getprocs(kd, KERN_PROC_PID, proctoolslist->pid, &nproc);
+-	if (nproc == 1 && ki != NULL) {
+-		fmt_argv(kd, ki);
+-	}
+-#else
+ #if defined(KERN_PROCARGS2)
+ 	size_t len = baton->argmax;
+ 
+@@ -1150,7 +1137,6 @@
+ 	#warning no KVM or sysctl known for proc arguments on this platform
+ 	printf("?");
+ #endif
+-#endif
+ }
+ 
+ void
+diff -Naur ../proctools-0.4pre1/proctools/proctools.h ./proctools/proctools.h
+--- proctools/proctools.h	2003-12-06 12:12:04.000000000 +0100
++++ proctools/proctools.h	2008-06-01 10:23:14.000000000 +0200
+@@ -5,7 +5,6 @@
+ 
+ #include <sys/cdefs.h>
+ #include <stdio.h>
+-#include <kvm.h>
+ 
+ #if !defined(USE_KVM) && !defined(USE_SYSCTL)
+ #	if defined(KVM_NO_FILES)
+@@ -71,16 +70,12 @@
+ 	baton_type		 type;
+ 	int				 argmax;
+ 	char			*args;
+-#if defined(USE_KVM)
+-	kvm_t			*kd;
+-#else
+ 	struct kinfo_proc	*kp;
+ #	if defined(KERN_PROCARGS2)
+ 	int				 mib[4];
+ 	int				 miblen;
+ 	int				*pid;
+ #	endif
+-#endif
+ };
+ 
+ #define DUMPBUFSZ 8

