diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2004-06-23 16:44:41 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2004-06-23 16:44:41 +0800 |
commit | 59ae4c7d9abb491333c39a2bdccbf99e67427db1 (patch) | |
tree | 2e9d1721b1605ade00b161ca7d7b664e7de3f741 /net-mgmt/net-snmp53 | |
parent | ba98b7b248962c2631c12763abeeb86fc0b2669f (diff) | |
download | freebsd-ports-gnome-59ae4c7d9abb491333c39a2bdccbf99e67427db1.tar.gz freebsd-ports-gnome-59ae4c7d9abb491333c39a2bdccbf99e67427db1.tar.zst freebsd-ports-gnome-59ae4c7d9abb491333c39a2bdccbf99e67427db1.zip |
o Try to use modern autotools.
o Fix typo about WITHOUT_PERL knob. (1)
o Unbreak on -current after mbuf allocator changes. (2)
Submitted by: ceri (1)
Complained from: many people (2)
Diffstat (limited to 'net-mgmt/net-snmp53')
-rw-r--r-- | net-mgmt/net-snmp53/Makefile | 18 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-Makefile.top | 11 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-aclocal.m4 | 48 | ||||
-rw-r--r-- | net-mgmt/net-snmp53/files/patch-hr_storage.c | 35 |
4 files changed, 42 insertions, 70 deletions
diff --git a/net-mgmt/net-snmp53/Makefile b/net-mgmt/net-snmp53/Makefile index 27ec57c442e3..133d1ec6fcc6 100644 --- a/net-mgmt/net-snmp53/Makefile +++ b/net-mgmt/net-snmp53/Makefile @@ -7,7 +7,7 @@ PORTNAME= snmp PORTVERSION= 5.1.1 -PORTREVISION= 4 +PORTREVISION= 5 PKGNAMEPREFIX= net- CATEGORIES= net-mgmt ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -29,11 +29,11 @@ RUN_DEPEND= ${SITE_PERL}/${PERL_ARCH}/Tk.pm:${PORTSDIR}/x11-toolkits/p5-Tk .endif USE_REINPLACE= yes -USE_AUTOCONF_VER=257 -USE_LIBTOOL_VER=13 +USE_AUTOCONF_VER=259 +USE_LIBTOOL_VER=15 USE_RC_SUBR= yes INSTALLS_SHLIB= yes -LIBTOOLFLAGS= --disable-ltlibs --release-ignore +LIBTOOLFLAGS= #empty NO_LATEST_LINK= yes .if !defined(WITHOUT_PERL) USE_PERL5= yes @@ -82,8 +82,6 @@ PLIST_SUB+= WITH_IPV6="@comment " SHLIB_VERSION= 6 PLIST_SUB+= SHLIB_VERSION=${SHLIB_VERSION} -LIBTOOL_SUB= LTCONFIG=${LIBTOOL_SHAREDIR}/ltconfig${LIBTOOL_VERSION} \ - LTMAIN=${LIBTOOL_SHAREDIR}/ltmain.sh SCRIPTS_SUB= PREFIX=${PREFIX} PERL=${PERL} RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} @@ -187,7 +185,7 @@ pre-everything:: @${ECHO_MSG} "WITH_TKMIB=yes Install a graphical Perl/Tk/SNMP based mib browser" @${ECHO_MSG} "WITHOUT_DUMMY_VALUES=yes Provide 'placeholder' dummy values where" @${ECHO_MSG} " the necessary information is not available." - @${ECHO_MSG} "WITHOUT_PERL=yes Install the perl modules along with the rest" + @${ECHO_MSG} "WITHOUT_PERL=yes Do not install the perl modules along with the rest" @${ECHO_MSG} " of the net-snmp toolkit." @${ECHO_MSG} "WITHOUT_IPV6=yes Disable IPv6." @${ECHO_MSG} @@ -208,8 +206,10 @@ pre-everything:: post-patch: patch-autoconf patch-script-files patch-startup-files patch-autoconf: - @${REINPLACE_CMD} ${LIBTOOL_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${WRKSRC}/aclocal.m4 + @${AWK} '/@synopsis/,/taken from libtool.m4/' ${WRKSRC}/aclocal.m4 > ${WRKSRC}/aclocal.m4.tmp + @${CAT} ${LOCALBASE}/share/aclocal/libtool15.m4 >> ${WRKSRC}/aclocal.m4.tmp + @${CP} ${LOCALBASE}/share/libtool15/ltmain.sh ${WRKSRC} + @${MV} ${WRKSRC}/aclocal.m4.tmp ${WRKSRC}/aclocal.m4 patch-script-files: .for file in ${SCRIPT_FILES} diff --git a/net-mgmt/net-snmp53/files/patch-Makefile.top b/net-mgmt/net-snmp53/files/patch-Makefile.top deleted file mode 100644 index 33bed26b787a..000000000000 --- a/net-mgmt/net-snmp53/files/patch-Makefile.top +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.top.orig Thu Mar 6 05:08:26 2003 -+++ Makefile.top Sat Mar 29 21:54:50 2003 -@@ -59,7 +59,7 @@ - # generally, LIBCURRENT should stay the same unless major changes occur. - # Increment REVISION every release. - # Increment AGE if new stuff is available. --LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o -+LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -release $(LIBCURRENT) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o - LIB_EXTENSION = la - LIB_VERSION = - LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir) diff --git a/net-mgmt/net-snmp53/files/patch-aclocal.m4 b/net-mgmt/net-snmp53/files/patch-aclocal.m4 deleted file mode 100644 index eb2e519aa7f0..000000000000 --- a/net-mgmt/net-snmp53/files/patch-aclocal.m4 +++ /dev/null @@ -1,48 +0,0 @@ ---- aclocal.m4.orig Tue Sep 18 17:08:01 2001 -+++ aclocal.m4 Mon Jan 21 10:38:40 2002 -@@ -196,8 +196,23 @@ - AC_DEFUN([AC_PROG_LIBTOOL], - [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -+# Save cache, so that ltconfig can load it -+AC_CACHE_SAVE -+ -+# Actually configure libtool. ac_aux_dir is where install-sh is found. -+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -+${CONFIG_SHELL-/bin/sh} %%LTCONFIG%% --no-reexec \ -+$libtool_flags --no-verify --disable-ltlibs --release-ignore %%LTMAIN%% $lt_target \ -+|| AC_MSG_ERROR([libtool configure failed]) -+ -+# Reload cache, that may have been modified by ltconfig -+AC_CACHE_LOAD -+ - # This can be used to rebuild libtool when needed --LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" -+LIBTOOL_DEPS="--disable-ltlibs --release-ignore %%LTMAIN%%" - - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' -@@ -224,6 +239,11 @@ - AC_REQUIRE([AC_EXEEXT])dnl - dnl - -+case "$target" in -+NONE) lt_target="$host" ;; -+*) lt_target="$target" ;; -+esac -+ - _LT_AC_PROG_ECHO_BACKSLASH - # Only perform the check for file, if the check method requires it - case $deplibs_check_method in -@@ -875,7 +895,7 @@ - # All known linkers require a `.a' archive for static linking (except M$VC, - # which needs '.lib'). - libext=a --ltmain="$ac_aux_dir/ltmain.sh" -+ltmain="--disable-ltlibs --release-ignore %%LTMAIN%%" - ofile="$default_ofile" - with_gnu_ld="$lt_cv_prog_gnu_ld" - need_locks="$enable_libtool_lock" diff --git a/net-mgmt/net-snmp53/files/patch-hr_storage.c b/net-mgmt/net-snmp53/files/patch-hr_storage.c index 2480b9a02395..df54986a93f6 100644 --- a/net-mgmt/net-snmp53/files/patch-hr_storage.c +++ b/net-mgmt/net-snmp53/files/patch-hr_storage.c @@ -1,5 +1,5 @@ --- agent/mibgroup/host/hr_storage.c.orig Thu Jan 29 22:53:59 2004 -+++ agent/mibgroup/host/hr_storage.c Wed May 5 16:08:06 2004 ++++ agent/mibgroup/host/hr_storage.c Wed Jun 23 11:50:55 2004 @@ -148,7 +148,7 @@ #define HRFS_mount mnt_mountp #define HRFS_statfs statvfs @@ -142,7 +142,19 @@ default: #if NO_DUMMY_VALUES goto try_next; -@@ -853,3 +908,78 @@ +@@ -742,7 +797,11 @@ + break; + #if !defined(linux) && !defined(solaris2) && !defined(hpux10) && !defined(hpux11) && defined(MBSTAT_SYMBOL) + case HRS_TYPE_MBUF: ++#if defined(__FreeBSD__) && __FreeBSD_version >= 502113 ++ long_return = mbstat.m_mcfail + mbstat.m_mpfail; ++#else + long_return = mbstat.m_drops; ++#endif + break; + #endif /* !linux && !solaris2 && !hpux10 && !hpux11 && MBSTAT_SYMBOL */ + default: +@@ -853,3 +912,97 @@ *usedP = ainfo.ani_resv; } #endif /* solaris2 */ @@ -151,6 +163,24 @@ +void +collect_mbuf(long *long_mbuf, long *long_mbufc) +{ ++#if __FreeBSD_version >= 502113 ++ size_t mlen; ++ struct mbstat mbstat; ++ ++ mlen = sizeof mbstat; ++ if (sysctlbyname("kern.ipc.mbstat", &mbstat, &mlen, NULL, 0) < 0) { ++ warn("sysctl: retrieving mbstat"); ++ return; ++ } ++ if (mbstat.m_mbufs < 0) mbstat.m_mbufs = 0; /* XXX */ ++ if (mbstat.m_mclusts < 0) mbstat.m_mclusts = 0; /* XXX */ ++ if (long_mbuf) { ++ *long_mbuf = mbstat.m_mbufs; ++ } ++ if (long_mbufc) { ++ *long_mbufc = mbstat.m_mclusts; ++ } ++#else + int i, j, num_objs; + size_t mlen; + u_long totused[2]; @@ -219,5 +249,6 @@ + free(mbpstat[0]); + free(mbpstat); + } ++#endif +} +#endif |