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

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

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 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 139229 2015-08-08 03:10:35Z jeremyhu@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    copy ${worksrcpath}/include/net-snmp/system/darwin13.h ${worksrcpath}/include/net-snmp/system/darwin15.h
39}
40
41patchfiles              patch-configure.diff
42patchfiles-append       patch-include-net-snmp-system-darwin14.h.diff
43patchfiles-append       patch-include-net-snmp-system-darwin15.h.diff
44
45configure.env-append    PERLPROG=${prefix}/bin/perl${perl_version}
46
47configure.args          --with-defaults \
48                        --with-sys-contact=nobody@no.where \
49                        --with-persistent-directory=${prefix}/var/net-snmp \
50                        --with-logfile=${prefix}/var/log \
51                        --without-openssl \
52                        --with-zlib=${prefix} \
53                        --with-bzip2=${prefix} \
54                        --with-install-prefix=${destroot} \
55                        --without-elf \
56                        --without-kmem-usage \
57                        --enable-ipv6 \
58                        --with-out-mib-modules=mibII/ipv6
59
60# Remove no_ssl variant after December 2015
61variant no_ssl conflicts ssl description {Legacy compatibility variant} {}
62variant ssl conflicts no_ssl description {Enable ssl support} {
63    depends_lib-append  path:lib/libssl.dylib:openssl
64    configure.args-replace --without-openssl --with-openssl=${prefix}
65}
66if {[variant_isset no_ssl]} {
67    default_variants -ssl
68} else {
69    default_variants +ssl
70}
71
72variant ksm description {Enable support for kerberos-based SNMP security} {
73    depends_lib-append  port:kerberos5
74    configure.args-append --with-security-modules="usm ksm"
75}
76
77post-build {
78    reinplace -E {s|-arch [a-z0-9_]+||g} \
79        ${worksrcpath}/net-snmp-config \
80        ${worksrcpath}/net-snmp-create-v3-user
81}
82
83post-destroot {
84    destroot.keepdirs ${destroot}${prefix}/var/net-snmp
85    foreach packlist [exec find ${destroot} -name .packlist] {
86        ui_info "Fixing packlist ${packlist}"
87        reinplace "s|${destroot}||" ${packlist}
88    }
89    foreach badfile [exec find ${destroot} -name perllocal.pod] {
90        ui_info "Removing ${badfile}"
91        file delete ${badfile}
92    }
93}
94
95startupitem.create      yes
96startupitem.executable  ${prefix}/sbin/snmpd -f
97
98livecheck.type          regex
99livecheck.url           ${homepage}download.html
100livecheck.regex         {net-snmp/([0-9.]+)/}
Note: See TracBrowser for help on using the repository browser.