kumquat-buildroot/package/wireshark/wireshark.mk

110 lines
2.9 KiB
Makefile
Raw Normal View History

################################################################################
#
# wireshark
#
################################################################################
WIRESHARK_VERSION = 2.2.4
WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2
WIRESHARK_SITE = https://www.wireshark.org/download/src/all-versions
WIRESHARK_LICENSE = wireshark license
WIRESHARK_LICENSE_FILES = COPYING
WIRESHARK_DEPENDENCIES = host-pkgconf libpcap libglib2
WIRESHARK_CONF_ENV = \
PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config
# patch touching configure.ac
WIRESHARK_AUTORECONF = YES
# wireshark adds -I$includedir to CFLAGS, causing host/target headers mixup.
# Work around it by pointing includedir at staging
WIRESHARK_CONF_OPTS = \
--without-krb5 \
--enable-static=no \
--with-libsmi=no \
--with-lua=no \
--with-pcap=$(STAGING_DIR)/usr \
--includedir=$(STAGING_DIR)/usr/include
# wireshark GUI options
ifeq ($(BR2_PACKAGE_LIBGTK3),y)
WIRESHARK_CONF_OPTS += --with-gtk=3
WIRESHARK_DEPENDENCIES += libgtk3
else ifeq ($(BR2_PACKAGE_LIBGTK2),y)
WIRESHARK_CONF_OPTS += --with-gtk=2
WIRESHARK_DEPENDENCIES += libgtk2
else
WIRESHARK_CONF_OPTS += --with-gtk=no
endif
# Qt4 needs accessibility, we don't support it
package/wireshark: fix kconfig dependencies Commit fa6feff (wireshark: needs the qt5tools lrelease utility) introduced a circular dependency chain in Kconfig: package/qt5/qt5base/Config.in:118:error: recursive dependency detected! package/qt5/qt5base/Config.in:118: symbol BR2_PACKAGE_QT5BASE_GUI is selected by BR2_PACKAGE_QT5TOOLS_PIXELTOOL package/qt5/qt5tools/Config.in:19: symbol BR2_PACKAGE_QT5TOOLS_PIXELTOOL depends on BR2_PACKAGE_QT5TOOLS package/qt5/qt5tools/Config.in:1: symbol BR2_PACKAGE_QT5TOOLS is selected by BR2_PACKAGE_QT5BASE_WIDGETS package/qt5/qt5base/Config.in:131: symbol BR2_PACKAGE_QT5BASE_WIDGETS is selected by BR2_PACKAGE_QT5X11EXTRAS package/qt5/qt5x11extras/Config.in:1: symbol BR2_PACKAGE_QT5X11EXTRAS depends on BR2_PACKAGE_QT5BASE_XCB package/qt5/qt5base/Config.in:186: symbol BR2_PACKAGE_QT5BASE_XCB depends on BR2_PACKAGE_QT5BASE_GUI Fix that by dropping the select on the Qt5Tools, and introduce an intermediate kconfig-level variable to represent the new condition, to simplify the .mk file. That would make the condition for enabling/disabling the GUI to be a little bit more complex by adding yet another (long-ish) variable. So we also introduce an intermediate kconfig-level variable that represent the condition to enable the GUI. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Baruch Siach <baruch@tkos.co.il> Tested-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-20 18:28:25 +02:00
ifeq ($(BR2_PACKAGE_WIRESHARK_QT),y)
WIRESHARK_CONF_OPTS += --with-qt=5
WIRESHARK_DEPENDENCIES += qt5base qt5tools
WIRESHARK_CONF_ENV += ac_cv_path_QTCHOOSER=""
# Seems it expects wrappers and passes a -qt=X parameter for version
WIRESHARK_MAKE_OPTS += \
MOC="$(HOST_DIR)/usr/bin/moc" \
RCC="$(HOST_DIR)/usr/bin/rcc" \
UIC="$(HOST_DIR)/usr/bin/uic"
else
WIRESHARK_CONF_OPTS += --with-qt=no
endif
# No GUI at all
package/wireshark: fix kconfig dependencies Commit fa6feff (wireshark: needs the qt5tools lrelease utility) introduced a circular dependency chain in Kconfig: package/qt5/qt5base/Config.in:118:error: recursive dependency detected! package/qt5/qt5base/Config.in:118: symbol BR2_PACKAGE_QT5BASE_GUI is selected by BR2_PACKAGE_QT5TOOLS_PIXELTOOL package/qt5/qt5tools/Config.in:19: symbol BR2_PACKAGE_QT5TOOLS_PIXELTOOL depends on BR2_PACKAGE_QT5TOOLS package/qt5/qt5tools/Config.in:1: symbol BR2_PACKAGE_QT5TOOLS is selected by BR2_PACKAGE_QT5BASE_WIDGETS package/qt5/qt5base/Config.in:131: symbol BR2_PACKAGE_QT5BASE_WIDGETS is selected by BR2_PACKAGE_QT5X11EXTRAS package/qt5/qt5x11extras/Config.in:1: symbol BR2_PACKAGE_QT5X11EXTRAS depends on BR2_PACKAGE_QT5BASE_XCB package/qt5/qt5base/Config.in:186: symbol BR2_PACKAGE_QT5BASE_XCB depends on BR2_PACKAGE_QT5BASE_GUI Fix that by dropping the select on the Qt5Tools, and introduce an intermediate kconfig-level variable to represent the new condition, to simplify the .mk file. That would make the condition for enabling/disabling the GUI to be a little bit more complex by adding yet another (long-ish) variable. So we also introduce an intermediate kconfig-level variable that represent the condition to enable the GUI. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Baruch Siach <baruch@tkos.co.il> Tested-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-20 18:28:25 +02:00
ifeq ($(BR2_PACKAGE_WIRESHARK_GUI),)
WIRESHARK_CONF_OPTS += --disable-wireshark
endif
ifeq ($(BR2_PACKAGE_C_ARES),y)
WIRESHARK_CONF_OPTS += --with-c-ares=$(STAGING_DIR)/usr
WIRESHARK_DEPENDENCIES += c-ares
else
WIRESHARK_CONF_OPTS += --without-c-ares
endif
ifeq ($(BR2_PACKAGE_GEOIP),y)
WIRESHARK_CONF_OPTS += --with-geoip=$(STAGING_DIR)/usr
WIRESHARK_DEPENDENCIES += geoip
else
WIRESHARK_CONF_OPTS += --without-geoip
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
WIRESHARK_CONF_OPTS += --with-gnutls=yes
WIRESHARK_DEPENDENCIES += gnutls
else
WIRESHARK_CONF_OPTS += --with-gnutls=no
endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
WIRESHARK_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
WIRESHARK_CONF_OPTS += --with-gcrypt=yes
WIRESHARK_DEPENDENCIES += libgcrypt
else
WIRESHARK_CONF_OPTS += --with-gcrypt=no
endif
ifeq ($(BR2_PACKAGE_LIBNL),y)
WIRESHARK_CONF_OPTS += --with-libnl
WIRESHARK_DEPENDENCIES += libnl
else
WIRESHARK_CONF_OPTS += --without-libnl
endif
ifeq ($(BR2_PACKAGE_SBC),y)
WIRESHARK_CONF_OPTS += --with-sbc=yes
WIRESHARK_DEPENDENCIES += sbc
else
WIRESHARK_CONF_OPTS += --with-sbc=no
endif
define WIRESHARK_REMOVE_DOCS
find $(TARGET_DIR)/usr/share/wireshark -name '*.txt' -print0 \
-o -name '*.html' -print0 | xargs -0 rm -f
endef
WIRESHARK_POST_INSTALL_TARGET_HOOKS += WIRESHARK_REMOVE_DOCS
$(eval $(autotools-package))