Add libxml2 as optional dependency

This can be used by dissectors that need to parse out-of-band
configuration.

Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783
Reviewed-on: https://code.wireshark.org/review/20912
Reviewed-by: Roland Knall <rknall@gmail.com>
This commit is contained in:
Ahmad Fatoum 2017-04-04 23:23:59 +02:00 committed by Roland Knall
parent d13c6d9628
commit cfab5ef035
17 changed files with 253 additions and 11 deletions

View File

@ -875,6 +875,10 @@ if(ENABLE_SPANDSP)
set(PACKAGELIST ${PACKAGELIST} SPANDSP) set(PACKAGELIST ${PACKAGELIST} SPANDSP)
endif() endif()
if(ENABLE_LIBXML2)
set(PACKAGELIST ${PACKAGELIST} LibXml2)
endif()
# Capabilities # Capabilities
if(ENABLE_CAP) if(ENABLE_CAP)
set(PACKAGELIST ${PACKAGELIST} CAP SETCAP) set(PACKAGELIST ${PACKAGELIST} CAP SETCAP)
@ -908,6 +912,8 @@ foreach(PACKAGE ${PACKAGELIST})
set(PACKAGE_VAR "GETTEXT") set(PACKAGE_VAR "GETTEXT")
elseif(${PACKAGE} STREQUAL "Perl") elseif(${PACKAGE} STREQUAL "Perl")
set(PACKAGE_VAR "PERL") set(PACKAGE_VAR "PERL")
elseif(${PACKAGE} STREQUAL "LibXml2")
set(PACKAGE_VAR "LIBXML2")
else() else()
set(PACKAGE_VAR ${PACKAGE}) set(PACKAGE_VAR ${PACKAGE})
endif() endif()
@ -989,6 +995,9 @@ endif()
if(SPANDSP_FOUND) if(SPANDSP_FOUND)
set(HAVE_SPANDSP 1) set(HAVE_SPANDSP 1)
endif() endif()
if(LIBXML2_FOUND)
set(HAVE_LIBXML2 1)
endif()
if(EXTCAP_ANDROIDDUMP_LIBPCAP) if(EXTCAP_ANDROIDDUMP_LIBPCAP)
set(ANDROIDDUMP_USE_LIBPCAP 1) set(ANDROIDDUMP_USE_LIBPCAP 1)
endif() endif()
@ -1370,6 +1379,7 @@ include(FeatureSummary)
#SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ]) #SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ])
SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "http://git.kernel.org/cgit/bluetooth/sbc.git" ) SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "http://git.kernel.org/cgit/bluetooth/sbc.git" )
SET_FEATURE_INFO(SPANDSP "Support for G.722 and G.726 codecs in RTP player" "http://www.soft-switch.org/" ) SET_FEATURE_INFO(SPANDSP "Support for G.722 and G.726 codecs in RTP player" "http://www.soft-switch.org/" )
SET_FEATURE_INFO(LIBXML2 "Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors" "http://xmlsoft.org/" )
SET_FEATURE_INFO(LIBSSH "libssh is library for ssh connections and it is needed to build sshdump/ciscodump" "https://www.libssh.org/get-it/" ) SET_FEATURE_INFO(LIBSSH "libssh is library for ssh connections and it is needed to build sshdump/ciscodump" "https://www.libssh.org/get-it/" )
SET_FEATURE_INFO(LZ4 "LZ4 is lossless compression algorithm used in some protocol (CQL...)" "http://www.lz4.org" ) SET_FEATURE_INFO(LZ4 "LZ4 is lossless compression algorithm used in some protocol (CQL...)" "http://www.lz4.org" )
SET_FEATURE_INFO(SNAPPY "snappy is a fast compressor/decompressor from Google used in some protocol (CQL, kafka...)" "http://google.github.io/snappy/") SET_FEATURE_INFO(SNAPPY "snappy is a fast compressor/decompressor from Google used in some protocol (CQL, kafka...)" "http://google.github.io/snappy/")
@ -1650,6 +1660,13 @@ if(WIN32)
"${_dll_output_dir}" "${_dll_output_dir}"
) )
endif(SPANDSP_FOUND) endif(SPANDSP_FOUND)
if (LIBXML2_FOUND)
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${LIBXML2_DLL_DIR}/${LIBXML2_DLL}"
"${_dll_output_dir}"
)
endif(LIBXML2_FOUND)
if (SMI_FOUND) if (SMI_FOUND)
# Wireshark.nsi wants SMI_DIR which is the base SMI directory # Wireshark.nsi wants SMI_DIR which is the base SMI directory
get_filename_component(SMI_DIR ${SMI_DLL_DIR} DIRECTORY) get_filename_component(SMI_DIR ${SMI_DLL_DIR} DIRECTORY)

View File

@ -88,6 +88,7 @@ endif()
option(ENABLE_KERBEROS "Build with Kerberos support" ON) option(ENABLE_KERBEROS "Build with Kerberos support" ON)
option(ENABLE_SBC "Build with SBC Codec support in RTP Player" ON) option(ENABLE_SBC "Build with SBC Codec support in RTP Player" ON)
option(ENABLE_SPANDSP "Build with G.722/G.726 codecs support in RTP Player" ON) option(ENABLE_SPANDSP "Build with G.722/G.726 codecs support in RTP Player" ON)
option(ENABLE_LIBXML2 "Build with libxml2 support" ON)
# How to install # How to install
set(DUMPCAP_INSTALL_OPTION "normal" CACHE STRING "Permissions to install") set(DUMPCAP_INSTALL_OPTION "normal" CACHE STRING "Permissions to install")
set(DUMPCAP_INST_VALS "normal" "suid" "capabilities") set(DUMPCAP_INST_VALS "normal" "suid" "capabilities")

View File

@ -0,0 +1,108 @@
# This code was copied from https://gitlab.kitware.com/cmake/cmake/raw/master/Modules/FindLibXml2.cmake
# and modified to support Wireshark Windows 3rd party packages
#.rst:
# FindLibXml2
# -----------
#
# Try to find the LibXml2 xml processing library
#
# Once done this will define
#
# ::
#
# LIBXML2_FOUND - System has LibXml2
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory
# LIBXML2_LIBRARIES - The libraries needed to use LibXml2
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
# LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8)
#
# :: Included for Wireshark build system
# LIBXML2_DLL_DIR - (Windows) Path to the libxml2 DLL.
# LIBXML2_DLL - (Windows) Name of the libxml2 DLL.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
# Copyright 2006 Alexander Neundorf <neundorf@kde.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# use pkg-config to get the directories and then use these values
# in the find_path() and find_library() calls
find_package(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0)
set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
INCLUDE(FindWSWinLibs)
FindWSWinLibs("libxml2-.*" "LIBXML2_HINTS")
find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
HINTS
${PC_LIBXML_INCLUDEDIR}
${PC_LIBXML_INCLUDE_DIRS}
"${LIBXML2_HINTS}/include"
PATH_SUFFIXES libxml2
)
find_library(LIBXML2_LIBRARIES NAMES xml2 libxml2 libxml2-2
HINTS
${PC_LIBXML_LIBDIR}
${PC_LIBXML_LIBRARY_DIRS}
"${LIBXML2_HINTS}/lib"
)
find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint
HINTS
"${LIBXML2_HINTS}/bin"
)
# for backwards compat. with KDE 4.0.x:
set(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}")
if(PC_LIBXML_VERSION)
set(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION})
elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h")
file(STRINGS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h" libxml2_version_str
REGEX "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\".*\"")
string(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1"
LIBXML2_VERSION_STRING "${libxml2_version_str}")
unset(libxml2_version_str)
endif()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2
REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR
VERSION_VAR LIBXML2_VERSION_STRING)
# Included for Wireshark build system. If libxml2 was found, include direct
# paths to the DLLs for windows
if(WIN32)
if(LIBXML2_FOUND)
set ( LIBXML2_DLL_DIR "${LIBXML2_HINTS}/bin"
CACHE PATH "Path to Libxml2 DLL"
)
file( GLOB _libxml2_dll RELATIVE "${LIBXML2_DLL_DIR}"
"${LIBXML2_DLL_DIR}/libxml2-*.dll"
)
set ( LIBXML2_DLL ${_libxml2_dll}
# We're storing filenames only. Should we use STRING instead?
CACHE FILEPATH "Libxml2 DLL file name"
)
mark_as_advanced( LIBXML2_DLL_DIR LIBXML2_DLL )
else()
set( LIBXML2_DLL_DIR )
set( LIBXML2_DLL )
endif()
endif()
mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)

View File

@ -303,6 +303,9 @@
/* Define to 1 if you have the SpanDSP library. */ /* Define to 1 if you have the SpanDSP library. */
#cmakedefine HAVE_SPANDSP 1 #cmakedefine HAVE_SPANDSP 1
/* Define to 1 if you have the lixbml2 library. */
#cmakedefine HAVE_LIBXML2 1
/* Define to 1 if you have the `setresgid' function. */ /* Define to 1 if you have the `setresgid' function. */
#cmakedefine HAVE_SETRESGID 1 #cmakedefine HAVE_SETRESGID 1

View File

@ -2552,6 +2552,27 @@ else
fi fi
AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes") AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes")
#`
# Libxml2 check
AC_ARG_WITH(libxml2,
AC_HELP_STRING([--with-libxml2=@<:@yes/no@:>@],
[Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors @<:@default=yes, if available@:>@]),
with_libxml2="$withval"; want_libxml2="yes", with_libxml2="yes")
PKG_CHECK_MODULES(LIBXML2, libxml-2.0, [have_libxml2=yes], [have_libxml2=no])
if test "x$with_libxml2" != "xno"; then
if (test "${have_libxml2}" = "yes"); then
AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2])
elif test "x$want_libxml2" = "xyes"; then
# Error out if the user explicitly requested libxml2
AC_MSG_ERROR([Libxml2 was requested, but is not available])
fi
else
have_libxml2=no
fi
AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes")
dnl dnl
dnl check whether plugins should be enabled and, if they should be, dnl check whether plugins should be enabled and, if they should be,
dnl check for plugins directory - stolen from Amanda's configure.ac dnl check for plugins directory - stolen from Amanda's configure.ac
@ -3171,6 +3192,7 @@ echo " Have ssh_userauth_agent : $ssh_userauth_agent_message"
echo " Use nl library : $libnl_message" echo " Use nl library : $libnl_message"
echo " Use SBC codec library : $have_sbc" echo " Use SBC codec library : $have_sbc"
echo " Use SpanDSP library : $have_spandsp" echo " Use SpanDSP library : $have_spandsp"
echo " Use libxml2 library : $have_libxml2"
echo " Use nghttp2 library : $nghttp2_message" echo " Use nghttp2 library : $nghttp2_message"
echo " Use LZ4 library : $have_lz4" echo " Use LZ4 library : $have_lz4"
echo " Use Snappy library : $have_snappy" echo " Use Snappy library : $have_snappy"

2
debian/control vendored
View File

@ -22,7 +22,7 @@ Build-Depends: libgtk-3-dev, lsb-release,
libgeoip-dev, dpkg-dev (>= 1.16.1~), imagemagick, xdg-utils, libgeoip-dev, dpkg-dev (>= 1.16.1~), imagemagick, xdg-utils,
libnl-genl-3-dev [linux-any], libnl-route-3-dev [linux-any], asciidoc, libnl-genl-3-dev [linux-any], libnl-route-3-dev [linux-any], asciidoc,
cmake (>= 2.8.8), w3m, libsbc-dev, libnghttp2-dev, libssh-gcrypt-dev, cmake (>= 2.8.8), w3m, libsbc-dev, libnghttp2-dev, libssh-gcrypt-dev,
liblz4-dev, libsnappy-dev, libspandsp-dev liblz4-dev, libsnappy-dev, libspandsp-dev, libxml2-dev
Build-Conflicts: libsnmp4.2-dev, libsnmp-dev Build-Conflicts: libsnmp4.2-dev, libsnmp-dev
Vcs-Svn: svn://svn.debian.org/svn/collab-maint/ext-maint/wireshark/trunk Vcs-Svn: svn://svn.debian.org/svn/collab-maint/ext-maint/wireshark/trunk
Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/ext-maint/wireshark/trunk/ Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/ext-maint/wireshark/trunk/

View File

@ -205,6 +205,7 @@ set(epan_LIBS
${SMI_LIBRARIES} ${SMI_LIBRARIES}
${SNAPPY_LIBRARIES} ${SNAPPY_LIBRARIES}
${WIN_PSAPI_LIBRARY} ${WIN_PSAPI_LIBRARY}
${LIBXML2_LIBRARIES}
) )
set(CLEAN_FILES set(CLEAN_FILES

View File

@ -40,7 +40,7 @@ DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir)
AM_CPPFLAGS = $(INCLUDEDIRS) -I$(builddir)/wslua $(WS_CPPFLAGS) \ AM_CPPFLAGS = $(INCLUDEDIRS) -I$(builddir)/wslua $(WS_CPPFLAGS) \
$(GLIB_CFLAGS) $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \ $(GLIB_CFLAGS) $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \
$(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) \ $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) \
$(LZ4_CFLAGS) $(KRB5_CFLAGS) $(SNAPPY_CFLAGS) $(LZ4_CFLAGS) $(KRB5_CFLAGS) $(SNAPPY_CFLAGS) $(LIBXML2_CFLAGS)
noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la
lib_LTLIBRARIES = libwireshark.la lib_LTLIBRARIES = libwireshark.la
@ -336,6 +336,7 @@ libwireshark_la_LIBADD = \
@NGHTTP2_LIBS@ \ @NGHTTP2_LIBS@ \
@SSL_LIBS@ \ @SSL_LIBS@ \
@SNAPPY_LIBS@ \ @SNAPPY_LIBS@ \
@LIBXML2_LIBS@ \
@GLIB_LIBS@ @GLIB_LIBS@
libwireshark_la_DEPENDENCIES = \ libwireshark_la_DEPENDENCIES = \

View File

@ -22,7 +22,7 @@ include $(top_srcdir)/Makefile.am.inc
AM_CPPFLAGS = $(INCLUDEDIRS) -I$(top_srcdir)/epan $(WS_CPPFLAGS) \ AM_CPPFLAGS = $(INCLUDEDIRS) -I$(top_srcdir)/epan $(WS_CPPFLAGS) \
$(GLIB_CFLAGS) $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \ $(GLIB_CFLAGS) $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \
$(KRB5_CFLAGS) $(KRB5_CFLAGS) $(LIBXML2_CFLAGS)
include Custom.common include Custom.common

View File

@ -84,6 +84,11 @@
#include <nghttp2/nghttp2ver.h> #include <nghttp2/nghttp2ver.h>
#endif #endif
#ifdef HAVE_LIBXML2
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#endif
static wmem_allocator_t *pinfo_pool_cache = NULL; static wmem_allocator_t *pinfo_pool_cache = NULL;
const gchar* const gchar*
@ -166,6 +171,10 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
#ifdef HAVE_LIBGNUTLS #ifdef HAVE_LIBGNUTLS
gnutls_global_init(); gnutls_global_init();
#endif
#ifdef HAVE_LIBXML2
xmlInitParser();
LIBXML_TEST_VERSION;
#endif #endif
TRY { TRY {
tap_init(); tap_init();
@ -253,6 +262,9 @@ epan_cleanup(void)
#endif #endif
#ifdef HAVE_LIBGNUTLS #ifdef HAVE_LIBGNUTLS
gnutls_global_deinit(); gnutls_global_deinit();
#endif
#ifdef HAVE_LIBXML2
xmlCleanupParser();
#endif #endif
except_deinit(); except_deinit();
addr_resolv_cleanup(); addr_resolv_cleanup();
@ -677,6 +689,14 @@ epan_get_compiled_version_info(GString *str)
g_string_append(str, "without Snappy"); g_string_append(str, "without Snappy");
#endif /* HAVE_SNAPPY */ #endif /* HAVE_SNAPPY */
/* libxml2 */
g_string_append(str, ", ");
#ifdef HAVE_LIBXML2
g_string_append(str, "with libxml2 " LIBXML_DOTTED_VERSION);
#else
g_string_append(str, "without libxml2");
#endif /* HAVE_LIBXML2 */
} }
/* /*

View File

@ -136,6 +136,7 @@ GNUTLS_VERSION=2.12.19
LUA_VERSION=5.2.4 LUA_VERSION=5.2.4
PORTAUDIO_VERSION=pa_stable_v19_20111121 PORTAUDIO_VERSION=pa_stable_v19_20111121
SNAPPY_VERSION=1.1.3 SNAPPY_VERSION=1.1.3
LIBXML2_VERSION=2.9.4
LZ4_VERSION=r131 LZ4_VERSION=r131
SBC_VERSION=1.3 SBC_VERSION=1.3
GEOIP_VERSION=1.6.10 GEOIP_VERSION=1.6.10
@ -227,6 +228,41 @@ uninstall_snappy() {
fi fi
} }
install_libxml2() {
if [ "$LIBXML2_VERSION" -a ! -f libxml2-$LIBXML2_VERSION-done ] ; then
echo "Downloading, building, and installing libxml2:"
[ -f libxml2-$LIBXML2_VERSION.tar.gz ] || curl -L -O ftp://xmlsoft.org/libxml2/libxml2-$LIBXML2_VERSION.tar.gz || exit 1
gzcat libxml2-$LIBXML2_VERSION.tar.gz | tar xf - || exit 1
cd libxml2-$LIBXML2_VERSION
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure || exit 1
make $MAKE_BUILD_OPTS || exit 1
$DO_MAKE_INSTALL || exit 1
cd ..
touch libxml2-$LIBXML2_VERSION-done
fi
}
uninstall_libxml2() {
if [ ! -z "$installed_libxml2_version" ] ; then
echo "Uninstalling libxml2:"
cd libxml2-$installed_libxml2_version
$DO_MAKE_UNINSTALL || exit 1
make distclean || exit 1
cd ..
rm libxml2-$installed_libxml2_version-done
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
#
# Get rid of the previously downloaded and unpacked version.
#
rm -rf libxml2-$installed_libxml2_version
rm -rf libxml2-$installed_libxml2_version.tar.gz
fi
installed_libxml2_version=""
fi
}
install_lz4() { install_lz4() {
if [ "$LZ4_VERSION" -a ! -f lz4-$LZ4_VERSION-done ] ; then if [ "$LZ4_VERSION" -a ! -f lz4-$LZ4_VERSION-done ] ; then
echo "Downloading, building, and installing lz4:" echo "Downloading, building, and installing lz4:"
@ -1685,6 +1721,18 @@ install_all() {
uninstall_snappy -r uninstall_snappy -r
fi fi
if [ ! -z "$installed_libxml2_version" -a \
"$installed_libxml2_version" != "$LIBXML2_VERSION" ] ; then
echo "Installed libxml2 version is $installed_libxml2_version"
if [ -z "$LIBXML2_VERSION" ] ; then
echo "libxml2 is not requested"
else
echo "Requested libxml2 version is $LIBXML2_VERSION"
fi
uninstall_libxml2 -r
fi
if [ ! -z "$installed_sbc_version" -a \ if [ ! -z "$installed_sbc_version" -a \
"$installed_sbc_version" != "$SBC_VERSION" ] ; then "$installed_sbc_version" != "$SBC_VERSION" ] ; then
echo "Installed SBC version is $installed_sbc_version" echo "Installed SBC version is $installed_sbc_version"
@ -2060,6 +2108,8 @@ install_all() {
install_snappy install_snappy
install_libxml2
install_lz4 install_lz4
install_sbc install_sbc
@ -2099,6 +2149,8 @@ uninstall_all() {
uninstall_snappy uninstall_snappy
uninstall_libxml2
uninstall_lz4 uninstall_lz4
uninstall_sbc uninstall_sbc
@ -2250,6 +2302,7 @@ then
installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'` installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'`
installed_portaudio_version=`ls portaudio-*-done 2>/dev/null | sed 's/portaudio-\(.*\)-done/\1/'` installed_portaudio_version=`ls portaudio-*-done 2>/dev/null | sed 's/portaudio-\(.*\)-done/\1/'`
installed_snappy_version=`ls snappy-*-done 2>/dev/null | sed 's/snappy-\(.*\)-done/\1/'` installed_snappy_version=`ls snappy-*-done 2>/dev/null | sed 's/snappy-\(.*\)-done/\1/'`
installed_libxml2_version=`ls libxml2-*-done 2>/dev/null | sed 's/libxml2-\(.*\)-done/\1/'`
installed_lz4_version=`ls lz4-*-done 2>/dev/null | sed 's/lz4-\(.*\)-done/\1/'` installed_lz4_version=`ls lz4-*-done 2>/dev/null | sed 's/lz4-\(.*\)-done/\1/'`
installed_sbc_version=`ls sbc-*-done 2>/dev/null | sed 's/sbc-\(.*\)-done/\1/'` installed_sbc_version=`ls sbc-*-done 2>/dev/null | sed 's/sbc-\(.*\)-done/\1/'`
installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'` installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'`

View File

@ -132,7 +132,7 @@ set(_all_manifest_contents "# Files required for all sections. Generated by CMak
foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL}
) )
set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n")
endforeach() endforeach()

View File

@ -13,6 +13,7 @@
%global with_c_ares 1 %global with_c_ares 1
%global with_portaudio 0 %global with_portaudio 0
%global with_spandsp 0 %global with_spandsp 0
%global with_libxml2 1
%global with_nghttp2 1 %global with_nghttp2 1
%global with_extcap 1 %global with_extcap 1
@ -240,6 +241,10 @@ Requires: portaudio
BuildRequires: spandsp-devel BuildRequires: spandsp-devel
Requires: spandsp Requires: spandsp
%endif %endif
%if %{with_libxml2}
BuildRequires: libxml2-devel
Requires: libxml2
%endif
# Uncomment these if you want to be sure you get them... # Uncomment these if you want to be sure you get them...
#BuildRequires: GeoIP-devel #BuildRequires: GeoIP-devel
@ -277,6 +282,11 @@ This package contains the GTK+ Wireshark GUI and desktop integration files.
%if %{with_spandsp} %if %{with_spandsp}
--with-spandsp \ --with-spandsp \
%endif %endif
%if %{with_libxml2}
--with-libxml2 \
%else
--without-libxml2 \
%endif
%if %{with_extcap} %if %{with_extcap}
--with-extcap \ --with-extcap \
%else %else
@ -476,6 +486,9 @@ fi
%endif %endif
%changelog %changelog
* Tue Apr 4 2017 Ahmad Fatoum
- Added libxml2 (as an option, defaulting to required).
* Tue Dec 20 2016 Anders Broman * Tue Dec 20 2016 Anders Broman
- Add with extcap (as an option, defaulting to yes). - Add with extcap (as an option, defaulting to yes).

View File

@ -124,7 +124,7 @@ SET(unique_component "")
foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL}
) )
#ensure uniqueness of files #ensure uniqueness of files
IF(NOT "${unique_component}" MATCHES "(^|;)${_dll}(;|$)") IF(NOT "${unique_component}" MATCHES "(^|;)${_dll}(;|$)")
@ -149,7 +149,7 @@ SET(unique_file "")
foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL}
) )
#ensure uniqueness of files #ensure uniqueness of files
IF(NOT "${unique_file}" MATCHES "(^|;)${_dll}(;|$)") IF(NOT "${unique_file}" MATCHES "(^|;)${_dll}(;|$)")

View File

@ -41,7 +41,7 @@ ADDITIONAL_LIST="libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \
portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \ portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \
qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \ qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \
libparse-yapp-perl qt5-default cmake libcap-dev \ libparse-yapp-perl qt5-default cmake libcap-dev \
liblz4-dev libsnappy-dev libspandsp-dev" liblz4-dev libsnappy-dev libspandsp-dev libxml2-dev"
# Adds package $2 to list variable $1 if the package is found # Adds package $2 to list variable $1 if the package is found
add_package() { add_package() {

View File

@ -24,8 +24,8 @@
#Update to last brew release #Update to last brew release
brew update brew update
#install some lib need by Wireshark #install some libs needed by Wireshark
brew install c-ares glib libgcrypt gnutls lua cmake nghttp2 snappy lz4 brew install c-ares glib libgcrypt gnutls lua cmake nghttp2 snappy lz4 libxml2
#install Qt5 #install Qt5
brew install qt5 brew install qt5

View File

@ -99,8 +99,8 @@ Param(
# trouble instead of trying to catch exceptions everywhere. # trouble instead of trying to catch exceptions everywhere.
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$Win64CurrentTag = "2017-04-14" $Win64CurrentTag = "2017-04-18"
$Win32CurrentTag = "2017-04-14" $Win32CurrentTag = "2017-04-18"
# Archive file / subdir. # Archive file / subdir.
$Win64Archives = @{ $Win64Archives = @{
@ -113,6 +113,7 @@ $Win64Archives = @{
"libgcrypt-1.7.6-win64ws.zip" = ""; "libgcrypt-1.7.6-win64ws.zip" = "";
"libsmi-svn-40773-win64ws.zip" = ""; "libsmi-svn-40773-win64ws.zip" = "";
"libssh-0.7.3-1-win64ws.zip" = ""; "libssh-0.7.3-1-win64ws.zip" = "";
"libxml2-2.9.4-win64ws.zip" = "";
"lua-5.2.4_Win64_dllw4_lib.zip" = "lua5.2.4"; "lua-5.2.4_Win64_dllw4_lib.zip" = "lua5.2.4";
"lz4-r131-1-win64ws.zip" = ""; "lz4-r131-1-win64ws.zip" = "";
"nasm-2.09.08-win32.zip" = ""; "nasm-2.09.08-win32.zip" = "";
@ -137,6 +138,7 @@ $Win32Archives = @{
"libgcrypt-1.7.6-win32ws.zip" = ""; "libgcrypt-1.7.6-win32ws.zip" = "";
"libsmi-svn-40773-win32ws.zip" = ""; "libsmi-svn-40773-win32ws.zip" = "";
"libssh-0.7.3-1-win32ws.zip" = ""; "libssh-0.7.3-1-win32ws.zip" = "";
"libxml2-2.9.4-win32ws.zip" = "";
"lua-5.2.4_Win32_dllw4_lib.zip" = "lua5.2.4"; "lua-5.2.4_Win32_dllw4_lib.zip" = "lua5.2.4";
"lz4-r131-1-win32ws.zip" = ""; "lz4-r131-1-win32ws.zip" = "";
"nasm-2.09.08-win32.zip" = ""; "nasm-2.09.08-win32.zip" = "";
@ -188,6 +190,7 @@ $CleanupItems = @(
"libsmi-0.4.8" "libsmi-0.4.8"
"libsmi-svn-40773-win??ws" "libsmi-svn-40773-win??ws"
"libssh-0.7.?-win??ws" "libssh-0.7.?-win??ws"
"libxml2-*-win??ws"
"lua5.1.4" "lua5.1.4"
"lua5.2.?" "lua5.2.?"
"lz4-r131-win??ws" "lz4-r131-win??ws"