Ticket #40782: Portfile-wireshark-devel.diff​

File Portfile-wireshark-devel.diff​, 14.9 KB (added by hsivank@…, 9 years ago)

fix trailingspace issue

Line 
1--- Portfile.orig       2015-08-08 05:31:13.000000000 +0200
2+++ Portfile    2015-08-11 19:41:47.000000000 +0200
3@@ -1,13 +1,13 @@
4 # -*- 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
5 # $Id: Portfile 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
6 
7-PortSystem 1.0
8+PortSystem      1.0
9+PortGroup       cmake 1.0
10 
11 name            wireshark-devel
12 epoch           2
13-version         1.9.0
14-revision        4
15-patchfiles      patch-configure.diff
16+version         1.99.8
17+revision        0
18 categories      net
19 license         {GPL-2 GPL-3}
20 maintainers     gmail.com:hsivank
21@@ -27,131 +27,202 @@
22 
23 use_bzip2       yes
24 
25-checksums       rmd160  56f62e9a1bc2dfedcbd1856dd06c42869a2cdde2 \
26-                sha256  0a21aa84e78de2ae2f758e5f21edf2ec5c26a372fbfbb30a53a9b67a128e4538
27+checksums       md5    1d15377bfc363e46cd7acf479c989075 \
28+                sha1   b4eb673f580c0e2f0e9f2a834c3df2e973cce991 \
29+                rmd160 06100e0e858bbfea74f5badac8b354b79dd347f2 \
30+                sha256 6e03021a82cbc6b039210d37694ae51de101b7ffd4eb0e92a65ff84b4499e211
31 
32 conflicts       wireshark
33 
34-depends_build   port:pkgconfig
35+depends_build-append   port:pkgconfig
36 
37-depends_lib     port:c-ares \
38-                path:lib/pkgconfig/glib-2.0.pc:glib2 \
39-                port:gtk2 \
40+depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 \
41                 path:lib/libssl.dylib:openssl \
42-                port:libpcap \
43-                port:kerberos5 \
44-                port:zlib
45-
46-configure.args  \
47-                --disable-usr-local \
48-                --without-adns \
49-                --with-c-ares=${prefix} \
50-                --without-pcre \
51-                --disable-ipv6 \
52-                --with-pcap=${prefix} \
53-                --with-ssl=${prefix} \
54-                --with-zlib=${prefix} \
55-                --mandir=\\\${prefix}/share/man \
56-                --infodir=\\\${prefix}/share/info \
57-                --without-portaudio \
58-                --disable-warnings-as-errors \
59-                --with-krb5=${prefix} \
60-                --without-gnutls \
61-                --without-python
62-
63-configure.ldflags-append "-Wl,-search_paths_first"
64-
65-variant adns description {use adns library for async. dns resolution instead of the default c-ares library} {
66-        configure.args-delete   --without-adns \
67-                                --with-c-ares=${prefix}
68-        configure.args-append   --with-adns=${prefix} \
69-                                --without-c-ares
70-        depends_lib-delete      port:c-ares
71-        depends_lib-append      port:adns
72-}
73+                port:libpcap
74 
75-variant gnutls {
76-        configure.args-append   --with-gnutls=yes
77-        depends_lib-append      port:gnutls
78+configure.args-append  -DCMAKE_INSTALL_RPATH:STRING="${prefix}/lib" \
79+                       -DCMAKE_INSTALL_NAME_DIR:STRING="${prefix}/lib" \
80+                       -DENABLE_NETLINK=OFF \
81+                       -DENABLE_APPLICATION_BUNDLE=OFF
82+
83+default_variants +portaudio +zlib +lua +libsmi +gnutls +libgcrypt +cares +geoip +kerberos5
84+
85+if {![variant_isset qt4] && ![variant_isset qt5] && ![variant_isset gtk2] && ![variant_isset gtk3] && ![variant_isset no_gui]} {
86+       default_variants +qt5
87+}
88+
89+variant qt4 conflicts no_gui qt5 gtk2 gtk3 description {Use Qt5 instead of Qt4 to build wireshark} {
90+        configure.args-append   -DBUILD_wireshark=ON \
91+                                -DENABLE_QT5=OFF
92+        depends_lib-append      port:qt4-mac
93+        configure.env           PATH=$env(PATH):${prefix}/libexec/qt4-mac/bin
94+        post-destroot {
95+                ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/
96+                file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns
97+                ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark
98+                file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/
99+                file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist
100+                file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/
101+                move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app
102+       }
103+}
104+
105+variant qt5 conflicts no_gui qt4 gtk2 gtk3 description {Build Wireshark} {
106+       configure.args-append    -DBUILD_wireshark=ON \
107+                                -DENABLE_QT5=ON
108+       depends_lib-append       port:qt5-mac
109+       configure.env            PATH=$env(PATH):${prefix}/libexec/qt5-mac/bin
110+       post-destroot {
111+                ln -s ${prefix}/bin/dumpcap ${destroot}/${prefix}/bin/wireshark.app/Contents/MacOS/
112+                file mkdir ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns
113+                ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${prefix}/bin/wireshark.app/Contents/PlugIns/wireshark
114+                file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${prefix}/bin/wireshark.app/Contents/
115+                file delete ${destroot}/${prefix}/bin/wireshark.app/Contents/Info.plist
116+                file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${prefix}/bin/wireshark.app/Contents/
117+                move ${destroot}/${prefix}/bin/wireshark.app ${destroot}${applications_dir}/Wireshark.app
118+       }
119+}
120+
121+if {![variant_isset qt4] && ![variant_isset qt5]} {
122+        configure.args-append   -DBUILD_wireshark=OFF
123+}
124+
125+variant gtk2 conflicts no_gui qt4 qt5 gtk3 description {Use GTK3 instead of GTK2 to build wireshark} {
126+        configure.args-append   -DBUILD_wireshark_gtk=ON \
127+                                -DENABLE_GTK3=OFF
128+        depends_lib-append      port:gtk2
129+
130+        post-destroot {
131+                file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS
132+               ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark
133+               ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap
134+                file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns
135+                ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark
136+                file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/
137+                file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/
138+        }
139 }
140-
141-variant libgcrypt {
142-        configure.args-append   --with-libgcrypt-prefix=${prefix}
143-        depends_lib-append      port:libgcrypt
144+variant gtk3 conflicts no_gui qt4 qt5 gtk2 description {Build Wireshark (GTK+ UI)} {
145+        configure.args-append   -DBUILD_wireshark_gtk=ON \
146+                                -DENABLE_GTK3=ON
147+        depends_lib-append      port:gtk3 \
148+                                port:adwaita-icon-theme
149+        post-destroot {
150+                file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS
151+                ln -s ${prefix}/bin/wireshark-gtk ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/Wireshark
152+                ln -s ${prefix}/bin/dumpcap ${destroot}/${applications_dir}/Wireshark.app/Contents/MacOS/dumpcap
153+                file mkdir ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns
154+                ln -s ${prefix}/lib/wireshark/plugins/${version} ${destroot}/${applications_dir}/Wireshark.app/Contents/PlugIns/wireshark
155+                file copy ${worksrcpath}/packaging/macosx/Resources ${destroot}/${applications_dir}/Wireshark.app/Contents/
156+                file copy ${worksrcpath}/packaging/macosx/Info.plist ${destroot}/${applications_dir}/Wireshark.app/Contents/
157+        }
158 }
159-
160-variant ipv6 {
161-        configure.args-append   --enable-ipv6
162-        configure.args-delete   --disable-ipv6
163+if {![variant_isset gtk2]  && ![variant_isset gtk3]} {
164+        configure.args-append   -DBUILD_wireshark_gtk=OFF
165 }
166 
167-variant lua {
168-        configure.args-append   --with-lua=${prefix}
169-        depends_lib-append      port:lua
170+variant no_gui conflicts qt4 qt5 gtk2 gtk3 description {Disable wireshark and wireshark_gtk} {
171+        configure.args-append   -DBUILD_wireshark_gtk=OFF \
172+                                -DBUILD_wireshark=OFF
173 }
174 
175-variant pcre {
176-        configure.args-append   --with-pcre=${prefix}
177-        configure.args-delete   --without-pcre
178-        depends_lib-append      port:pcre
179+variant adns conflicts cares description {use adns library for async. dns resolution} {
180+        configure.args-append   -DENABLE_ADNS=ON
181+        depends_lib-append      port:adns
182+}
183+if {![variant_isset adns]} {
184+        configure.args-append   -DENABLE_ADNS=OFF
185 }
186 
187-variant rtp description {add rtp support with portaudio} {
188-        configure.args-append   --with-portaudio=${prefix}
189-        configure.args-delete   --without-portaudio
190+variant portaudio description {Build with PortAudio support} {
191+        configure.args-append   -DENABLE_PORTAUDIO=ON
192         depends_lib-append      port:portaudio
193 }
194+if {![variant_isset portaudio]} {
195+        configure.args-append   -DENABLE_PORTAUDIO=OFF
196+}
197+
198+variant zlib description {Build with zlib compression support} {
199+        configure.args-append   -DENABLE_ZLIB=ON
200+        depends_lib-append      port:zlib
201+}
202+if {![variant_isset zlib]} {
203+        configure.args-append   -DENABLE_ZLIB=OFF
204+}
205 
206-variant no_ssl {
207-        configure.args-append --without-ssl
208-        depends_lib-delete      path:lib/libssl.dylib:openssl
209+variant lua description {Build with Lua dissector support} {
210+        configure.args-append   -DENABLE_LUA=ON
211+        depends_lib-append      port:lua
212+}
213+if {![variant_isset lua]} {
214+        configure.args-append   -DENABLE_LUA=OFF
215 }
216 
217-variant no_gui description {Disable GTK GUI} {
218-        depends_lib-delete      port:gtk2
219-        configure.args-delete   --disable-gtk2
220-        configure.args-append   --disable-wireshark
221+variant libsmi description {Build with libsmi snmp support} {
222+        configure.args-append   -DENABLE_SMI=ON
223+        depends_lib-append      port:libsmi
224+}
225+if {![variant_isset libsmi]} {
226+        configure.args-append   -DENABLE_SMI=OFF
227 }
228 
229-variant libsmi {
230-        depends_lib-append port:libsmi
231-        configure.args-append --with-libsmi
232+variant gnutls description {Build with GNU TLS support} {
233+        configure.args-append   -DENABLE_GNUTLS=ON
234+        depends_lib-append      port:gnutls
235+}
236+if {![variant_isset gnutls]} {
237+        configure.args-append   -DENABLE_GNUTLS=OFF
238 }
239 
240-# TODO: Remove after 2016-01-04.
241-variant python25 requires python27 description {Legacy variant} {}
242-variant python26 requires python27 description {Legacy variant} {}
243+variant libgcrypt description {Build with GNU crypto support} {
244+        configure.args-append   -DENABLE_GCRYPT=ON
245+        depends_lib-append      port:libgcrypt
246+}
247+if {![variant_isset libgcrypt]} {
248+        configure.args-append   -DENABLE_GCRYPT=OFF
249+}
250 
251-variant python27 description {use python27 for the experimental python interface} {
252-        configure.python        ${prefix}/bin/python2.7
253-        depends_lib-append      port:python27
254+variant cares conflicts adns description description {Build with c-ares support} {
255+        configure.args-append   -DENABLE_CARES=ON
256+        depends_lib-append      port:c-ares
257+}
258+if {![variant_isset cares]} {
259+        configure.args-append   -DENABLE_CARES=OFF
260 }
261 
262-pre-configure {
263-        if {[variant_isset python27]} {
264-                configure.args-append   --with-python
265-                configure.args-delete   --without-python
266-                reinplace "s|python-config|python2.7-config|g" ${worksrcpath}/configure
267-        }
268+variant kerberos5 description {Build with Kerberos support} {
269+        configure.args-append   -DENABLE_KERBEROS=ON \
270+                                -DCMAKE_SHARED_LINKER_FLAGS="-lk5crypto"
271+        depends_lib-append      port:kerberos5
272+}
273+if {![variant_isset kerberos5]} {
274+        configure.args-append   -DENABLE_KERBEROS=OFF
275 }
276 
277-pre-destroot {
278-        if {[variant_isset python27]} {
279-                 reinplace "s|libwireshark.dylib|${prefix}/lib/libwireshark.dylib|g" ${worksrcpath}/epan/wspython/wspy_libws.py
280-        }
281+variant geoip description {Build with GeoIP support} {
282+        configure.args-append   -DENABLE_GEOIP=ON
283+        depends_lib-append      port:libgeoip
284+}
285+if {![variant_isset geoip]} {
286+        configure.args-append   -DENABLE_GEOIP=OFF
287 }
288 
289 post-destroot {
290-        xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/ \
291-                    ${destroot}${prefix}/include/wireshark/epan/dfilter/ \
292-                    ${destroot}${prefix}/include/wireshark/epan/dissectors/ \
293-                    ${destroot}${prefix}/include/wireshark/epan/ftypes/ \
294-                    ${destroot}${prefix}/include/wireshark/wiretap/
295-        xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/
296-        eval xinstall -m 644 [glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
297-        eval xinstall -m 644 [glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
298-        eval xinstall -m 644 [glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
299-        eval xinstall -m 644 [glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
300-        eval xinstall -m 644 [glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
301-        eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
302-}
303+       xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/
304+       xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/
305+       xinstall -d ${destroot}${prefix}/include/wireshark/epan/dissectors/
306+       xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/
307+       xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/
308+       xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/
309+       xinstall -m 644 {*}[glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
310+       xinstall -m 644 {*}[glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
311+       xinstall -m 644 {*}[glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
312+       xinstall -m 644 {*}[glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
313+       xinstall -m 644 {*}[glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
314+       xinstall -m 644 {*}[glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
315+}
316+
317+livecheck.type  regex
318+livecheck.url   ${homepage}download.html
319+livecheck.regex "Development Release \\((\\d+(?:\\.\\d+)*)"
320+