summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/wireshark/Makefile6
-rw-r--r--net/wireshark/PLIST6
-rw-r--r--net/wireshark/options.mk19
3 files changed, 24 insertions, 7 deletions
diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile
index 8b78b9a1562..ce24ace9fb4 100644
--- a/net/wireshark/Makefile
+++ b/net/wireshark/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2008/01/18 05:08:52 tnn Exp $
+# $NetBSD: Makefile,v 1.16 2008/02/13 20:10:20 tron Exp $
DISTNAME= wireshark-0.99.7
PKGREVISION= 1
@@ -20,10 +20,8 @@ USE_LIBTOOL= YES
SHLIBTOOL_OVERRIDE= # empty
GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --enable-gtk2
CONFIGURE_ARGS+= --enable-static=no
CONFIGURE_ARGS+= --enable-threads
-CONFIGURE_ARGS+= --with-gtk-prefix=${BUILDLINK_PREFIX.gtk2}
CONFIGURE_ARGS+= --with-ssl=${SSLBASE:Q}
CONFIGURE_ARGS+= --with-net-snmp
CONFIGURE_ARGS+= --with-pcap=${BUILDLINK_PREFIX.libpcap}
@@ -33,6 +31,7 @@ CONFIGURE_ARGS+= --with-pcre=${BUILDLINK_PREFIX.pcre}
PTHREAD_OPTS+= require
.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
.if !empty(MACHINE_PLATFORM:MDarwin-[567].*-*)
USE_BUILTIN.libpcap= no
@@ -54,7 +53,6 @@ SUBST_SED.shell= -e 's,@SHELL@,${SHELL},g'
.include "../../net/net-snmp/buildlink3.mk"
.include "../../security/gnutls/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
-.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/net/wireshark/PLIST b/net/wireshark/PLIST
index c34541e745d..6d7191ff266 100644
--- a/net/wireshark/PLIST
+++ b/net/wireshark/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2007/12/15 13:53:27 tron Exp $
+@comment $NetBSD: PLIST,v 1.8 2008/02/13 20:10:20 tron Exp $
bin/capinfos
bin/dftest
bin/dumpcap
@@ -8,7 +8,7 @@ bin/mergecap
bin/randpkt
bin/text2pcap
bin/tshark
-bin/wireshark
+${WIRESHARK}bin/wireshark
lib/libwireshark.la
lib/libwiretap.la
lib/wireshark/plugins/${PKGVERSION}/agentx.la
@@ -47,7 +47,7 @@ man/man1/idl2wrs.1
man/man1/mergecap.1
man/man1/text2pcap.1
man/man1/tshark.1
-man/man1/wireshark.1
+${WIRESHARK}man/man1/wireshark.1
man/man4/wireshark-filter.4
share/wireshark/AUTHORS-SHORT
share/wireshark/COPYING
diff --git a/net/wireshark/options.mk b/net/wireshark/options.mk
new file mode 100644
index 00000000000..8f1943acc22
--- /dev/null
+++ b/net/wireshark/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2008/02/13 20:10:20 tron Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.wireshark
+PKG_SUPPORTED_OPTIONS= x11
+PKG_SUGGESTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mx11)
+CONFIGURE_ARGS+= --enable-gtk2
+CONFIGURE_ARGS+= --with-gtk-prefix=${BUILDLINK_PREFIX.gtk2}
+
+PLIST_SUBST+= WIRESHARK=
+.include "../../x11/gtk2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-wireshark
+
+PLIST_SUBST+= WIRESHARK="@comment "
+.endif