blob: 8881c185a1eba451bfe76d6d8484e089812c3db1 (
plain)
1 # Description: Network Sniffer
2 # URL: https://www.wireshark.org
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: c-ares hicolor-icon-theme libgcrypt libpcap qt6-5compat qt6-multimedia qt6-translations
5
6 name=wireshark
7 version=4.0.2
8 release=2
9 source=(https://www.wireshark.org/download/src/$name-$version.tar.xz)
10
11 build() {
12 prt-get isinst ccache && PKGMK_WIRESHARK+=' -D ENABLE_CCACHE=ON' && \
13 PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
14
15 # lto only works well with lld due to a ld bug
16 prt-get isinst clang lld && \
17 export CC='clang' && \
18 export CXX='clang++' && \
19 export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib && \
20 export LDFLAGS+=' -fuse-ld=lld -flto=thin'
21 prt-get isinst clang lld && PKGMK_WIRESHARK+=' -D ENABLE_LTO=ON '
22
23 cmake -S $name-$version -B build -G Ninja $PKGMK_WIRESHARK \
24 -D CMAKE_BUILD_TYPE=Release \
25 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
26 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
27 -D CMAKE_INSTALL_PREFIX=/usr \
28 -D CMAKE_INSTALL_LIBDIR=lib \
29 -D USE_qt6=ON
30
31 cmake --build build
32 DESTDIR=$PKG cmake --install build
33
34 chown root:wireshark $PKG/usr/bin/dumpcap
35 chmod u+s $PKG/usr/bin/dumpcap
36
37 # Don't remove these files, they are read by wiresharks about box.
38 #rm -f $PKG/usr/share/$name/{AUTHORS-SHORT,COPYING}
39 }
|