Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Dec 1999 14:44:10 -0500 (EST)
From:      jack@germanium.xtalwind.net
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/15669: Unbreak ucd-snmp for current
Message-ID:  <199912241944.dBOJiAT42146@germanium.xtalwind.net>

next in thread | raw e-mail | index | archive | help

>Number:         15669
>Category:       ports
>Synopsis:       Unbreak ucd-snmp for current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 24 11:50:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        FreeBSD 3.4-RELEASE i386
>Organization:
>Environment:

	

>Description:

	Merger vendor patches to handle new VM system on current.  This should
	allow most FreeBSD patches to go away in the next vendor release.
	Add autoconf BUILD_DEPENDS
	Set myself as maintainer per Gary Palmer, previou maintainer.

>How-To-Repeat:

	

>Fix:
	
	
diff -ruN ucd-snmp/Makefile ucd-snmp.new/Makefile
--- ucd-snmp/Makefile	Mon Nov 15 16:49:54 1999
+++ ucd-snmp.new/Makefile	Tue Dec  7 21:55:43 1999
@@ -1,5 +1,5 @@
 # New ports collection makefile for:	ucd-snmp
-# Version required:			3.6.1
+# Version required:			4.0.1
 # Date created:				26 June 1996
 # Whom:					gpalmer
 #
@@ -15,10 +15,12 @@
 PATCHFILES=	012.patch
 PATCH_DIST_STRIP=	-p0 -d ${WRKSRC}/agent
 
-MAINTAINER=	gpalmer@FreeBSD.org
+MAINTAINER=	jack@germanium.xtalwind.net
 
 CONFIGURE_ARGS=	--enable-shared
 
+BUILD_DEPENDS=  autoheader:${PORTSDIR}/devel/autoconf
+
 GNU_CONFIGURE=	YES
 .if defined(BATCH)
 CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
@@ -45,15 +47,9 @@
 .if ${PORTOBJFORMAT} == "aout"
 BROKEN=		"aout build breaks: ld: internal error: RRS relocs exceed allocation 343"
 .endif
-.if ${OSVERSION} >= 400000
-BROKEN=		"Uses the old VM system interfaces"
-.endif
 
 SHLIB_VERSION=4
 PLIST_SUB= shlib=${SHLIB_VERSION}
-
-post-patch:
-	@${CP} ${FILESDIR}/freebsd4.h ${WRKSRC}/s
 
 post-install:
 	@( cd ${PREFIX}/bin && strip ${BIN} )
diff -ruN ucd-snmp/files/freebsd4.h ucd-snmp.new/files/freebsd4.h
--- ucd-snmp/files/freebsd4.h	Wed Apr  7 12:07:40 1999
+++ ucd-snmp.new/files/freebsd4.h	Wed Dec 31 19:00:00 1969
@@ -1 +0,0 @@
-#include "freebsd3.h"
diff -ruN ucd-snmp/patches/patch-ab ucd-snmp.new/patches/patch-ab
--- ucd-snmp/patches/patch-ab	Wed Apr  7 12:07:40 1999
+++ ucd-snmp.new/patches/patch-ab	Wed Dec 31 19:00:00 1969
@@ -1,40 +0,0 @@
---- agent/mibgroup/ucd-snmp/disk.c~	Fri Mar  5 08:45:00 1999
-+++ agent/mibgroup/ucd-snmp/disk.c	Sat Apr  3 13:33:11 1999
-@@ -79,6 +79,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/errormib.c~	Tue Mar  2 05:27:30 1999
-+++ agent/mibgroup/ucd-snmp/errormib.c	Sat Apr  3 13:33:44 1999
-@@ -93,6 +93,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/extensible.c~	Fri Mar  5 08:45:01 1999
-+++ agent/mibgroup/ucd-snmp/extensible.c	Sat Apr  3 13:34:13 1999
-@@ -81,6 +81,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
---- agent/mibgroup/ucd-snmp/loadave.c~	Tue Mar 16 08:21:02 1999
-+++ agent/mibgroup/ucd-snmp/loadave.c	Sat Apr  3 13:34:39 1999
-@@ -80,6 +80,7 @@
- #define statvfs statfs
- #endif
- #if HAVE_VM_SWAP_PAGER_H
-+#include <vm/vm.h>
- #include <vm/swap_pager.h>
- #endif
- #if HAVE_SYS_FIXPOINT_H
diff -ruN ucd-snmp/patches/patch-ad ucd-snmp.new/patches/patch-ad
--- ucd-snmp/patches/patch-ad	Wed Apr  7 12:07:40 1999
+++ ucd-snmp.new/patches/patch-ad	Tue Dec  7 21:55:43 1999
@@ -1,12 +1,36 @@
---- agent/mibgroup/mibII/interfaces.c~	Tue Mar 16 08:46:12 1999
-+++ agent/mibgroup/mibII/interfaces.c	Sat Apr  3 13:49:28 1999
-@@ -1745,10 +1745,18 @@
+--- agent/mibgroup/mibII/interfaces.c.orig	Thu Aug 19 05:33:56 1999
++++ agent/mibgroup/mibII/interfaces.c	Tue Dec  7 17:27:21 1999
+@@ -12,10 +12,12 @@
+ #define _I_DEFINED_KERNEL
+ #endif
+ 
+-#if STDC_HEADERS
+-#include <stdlib.h>
++#if HAVE_STRING_H
+ #include <string.h>
+ #endif
++#if HAVE_STDLIB_H
++#include <stdlib.h>
++#endif
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+@@ -118,7 +120,7 @@
+ #if HAVE_SYS_SYSCTL_H
+ #include <sys/sysctl.h>
+ 
+-#if defined(freebsd3)
++#if defined(freebsd3) || defined(freebsd4)
+ #    define USE_SYSCTL_IFLIST
+ #else
+ # if defined(CTL_NET) && !defined(freebsd2)
+@@ -1832,10 +1834,18 @@
  			physaddrbuf = 0;
  		}
  		ifm = (struct if_msghdr *)rtm;
 +#if defined(freebsd3) || defined(freebsd4)
-+		if (physaddrs != 0) physaddrs[naddrs] = (void*)(ifm + 1);
-+		naddrs++;
++       if (physaddrs != 0) physaddrs[naddrs] = (void*)(ifm + 1);
++       naddrs++;
 +#endif
  		ilen -= ifm->ifm_msglen;
  		cp += ifm->ifm_msglen;
@@ -19,7 +43,7 @@
  			int is_alias = 0;
  			ifam = (struct ifa_msghdr *)rtm;
  			ilen -= sizeof(*ifam);
-@@ -1771,6 +1779,7 @@
+@@ -1858,6 +1868,7 @@
  				}
  				sa = (struct sockaddr *)cp;
  			}
@@ -27,3 +51,27 @@
  			rtm = (struct rt_msghdr *)cp;
  		}
  	}
+--- agent/mibgroup/mibII/tcp.c.orig	Wed Aug 18 12:30:37 1999
++++ agent/mibgroup/mibII/tcp.c	Tue Dec  7 17:24:23 1999
+@@ -135,6 +135,10 @@
+ #ifdef linux
+ static void linux_read_tcp_stat (struct tcp_mib *);
+ #endif
++#ifdef freebsd4
++static unsigned int hz;
++#endif
++
+ 
+ 	/*********************
+ 	 *
+@@ -185,7 +189,9 @@
+ #ifdef TCP_SYMBOL
+   auto_nlist( TCP_SYMBOL,0,0 );
+ #endif
+-
++#if freebsd4
++  hz=sysconf(_SC_CLK_TCK); /* get ticks/s from system */
++#endif
+ }
+ 
+ /*
diff -ruN ucd-snmp/patches/patch-ai ucd-snmp.new/patches/patch-ai
--- ucd-snmp/patches/patch-ai	Wed Dec 31 19:00:00 1969
+++ ucd-snmp.new/patches/patch-ai	Tue Dec  7 21:55:43 1999
@@ -0,0 +1,22 @@
+--- acconfig.h.orig	Mon Aug 23 09:14:37 1999
++++ acconfig.h	Tue Dec  7 16:35:28 1999
+@@ -282,7 +282,7 @@
+ #ifdef netbsd1
+ #define OSTYPE NETBSD1ID
+ #endif
+-#if defined(freebsd2) || defined(freebsd3)
++#if defined(freebsd2) || defined(freebsd3) || defined(freebsd4)
+ #define OSTYPE FREEBSDID
+ #endif
+ #if defined(irix6) || defined(irix5)
+--- config.h.in.orig	Mon Aug 23 09:14:38 1999
++++ config.h.in	Tue Dec  7 16:52:22 1999
+@@ -803,7 +803,7 @@
+ #ifdef netbsd1
+ #define OSTYPE NETBSD1ID
+ #endif
+-#if defined(freebsd2) || defined(freebsd3)
++#if defined(freebsd2) || defined(freebsd3) || defined(freebsd4)
+ #define OSTYPE FREEBSDID
+ #endif
+ #if defined(irix6) || defined(irix5)
diff -ruN ucd-snmp/patches/patch-aj ucd-snmp.new/patches/patch-aj
--- ucd-snmp/patches/patch-aj	Wed Dec 31 19:00:00 1969
+++ ucd-snmp.new/patches/patch-aj	Tue Dec  7 21:55:43 1999
@@ -0,0 +1,17 @@
+--- ./s/freebsd4.h  Thu Nov  4 09:48:40 1999
++++ ./s/freebsd4.h  Thu Nov  4 09:00:18 1999
+@@ -0,0 +1,14 @@
++#include "freebsd.h"
++
++#define freebsd2 1                  /* freebsd3 is a superset of freebsd2 */
++
++#undef IFADDR_SYMBOL
++#define IFADDR_SYMBOL "in_ifaddrhead"
++
++#undef PROC_SYMBOL
++#define PROC_SYMBOL "allproc"
++
++#undef NPROC_SYMBOL
++#define NPROC_SYMBOL "nprocs"
++
++#undef TOTAL_MEMORY_SYMBOL
diff -ruN ucd-snmp/patches/patch-ak ucd-snmp.new/patches/patch-ak
--- ucd-snmp/patches/patch-ak	Wed Dec 31 19:00:00 1969
+++ ucd-snmp.new/patches/patch-ak	Tue Dec  7 21:55:43 1999
@@ -0,0 +1,48 @@
+--- agent/mibgroup/ucd-snmp/disk.c.orig	Tue Aug 24 17:17:32 1999
++++ agent/mibgroup/ucd-snmp/disk.c	Tue Dec  7 18:51:52 1999
+@@ -82,6 +82,9 @@
+ #endif
+ #define statvfs statfs
+ #endif
++#if HAVE_VM_VM_H
++#include <vm/vm.h>
++#endif
+ #if HAVE_VM_SWAP_PAGER_H
+ #include <vm/swap_pager.h>
+ #endif
+--- agent/mibgroup/ucd-snmp/errormib.c.orig	Wed Aug 18 12:30:44 1999
++++ agent/mibgroup/ucd-snmp/errormib.c	Tue Dec  7 18:52:51 1999
+@@ -92,6 +92,9 @@
+ #endif
+ #define statvfs statfs
+ #endif
++#if HAVE_VM_VM_H
++#include <vm/vm.h>
++#endif
+ #if HAVE_VM_SWAP_PAGER_H
+ #include <vm/swap_pager.h>
+ #endif
+--- agent/mibgroup/ucd-snmp/loadave.c.orig	Tue Jul 27 09:38:09 1999
++++ agent/mibgroup/ucd-snmp/loadave.c	Tue Dec  7 18:54:42 1999
+@@ -79,6 +79,9 @@
+ #endif
+ #define statvfs statfs
+ #endif
++#if HAVE_VM_VM_H
++#include <vm/vm.h>
++#endif
+ #if HAVE_VM_SWAP_PAGER_H
+ #include <vm/swap_pager.h>
+ #endif
+--- agent/mibgroup/ucd-snmp/extensible.c.orig	Tue Jul 27 09:38:08 1999
++++ agent/mibgroup/ucd-snmp/extensible.c	Tue Dec  7 19:09:56 1999
+@@ -80,6 +80,9 @@
+ #endif
+ #define statvfs statfs
+ #endif
++#if HAVE_VM_VM_H
++#include <vm/vm.h>
++#endif
+ #if HAVE_VM_SWAP_PAGER_H
+ #include <vm/swap_pager.h>
+ #endif


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912241944.dBOJiAT42146>