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.11.0 |
---|
10 | revision 3 |
---|
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 | fetch.type svn |
---|
21 | svn.revision 52640 |
---|
22 | worksrcdir trunk |
---|
23 | svn.url http://anonsvn.wireshark.org/wireshark/trunk |
---|
24 | |
---|
25 | long_description A network analyzer that lets you capture and \ |
---|
26 | interactively browse Ethernet frames. \ |
---|
27 | Packet data can be read from a file, or live from a local \ |
---|
28 | network interface. |
---|
29 | |
---|
30 | master_sites http://www.wireshark.org/download/src/ \ |
---|
31 | http://www.wireshark.org/download/src/all-versions/ |
---|
32 | |
---|
33 | #use_bzip2 yes |
---|
34 | |
---|
35 | #checksums rmd160 6335465a428a18a033844d72d7f3bd137aa17434 \ |
---|
36 | # sha256 64085a564e91edf623570a9ed49588de457ab1e8025aceac3c0b861a8f9b1891 |
---|
37 | |
---|
38 | conflicts wireshark |
---|
39 | |
---|
40 | depends_build port:pkgconfig \ |
---|
41 | port:subversion \ |
---|
42 | port:cmake |
---|
43 | |
---|
44 | depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
45 | port:openssl \ |
---|
46 | port:libpcap |
---|
47 | |
---|
48 | configure.args -DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \ |
---|
49 | -DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \ |
---|
50 | -DENABLE_NETLINK=OFF \ |
---|
51 | -DENABLE_GEOIP=OFF |
---|
52 | |
---|
53 | default_variants +qt4 +adns +portaudio +zlib +lua +libsmi +gnutls +libgcrypt +cares +kerberos5 |
---|
54 | |
---|
55 | variant qt4 conflicts no_gui qt5 { |
---|
56 | configure.args-append -DBUILD_qtshark=ON \ |
---|
57 | -DENABLE_QT5=OFF |
---|
58 | depends_lib-append port:qt4-mac |
---|
59 | } |
---|
60 | variant qt5 conflicts no_gui qt4 { |
---|
61 | configure.args-append -DBUILD_qtshark=ON \ |
---|
62 | -DENABLE_QT5=ON |
---|
63 | #waiting for qt5 integration into macports ... |
---|
64 | # depends_lib-append port:qt5-mac |
---|
65 | } |
---|
66 | |
---|
67 | if {![variant_isset qt4] && ![variant_isset qt5]} { |
---|
68 | configure.args-append -DBUILD_qtshark=OFF |
---|
69 | } |
---|
70 | |
---|
71 | variant gtk2 conflicts no_gui gtk3 { |
---|
72 | configure.args-append -DBUILD_wireshark=ON \ |
---|
73 | -DENABLE_GTK3=OFF |
---|
74 | depends_lib-append port:gtk2 |
---|
75 | } |
---|
76 | variant gtk3 conflicts no_gui gtk2 { |
---|
77 | configure.args-append -DBUILD_wireshark=ON \ |
---|
78 | -DENABLE_GTK3=ON |
---|
79 | depends_lib-append port:gtk3 |
---|
80 | } |
---|
81 | if {![variant_isset gtk2] && ![variant_isset gtk3]} { |
---|
82 | configure.args-append -DBUILD_wireshark=OFF |
---|
83 | } |
---|
84 | |
---|
85 | variant no_gui conflicts qt4 qt5 gtk2 gtk3 description {Disable wireshark and qtshark} { |
---|
86 | configure.args-append -DBUILD_wireshark=OFF \ |
---|
87 | -DBUILD_qtshark=OFF |
---|
88 | } |
---|
89 | |
---|
90 | variant adns description {use adns library for async. dns resolution} { |
---|
91 | configure.args-append -DENABLE_ADNS=ON |
---|
92 | depends_lib-append port:adns |
---|
93 | } |
---|
94 | if {![variant_isset adns]} { |
---|
95 | configure.args-append -DENABLE_ADNS=OFF |
---|
96 | } |
---|
97 | |
---|
98 | variant portaudio { |
---|
99 | configure.args-append -DENABLE_PORTAUDIO=ON |
---|
100 | depends_lib-append port:portaudio |
---|
101 | } |
---|
102 | if {![variant_isset portaudio]} { |
---|
103 | configure.args-append -DENABLE_PORTAUDIO=OFF |
---|
104 | } |
---|
105 | |
---|
106 | variant zlib { |
---|
107 | configure.args-append -DENABLE_ZLIB=ON |
---|
108 | depends_lib-append port:zlib |
---|
109 | } |
---|
110 | if {![variant_isset zlib]} { |
---|
111 | configure.args-append -DENABLE_ZLIB=OFF |
---|
112 | } |
---|
113 | |
---|
114 | variant lua { |
---|
115 | configure.args-append -DENABLE_LUA=ON |
---|
116 | depends_lib-append port:lua |
---|
117 | } |
---|
118 | if {![variant_isset lua]} { |
---|
119 | configure.args-append -DENABLE_LUA=OFF |
---|
120 | } |
---|
121 | |
---|
122 | variant libsmi { |
---|
123 | configure.args-append -DENABLE_SMI=ON |
---|
124 | depends_lib-append port:libsmi |
---|
125 | } |
---|
126 | if {![variant_isset libsmi]} { |
---|
127 | configure.args-append -DENABLE_SMI=OFF |
---|
128 | } |
---|
129 | |
---|
130 | variant gnutls { |
---|
131 | configure.args-append -DENABLE_GNUTLS=ON |
---|
132 | depends_lib-append port:gnutls |
---|
133 | } |
---|
134 | if {![variant_isset gnutls]} { |
---|
135 | configure.args-append -DENABLE_GNUTLS=OFF |
---|
136 | } |
---|
137 | |
---|
138 | variant libgcrypt { |
---|
139 | configure.args-append -DENABLE_GCRYPT=ON |
---|
140 | depends_lib-append port:libgcrypt |
---|
141 | } |
---|
142 | if {![variant_isset libgcrypt]} { |
---|
143 | configure.args-append -DENABLE_GCRYPT=OFF |
---|
144 | } |
---|
145 | |
---|
146 | variant cares description { |
---|
147 | configure.args-append -DENABLE_CARES=ON |
---|
148 | depends_lib-append port:c-ares |
---|
149 | } |
---|
150 | if {![variant_isset cares]} { |
---|
151 | configure.args-append -DENABLE_CARES=OFF |
---|
152 | } |
---|
153 | |
---|
154 | variant kerberos5 { |
---|
155 | configure.args-append -DENABLE_KERBEROS=ON |
---|
156 | depends_lib-append port:kerberos5 |
---|
157 | } |
---|
158 | if {![variant_isset kerberos5]} { |
---|
159 | configure.args-append -DENABLE_KERBEROS=OFF |
---|
160 | } |
---|
161 | |
---|
162 | variant python25 description {use python25 for the experimental python interface} conflicts python26 python27 { |
---|
163 | configure.python ${prefix}/bin/python2.5 |
---|
164 | depends_lib-append port:python25 |
---|
165 | } |
---|
166 | |
---|
167 | variant python26 description {use python26 for the experimental python interface} conflicts python25 python27 { |
---|
168 | configure.python ${prefix}/bin/python2.6 |
---|
169 | depends_lib-append port:python26 |
---|
170 | } |
---|
171 | |
---|
172 | variant python27 description {use python27 for the experimental python interface} conflicts python25 python26 { |
---|
173 | configure.python ${prefix}/bin/python2.7 |
---|
174 | depends_lib-append port:python27 |
---|
175 | } |
---|
176 | |
---|
177 | pre-configure { |
---|
178 | if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} { |
---|
179 | configure.args-append -DENABLE_PYTHON=ON |
---|
180 | } |
---|
181 | |
---|
182 | if {[variant_isset python25]} { |
---|
183 | reinplace "s|python-config|python2.5-config|g" ${worksrcpath}/configure |
---|
184 | } |
---|
185 | if {[variant_isset python26]} { |
---|
186 | reinplace "s|python-config|python2.6-config|g" ${worksrcpath}/configure |
---|
187 | } |
---|
188 | if {[variant_isset python27]} { |
---|
189 | reinplace "s|python-config|python2.7-config|g" ${worksrcpath}/configure |
---|
190 | } |
---|
191 | } |
---|
192 | |
---|
193 | pre-destroot { |
---|
194 | if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} { |
---|
195 | reinplace "s|libwireshark.dylib|${prefix}/lib/libwireshark.dylib|g" ${worksrcpath}/epan/wspython/wspy_libws.py |
---|
196 | } |
---|
197 | } |
---|
198 | |
---|
199 | post-destroot { |
---|
200 | xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/ \ |
---|
201 | ${destroot}${prefix}/include/wireshark/epan/dfilter/ \ |
---|
202 | ${destroot}${prefix}/include/wireshark/epan/dissectors/ \ |
---|
203 | ${destroot}${prefix}/include/wireshark/epan/ftypes/ \ |
---|
204 | ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
205 | xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/ |
---|
206 | eval xinstall -m 644 [glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/ |
---|
207 | eval xinstall -m 644 [glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/ |
---|
208 | eval xinstall -m 644 [glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/ |
---|
209 | eval xinstall -m 644 [glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/ |
---|
210 | eval xinstall -m 644 [glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/ |
---|
211 | eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/ |
---|
212 | } |
---|