diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2004-05-29 16:36:16 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2004-05-29 16:36:16 +0000 |
commit | a16682c228aa78438bd014b55ad9c8826e1bfff8 (patch) | |
tree | 5f5dc4e397fa6bf3e587a577c92f579b2960f478 /mail/cyrus-imapd23 | |
parent | fd403c96c4d677debccb878616560055cade8191 (diff) | |
download | ports-a16682c228aa78438bd014b55ad9c8826e1bfff8.tar.gz ports-a16682c228aa78438bd014b55ad9c8826e1bfff8.zip |
Since net-snmp-5.X support was added in 2.2.5, change the default
of WITH_SNMP from net-snmp4 to net-snmp. However, if there is
net-snmp4 installed, we still use net-snmp4 for backward compatibility.
Notes
Notes:
svn path=/head/; revision=110289
Diffstat (limited to 'mail/cyrus-imapd23')
-rw-r--r-- | mail/cyrus-imapd23/Makefile | 17 | ||||
-rw-r--r-- | mail/cyrus-imapd23/files/extra-patch-aclocal.m4 | 11 | ||||
-rw-r--r-- | mail/cyrus-imapd23/files/patch-ac | 11 |
3 files changed, 36 insertions, 3 deletions
diff --git a/mail/cyrus-imapd23/Makefile b/mail/cyrus-imapd23/Makefile index 0c5e8e4b8086..555eb20cc5c4 100644 --- a/mail/cyrus-imapd23/Makefile +++ b/mail/cyrus-imapd23/Makefile @@ -110,8 +110,23 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac .include <bsd.port.pre.mk> -.if defined(WITH_SNMP) +.if !defined(WITH_SNMP_VER) && defined(WITH_SNMP) +.if exists(${LOCALBASE}/lib/libsnmp.so.6) +WITH_SNMP_VER= 5 +.elif exists(${LOCALBASE}/lib/libsnmp.so.4) +WITH_SNMP_VER= 4 +.else +WITH_SNMP_VER= 5 +.endif +.endif +.if defined(WITH_SNMP_VER) +.if ${WITH_SNMP_VER} == 4 LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4 +.elif ${WITH_SNMP_VER} == 5 +LIB_DEPENDS+= netsnmp.6:${PORTSDIR}/net-mgmt/net-snmp +.else +BROKEN= "WITH_SNMP_VER must be 4 or 5" +.endif CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} .else CONFIGURE_ARGS+=--with-snmp=no diff --git a/mail/cyrus-imapd23/files/extra-patch-aclocal.m4 b/mail/cyrus-imapd23/files/extra-patch-aclocal.m4 index b6cafac0a496..0fb00562c04e 100644 --- a/mail/cyrus-imapd23/files/extra-patch-aclocal.m4 +++ b/mail/cyrus-imapd23/files/extra-patch-aclocal.m4 @@ -1,7 +1,7 @@ Index: aclocal.m4 diff -u aclocal.m4.orig aclocal.m4 --- aclocal.m4.orig Sat May 29 03:08:14 2004 -+++ aclocal.m4 Sat May 29 04:57:43 2004 ++++ aclocal.m4 Sat May 29 07:10:54 2004 @@ -505,7 +505,7 @@ BDB_LIBADD="" fi @@ -20,6 +20,15 @@ diff -u aclocal.m4.orig aclocal.m4 dblib="no") CPPFLAGS=$cmu_save_CPPFLAGS +@@ -1806,7 +1806,7 @@ + + if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then + CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include" +- LIB_UCDSNMP=$SNMP_LIBS ++ LIB_UCDSNMP="$SNMP_LIBS -lwrap" + AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?]) + AC_SUBST(LIB_UCDSNMP) + AC_MSG_RESULT(yes) @@ -1834,7 +1834,7 @@ LIB_UCDSNMP="" if test "$with_snmp" != no; then diff --git a/mail/cyrus-imapd23/files/patch-ac b/mail/cyrus-imapd23/files/patch-ac index d2d3c3c729f7..4f6476d7498a 100644 --- a/mail/cyrus-imapd23/files/patch-ac +++ b/mail/cyrus-imapd23/files/patch-ac @@ -1,7 +1,7 @@ Index: configure diff -u configure.orig configure --- configure.orig Sat May 29 03:08:17 2004 -+++ configure Sat May 29 04:38:20 2004 ++++ configure Sat May 29 06:43:27 2004 @@ -6551,7 +6551,7 @@ BDB_LIBADD="" fi @@ -33,6 +33,15 @@ diff -u configure.orig configure PERL_CCCDLFLAGS="$cccdlflags" fi +@@ -14020,7 +14021,7 @@ + + if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then + CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include" +- LIB_UCDSNMP=$SNMP_LIBS ++ LIB_UCDSNMP="$SNMP_LIBS -lwrap" + + cat >>confdefs.h <<\_ACEOF + #define HAVE_NETSNMP 1 @@ -14251,7 +14252,7 @@ #define HAVE_UCDSNMP 1 _ACEOF |