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 1.99.8 |
---|
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 1d15377bfc363e46cd7acf479c989075 \ |
---|
31 | sha1 b4eb673f580c0e2f0e9f2a834c3df2e973cce991 \ |
---|
32 | rmd160 06100e0e858bbfea74f5badac8b354b79dd347f2 |
---|
33 | |
---|
34 | conflicts wireshark |
---|
35 | |
---|
36 | depends_build-append port:pkgconfig |
---|
37 | |
---|
38 | depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
39 | path:lib/libssl.dylib:openssl \ |
---|
40 | port:libpcap |
---|
41 | |
---|
42 | configure.args-append -DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \ |
---|
43 | -DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \ |
---|
44 | -DENABLE_NETLINK=OFF \ |
---|
45 | -DENABLE_APPLICATION_BUNDLE=OFF |
---|
46 | |
---|
47 | default_variants +portaudio +zlib +lua +libsmi +gnutls +libgcrypt +cares +geoip |
---|
48 | |
---|
49 | if {![variant_isset qt4] && ![variant_isset qt5] && ![variant_isset gtk2] && ![variant_isset gtk3] && ![variant_isset no_gui]} { |
---|
50 | default_variants +qt5 |
---|
51 | } |
---|
52 | |
---|
53 | variant qt4 conflicts no_gui qt5 gtk2 gtk3 description {Use Qt5 instead of Qt4 to build wireshark} { |
---|
54 | configure.args-append -DBUILD_wireshark=ON \ |
---|
55 | -DENABLE_QT5=OFF |
---|
56 | depends_lib-append port:qt4-mac |
---|
57 | configure.env PATH=$env(PATH):${prefix}/libexec/qt4-mac/bin |
---|
58 | post-destroot { |
---|
59 | ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/ |
---|
60 | file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns |
---|
61 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark |
---|
62 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
63 | file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist |
---|
64 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
65 | move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | variant qt5 conflicts no_gui qt4 gtk2 gtk3 description {Build Wireshark} { |
---|
70 | configure.args-append -DBUILD_wireshark=ON \ |
---|
71 | -DENABLE_QT5=ON |
---|
72 | depends_lib-append port:qt5-mac |
---|
73 | configure.env PATH=$env(PATH):${prefix}/libexec/qt5-mac/bin |
---|
74 | post-destroot { |
---|
75 | ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/ |
---|
76 | file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns |
---|
77 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark |
---|
78 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
79 | file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist |
---|
80 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/ |
---|
81 | move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app |
---|
82 | } |
---|
83 | } |
---|
84 | |
---|
85 | if {![variant_isset qt4] && ![variant_isset qt5]} { |
---|
86 | configure.args-append -DBUILD_wireshark=OFF |
---|
87 | } |
---|
88 | |
---|
89 | variant gtk2 conflicts no_gui qt4 qt5 gtk3 description {Use GTK3 instead of GTK2 to build wireshark} { |
---|
90 | configure.args-append -DBUILD_wireshark_gtk=ON \ |
---|
91 | -DENABLE_GTK3=OFF |
---|
92 | depends_lib-append port:gtk2 |
---|
93 | |
---|
94 | post-destroot { |
---|
95 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS |
---|
96 | ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark |
---|
97 | ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap |
---|
98 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns |
---|
99 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark |
---|
100 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
101 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
102 | } |
---|
103 | } |
---|
104 | variant gtk3 conflicts no_gui qt4 qt5 gtk2 description {Build Wireshark (GTK+ UI)} { |
---|
105 | configure.args-append -DBUILD_wireshark_gtk=ON \ |
---|
106 | -DENABLE_GTK3=ON |
---|
107 | depends_lib-append port:gtk3 \ |
---|
108 | port:adwaita-icon-theme |
---|
109 | post-destroot { |
---|
110 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS |
---|
111 | ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark |
---|
112 | ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap |
---|
113 | file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns |
---|
114 | ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark |
---|
115 | file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
116 | file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/ |
---|
117 | } |
---|
118 | } |
---|
119 | if {![variant_isset gtk2] && ![variant_isset gtk3]} { |
---|
120 | configure.args-append -DBUILD_wireshark_gtk=OFF |
---|
121 | } |
---|
122 | |
---|
123 | variant no_gui conflicts qt4 qt5 gtk2 gtk3 description {Disable wireshark and wireshark_gtk} { |
---|
124 | configure.args-append -DBUILD_wireshark_gtk=OFF \ |
---|
125 | -DBUILD_wireshark=OFF |
---|
126 | } |
---|
127 | |
---|
128 | variant adns conflicts cares description {use adns library for async. dns resolution} { |
---|
129 | configure.args-append -DENABLE_ADNS=ON |
---|
130 | depends_lib-append port:adns |
---|
131 | } |
---|
132 | if {![variant_isset adns]} { |
---|
133 | configure.args-append -DENABLE_ADNS=OFF |
---|
134 | } |
---|
135 | |
---|
136 | variant portaudio description {Build with PortAudio support} { |
---|
137 | configure.args-append -DENABLE_PORTAUDIO=ON |
---|
138 | depends_lib-append port:portaudio |
---|
139 | } |
---|
140 | if {![variant_isset portaudio]} { |
---|
141 | configure.args-append -DENABLE_PORTAUDIO=OFF |
---|
142 | } |
---|
143 | |
---|
144 | variant zlib description {Build with zlib compression support} { |
---|
145 | configure.args-append -DENABLE_ZLIB=ON |
---|
146 | depends_lib-append port:zlib |
---|
147 | } |
---|
148 | if {![variant_isset zlib]} { |
---|
149 | configure.args-append -DENABLE_ZLIB=OFF |
---|
150 | } |
---|
151 | |
---|
152 | variant lua description {Build with Lua dissector support} { |
---|
153 | configure.args-append -DENABLE_LUA=ON |
---|
154 | depends_lib-append port:lua |
---|
155 | } |
---|
156 | if {![variant_isset lua]} { |
---|
157 | configure.args-append -DENABLE_LUA=OFF |
---|
158 | } |
---|
159 | |
---|
160 | variant libsmi description {Build with libsmi snmp support} { |
---|
161 | configure.args-append -DENABLE_SMI=ON |
---|
162 | depends_lib-append port:libsmi |
---|
163 | } |
---|
164 | if {![variant_isset libsmi]} { |
---|
165 | configure.args-append -DENABLE_SMI=OFF |
---|
166 | } |
---|
167 | |
---|
168 | variant gnutls description {Build with GNU TLS support} { |
---|
169 | configure.args-append -DENABLE_GNUTLS=ON |
---|
170 | depends_lib-append port:gnutls |
---|
171 | } |
---|
172 | if {![variant_isset gnutls]} { |
---|
173 | configure.args-append -DENABLE_GNUTLS=OFF |
---|
174 | } |
---|
175 | |
---|
176 | variant libgcrypt description {Build with GNU crypto support} { |
---|
177 | configure.args-append -DENABLE_GCRYPT=ON |
---|
178 | depends_lib-append port:libgcrypt |
---|
179 | } |
---|
180 | if {![variant_isset libgcrypt]} { |
---|
181 | configure.args-append -DENABLE_GCRYPT=OFF |
---|
182 | } |
---|
183 | |
---|
184 | variant cares conflicts adns description description {Build with c-ares support} { |
---|
185 | configure.args-append -DENABLE_CARES=ON |
---|
186 | depends_lib-append port:c-ares |
---|
187 | } |
---|
188 | if {![variant_isset cares]} { |
---|
189 | configure.args-append -DENABLE_CARES=OFF |
---|
190 | } |
---|
191 | |
---|
192 | variant kerberos5 description {Build with Kerberos support} { |
---|
193 | configure.args-append -DENABLE_KERBEROS=ON |
---|
194 | depends_lib-append port:kerberos5 |
---|
195 | } |
---|
196 | if {![variant_isset kerberos5]} { |
---|
197 | configure.args-append -DENABLE_KERBEROS=OFF |
---|
198 | } |
---|
199 | |
---|
200 | variant geoip description {Build with GeoIP support} { |
---|
201 | configure.args-append -DENABLE_GEOIP=ON |
---|
202 | depends_lib-append port:libgeoip |
---|
203 | } |
---|
204 | if {![variant_isset geoip]} { |
---|
205 | configure.args-append -DENABLE_GEOIP=OFF |
---|
206 | } |
---|
207 | |
---|
208 | post-destroot { |
---|
209 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/ |
---|
210 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/ |
---|
211 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/dissectors/ |
---|
212 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/ |
---|
213 | xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
214 | xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/ |
---|
215 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/ |
---|
216 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/ |
---|
217 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/ |
---|
218 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/ |
---|
219 | xinstall -m 644 {*}[glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/ |
---|
220 | xinstall -m 644 {*}[glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
221 | } |
---|