View | Details | Raw Unified | Return to bug 204411 | Differences between
and this patch

Collapse All | Expand All

(-)net/wireshark/Makefile (-139 / +81 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME?=	wireshark
4
PORTNAME?=	wireshark
5
PORTVERSION=	1.12.8
5
PORTVERSION=	1.12.8
6
PORTREVISION=	1
6
CATEGORIES=	net ipv6
7
CATEGORIES=	net ipv6
7
MASTER_SITES=	http://www.wireshark.org/download/src/ \
8
MASTER_SITES=	http://www.wireshark.org/download/src/ \
8
		http://ftp.uni-kl.de/pub/wireshark/src/ \
9
		http://ftp.uni-kl.de/pub/wireshark/src/ \
Lines 12-45 Link Here
12
		http://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
13
		http://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
13
		ftp://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
14
		ftp://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
14
		http://wireshark.zing.org/download/src/
15
		http://wireshark.zing.org/download/src/
15
DISTNAME=	${DATADIR_NAME}-${PORTVERSION}
16
16
17
MAINTAINER=	marcus@FreeBSD.org
17
MAINTAINER=	marcus@FreeBSD.org
18
COMMENT?=	Powerful network analyzer/capture tool
18
COMMENT?=	Powerful network analyzer/capture tool
19
19
20
LICENSE=	GPLv2
20
LICENSE=	GPLv2
21
LICENSE_FILE=	${WRKSRC}/COPYING
21
22
22
DATADIR_NAME=	wireshark
23
CONFLICTS?=	wireshark-qt5-[0-9]*
23
24
25
GNU_CONFIGURE=	yes
26
USES=		alias cpe gmake libtool perl5 pkgconfig python:build tar:bzip2
24
USE_PERL5=	build
27
USE_PERL5=	build
25
USES=		alias cpe gettext gmake iconv libtool perl5 pkgconfig \
28
USE_GNOME=	glib20
26
		python:build tar:bzip2
27
WANT_GNOME=	yes
28
USE_OPENSSL=	yes
29
USE_OPENSSL=	yes
29
CONFLICTS?=	wireshark-qt5-[0-9]*
30
31
CONFIGURE_ARGS+=	--program-transform-name="" \
30
CONFIGURE_ARGS+=	--program-transform-name="" \
32
			--with-ssl=${OPENSSLBASE} \
31
			--with-ssl=${OPENSSLBASE}
33
			--with-qt=no
32
INSTALL_TARGET=	install-strip
34
USE_LDCONFIG=	yes
33
USE_LDCONFIG=	yes
35
DATADIR=	${PREFIX}/share/${DATADIR_NAME}
34
36
CFLAGS+=	-funit-at-a-time
35
CFLAGS+=	-funit-at-a-time
37
LIBS+=		-L${LOCALBASE}/lib
36
LIBS+=		-L${LOCALBASE}/lib
37
PLIST_SUB+=	PORTVERSION=${PORTVERSION}
38
38
39
DESKTOP_ENTRIES=	"Wireshark" "Network Protocol Analyzer" \
40
			"${DATADIR}/hi48-app-wireshark.png" \
41
			"wireshark" "System;Monitor;GTK;" true
42
43
.for x in capinfos editcap mergecap rawshark text2pcap dftest randpkt \
39
.for x in capinfos editcap mergecap rawshark text2pcap dftest randpkt \
44
    reordercap captype
40
    reordercap captype
45
.if defined(LITE)
41
.if defined(LITE)
Lines 52-205 Link Here
52
.endif
48
.endif
53
.endfor
49
.endfor
54
50
55
.if !defined(LITE)
51
OPTIONS_DEFINE=		RTP SNMP IPV6 GEOIP LUA GCRYPT GNUTLS
56
OPTIONS_DEFINE=		RTP SNMP ADNS PCRE IPV6 GEOIP LUA CARES GSSAPI X11 \
57
			GNUTLS GCRYPT THREADS
58
52
59
OPTIONS_RADIO=		GUI
53
OPTIONS_RADIO=		ASYNCDNS GUI
60
OPTIONS_RADIO_GUI=	GTK3 QT5
54
OPTIONS_SINGLE=		KERBEROS
61
55
62
OPTIONS_DEFAULT?=	SNMP ADNS PCRE IPV6 GEOIP GSSAPI X11 GTK3
56
OPTIONS_RADIO_ASYNCDNS=	ADNS CARES
57
OPTIONS_RADIO_GUI=	GTK2 GTK3 QT5
58
OPTIONS_SINGLE_KERBEROS=KRB_BASE KRB_HEIMDAL KRB_MIT KRB_NONE
63
59
60
OPTIONS_DEFAULT?=	SNMP ADNS IPV6 GEOIP KRB_BASE GTK3
61
64
RTP_DESC=		Enable support for playing back RTP streams
62
RTP_DESC=		Enable support for playing back RTP streams
65
ADNS_DESC=		Enable asynchronous DNS lookup support
63
GCRYPT_DESC=		IPsec decryption support
66
.endif
64
GNUTLS_DESC=		SSL decryption support
65
ASYNCDNS_DESC=		Asynchronous DNS lookup support
66
ADNS_DESC=		Asynchronous DNS resolution via GNU adns
67
KERBEROS_DESC=		Kerberos dissection support
68
KRB_BASE_DESC=		Kerberos support via base system
69
KRB_HEIMDAL_DESC=	Kerberos support via security/heimdal
70
KRB_MIT_DESC=		Kerberos support via security/krb5
71
KRB_NONE_DESC=		Disable Kerberos support
67
72
68
.include <bsd.port.options.mk>
73
GTK2_USE=	GNOME=gtk20
74
GTK3_USE=	GNOME=gtk30
75
QT5_USE=	QT5=core,gui,widgets,printsupport,buildtools_build
69
76
70
.if ${PORT_OPTIONS:MX11}
77
LUA_USES=		lua:5[1-2]
71
USE_XORG=		x11
78
KRB_BASE_USES=		gssapi
72
.endif
79
KRB_HEIMDAL_USES=	gssapi:heimdal
80
KRB_MIT_USES=		gssapi:mit
73
81
74
.if ${PORT_OPTIONS:MX11}
82
RTP_LIB_DEPENDS=	libportaudio.so:${PORTSDIR}/audio/portaudio
75
PLIST_SUB+=	WIRESHARK=bin/wireshark WIRESHARK_MAN=""
83
SNMP_LIB_DEPENDS=	libsmi.so:${PORTSDIR}/net-mgmt/libsmi
76
.else
84
ADNS_LIB_DEPENDS=	libadns.so:${PORTSDIR}/dns/adns
77
PLIST_SUB+=	WIRESHARK="@comment wireshark not built" \
85
CARES_LIB_DEPENDS=	libcares.so:${PORTSDIR}/dns/c-ares
78
		WIRESHARK_MAN="@comment wireshark not built "
86
GEOIP_LIB_DEPENDS=	libGeoIP.so:${PORTSDIR}/net/GeoIP
79
USE_GNOME+=	glib20
87
GCRYPT_LIB_DEPENDS=	libgcrypt.so:${PORTSDIR}/security/libgcrypt
80
CONFIGURE_ARGS+=	--enable-wireshark=no \
88
GNUTLS_LIB_DEPENDS=	libgnutls.so:${PORTSDIR}/security/gnutls
81
			--disable-gtktest
82
.endif
83
89
84
.if ${PORT_OPTIONS:MGTK3}
90
IPV6_CONFIGURE_ENABLE=	ipv6
85
USE_GNOME+=		gtk30
86
CONFIGURE_ARGS+=	--with-gtk2=no \
87
			--with-gtk3=yes \
88
			--with-qt=no
89
.endif
90
91
91
.if ${PORT_OPTIONS:MQT5}
92
KRB_NONE_CONFIGURE_ON=	--without-krb5
92
CONFIGURE_ARGS+=	--with-gtk2=no \
93
KRB_NONE_CONFIGURE_OFF=	--with-krb5
93
			--with-gtk3=no \
94
KRB_NONE_CONFIGURE_ENV_OFF=	KRB5_CONFIG=${KRB5CONFIG}
94
			--with-qt=yes
95
USE_QT5+=		core widgets printsupport buildtools_build
96
PKGNAMESUFFIX+=		-qt5
97
MAKE_ENV+=		PATH="${PATH}:${LOCALBASE}/lib/qt5/bin"
98
CONFIGURE_ENV+=		PATH="${PATH}:${LOCALBASE}/lib/qt5/bin"
99
.endif
100
95
101
GNU_CONFIGURE=	yes
96
GTK2_CONFIGURE_WITH=	gtk2
102
PLIST_SUB+=	PORTVERSION=${PORTVERSION}
97
GTK3_CONFIGURE_WITH=	gtk3
98
QT5_CONFIGURE_WITH=	qt
99
LUA_CONFIGURE_WITH=	lua
100
RTP_CONFIGURE_WITH=	portaudio
101
SNMP_CONFIGURE_WITH=	libsmi
102
ADNS_CONFIGURE_WITH=	adns
103
CARES_CONFIGURE_WITH=	c-ares
104
GEOIP_CONFIGURE_WITH=	geoip
105
GCRYPT_CONFIGURE_WITH=	gcrypt
106
GNUTLS_CONFIGURE_WITH=	gnutls
103
107
104
.if ${PORT_OPTIONS:MIPV6}
108
LUA_CPPFLAGS=		-I${LUA_INCDIR}
105
CONFIGURE_ARGS+=	--enable-ipv6=yes
106
.else
107
CONFIGURE_ARGS+=	--enable-ipv6=no
108
.endif
109
109
110
# XXX - untested
110
QT5_MAKE_ENV=		PATH="${PATH}:${QT_BINDIR}"
111
.if ${PORT_OPTIONS:MTHREADS}
111
QT5_VARS=		PKGNAMESUFFIX=-qt5
112
CONFIGURE_ARGS+=	--enable-threads
113
.endif
114
112
115
.if ${PORT_OPTIONS:MPCRE} && !defined(LITE)
113
OPTIONS_SUB=		LUA
116
LIB_DEPENDS+=	libpcre.so:${PORTSDIR}/devel/pcre
117
CONFIGURE_ARGS+=	--with-pcre=${LOCALBASE}/lib
118
.else
119
CONFIGURE_ARGS+=	--with-pcre=no
120
.endif
121
114
122
.if ${PORT_OPTIONS:MLUA} && !defined(LITE)
115
.include <bsd.port.options.mk>
123
USES+=		lua:51
124
CONFIGURE_ARGS+=--with-lua=${PREFIX}
125
CFLAGS+=	-I${LUA_INCDIR}
126
CPPFLAGS+=	-I${LUA_INCDIR}
127
PLIST_SUB+=	LUA=""
128
.else
129
CONFIGURE_ARGS+=--without-lua
130
PLIST_SUB+=	LUA="@comment "
131
.endif
132
116
133
.if ${PORT_OPTIONS:MRTP} && !defined(LITE)
117
.if empty(PORT_OPTIONS:MGTK2) && empty(PORT_OPTIONS:MGTK3) && \
134
LIB_DEPENDS+=	libportaudio.so:${PORTSDIR}/audio/portaudio
118
    empty(PORT_OPTIONS:MQT5)
135
CONFIGURE_ARGS+=--with-portaudio=${LOCALBASE}
119
CONFIGURE_ARGS+=	--disable-wireshark
120
PLIST_SUB+=		GUI="@comment "
136
.else
121
.else
137
CONFIGURE_ARGS+=--without-portaudio
122
USES+=			desktop-file-utils shared-mime-info
123
INSTALLS_ICONS=		yes
124
INSTALL_TARGET+=	install_desktop_files
125
PLIST_SUB+=		GUI=""
138
.endif
126
.endif
139
127
140
.if ${PORT_OPTIONS:MSNMP} && !defined(LITE)
128
.if empty(PORT_OPTIONS:MGTK2) && empty(PORT_OPTIONS:MGTK3) && \
141
LIB_DEPENDS+=		libsmi.so:${PORTSDIR}/net-mgmt/libsmi
129
	${PORT_OPTIONS:MRTP}
142
CONFIGURE_ARGS+=	--with-libsmi=${LOCALBASE}
130
IGNORE=			the RTP support requires GTK+ frontend
143
.else
144
CONFIGURE_ARGS+=	--with-libsmi=no
145
.endif
131
.endif
146
132
147
.if ${PORT_OPTIONS:MADNS} && !defined(LITE)
148
LIB_DEPENDS+=		libadns.so:${PORTSDIR}/dns/adns
149
CONFIGURE_ARGS+=	--with-adns=${LOCALBASE}/lib
150
.else
151
CONFIGURE_ARGS+=	--with-adns=no
152
.endif
153
154
.if ${PORT_OPTIONS:MCARES} && !defined(LITE)
155
LIB_DEPENDS+=		libcares.so:${PORTSDIR}/dns/c-ares
156
CONFIGURE_ARGS+=	--with-c-ares=${LOCALBASE}/lib
157
.else
158
CONFIGURE_ARGS+=	--with-c-ares=no
159
.endif
160
161
.if ${PORT_OPTIONS:MGEOIP} && !defined(LITE)
162
LIB_DEPENDS+=		libGeoIP.so:${PORTSDIR}/net/GeoIP
163
CONFIGURE_ARGS+=	--with-geoip=${LOCALBASE}/lib
164
.else
165
CONFIGURE_ARGS+=	--with-geoip=no
166
.endif
167
168
.if ${PORT_OPTIONS:MGNUTLS}
169
LIB_DEPENDS+=	libgnutls.so:${PORTSDIR}/security/gnutls \
170
		libgcrypt.so:${PORTSDIR}/security/libgcrypt
171
CONFIGURE_ARGS+=--with-libgcrypt-prefix=${LOCALBASE} \
172
		--with-gnutls=yes
173
.else
174
CONFIGURE_ARGS+=--with-gnutls=no
175
.endif
176
177
.if ${PORT_OPTIONS:MGCRYPT}
178
LIB_DEPENDS+=	libgcrypt.so:${PORTSDIR}/security/libgcrypt
179
CONFIGURE_ARGS+=--with-libgcrypt-prefix=${LOCALBASE}
180
.endif
181
182
.if ! ${PORT_OPTIONS:MGSSAPI}
183
CONFIGURE_ARGS+=--with-krb5=no
184
.else
185
KRB5_CONFIG?=	${LOCALBASE}/bin/krb5-config
186
CONFIGURE_ENV+=	KRB5_CONFIG=${KRB5_CONFIG}
187
LIB_DEPENDS+=	libkrb5.so:${PORTSDIR}/security/krb5
188
.endif
189
190
PKG_MESSAGE=	${FILESDIR}/pkg-message
191
192
post-patch:
133
post-patch:
193
	@${REINPLACE_CMD} -e 's|llua|llua-${LUA_VER}|g ; \
134
	@${REINPLACE_CMD} -e 's|llua|llua-${LUA_VER}|g ; \
194
		s|-DGDK_PIXBUF_DISABLE_DEPRECATED||g ; \
135
		s|-DQT_GUI_LIB|-DQT_GUI_LIB $$CPPFLAGS| ' \
195
		s|-Wl,--as-needed|| ' \
196
		${WRKSRC}/configure
136
		${WRKSRC}/configure
137
	@${REINPLACE_CMD} -e 's|/usr/share/applications|${DESKTOPDIR}|g ; \
138
		s|/usr/share|${LOCALBASE}/share|g ; \
139
		s|{mime/packages,applications}|mime/packages| ; \
140
		s|{apps,mimetypes}|apps $$(DESTDIR)${LOCALBASE}/share/icons/hicolor/$$$${size}x$$$${size}/mimetypes|' \
141
		${WRKSRC}/Makefile.in
197
142
198
post-install:
143
post-install-QT5-on:
199
	${INSTALL_DATA} ${WRKSRC}/image/hi48-app-wireshark.png \
144
	${MV} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-qt \
200
		${STAGEDIR}${DATADIR}
145
		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
201
.if ${PORT_OPTIONS:MQT5}
202
		${MV} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-qt ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
203
.endif
204
146
205
.include <bsd.port.mk>
147
.include <bsd.port.mk>
(-)net/wireshark/files/patch-configure (-20 lines)
Lines 1-20 Link Here
1
--- configure.orig	2015-05-12 20:26:44 UTC
2
+++ configure
3
@@ -35189,7 +35189,7 @@ $as_echo "yes" >&6; }
4
 	  # searches the specified directory.
5
 	  #
6
 	  CPPFLAGS="$CPPFLAGS -I$krb5_dir/include"
7
-	  ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*heimdal.*$/HEIMDAL/'`
8
+	  ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | tr "[:lower:]" "[:upper:]" sed 's/^.*heimdal.*$/HEIMDAL/'`
9
 	  # MIT Kerberos moved krb5.h to krb5/krb5.h starting with release 1.5
10
 	  ac_mit_version_olddir=`grep 'Massachusetts Institute of Technology' $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*Massachusetts Institute of Technology.*$/MIT/'`
11
 	  ac_mit_version_newdir=`grep 'Massachusetts Institute of Technology' $krb5_dir/include/krb5/krb5.h | head -n 1 | sed 's/^.*Massachusetts Institute of Technology.*$/MIT/'`
12
@@ -35249,7 +35249,7 @@ fi
13
 
14
 	  if test -x "$KRB5_CONFIG"
15
 	  then
16
-	    KRB5_FLAGS=`"$KRB5_CONFIG" --cflags`
17
+	    KRB5_FLAGS=`"$KRB5_CONFIG" --cflags | sed -e 's/@INCLUDE_des@//g'`
18
 	    KRB5_LIBS=`"$KRB5_CONFIG" --libs`
19
 	    CPPFLAGS="$CPPFLAGS $KRB5_FLAGS"
20
 	    #
(-)net/wireshark/files/pkg-message (-17 lines)
Lines 1-17 Link Here
1
===============================================================================
2
3
In order for wireshark be able to capture packets when used by unprivileged
4
user, /dev/bpf should be in network group and have read-write permissions.
5
For example:
6
7
# chgrp network /dev/bpf*
8
# chmod g+r /dev/bpf*
9
# chmod g+w /dev/bpf*
10
11
In order for this to persist across reboots, add the following to
12
/etc/devfs.conf:
13
14
own  bpf* root:network
15
perm bpf* 0660
16
17
===============================================================================
(-)net/wireshark/pkg-message (+17 lines)
Line 0 Link Here
1
===============================================================================
2
3
In order for wireshark be able to capture packets when used by unprivileged
4
user, /dev/bpf should be in network group and have read-write permissions.
5
For example:
6
7
# chgrp network /dev/bpf*
8
# chmod g+r /dev/bpf*
9
# chmod g+w /dev/bpf*
10
11
In order for this to persist across reboots, add the following to
12
/etc/devfs.conf:
13
14
own  bpf* root:network
15
perm bpf* 0660
16
17
===============================================================================
(-)net/wireshark/pkg-plist (-3 / +19 lines)
Lines 7-13 Link Here
7
@mode
7
@mode
8
@group
8
@group
9
%%EDITCAP%%
9
%%EDITCAP%%
10
%%WIRESHARK%%
10
%%GUI%%bin/wireshark
11
%%MERGECAP%%
11
%%MERGECAP%%
12
%%RANDPKT%%
12
%%RANDPKT%%
13
%%RAWSHARK%%
13
%%RAWSHARK%%
Lines 49-56 Link Here
49
%%RANDPKT_MAN%%man/man1/randpkt.1.gz
49
%%RANDPKT_MAN%%man/man1/randpkt.1.gz
50
%%REORDERCAP_MAN%%man/man1/reordercap.1.gz
50
%%REORDERCAP_MAN%%man/man1/reordercap.1.gz
51
man/man1/tshark.1.gz
51
man/man1/tshark.1.gz
52
%%WIRESHARK_MAN%%man/man1/wireshark.1.gz
52
%%GUI%%man/man1/wireshark.1.gz
53
man/man4/wireshark-filter.4.gz
53
man/man4/wireshark-filter.4.gz
54
%%GUI%%share/applications/wireshark.desktop
55
%%GUI%%share/icons/hicolor/128x128/apps/wireshark.png
56
%%GUI%%share/icons/hicolor/128x128/mimetypes/application-wireshark-doc.png
57
%%GUI%%share/icons/hicolor/16x16/apps/wireshark.png
58
%%GUI%%share/icons/hicolor/16x16/mimetypes/application-wireshark-doc.png
59
%%GUI%%share/icons/hicolor/24x24/apps/wireshark.png
60
%%GUI%%share/icons/hicolor/24x24/mimetypes/application-wireshark-doc.png
61
%%GUI%%share/icons/hicolor/256x256/apps/wireshark.png
62
%%GUI%%share/icons/hicolor/256x256/mimetypes/application-wireshark-doc.png
63
%%GUI%%share/icons/hicolor/32x32/apps/wireshark.png
64
%%GUI%%share/icons/hicolor/32x32/mimetypes/application-wireshark-doc.png
65
%%GUI%%share/icons/hicolor/48x48/apps/wireshark.png
66
%%GUI%%share/icons/hicolor/48x48/mimetypes/application-wireshark-doc.png
67
%%GUI%%share/icons/hicolor/64x64/apps/wireshark.png
68
%%GUI%%share/icons/hicolor/64x64/mimetypes/application-wireshark-doc.png
69
%%GUI%%share/icons/hicolor/scalable/apps/wireshark.svg
70
%%GUI%%share/mime/packages/wireshark.xml
54
%%DATADIR%%/AUTHORS-SHORT
71
%%DATADIR%%/AUTHORS-SHORT
55
%%DATADIR%%/COPYING
72
%%DATADIR%%/COPYING
56
%%DATADIR%%/capinfos.html
73
%%DATADIR%%/capinfos.html
Lines 109-115 Link Here
109
%%DATADIR%%/help/getting_started.txt
126
%%DATADIR%%/help/getting_started.txt
110
%%DATADIR%%/help/overview.txt
127
%%DATADIR%%/help/overview.txt
111
%%DATADIR%%/help/toc
128
%%DATADIR%%/help/toc
112
%%DATADIR%%/hi48-app-wireshark.png
113
%%DATADIR%%/ipmap.html
129
%%DATADIR%%/ipmap.html
114
%%DATADIR%%/manuf
130
%%DATADIR%%/manuf
115
%%DATADIR%%/mergecap.html
131
%%DATADIR%%/mergecap.html
(-)net/wireshark-lite/Makefile (+2 lines)
Lines 7-10 Link Here
7
MASTERDIR=	${.CURDIR}/../wireshark
7
MASTERDIR=	${.CURDIR}/../wireshark
8
COMMENT=	Powerful network analyzer/capture tool (lite package)
8
COMMENT=	Powerful network analyzer/capture tool (lite package)
9
9
10
OPTIONS_EXCLUDE=	LUA RTP SNMP ADNS CARES GEOIP
11
10
.include "${MASTERDIR}/Makefile"
12
.include "${MASTERDIR}/Makefile"
(-)net/wireshark-qt5/Makefile (-2 / +2 lines)
Lines 5-11 Link Here
5
5
6
CONFLICTS=	wireshark-[0-9]*
6
CONFLICTS=	wireshark-[0-9]*
7
7
8
OPTIONS_EXCLUDE=	GTK3
8
OPTIONS_EXCLUDE=	GTK2 GTK3
9
OPTIONS_DEFAULT=	SNMP ADNS PCRE IPV6 GEOIP GSSAPI X11 QT5
9
OPTIONS_DEFAULT=	SNMP ADNS IPV6 GEOIP KRB_BASE QT5
10
10
11
.include "${MASTERDIR}/Makefile"
11
.include "${MASTERDIR}/Makefile"

Return to bug 204411