pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/net-snmp Convert to options framework.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a51049eed7f6
branches:  trunk
changeset: 497630:a51049eed7f6
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Aug 01 11:55:55 2005 +0000

description:
Convert to options framework.
While here, sort Makefile a bit to make it easier to read.

diffstat:

 net/net-snmp/Makefile   |  56 ++++++++++++++++--------------------------------
 net/net-snmp/options.mk |  26 ++++++++++++++++++++++
 2 files changed, 45 insertions(+), 37 deletions(-)

diffs (135 lines):

diff -r 7841b800c315 -r a51049eed7f6 net/net-snmp/Makefile
--- a/net/net-snmp/Makefile     Mon Aug 01 11:46:36 2005 +0000
+++ b/net/net-snmp/Makefile     Mon Aug 01 11:55:55 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.34 2005/07/31 02:30:18 rtr Exp $
+# $NetBSD: Makefile,v 1.35 2005/08/01 11:55:55 wiz Exp $
 
 DISTNAME=      net-snmp-5.2.1.2
 CATEGORIES=    net
@@ -11,15 +11,7 @@
 
 CONFLICTS=     ucd-snmp-[0-9]*
 
-BUILD_DEFS+=   USE_INET6
-
-.include "../../mk/bsd.prefs.mk"
-
-NET_SNMP_SYS_CONTACT?=         default_user@contact.domain
-NET_SNMP_SYS_LOCATION?=                defaultlocation
-NET_SNMP_PERSISTENTDIR?=       ${VARBASE}/net-snmp
-NET_SNMP_MIBDIRS?=             \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs
-
+GNU_CONFIGURE=         yes
 USE_LIBTOOL=           yes
 
 # The self-test of Perl modules only works after installation because perl
@@ -31,31 +23,27 @@
 USE_PKGINSTALL=                yes
 DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
 
-.if ${OPSYS} == "NetBSD" && empty(CFLAGS:U:M*-Dnetbsd1*)
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+OSVERSION_SPECIFIC=    YES
+.  if empty(CFLAGS:U:M*-Dnetbsd1*)
 CFLAGS+=               -Dnetbsd1
+.  endif
 .endif
 
-GNU_CONFIGURE=         yes
+.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat)
+CONFIGURE_ENV+=                ac_cv_path_LPSTAT_PATH=no
+.endif
+
+NET_SNMP_SYS_CONTACT?=         default_user@contact.domain
+NET_SNMP_SYS_LOCATION?=                defaultlocation
+NET_SNMP_PERSISTENTDIR?=       ${VARBASE}/net-snmp
+NET_SNMP_MIBDIRS?=             \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs
 
 CONFIGURE_ARGS+=       --enable-shared
-# net-snmp doesn't do IPv6 on Solaris
-.if (defined(USE_INET6) && (${USE_INET6} == "YES")) && ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
-CONFIGURE_ARGS+=       --enable-ipv6
-PLIST_SUBST+=          IPV6H=
-.else
-CONFIGURE_ARGS+=       --disable-ipv6
-PLIST_SUBST+=          IPV6H="@comment "
-.endif
 CONFIGURE_ARGS+=       --with-defaults
-
-.include "../../security/tcp_wrappers/buildlink3.mk"
 CONFIGURE_ARGS+=       --with-libwrap
-
-.if defined(NET_SNMP_USE_SSL) && ${NET_SNMP_USE_SSL} == "YES"
-.  include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+=       --with-openssl
-.endif
-
 CONFIGURE_ARGS+=       --with-sys-contact="${NET_SNMP_SYS_CONTACT}"
 CONFIGURE_ARGS+=       --with-sys-location="${NET_SNMP_SYS_LOCATION}"
 #
@@ -90,15 +78,9 @@
 CONFIGURE_ARGS+=       --with-perl-modules=${MAKE_PARAMS:Q}
 PERL5_CONFIGURE=       NO
 PERL5_PACKLIST=                auto/Bundle/NetSNMP/.packlist
-
-.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat)
-CONFIGURE_ENV+=                ac_cv_path_LPSTAT_PATH=no
-.endif
 CONFIGURE_ENV+=                PERLPROG="${PERL5}"
 
-.if (${OPSYS} == "NetBSD")
-OSVERSION_SPECIFIC=    YES
-.endif
+.include "options.mk"
 
 # Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain
 # leftover config files or pidfiles after deinstallation.
@@ -106,8 +88,6 @@
 OWN_DIRS=      ${PREFIX}/share/snmp
 RCD_SCRIPTS=   snmpd snmptrapd
 
-.include "../../lang/perl5/module.mk"
-
 post-wrapper:
 .if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386)
        ${MKDIR} ${BUILDLINK_DIR}/include/sys
@@ -119,4 +99,6 @@
        ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf                          \
                ${PREFIX}/share/examples/net-snmp/EXAMPLE.conf
 
+.include "../../lang/perl5/module.mk"
+.include "../../security/tcp_wrappers/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 7841b800c315 -r a51049eed7f6 net/net-snmp/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/net-snmp/options.mk   Mon Aug 01 11:55:55 2005 +0000
@@ -0,0 +1,26 @@
+# $NetBSD: options.mk,v 1.1 2005/08/01 11:55:55 wiz Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.net-snmp
+PKG_SUPPORTED_OPTIONS= ssl
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} != "SunOS" && ${OPSYS} != "Darwin"
+# net-snmp doesn't do IPv6 on Solaris & Darwin
+PKG_SUPPORTED_OPTIONS+=        inet6 
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --enable-ipv6
+PLIST_SUBST+=          IPV6H=
+.else
+CONFIGURE_ARGS+=       --disable-ipv6
+PLIST_SUBST+=          IPV6H="@comment "
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+.  include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-openssl
+.endif



Home | Main Index | Thread Index | Old Index