aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2015-02-05 00:37:21 +0800
committermarcus <marcus@FreeBSD.org>2015-02-05 00:37:21 +0800
commit4c625ba56464ee90392776fbe20b483b65357804 (patch)
tree4f86282e4145363fa3ce7b4fe021903d00851254
parent776f66709ae3a0cc843e50b9f6ce3eac31d6a713 (diff)
downloadfreebsd-ports-gnome-4c625ba56464ee90392776fbe20b483b65357804.tar.gz
freebsd-ports-gnome-4c625ba56464ee90392776fbe20b483b65357804.tar.zst
freebsd-ports-gnome-4c625ba56464ee90392776fbe20b483b65357804.zip
Add support for building wireshark with Qt 5 GUI support. Note: not all of
the GTK+ features have been ported to Qt yet. PR: 196728 Submitted by: olevole@olevole.ru
-rw-r--r--net/Makefile1
-rw-r--r--net/wireshark-qt5/Makefile11
-rw-r--r--net/wireshark/Makefile41
3 files changed, 44 insertions, 9 deletions
diff --git a/net/Makefile b/net/Makefile
index a300367ebb0a..b3e504efe2c7 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -1255,6 +1255,7 @@
SUBDIR += widentd
SUBDIR += wireshark
SUBDIR += wireshark-lite
+ SUBDIR += wireshark-qt5
SUBDIR += wizd
SUBDIR += wlan2eth
SUBDIR += wmlj
diff --git a/net/wireshark-qt5/Makefile b/net/wireshark-qt5/Makefile
new file mode 100644
index 000000000000..873d501a7cd9
--- /dev/null
+++ b/net/wireshark-qt5/Makefile
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+MASTERDIR= ${.CURDIR}/../wireshark
+COMMENT= Powerful network analyzer/capture tool (QT package)
+
+CONFLICTS= wireshark-[0-9]*
+
+OPTIONS_EXCLUDE= GTK3
+OPTIONS_DEFAULT= SNMP ADNS PCRE IPV6 GEOIP GSSAPI X11 QT5
+
+.include "${MASTERDIR}/Makefile"
diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile
index dfb0c9d94542..5b4b9c6e3d28 100644
--- a/net/wireshark/Makefile
+++ b/net/wireshark/Makefile
@@ -1,7 +1,7 @@
# Created by: Bill Fumerola <billf@chc-chimes.com>
# $FreeBSD$
-PORTNAME?= wireshark
+PORTNAME= wireshark
PORTVERSION= 1.12.3
CATEGORIES= net ipv6
MASTER_SITES= http://www.wireshark.org/download/src/ \
@@ -12,11 +12,12 @@ MASTER_SITES= http://www.wireshark.org/download/src/ \
http://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
ftp://ftp.yz.yamagata-u.ac.jp/pub/network/security/wireshark/src/ \
http://wireshark.zing.org/download/src/
-DISTNAME= ${DATADIR_NAME}-${PORTVERSION}
MAINTAINER= marcus@FreeBSD.org
COMMENT?= Powerful network analyzer/capture tool
+LICENSE= GPLv2
+
DATADIR_NAME= wireshark
USE_PERL5= build
@@ -24,6 +25,8 @@ USES= alias gettext gmake iconv libtool perl5 pkgconfig \
python:build tar:bzip2
WANT_GNOME= yes
USE_OPENSSL= yes
+CONFLICTS?= wireshark-qt5-[0-9]*
+
CONFIGURE_ARGS+= --program-transform-name="" \
--with-ssl=${OPENSSLBASE} \
--with-qt=no
@@ -51,7 +54,11 @@ PLIST_SUB+= ${x:tu}=bin/$x \
.if !defined(LITE)
OPTIONS_DEFINE= RTP SNMP ADNS PCRE IPV6 GEOIP LUA CARES GSSAPI X11 \
GNUTLS GCRYPT THREADS
-OPTIONS_DEFAULT= SNMP ADNS PCRE IPV6 GEOIP GSSAPI X11
+
+OPTIONS_RADIO= GUI
+OPTIONS_RADIO_GUI= GTK3 QT5
+
+OPTIONS_DEFAULT?= SNMP ADNS PCRE IPV6 GEOIP GSSAPI X11 GTK3
RTP_DESC= Enable support for playing back RTP streams
ADNS_DESC= Enable asynchronous DNS lookup support
@@ -63,12 +70,8 @@ ADNS_DESC= Enable asynchronous DNS lookup support
USE_XORG= x11
.endif
-.include <bsd.port.options.mk>
-
.if ${PORT_OPTIONS:MX11}
PLIST_SUB+= WIRESHARK=bin/wireshark WIRESHARK_MAN=""
-USE_GNOME+= gtk30
-CONFIGURE_ARGS+=--with-gtk3=yes
.else
PLIST_SUB+= WIRESHARK="@comment wireshark not built" \
WIRESHARK_MAN="@comment wireshark not built "
@@ -77,6 +80,23 @@ CONFIGURE_ARGS+= --enable-wireshark=no \
--disable-gtktest
.endif
+.if ${PORT_OPTIONS:MGTK3}
+USE_GNOME+= gtk30
+CONFIGURE_ARGS+= --with-gtk2=no \
+ --with-gtk3=yes \
+ --with-qt=no
+.endif
+
+.if ${PORT_OPTIONS:MQT5}
+CONFIGURE_ARGS+= --with-gtk2=no \
+ --with-gtk3=no \
+ --with-qt=yes
+USE_QT5+= core widgets printsupport buildtools_build
+PKGNAMESUFFIX+= -qt5
+MAKE_ENV+= PATH="${PATH}:${LOCALBASE}/lib/qt5/bin"
+CONFIGURE_ENV+= PATH="${PATH}:${LOCALBASE}/lib/qt5/bin"
+.endif
+
GNU_CONFIGURE= yes
PLIST_SUB+= PORTVERSION=${PORTVERSION}
@@ -165,12 +185,15 @@ PKG_MESSAGE= ${FILESDIR}/pkg-message
post-patch:
@${REINPLACE_CMD} -e 's|llua|llua-${LUA_VER}|g ; \
- s|-DGDK_PIXBUF_DISABLE_DEPRECATED||g ; \
+ s|-DGDK_PIXBUF_DISABLE_DEPRECATED||g ; \
s|-Wl,--as-needed|| ' \
${WRKSRC}/configure
post-install:
${INSTALL_DATA} ${WRKSRC}/image/hi48-app-wireshark.png \
- ${STAGEDIR}${DATADIR}
+ ${STAGEDIR}${DATADIR}
+.if ${PORT_OPTIONS:MQT5}
+ ${MV} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-qt ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+.endif
.include <bsd.port.mk>