summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorfrueauf <frueauf>1998-04-02 09:35:38 +0000
committerfrueauf <frueauf>1998-04-02 09:35:38 +0000
commit39cbddf3acb8b78bd953c740bb01751a82e62cfd (patch)
tree92a8a9100c98e3dce2598700a0679c5e649005b1 /sysutils
parent8e83ff5b38a9447de8cb47a656fb88560e5d42c0 (diff)
downloadpkgsrc-39cbddf3acb8b78bd953c740bb01751a82e62cfd.tar.gz
Add support for UVM.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/lsof/Makefile24
-rw-r--r--sysutils/lsof/patches/patch-aa14
-rw-r--r--sysutils/lsof/patches/patch-ab29
3 files changed, 52 insertions, 15 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile
index 1e5b68f5e13..8c19da5a642 100644
--- a/sysutils/lsof/Makefile
+++ b/sysutils/lsof/Makefile
@@ -3,7 +3,7 @@
# Date created: Sat July 20, 1996
# Whom: David O'Brien (obrien@FreeBSD.org)
#
-# $NetBSD: Makefile,v 1.1 1998/04/01 15:02:36 frueauf Exp $
+# $NetBSD: Makefile,v 1.2 1998/04/02 09:35:38 frueauf Exp $
# FreeBSD Id: Makefile,v 1.19 1998/03/08 06:44:48 obrien Exp
#
@@ -29,30 +29,24 @@ CONFIGURE_ARGS= -n freebsd
CONFIGURE_ARGS= -n netbsd
.endif
+MAKE_FLAGS= UVM=${UVM}
+
MAN1= lsof.1
SRCBALL_NAME= ${DISTNAME:S/_W$//}
-pre-extract:
- @if [ "X${UVM}" != X"" ]; then \
- ${ECHO} ""; \
- ${ECHO} "This package does not yet work with UVM."; \
- ${ECHO} ""; \
- ${FALSE}; \
- fi
-
post-extract:
@( cd ${WRKDIR} ; \
- EXPMD5=`/usr/bin/grep MD5 README.${SRCBALL_NAME} | sed 's/^[ ]*//'` ; \
+ EXPMD5=`${GREP} MD5 README.${SRCBALL_NAME} | ${SED} 's/^[ ]*//'` ; \
CALCMD5=`${MD5} ${SRCBALL_NAME}.tar` ; \
if [ "$${EXPMD5}"X != "$${CALCMD5}"X ]; then \
- echo "Expected and calculated MD5 signatures don't agree." ; \
- echo "($$EXPMD5 != $$CALCMD5)" ; \
- exit 1 ; \
+ ${ECHO} "Expected and calculated MD5 signatures don't agree." ; \
+ ${ECHO} "($$EXPMD5 != $$CALCMD5)" ; \
+ ${FALSE} ; \
fi ; \
${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS:S/z//} ${SRCBALL_NAME}.tar \
)
- @( cd ${WRKSRC} ; echo "y" | ./Inventory || exit 1 )
+ @( cd ${WRKSRC} ; ${ECHO} "y" | ./Inventory || exit 1 )
do-install:
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m 2755 -g kmem \
@@ -60,6 +54,6 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/lsof.man ${PREFIX}/man/man1/lsof.1
@${MKDIR} ${PREFIX}/share/lsof
${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${PREFIX}/share/lsof
- @/bin/chmod 0444 ${PREFIX}/share/lsof/00*
+ @chmod 0444 ${PREFIX}/share/lsof/00*
.include <bsd.port.mk>
diff --git a/sysutils/lsof/patches/patch-aa b/sysutils/lsof/patches/patch-aa
new file mode 100644
index 00000000000..7990d307610
--- /dev/null
+++ b/sysutils/lsof/patches/patch-aa
@@ -0,0 +1,14 @@
+--- dialects/n+obsd/Makefile.orig Tue Feb 17 01:51:59 1998
++++ dialects/n+obsd/Makefile Thu Apr 2 11:20:07 1998
+@@ -12,7 +12,11 @@
+ L=/usr/include/local
+ P=
+
++.if ${UVM} != ""
++DEBUG= -O -DUVM
++.else
+ DEBUG= -O
++.endif
+
+ CDEF=
+ CDEFS= ${CDEF} ${CFGF}
diff --git a/sysutils/lsof/patches/patch-ab b/sysutils/lsof/patches/patch-ab
new file mode 100644
index 00000000000..3e23befb9cd
--- /dev/null
+++ b/sysutils/lsof/patches/patch-ab
@@ -0,0 +1,29 @@
+--- dialects/n+obsd/dproc.c.orig Fri Mar 6 14:24:46 1998
++++ dialects/n+obsd/dproc.c Thu Apr 2 10:25:22 1998
+@@ -37,6 +37,11 @@
+
+ #include "lsof.h"
+
++#if defined(UVM) /* this is an ugly hack, but <uvm/uvm.h> is not supposed */
++ /* to get included by userland programms */
++#define UVM_ET_MAP 0x02 /* it is a vm_map */
++#define UVM_ET_SUBMAP 0x04 /* it is a submap (MAP must be 1 too) */
++#endif
+
+ _PROTOTYPE(static void enter_vn_text,(KA_T va, int *n));
+ _PROTOTYPE(static void get_kernel_access,(void));
+@@ -365,8 +370,14 @@
+ if (kread(ka, (char *)e, sizeof(vmme)))
+ return;
+ }
++#if defined(UVM) /* part 2 of the ugly UVM hack */
++ if ((e->etype & UVM_ET_MAP) != 0)
++ continue;
++#else
+ if (e->is_a_map || e->is_sub_map)
+ continue;
++#endif
++
+ /*
+ * Read the map entry's object and the object's shadow.
+ * Look for a PG_VNODE pager handle.