Fix building of sysutils/pftop on FreeBSD 12, where pcap-int.h has been

removed.  This patches the affected files to use <pcap/pcap.h> instead.

Submitted by:	woodsb02
Approved by:	bapt
PR:		217219
MFH:		2017Q2
This commit is contained in:
Dimitry Andric 2017-05-26 20:01:01 +00:00
parent 6f2d2ee5e4
commit d63a4cfa1b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=441813

View file

@ -12,8 +12,6 @@ COMMENT= Utility for real-time display of statistics for pf
LICENSE= BSD2CLAUSE LICENSE= BSD2CLAUSE
BROKEN_FreeBSD_12= fails to compile: sf-gencode.h: pcap-int.h: No such file or directory
OPTIONS_DEFINE= ALTQ OPTIONS_DEFINE= ALTQ
ALTQ_DESC= ALTQ support for queue statistics ALTQ_DESC= ALTQ support for queue statistics
@ -61,6 +59,14 @@ post-patch:
.if ${OPSYS} == DragonFly || ${OSVERSION} >= 1100070 .if ${OPSYS} == DragonFly || ${OSVERSION} >= 1100070
@${REINPLACE_CMD} -e 's|altq/|net/&|' ${WRKSRC}/pftop.c @${REINPLACE_CMD} -e 's|altq/|net/&|' ${WRKSRC}/pftop.c
.endif .endif
@${REINPLACE_CMD} -e 's|#include .pcap-int.h.|#include <pcap/pcap.h>|g' \
${WRKSRC}/bpf_image.c \
${WRKSRC}/bpf_optimize.c \
${WRKSRC}/pcap-nametoaddr.c \
${WRKSRC}/sf-gencode.c \
${WRKSRC}/sf-gencode.h \
${WRKSRC}/sf-grammer.y \
${WRKSRC}/sf-scanner.l
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pftop ${STAGEDIR}${PREFIX}/sbin ${INSTALL_PROGRAM} ${WRKSRC}/pftop ${STAGEDIR}${PREFIX}/sbin