source: trunk/dports/net/net-snmp/Portfile @ 129760

Last change on this file since 129760 was 129760, checked in by ryandesign@…, 4 years ago

net-snmp:

  • update to 5.7.3 (#46225)
  • use perl 5.16 explicitly
  • change no_ssl variant to ssl variant
  • remove server variant; always build agent and install launchd plist (#26197)
  • don't install.asroot; I don't remember why I added that in r73191
  • allow parallel build, which now works (#35691)
  • add kerberos5 dependency to ksm variant, which now works (#21241)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 129760 2014-12-20 00:41:13Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    net-snmp
7version                 5.7.3
8categories              net
9license                 BSD
10platforms               darwin
11maintainers             ryandesign openmaintainer
12homepage                http://net-snmp.sourceforge.net/
13master_sites            sourceforge:project/${name}/${name}/${version}
14
15description             An extendable SNMP implementation
16
17long_description        This is net-snmp, a derivative of CMU's SNMP \
18                        package. Various tools relating to the Simple \
19                        Network Management Protocol including: an extensible \
20                        agent, an SNMP library, tools to request or set \
21                        information from SNMP agents, tools to generate and \
22                        handle SNMP traps, a version of the unix 'netstat' \
23                        command using SNMP, a Tk/perl MIB browser.
24
25checksums               rmd160  c5cf54d5723ee417e07f1f9fa3936aef505104a2 \
26                        sha256  12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0
27
28set perl_version        5.16
29
30depends_lib             port:bzip2 \
31                        port:perl${perl_version} \
32                        port:zlib
33
34post-extract {
35    # darwin14.h does not exist in 5.7.3
36    # https://sourceforge.net/p/net-snmp/bugs/2504/
37    copy ${worksrcpath}/include/net-snmp/system/darwin13.h ${worksrcpath}/include/net-snmp/system/darwin14.h
38}
39
40patchfiles              patch-configure.diff
41patchfiles-append       patch-include-net-snmp-system-darwin14.h.diff
42
43configure.env-append    PERLPROG=${prefix}/bin/perl${perl_version}
44
45configure.args          --with-defaults \
46                        --with-sys-contact=nobody@no.where \
47                        --with-persistent-directory=${prefix}/var/net-snmp \
48                        --with-logfile=${prefix}/var/log \
49                        --without-openssl \
50                        --with-zlib=${prefix} \
51                        --with-bzip2=${prefix} \
52                        --with-install-prefix=${destroot} \
53                        --without-elf \
54                        --without-kmem-usage \
55                        --enable-ipv6 \
56                        --with-out-mib-modules=mibII/ipv6
57
58# Remove no_ssl variant after December 2015
59variant no_ssl conflicts ssl description {Legacy compatibility variant} {}
60variant ssl conflicts no_ssl description {Enable ssl support} {
61    depends_lib-append  port:openssl
62    configure.args-replace --without-openssl --with-openssl=${prefix}
63}
64if {[variant_isset no_ssl]} {
65    default_variants -ssl
66} else {
67    default_variants +ssl
68}
69
70variant ksm description {Enable support for kerberos-based SNMP security} {
71    depends_lib-append  port:kerberos5
72    configure.args-append --with-security-modules="usm ksm"
73}
74
75post-build {
76    reinplace -E {s|-arch [a-z0-9_]+||g} \
77        ${worksrcpath}/net-snmp-config \
78        ${worksrcpath}/net-snmp-create-v3-user
79}
80
81post-destroot {
82    destroot.keepdirs ${destroot}${prefix}/var/net-snmp
83    foreach packlist [exec find ${destroot} -name .packlist] {
84        ui_info "Fixing packlist ${packlist}"
85        reinplace "s|${destroot}||" ${packlist}
86    }
87    foreach badfile [exec find ${destroot} -name perllocal.pod] {
88        ui_info "Removing ${badfile}"
89        file delete ${badfile}
90    }
91}
92
93startupitem.create      yes
94startupitem.executable  ${prefix}/sbin/snmpd -f
95
96livecheck.type          regex
97livecheck.url           ${homepage}download.html
98livecheck.regex         {net-snmp/([0-9.]+)/}
Note: See TracBrowser for help on using the repository browser.