Wed Sep 22 10:35:57 2021 UTC ()
net-snmp: allow build on newer Darwin; fix #55927


(adam)
diff -r1.136 -r1.137 pkgsrc/net/net-snmp/Makefile

cvs diff -r1.136 -r1.137 pkgsrc/net/net-snmp/Makefile (expand / switch to unified diff)

--- pkgsrc/net/net-snmp/Makefile 2021/05/24 19:53:21 1.136
+++ pkgsrc/net/net-snmp/Makefile 2021/09/22 10:35:57 1.137
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.136 2021/05/24 19:53:21 wiz Exp $ 1# $NetBSD: Makefile,v 1.137 2021/09/22 10:35:57 adam Exp $
2 2
3PKGREVISION= 3 3PKGREVISION= 3
4.include "Makefile.common" 4.include "Makefile.common"
5CATEGORIES= net 5CATEGORIES= net
6 6
7MAINTAINER= adam@NetBSD.org 7MAINTAINER= adam@NetBSD.org
8COMMENT= Extensible SNMP implementation 8COMMENT= Extensible SNMP implementation
9 9
10CONFLICTS= ucd-snmp-[0-9]* 10CONFLICTS= ucd-snmp-[0-9]*
11CONFLICTS+= nocol-[0-9]* # bin/snmpget bin/snmpwalk 11CONFLICTS+= nocol-[0-9]* # bin/snmpget bin/snmpwalk
12 12
13USE_LIBTOOL= yes 13USE_LIBTOOL= yes
14GNU_CONFIGURE= yes 14GNU_CONFIGURE= yes
@@ -109,34 +109,31 @@ SMF_NAME= snmp @@ -109,34 +109,31 @@ SMF_NAME= snmp
109SMF_INSTANCES= default snmptrapd 109SMF_INSTANCES= default snmptrapd
110 110
111USE_TOOLS+= sh:run 111USE_TOOLS+= sh:run
112REPLACE_INTERPRETER+= bash 112REPLACE_INTERPRETER+= bash
113REPLACE.bash.old= /bin/bash 113REPLACE.bash.old= /bin/bash
114REPLACE.bash.new= ${SH} 114REPLACE.bash.new= ${SH}
115REPLACE_FILES.bash= local/mib2c-update 115REPLACE_FILES.bash= local/mib2c-update
116 116
117INSTALLATION_DIRS+= share/examples/net-snmp 117INSTALLATION_DIRS+= share/examples/net-snmp
118 118
119post-extract: 119post-extract:
120.if ${OPSYS} == "DragonFly" 120.if ${OPSYS} == "DragonFly"
121 cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c 121 cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c
122# XXX make it build on OS X 10.10; remove on the next update 
123.elif ${OPSYS} == "Darwin" 122.elif ${OPSYS} == "Darwin"
124 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin14.h 123 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin18.h
125 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin15.h 124 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin19.h
126 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin16.h 125 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin20.h
127 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin17.h 126 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin21.h
128 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin18.h 
129 ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin13.h ${WRKSRC}/include/net-snmp/system/darwin19.h 
130.endif 127.endif
131 128
132post-wrapper: 129post-wrapper:
133.if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386) 130.if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386)
134 mkdir ${BUILDLINK_DIR}/include/sys 131 mkdir ${BUILDLINK_DIR}/include/sys
135 cp ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys 132 cp ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys
136.endif 133.endif
137 134
138post-install: 135post-install:
139 ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \ 136 ${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \
140 ${DESTDIR}${PREFIX}/share/examples/net-snmp/EXAMPLE.conf 137 ${DESTDIR}${PREFIX}/share/examples/net-snmp/EXAMPLE.conf
141 ${INSTALL_DATA} ${WRKSRC}/agent/snmp_perl.pl \ 138 ${INSTALL_DATA} ${WRKSRC}/agent/snmp_perl.pl \
142 ${DESTDIR}${PREFIX}/share/snmp/ 139 ${DESTDIR}${PREFIX}/share/snmp/