pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/lsof Fix NetBSD 2.0 check in Configure, and c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb6fda30968f
branches:  trunk
changeset: 474409:bb6fda30968f
user:      atatat <atatat%pkgsrc.org@localhost>
date:      Thu Apr 29 04:19:22 2004 +0000

description:
Fix NetBSD 2.0 check in Configure, and check for and deal with the new
statvfs() sysctl call which replaced statfs() around 2.0D.  This pkg
will now build on current again (addresses my PR pkg/25372).  Bump
PKGREVISION to 1.

Changes adapted from changes adapted by lsof maintainer based on
changes that made things work this morning.  That means they'll all be
in the next official lsof release.  So there.

diffstat:

 sysutils/lsof/Makefile         |   3 +-
 sysutils/lsof/distinfo         |   6 +++-
 sysutils/lsof/patches/patch-ab |  55 ++++++++++++++++++++++++++++++++++-------
 sysutils/lsof/patches/patch-ac |  55 ++++++++++++++++++++++++++++++++++++++++++
 sysutils/lsof/patches/patch-ad |  34 +++++++++++++++++++++++++
 5 files changed, 140 insertions(+), 13 deletions(-)

diffs (185 lines):

diff -r 7474692e498c -r bb6fda30968f sysutils/lsof/Makefile
--- a/sysutils/lsof/Makefile    Thu Apr 29 02:23:26 2004 +0000
+++ b/sysutils/lsof/Makefile    Thu Apr 29 04:19:22 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.74 2004/03/12 14:31:37 atatat Exp $
+# $NetBSD: Makefile,v 1.75 2004/04/29 04:19:22 atatat Exp $
 #
 
 DISTNAME=              lsof_4.71
+PKGREVISION=           1
 PKGNAME=               ${DISTNAME:S/_/-/}
 CATEGORIES=            sysutils
 MASTER_SITES=          ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  \
diff -r 7474692e498c -r bb6fda30968f sysutils/lsof/distinfo
--- a/sysutils/lsof/distinfo    Thu Apr 29 02:23:26 2004 +0000
+++ b/sysutils/lsof/distinfo    Thu Apr 29 04:19:22 2004 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.39 2004/04/01 20:15:54 tron Exp $
+$NetBSD: distinfo,v 1.40 2004/04/29 04:19:22 atatat Exp $
 
 SHA1 (lsof_4.71.tar.bz2) = 20f63f6122f5a9a55cf3396e32d33ed4325271ba
 Size (lsof_4.71.tar.bz2) = 701281 bytes
 SHA1 (patch-aa) = 36790019394b4088c226222d4aefaec50430bcf3
-SHA1 (patch-ab) = f71f0ccc5617b83d9bfb5bfe3aabae448af15314
+SHA1 (patch-ab) = f321acb9a1f8cacb4fc9aa8da40d0c60a07e59b9
+SHA1 (patch-ac) = 941b149d31d0bf59192a11b53989d53c9111305b
+SHA1 (patch-ad) = 3d0037bf0a31b108e8adaf8c93b6fa72aa44dfb2
diff -r 7474692e498c -r bb6fda30968f sysutils/lsof/patches/patch-ab
--- a/sysutils/lsof/patches/patch-ab    Thu Apr 29 02:23:26 2004 +0000
+++ b/sysutils/lsof/patches/patch-ab    Thu Apr 29 04:19:22 2004 +0000
@@ -1,12 +1,47 @@
-$NetBSD: patch-ab,v 1.27 2004/04/01 20:15:54 tron Exp $
+$NetBSD: patch-ab,v 1.28 2004/04/29 04:19:22 atatat Exp $
+
+Make lsof compile on and properly report 2.0.  Make lsof use statvfs
+on NetBSD where available.
 
---- Configure.orig     2004-03-11 00:41:04.000000000 +0100
-+++ Configure  2004-04-01 22:12:30.000000000 +0200
-@@ -2210,6 +2210,6 @@
-       LSOF_VERS="1050"
+--- Configure.orig     2004-03-10 18:41:04.000000000 -0500
++++ Configure
+@@ -2218,6 +2218,15 @@ return(0); }
+       echo "!!!WARNING!!!  Unsupported NetBSD version: $LSOF_VSTR"
+       echo "!!!WARNING!!!  Configuring for NetBSD 1.6"
        ;;
--      1.6*)
-+      1.6*|2.0*)
-       LSOF_TSTBIGF=" "
-       LSOF_VERS="1060"
-       ;;
++      2.0*)
++      LSOF_TSTBIGF=" "
++      LSOF_VERS="2000"
++      ;;
++      2*)
++      LSOF_VERS=2000
++      echo "!!!WARNING!!!  Unsupported NetBSD version: $LSOF_VSTR"
++      echo "!!!WARNING!!!  Configuring for NetBSD 2.0"
++      ;;
+       *)
+       echo "Unknown NetBSD release: $LSOF_VSTR"
+       echo Assuming NetBSD 1.0
+@@ -2229,7 +2238,7 @@ return(0); }
+     # Test for legal NetBSD version.
+ 
+     case $LSOF_VERS in        # {
+-    1000|1010|1020|1030|1040|1050|1060)
++    1000|1010|1020|1030|1040|1050|1060|2000)
+       ;;
+     *)
+       echo "Unknown NetBSD version: $LSOF_VERS"
+@@ -2505,6 +2514,14 @@ return(0); }
+     then
+       LSOF_CFGF="$LSOF_CFGF -DHAS_SYS_PIPEH"
+     fi        # }
++    if test -r ${LSOF_INCLUDE}/sys/statvfs.h   # {
++    then
++      grep -q '^struct statvfs {' ${LSOF_INCLUDE}/sys/statvfs.h
++      if test $? -eq 0        # {
++      then
++      LSOF_CFGF="$LSOF_CFGF -DHASSTATVFS"
++      fi      # }
++    fi        # }
+     if test -r ${LSOF_INCLUDE}/kvm.h  # {
+     then
+       grep -q kvm_getproc2 ${LSOF_INCLUDE}/kvm.h
diff -r 7474692e498c -r bb6fda30968f sysutils/lsof/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ac    Thu Apr 29 04:19:22 2004 +0000
@@ -0,0 +1,55 @@
+$NetBSD: patch-ac,v 1.16 2004/04/29 04:19:22 atatat Exp $
+
+Make lsof use statvfs on NetBSD where available.
+
+--- dialects/n+obsd/dmnt.c.orig        2002-06-16 21:44:17.000000000 -0400
++++ dialects/n+obsd/dmnt.c
+@@ -56,7 +56,6 @@ readmnt()
+ {
+       char *dn = (char *)NULL;
+       char *ln;
+-      struct statfs *mb = (struct statfs *)NULL;
+       struct mounts *mtp;
+       int n;
+       struct stat sb;
+@@ -65,6 +64,12 @@ readmnt()
+       unsigned char procfs = 0;
+ #endif        /* defined(HASPROCFS) */
+ 
++#if   defined(HASSTATVFS)
++      struct statvfs *mb = (struct statvfs *)NULL;
++#else /* !defined(HASSTATVFS) */
++      struct statfs *mb = (struct statfs *)NULL;
++#endif        /* defined(HASSTATVFS) */
++
+       if (Lmi || Lmist)
+           return(Lmi);
+ /*
+@@ -123,7 +128,13 @@ no_space_for_mount:
+                       "      Output information may be incomplete.\n");
+               }
+               (void) bzero((char *)&sb, sizeof(sb));
++
++#if   defined(HASSTATVFS)
++              sb.st_dev = (dev_t)mb->f_fsid;
++#else /* !defined(HASSTATVFS) */
+               sb.st_dev = (dev_t)mb->f_fsid.val[0];
++#endif        /* defined(HASSTATVFS) */
++
+               sb.st_mode = S_IFDIR | 0777;
+               if (!Fwarn) {
+                   (void) fprintf(stderr,
+@@ -222,7 +233,13 @@ readvfs(vm)
+           Exit(1);
+       }
+       vp->addr = vm;
++
++#if   defined(HASSTATVFS)
++      vp->fsid = m.m_stat.f_fsidx;
++#else /* !defined(HASSTATVFS) */
+       vp->fsid = m.m_stat.f_fsid;
++#endif        /* defined(HASSTATVFS) */
++
+       (void) snpf(vp->type, sizeof(vp->type), "%s", m.m_stat.f_fstypename);
+       vp->next = Lvfs;
+       Lvfs = vp;
diff -r 7474692e498c -r bb6fda30968f sysutils/lsof/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/lsof/patches/patch-ad    Thu Apr 29 04:19:22 2004 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-ad,v 1.7 2004/04/29 04:19:23 atatat Exp $
+
+Make lsof use statvfs on NetBSD where available.
+
+--- dialects/n+obsd/dnode.c.orig       2004-01-14 06:29:19.000000000 -0500
++++ dialects/n+obsd/dnode.c
+@@ -745,7 +745,13 @@ process_overlaid_node:
+ #if   defined(HASKERNFS)
+       case KERNFSNODE:
+           if (vfs) {
++
++# if  defined(HASSTATVFS)
++              dev = (dev_t)vfs->fsid.__fsid_val[0];
++# else        /* !defined(HASSTATVFS) */
+               dev = (dev_t)vfs->fsid.val[0];
++# endif       /* defined(HASSTATVFS) */
++
+               devs = 1;
+           }
+           break;
+@@ -1069,7 +1075,13 @@ process_overlaid_node:
+  * 
+  */
+       if (nvfs) {
++
++# if  defined(HASSTATVFS)
++          dev = nvfs->fsid.__fsid_val[0];
++# else        /* !defined(HASSTATVFS) */
+           dev = nvfs->fsid.val[0];
++# endif       /* defined(HASSTATVFS) */
++
+           devs = 1;
+       }
+ #endif        /* defined(HASNULLFS) */



Home | Main Index | Thread Index | Old Index