diff options
author | frueauf <frueauf@pkgsrc.org> | 1998-04-02 09:35:38 +0000 |
---|---|---|
committer | frueauf <frueauf@pkgsrc.org> | 1998-04-02 09:35:38 +0000 |
commit | e6ce6c878e8f899a6826bad21090b76005e657d2 (patch) | |
tree | 92a8a9100c98e3dce2598700a0679c5e649005b1 | |
parent | 17bb7bd438ec087f049da177bc2d860a342ec36c (diff) | |
download | pkgsrc-e6ce6c878e8f899a6826bad21090b76005e657d2.tar.gz |
Add support for UVM.
-rw-r--r-- | sysutils/lsof/Makefile | 24 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-aa | 14 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ab | 29 |
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. |