11distributable :
22 url : https://www.wireshark.org/download/src/all-versions/wireshark-{{version}}.tar.xz
33 strip-components : 1
4+
45versions :
56 url : https://www.wireshark.org/download/src/all-versions/
67 match : /wireshark-\d+\.\d+\.\d+\.tar\.xz/
78 strip :
89 - /^wireshark-/
910 - /\.tar\.xz/
11+
1012dependencies :
1113 c-ares.org : ^1.23
1214 gnome.org/glib : ^2.78.3
@@ -21,11 +23,12 @@ dependencies:
2123 github.com/xiph/speexdsp : ^1.2.1
2224 tcpdump.org : ^1.10.4
2325 gnome.org/libxml2 : ^2.12.3
26+
2427build :
2528 dependencies :
26- cmake.org : ' * '
27- gnu.org/bison : ' * '
28- github.com/westes/flex : ' * '
29+ cmake.org : " * "
30+ gnu.org/bison : " * "
31+ github.com/westes/flex : " * "
2932 python.org : ^3.11
3033 perl.org : 5
3134 script :
6265 linux :
6366 CMAKE_ARGS :
6467 - -DLUA_LIBRARY={{deps.lua.org.prefix}}/lib/liblua.so
68+
6569provides :
6670 - bin/capinfos
6771 - bin/captype
@@ -76,8 +80,25 @@ provides:
7680 - bin/sharkd
7781 - bin/text2pcap
7882 - bin/tshark
83+
7984test :
80- - c++ -std=c++11 -o test test.cpp
81- - ./test | grep {{version}}
82- - randpkt -b 100 -c 2 capture.pcap
83- - capinfos -Tmc capture.pcap | grep 'capture.pcap,2'
85+ dependencies :
86+ gnu.org/sed : " *"
87+ script :
88+ - run : cp $FIXTURE test.cpp
89+ fixture : |
90+ #include <stdio.h>
91+ #include <wireshark/ws_version.h>
92+
93+ int main() {
94+ printf("%d.%d.%d", WIRESHARK_VERSION_MAJOR, WIRESHARK_VERSION_MINOR,
95+ WIRESHARK_VERSION_MICRO);
96+ return 0;
97+ }
98+ # darwin only changed at v4.7.0 for some reason
99+ - run : if test "{{hw.platform}}" = "darwin"; then sed -i 's|wireshark/||' test.cpp; fi
100+ if : " >=4.7.0"
101+ - c++ -std=c++11 -o test test.cpp
102+ - ./test | grep {{version}}
103+ - randpkt -b 100 -c 2 capture.pcap
104+ - capinfos -Tmc capture.pcap | grep 'capture.pcap,2'
0 commit comments