aboutsummaryrefslogtreecommitdiff
path: root/net/libpcap/Makefile
blob: c314c1763eb3cb95f1119350a79c509596efb4cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Created by: Bruce M Simpson <bms@FreeBSD.org>
# $FreeBSD$

PORTNAME=	libpcap
PORTVERSION=	1.7.2
CATEGORIES=	net ipv6
MASTER_SITES=	http://www.tcpdump.org/release/

MAINTAINER=	garga@FreeBSD.org
COMMENT=	Ubiquitous network traffic capture library

LICENSE=	BSD3CLAUSE

GNU_CONFIGURE=	yes
USES=		bison gmake
USE_LDCONFIG=	yes

.if defined(LIBPCAP_OVERWRITE_BASE)
PREFIX=		/usr
PKGNAMESUFFIX=	-overwrite-base
MANPREFIX=	${PREFIX}/share
PKGMESSAGE=	${FILESDIR}/pkg-message-base
.endif

PLIST_FILES+=	bin/pcap-config \
		include/pcap/bluetooth.h \
		include/pcap/bpf.h \
		include/pcap/ipnet.h \
		include/pcap/namedb.h \
		include/pcap/nflog.h \
		include/pcap/pcap.h \
		include/pcap/sll.h \
		include/pcap/usb.h \
		include/pcap/vlan.h \
		include/pcap.h \
		include/pcap-namedb.h \
		include/pcap-bpf.h \
		lib/libpcap.a \
		lib/libpcap.so.1 \
		lib/libpcap.so.${PORTVERSION} \
		lib/libpcap.so \
		man/man1/pcap-config.1.gz \
		man/man3/pcap.3.gz \
		man/man3/pcap_activate.3.gz \
		man/man3/pcap_breakloop.3.gz \
		man/man3/pcap_can_set_rfmon.3.gz \
		man/man3/pcap_close.3.gz \
		man/man3/pcap_compile.3.gz \
		man/man3/pcap_create.3.gz \
		man/man3/pcap_datalink.3.gz \
		man/man3/pcap_datalink_name_to_val.3.gz \
		man/man3/pcap_datalink_val_to_name.3.gz \
		man/man3/pcap_dump.3.gz \
		man/man3/pcap_dump_close.3.gz \
		man/man3/pcap_dump_file.3.gz \
		man/man3/pcap_dump_flush.3.gz \
		man/man3/pcap_dump_ftell.3.gz \
		man/man3/pcap_dump_open.3.gz \
		man/man3/pcap_file.3.gz \
		man/man3/pcap_fileno.3.gz \
		man/man3/pcap_findalldevs.3.gz \
		man/man3/pcap_freecode.3.gz \
		man/man3/pcap_get_tstamp_precision.3.gz \
		man/man3/pcap_get_selectable_fd.3.gz \
		man/man3/pcap_geterr.3.gz \
		man/man3/pcap_inject.3.gz \
		man/man3/pcap_is_swapped.3.gz \
		man/man3/pcap_lib_version.3.gz \
		man/man3/pcap_list_datalinks.3.gz \
		man/man3/pcap_list_tstamp_types.3.gz \
		man/man3/pcap_lookupdev.3.gz \
		man/man3/pcap_lookupnet.3.gz \
		man/man3/pcap_loop.3.gz \
		man/man3/pcap_major_version.3.gz \
		man/man3/pcap_next_ex.3.gz \
		man/man3/pcap_offline_filter.3.gz \
		man/man3/pcap_open_dead.3.gz \
		man/man3/pcap_open_live.3.gz \
		man/man3/pcap_open_offline.3.gz \
		man/man3/pcap_set_buffer_size.3.gz \
		man/man3/pcap_set_datalink.3.gz \
		man/man3/pcap_set_immediate_mode.3.gz \
		man/man3/pcap_set_promisc.3.gz \
		man/man3/pcap_set_rfmon.3.gz \
		man/man3/pcap_set_snaplen.3.gz \
		man/man3/pcap_set_timeout.3.gz \
		man/man3/pcap_set_tstamp_precision.3.gz \
		man/man3/pcap_set_tstamp_type.3.gz \
		man/man3/pcap_setdirection.3.gz \
		man/man3/pcap_setfilter.3.gz \
		man/man3/pcap_setnonblock.3.gz \
		man/man3/pcap_snapshot.3.gz \
		man/man3/pcap_stats.3.gz \
		man/man3/pcap_statustostr.3.gz \
		man/man3/pcap_strerror.3.gz \
		man/man3/pcap_tstamp_type_name_to_val.3.gz \
		man/man3/pcap_tstamp_type_val_to_name.3.gz \
		man/man5/pcap-savefile.5.gz \
		man/man7/pcap-filter.7.gz \
		man/man7/pcap-linktype.7.gz \
		man/man7/pcap-tstamp.7.gz

OPTIONS_DEFINE=	DAG IPV6

DAG_DESC=	Support for Endace DAG hardware

OPTIONS_DEFAULT=	IPV6

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+=	--enable-ipv6
.endif

.if ${PORT_OPTIONS:MDAG}
LDFLAGS+=	-L${LOCALBASE}/lib
.else
CONFIGURE_ARGS+=	--without-dag
.endif

# Maybe make this into an OPTION?
.if defined(LIBPCAP_OVERWRITE_BASE)
post-install:
	${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.pre.mk>

# Packages are built on a kernel that has cloning, but the resulting
# package will be run on a system that does not have cloning (7.x).
# Always use bpf device, but specify CFLAGS if we have cloning.
CONFIGURE_ARGS+=	--with-pcap=bpf
.if ${OSVERSION} > 800043
CFLAGS+=	-DHAVE_DEVICE_CLONING=1
.endif

.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
CFLAGS+=	-fPIC
.endif

CONFIGURE_ARGS+=	--enable-dbus=no

.include <bsd.port.post.mk>