# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
maintainers {darkart.com:opendarwin.org @ghosthound}
description Graphical network analyzer and capture tool
homepage https://www.wireshark.org/
long_description A network analyzer that lets you capture and \
interactively browse Ethernet frames. \
Packet data can be read from a file, or live from a local \
master_sites https://www.wireshark.org/download/src/ \
https://www.wireshark.org/download/src/all-versions/
distfiles wireshark-${version}${extract.suffix}
worksrcdir wireshark-${version}
checksums sha256 a06b007e6343f148b8b93443b2fcfc9bb3204311cd268565d54d1b71660bc861 \
rmd160 719cab381d824672e0f5e4b1c7a20de8863b28a6 \
sha1 89ef68c2696b6b424cc65bb63a1be085fe7bd776 \
conflicts wireshark-devel wireshark wireshark22 wireshark24
depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
path:lib/libssl.dylib:openssl \
-DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \
-DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \
-DENABLE_APPLICATION_BUNDLE=OFF \
# fix include directory for lua -- stop putting zlib.h include directory first
# and then do put lua-52/lua.h directory first in list of include directories
# fixes the accidental finding of the lua-5.3 lua.h in ${prefix}/include, which fails
patchfiles-append patch-wireshark2-luafix-001.diff
patchfiles-append patch-wireshark2-luafix-002.diff
variant qt5 conflicts no_gui description {Build wireshark with a qt5 GUI} {
configure.args-replace -DENABLE_APPLICATION_BUNDLE=OFF -DENABLE_APPLICATION_BUNDLE=ON
configure.args-replace -DBUILD_wireshark=OFF -DBUILD_wireshark=ON
configure.args-append -DENABLE_QT5=ON
depends_lib-append port:qt5-qtmacextras port:qt5-qtmultimedia port:qt5-qtsvg port:qt5-qttranslations
# ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/
# file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns
# ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark
# file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/
# file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist
# file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/
# move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app
move ${destroot}/${prefix}/bin/Wireshark.app ${destroot}${applications_dir}/Wireshark.app