From patchwork Sun Feb 3 06:04:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 217729 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6F7A72C007A for ; Sun, 3 Feb 2013 17:05:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4CC5F101A57; Sun, 3 Feb 2013 06:05:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pxBa9oIYKjln; Sun, 3 Feb 2013 06:05:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2ADA8100E03; Sun, 3 Feb 2013 06:05:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 29E9A8F753 for ; Sun, 3 Feb 2013 06:05:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 15C5C8B523 for ; Sun, 3 Feb 2013 06:05:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5bySIYDwi1KE for ; Sun, 3 Feb 2013 06:05:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sivan.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTP id 4B0158B511 for ; Sun, 3 Feb 2013 06:05:38 +0000 (UTC) Received: from sapphire.alvarion.com (taragon.tkos.co.il [10.0.4.3]) by sivan.tkos.co.il (Postfix) with ESMTP id 3E2BFB4F7B; Sun, 3 Feb 2013 08:05:37 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Sun, 3 Feb 2013 08:04:16 +0200 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCHv5 2/2] wireshark: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This is only the bare minimum needed to build the textual tshark utility. Support for more options, including the wireshark GUI, can be added later. Cc: Stefan Fröberg Signed-off-by: Baruch Siach --- Changes v4 -> v5: * update to version 1.8.5 as suggested by Gustavo Zacarias Changes v3 -> v4: * Update to version 1.8.4 Changes v2 -> v3: * Use an upstreamable patch as suggested by Thomas Petazzoni * Add license info Changes v1 -> v2: * Patch configure.in and enable autoreconf, instead of overriding $prefix * Remove --with-sysroot as suggested by Arnout Vandecappelle package/Config.in | 1 + package/wireshark/Config.in | 14 +++++++ .../wireshark/wireshark-dont-include-prefix.patch | 41 ++++++++++++++++++++ package/wireshark/wireshark.mk | 19 +++++++++ 4 files changed, 75 insertions(+) create mode 100644 package/wireshark/Config.in create mode 100644 package/wireshark/wireshark-dont-include-prefix.patch create mode 100644 package/wireshark/wireshark.mk diff --git a/package/Config.in b/package/Config.in index ebd9817..63ab1f3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -727,6 +727,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/wget/Config.in" endif source "package/wireless_tools/Config.in" +source "package/wireshark/Config.in" source "package/wpa_supplicant/Config.in" source "package/xinetd/Config.in" source "package/xl2tp/Config.in" diff --git a/package/wireshark/Config.in b/package/wireshark/Config.in new file mode 100644 index 0000000..e6d4e72 --- /dev/null +++ b/package/wireshark/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WIRESHARK + bool "wireshark" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # glib2 + help + Network traffic sniffer and protocol decoder. Currently only tshark, + the console interface, is enabled. + + http://www.wireshark.org + +comment "wireshark requires a toolchain with WCHAR support" + depends on !BR2_USE_WCHAR diff --git a/package/wireshark/wireshark-dont-include-prefix.patch b/package/wireshark/wireshark-dont-include-prefix.patch new file mode 100644 index 0000000..567af9a --- /dev/null +++ b/package/wireshark/wireshark-dont-include-prefix.patch @@ -0,0 +1,41 @@ +configure.in: don't add the build host's /usr/include and /usr/lib to the +search path of include files and libraries. This is not what you want when +cross compiling. + +Sent upstream as https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7926. + +Signed-off-by: Baruch Siach +--- +diff -Nuar wireshark-1.8.3.orig/configure.in wireshark-1.8.3/configure.in +--- wireshark-1.8.3.orig/configure.in 2012-08-15 23:33:32.000000000 +0300 ++++ wireshark-1.8.3/configure.in 2012-10-28 10:07:54.864388531 +0200 +@@ -635,29 +635,6 @@ + AC_SUBST(CORESERVICES_FRAMEWORKS) + AC_SUBST(LAUNCHSERVICES_FRAMEWORKS) + +-# +-# If using $prefix we add "$prefix/include" to the include search path +-# and "$prefix/lib" to the library search path. +-# +-if test "x$prefix" != "x" ; then +- AC_MSG_CHECKING(whether to use $prefix for headers and libraries) +- if test -d $prefix/include ; then +- AC_MSG_RESULT(yes) +- # +- # Arrange that we search for header files in "$prefix/include", as +- # various packages we use may have been installed under "$prefix/include". +- # +- CPPFLAGS="$CPPFLAGS -I$prefix/include" +- +- # +- # Arrange that we search for libraries in "$prefix/lib". +- # +- AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib) +- else +- AC_MSG_RESULT(no) +- fi +-fi +- + dnl Look in /usr/local for header files and libraries ? + dnl XXX FIXME don't include /usr/local if it is already in the system + dnl search path as this causes gcc 3.2 on Linux to complain about a change diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk new file mode 100644 index 0000000..32c943a --- /dev/null +++ b/package/wireshark/wireshark.mk @@ -0,0 +1,19 @@ +############################################################# +# +# wireshark +# +############################################################# + +WIRESHARK_VERSION = 1.8.5 +WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2 +WIRESHARK_SITE = http://www.wireshark.org/download/src/all-versions +WIRESHARK_LICENSE = wireshark license +WIRESHARK_LICENSE_FILES = COPYING +WIRESHARK_DEPENDENCIES = libpcap libgcrypt libglib2 +WIRESHARK_AUTORECONF = YES +WIRESHARK_CONF_ENV = LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config +WIRESHARK_CONF_OPT = --disable-wireshark --without-krb5 --disable-usr-local \ + --enable-static=no + +$(eval $(call autotools-package))