1 | # -*- 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 |
---|
2 | # $Id: Portfile 106559 2013-05-31 00:13:02Z cal@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup cmake 1.0 |
---|
6 | |
---|
7 | name wireshark-devel |
---|
8 | epoch 2 |
---|
9 | version 2.0.0 |
---|
10 | revision 0 |
---|
11 | categories net |
---|
12 | license {GPL-2 GPL-3} |
---|
13 | maintainers gmail.com:hsivank |
---|
14 | description Graphical network analyzer and capture tool |
---|
15 | homepage http://wireshark.org/ |
---|
16 | platforms darwin |
---|
17 | distname wireshark-${version} |
---|
18 | dist_subdir wireshark |
---|
19 | |
---|
20 | long_description A network analyzer that lets you capture and \ |
---|
21 | interactively browse Ethernet frames. \ |
---|
22 | Packet data can be read from a file, or live from a local \ |
---|
23 | network interface. |
---|
24 | |
---|
25 | master_sites http://www.wireshark.org/download/src/ \ |
---|
26 | http://www.wireshark.org/download/src/all-versions/ |
---|
27 | |
---|
28 | use_bzip2 yes |
---|
29 | |
---|
30 | checksums md5 5909af2a09a9a3023ba61bc62e787ad2 \ |
---|
31 | sha1 f8b226b40e36e4c431b4f70bc3f523b6dd53a501 \ |
---|
32 | rmd160 79b1badcb34ce5d4d6b8c43de7d0ed2c7c301527 \ |
---|
33 | sha256 90026c761a85701d7783c7e2eaa4c1de247dfbadbd53221df355f121e42691dd |
---|
34 | # as sourced from https://www.wireshark.org/download/SIGNATURES-2.0.0.txt |
---|
35 | |
---|
36 | conflicts wireshark |
---|
37 | |
---|
38 | depends_build-append port:pkgconfig |
---|
39 | |
---|
40 | depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
41 | path:lib/libssl.dylib:openssl \ |
---|
42 | port:libpcap |
---|
43 | |
---|
44 | configure.args-append -DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \ |
---|
45 | -DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \ |
---|
46 | -DENABLE_NETLINK=OFF \ |
---|
47 | -DENABLE_APPLICATION_BUNDLE=OFF |
---|
48 | |
---|
49 | default_variants +portaudio +zlib +lua +libsmi +gnutls +libgcrypt +cares +geoip +kerberos5 |
---|
50 | |
---|
51 | if {![variant_isset qt4] && ![variant_isset qt5] && ![variant_isset gtk2] && ![variant_isset gtk3] && ![variant_isset no_gui]} { |
---|
52 | default_variants +qt5 |
---|
53 | } |
---|
54 | |
---|
55 | variant qt4 conflicts no_gui qt5 gtk2 gtk3 description {Use Qt5 instead of Qt4 to build wireshark} { |
---|
56 | configure.args-append -DBUILD_wireshark=ON \ |
---|
57 | -DENABLE_QT5=OFF |
---|
58 | depends_lib-append port:qt4-mac |
---|
59 | configure.env PATH=$env(PATH):${prefix}/libexec/qt4-mac/bin |
---|
60 | post-destroot { |
---|
61 | ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/ |
---|
62 | file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns |
---|
63 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark |
---|
64 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
65 | file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist |
---|
66 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
67 | move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
71 | variant qt5 conflicts no_gui qt4 gtk2 gtk3 description {Build Wireshark} { |
---|
72 | configure.args-append -DBUILD_wireshark=ON \ |
---|
73 | -DENABLE_QT5=ON |
---|
74 | depends_lib-append port:qt5 |
---|
75 | configure.env PATH=$env(PATH):${prefix}/libexec/qt5/bin |
---|
76 | post-destroot { |
---|
77 | ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/ |
---|
78 | file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns |
---|
79 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark |
---|
80 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
81 | file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist |
---|
82 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
83 | move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app |
---|
84 | } |
---|
85 | } |
---|
86 | |
---|
87 | if {![variant_isset qt4] && ![variant_isset qt5]} { |
---|
88 | configure.args-append -DBUILD_wireshark=OFF |
---|
89 | } |
---|
90 | |
---|
91 | variant gtk2 conflicts no_gui qt4 qt5 gtk3 description {Use GTK3 instead of GTK2 to build wireshark} { |
---|
92 | configure.args-append -DBUILD_wireshark_gtk=ON \ |
---|
93 | -DENABLE_GTK3=OFF |
---|
94 | depends_lib-append port:gtk2 |
---|
95 | |
---|
96 | post-destroot { |
---|
97 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS |
---|
98 | ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark |
---|
99 | ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap |
---|
100 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns |
---|
101 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark |
---|
102 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
103 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
104 | } |
---|
105 | } |
---|
106 | variant gtk3 conflicts no_gui qt4 qt5 gtk2 description {Build Wireshark (GTK+ UI)} { |
---|
107 | configure.args-append -DBUILD_wireshark_gtk=ON \ |
---|
108 | -DENABLE_GTK3=ON |
---|
109 | depends_lib-append port:gtk3 \ |
---|
110 | port:adwaita-icon-theme |
---|
111 | post-destroot { |
---|
112 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS |
---|
113 | ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark |
---|
114 | ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap |
---|
115 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns |
---|
116 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark |
---|
117 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
118 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
119 | } |
---|
120 | } |
---|
121 | if {![variant_isset gtk2] && ![variant_isset gtk3]} { |
---|
122 | configure.args-append -DBUILD_wireshark_gtk=OFF |
---|
123 | } |
---|
124 | |
---|
125 | variant no_gui conflicts qt4 qt5 gtk2 gtk3 description {Disable wireshark and wireshark_gtk} { |
---|
126 | configure.args-append -DBUILD_wireshark_gtk=OFF \ |
---|
127 | -DBUILD_wireshark=OFF |
---|
128 | } |
---|
129 | |
---|
130 | variant adns conflicts cares description {use adns library for async. dns resolution} { |
---|
131 | configure.args-append -DENABLE_ADNS=ON |
---|
132 | depends_lib-append port:adns |
---|
133 | } |
---|
134 | if {![variant_isset adns]} { |
---|
135 | configure.args-append -DENABLE_ADNS=OFF |
---|
136 | } |
---|
137 | |
---|
138 | variant portaudio description {Build with PortAudio support} { |
---|
139 | configure.args-append -DENABLE_PORTAUDIO=ON |
---|
140 | depends_lib-append port:portaudio |
---|
141 | } |
---|
142 | if {![variant_isset portaudio]} { |
---|
143 | configure.args-append -DENABLE_PORTAUDIO=OFF |
---|
144 | } |
---|
145 | |
---|
146 | variant zlib description {Build with zlib compression support} { |
---|
147 | configure.args-append -DENABLE_ZLIB=ON |
---|
148 | depends_lib-append port:zlib |
---|
149 | } |
---|
150 | if {![variant_isset zlib]} { |
---|
151 | configure.args-append -DENABLE_ZLIB=OFF |
---|
152 | } |
---|
153 | |
---|
154 | variant lua description {Build with Lua dissector support} { |
---|
155 | configure.args-append -DENABLE_LUA=ON |
---|
156 | depends_lib-append port:lua |
---|
157 | } |
---|
158 | if {![variant_isset lua]} { |
---|
159 | configure.args-append -DENABLE_LUA=OFF |
---|
160 | } |
---|
161 | |
---|
162 | variant libsmi description {Build with libsmi snmp support} { |
---|
163 | configure.args-append -DENABLE_SMI=ON |
---|
164 | depends_lib-append port:libsmi |
---|
165 | } |
---|
166 | if {![variant_isset libsmi]} { |
---|
167 | configure.args-append -DENABLE_SMI=OFF |
---|
168 | } |
---|
169 | |
---|
170 | variant gnutls description {Build with GNU TLS support} { |
---|
171 | configure.args-append -DENABLE_GNUTLS=ON |
---|
172 | depends_lib-append port:gnutls |
---|
173 | } |
---|
174 | if {![variant_isset gnutls]} { |
---|
175 | configure.args-append -DENABLE_GNUTLS=OFF |
---|
176 | } |
---|
177 | |
---|
178 | variant libgcrypt description {Build with GNU crypto support} { |
---|
179 | configure.args-append -DENABLE_GCRYPT=ON |
---|
180 | depends_lib-append port:libgcrypt |
---|
181 | } |
---|
182 | if {![variant_isset libgcrypt]} { |
---|
183 | configure.args-append -DENABLE_GCRYPT=OFF |
---|
184 | } |
---|
185 | |
---|
186 | variant cares conflicts adns description description {Build with c-ares support} { |
---|
187 | configure.args-append -DENABLE_CARES=ON |
---|
188 | depends_lib-append port:c-ares |
---|
189 | } |
---|
190 | if {![variant_isset cares]} { |
---|
191 | configure.args-append -DENABLE_CARES=OFF |
---|
192 | } |
---|
193 | |
---|
194 | variant kerberos5 description {Build with Kerberos support} { |
---|
195 | configure.args-append -DENABLE_KERBEROS=ON \ |
---|
196 | -DCMAKE_SHARED_LINKER_FLAGS="-lk5crypto" |
---|
197 | depends_lib-append port:kerberos5 |
---|
198 | } |
---|
199 | if {![variant_isset kerberos5]} { |
---|
200 | configure.args-append -DENABLE_KERBEROS=OFF |
---|
201 | } |
---|
202 | |
---|
203 | variant geoip description {Build with GeoIP support} { |
---|
204 | configure.args-append -DENABLE_GEOIP=ON |
---|
205 | depends_lib-append port:libgeoip |
---|
206 | } |
---|
207 | if {![variant_isset geoip]} { |
---|
208 | configure.args-append -DENABLE_GEOIP=OFF |
---|
209 | } |
---|
210 | |
---|
211 | post-destroot { |
---|
212 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/ |
---|
213 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/ |
---|
214 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/dissectors/ |
---|
215 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/ |
---|
216 | xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
217 | xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/ |
---|
218 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/ |
---|
219 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/ |
---|
220 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/ |
---|
221 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/ |
---|
222 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/ |
---|
223 | xinstall -m 644 {*}[glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
224 | } |
---|
225 | |
---|
226 | livecheck.type regex |
---|
227 | livecheck.url ${homepage}download.html |
---|
228 | livecheck.regex "Development Release \\((\\d+(?:\\.\\d+)*)" |
---|