Ticket #43248: patch-wireshark-Portfile.diff

File patch-wireshark-Portfile.diff, 6.3 KB (added by jul_bsd@…, 10 years ago)
  • net/wireshark/Portfile

    old new  
    22
    33PortSystem 1.0
    44name            wireshark
    5 version         1.10.5
     5version         1.10.6
    66revision        0
    77categories      net
    88license         {GPL-2 GPL-3}
     
    1919master_sites    http://www.wireshark.org/download/src/                  \
    2020                http://www.wireshark.org/download/src/all-versions/
    2121
    22 checksums           md5     a66894a62f05e1e7a3156a807f3296ea \
    23                     sha1    ebbf4f8382fc8961c1fb7959727b3e6792e597c1 \
    24                     rmd160  e4db106c6977c25c91bc5f85fe2be13c29091a55
     22checksums           md5     c67435039d67ef1757bfff0ab88824ab \
     23                    sha1    081a2daf85e3257d7a2699e84a330712e3e5b9bb \
     24                    rmd160  3018f4d60d1ac86dfffd875a53373c85f5be44e8
    2525
    2626use_bzip2       yes
    2727
     
    3232depends_build           \
    3333                port:pkgconfig
    3434depends_lib             \
    35                 port:adns \
    36                 port:libgcrypt \
     35                port:c-ares \
    3736                port:libgeoip \
    3837                path:lib/pkgconfig/glib-2.0.pc:glib2 \
    39                 port:libsmi \
    40                 port:lua \
    41                 port:gnutls \
    42                 port:gtk2 \
    4338                port:openssl \
    4439                port:portaudio \
    4540                port:libpcap \
     
    4742                port:zlib
    4843
    4944configure.args  \
    50                 --with-libsmi=${prefix} \
     45                --without-libsmi \
    5146                --disable-usr-local \
    52                 --with-adns=${prefix} \
    53                 --without-c-ares \
    54                 --with-geoip=${prefix} \
    55                 --with-gnutls=yes \
    56                 --with-libgcrypt-prefix=${prefix} \
    57                 --with-lua=${prefix} \
    58                 --enable-ipv6 \
     47                --without-adns \
     48                --with-c-ares=${prefix} \
     49                --without-geoip \
     50                --without-gnutls \
     51                --with-gcrypt=no \
     52                --without-lua \
     53                --disable-ipv6 \
    5954                --with-pcap=${prefix} \
    60                 --with-ssl=${prefix} \
     55                --without-ssl \
    6156                --with-zlib=${prefix} \
    6257                --mandir=\\\${prefix}/share/man \
    6358                --infodir=\\\${prefix}/share/info \
    64                 --with-portaudio=${prefix} \
     59                --without-portaudio \
    6560                --disable-warnings-as-errors \
    66                 --with-krb5=${prefix}
     61                --with-krb5=${prefix} \
     62                --disable-wireshark
    6763
    6864configure.ldflags-append "-Wl,-search_paths_first"
    6965
     
    9288        eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
    9389}
    9490
     91post-configure {
     92        reinplace "s|cp -pr \$(srcdir)/packaging/macosx/Wireshark.app /Applications|cp -pr \$(srcdir)/packaging/macosx/Wireshark.app ${destroot}${applications_dir}|" ${worksrcpath}/Makefile
     93}
     94
    9595if {[string match *llvm-gcc-4.2* ${configure.compiler}]} {
    9696        # see #32386
    9797        configure.cflags -fno-var-tracking
    9898}
    9999
    100 variant no_adns description {don't use adns library for async. dns resolution instead of the default c-ares library} {
    101         configure.args-append   --without-adns \
    102                                                         --with-c-ares=${prefix}
    103         configure.args-delete   --with-adns=${prefix} \
    104                                                         --without-c-ares
    105         depends_lib-delete      port:adns
    106         depends_lib-append      port:c-ares
     100notes "
     101To use wireshark as non-root user, you need to give user access to /dev/bpf* like this for the group admin:
     102(default is root:wheel and 600)
     103    $ sudo /usr/bin/chgrp admin /dev/bpf*;
     104    $ sudo /bin/chmod g+r /dev/bpf*
     105
     106As an alternative, you can enabled variant setuid_root (not recommended).
     107"
     108
     109default_variants  +x11 +gnutls +libgcrypt +lua +libsmi +geoip +ssl +rtp
     110
     111## make: *** No rule to make target `ui/gtk/libgtkui.a', needed by `wireshark'.  Stop.
     112variant gui {
     113        build.target     all osx-app
     114        destroot.target  install osx-install
     115}
     116
     117variant adns description {use adns library for async. dns resolution instead of the default c-ares library} {
     118        configure.args-delete   --without-adns \
     119                                --with-c-ares=${prefix}
     120        configure.args-append   --with-adns=${prefix} \
     121                                --without-c-ares
     122        depends_lib-append      port:adns
     123        depends_lib-delete      port:c-ares
    107124}
    108125
    109 variant no_gnutls {
    110         configure.args-append   --without-gnutls
    111         configure.args-delete   --with-gnutls=yes
    112         depends_lib-delete      port:gnutls
     126variant gnutls {
     127        configure.args-delete   --without-gnutls
     128        configure.args-append   --with-gnutls=yes
     129        depends_lib-append      port:gnutls
    113130}
    114131
    115 variant no_libgcrypt {
    116         configure.args-append   --with-gcrypt=no
    117         configure.args-delete   --with-libgcrypt-prefix=${prefix}
    118         depends_lib-delete      port:libgcrypt
     132variant libgcrypt {
     133        configure.args-delete   --with-gcrypt=no
     134        configure.args-append   --with-libgcrypt-prefix=${prefix}
     135        depends_lib-append      port:libgcrypt
    119136}
    120137
    121 variant no_ipv6 {
    122         configure.args-append   --disable-ipv6
    123         configure.args-delete   --enable-ipv6
     138variant ipv6 {
     139        configure.args-delete   --disable-ipv6
     140        configure.args-append   --enable-ipv6
    124141}
    125142
    126 variant no_lua {
    127         configure.args-append   --without-lua
    128         configure.args-delete   --with-lua=${prefix}
    129         depends_lib-delete      port:lua
     143variant lua {
     144        configure.args-delete   --without-lua
     145        configure.args-append   --with-lua=${prefix}
     146        depends_lib-append      port:lua
    130147}
    131148
    132 variant no_libsmi {
    133         configure.args-append   --without-libsmi
    134         configure.args-delete   --with-libsmi=${prefix}
    135         depends_lib-delete      port:libsmi
     149variant libsmi {
     150        configure.args-delete   --without-libsmi
     151        configure.args-append   --with-libsmi=${prefix}
     152        depends_lib-append      port:libsmi
    136153}
    137154
    138 variant no_geoip {
    139         configure.args-append   --without-geoip
    140         configure.args-delete   --with-geoip=${prefix}
    141         depends_lib-delete      port:libgeoip
     155variant geoip {
     156        configure.args-delete   --without-geoip
     157        configure.args-append   --with-geoip=${prefix}
     158        depends_lib-append      port:libgeoip
    142159}
    143160
    144161## 1.10.0 doesn't include python options in configure
     
    161178##      configure.args-append   --without-python
    162179## }
    163180
    164 variant no_rtp description {remove rtp support} {
    165         configure.args-append   --without-portaudio
    166         configure.args-delete   --with-portaudio=${prefix}
    167         depends_lib-delete      port:portaudio
     181variant rtp description {rtp support} {
     182        configure.args-delete   --without-portaudio
     183        configure.args-append   --with-portaudio=${prefix}
     184        depends_lib-append      port:portaudio
    168185}
    169186
    170 variant no_ssl {
    171         configure.args-append --without-ssl
    172         depends_lib-delete      port:openssl
     187variant ssl {
     188        configure.args-delete --without-ssl
     189        depends_lib-append      port:openssl
    173190}
    174191
    175 variant no_x11  {
    176         depends_lib-delete      port:gtk2
    177         configure.args-delete   --disable-gtk2
    178         configure.args-append   --disable-wireshark
     192variant x11     {
     193        depends_lib-append      port:gtk2
     194        configure.args-append   --disable-gtk2
     195        configure.args-delete   --disable-wireshark
    179196}
    180197
     198variant setuid_root description {install dumpcap binary as setuid root} {
     199        configure.args-append   --enable-setuid-install
     200        destroot.asroot         yes
     201        install.asroot          yes
     202}
    181203
    182204#
    183205##EOF