diff options
author | atatat <atatat@pkgsrc.org> | 2004-04-29 04:19:22 +0000 |
---|---|---|
committer | atatat <atatat@pkgsrc.org> | 2004-04-29 04:19:22 +0000 |
commit | 97298bbfe4c940c976843ebcd5649989eb4ce1b6 (patch) | |
tree | 901ad51dcc9a8c180cdb6f785f2293cec723519d | |
parent | 5e1b3f9aca686a15c5a339ec3b652e20fc72a3b8 (diff) | |
download | pkgsrc-97298bbfe4c940c976843ebcd5649989eb4ce1b6.tar.gz |
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.
-rw-r--r-- | sysutils/lsof/Makefile | 3 | ||||
-rw-r--r-- | sysutils/lsof/distinfo | 6 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ab | 55 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ac | 55 | ||||
-rw-r--r-- | sysutils/lsof/patches/patch-ad | 34 |
5 files changed, 140 insertions, 13 deletions
diff --git a/sysutils/lsof/Makefile b/sysutils/lsof/Makefile index 2ba95ab161d..3ba77d2c7d4 100644 --- a/sysutils/lsof/Makefile +++ b/sysutils/lsof/Makefile @@ -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 --git a/sysutils/lsof/distinfo b/sysutils/lsof/distinfo index ae1134bf754..eadc50c5b47 100644 --- a/sysutils/lsof/distinfo +++ b/sysutils/lsof/distinfo @@ -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 --git a/sysutils/lsof/patches/patch-ab b/sysutils/lsof/patches/patch-ab index e5ea0fd70d9..64053583060 100644 --- a/sysutils/lsof/patches/patch-ab +++ b/sysutils/lsof/patches/patch-ab @@ -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 $ ---- 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" - ;; -- 1.6*) -+ 1.6*|2.0*) - LSOF_TSTBIGF=" " - LSOF_VERS="1060" +Make lsof compile on and properly report 2.0. Make lsof use statvfs +on NetBSD where available. + +--- 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" ;; ++ 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 --git a/sysutils/lsof/patches/patch-ac b/sysutils/lsof/patches/patch-ac new file mode 100644 index 00000000000..84141d440f9 --- /dev/null +++ b/sysutils/lsof/patches/patch-ac @@ -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 --git a/sysutils/lsof/patches/patch-ad b/sysutils/lsof/patches/patch-ad new file mode 100644 index 00000000000..28a5d5b435d --- /dev/null +++ b/sysutils/lsof/patches/patch-ad @@ -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) */ |