Ticket #43248: patch-wireshark-Portfile.2.diff

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

    old new  
    1 # $Id: Portfile 119784 2014-05-06 20:17:22Z ricci@macports.org $
     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 114970 2013-12-19 22:34:46Z ricci@macports.org $
    23
    3 PortSystem 1.0
    4 name            wireshark
    5 version         1.10.7
    6 revision        0
    7 categories      net
    8 license         {GPL-2 GPL-3}
    9 maintainers     darkart.com:opendarwin.org
    10 description     Graphical network analyzer and capture tool
    11 homepage        http://wireshark.org/
    12 platforms       darwin
    13 
    14 long_description A network analyzer that lets you capture and \
    15                  interactively browse Ethernet frames. \
    16                  Packet data can be read from a file, or live from a local \
    17                  network interface.
    18 
    19 master_sites    http://www.wireshark.org/download/src/                  \
    20                 http://www.wireshark.org/download/src/all-versions/
    21 
    22 checksums           md5     0e8a111d24c11255eae139c8f27fd25b \
    23                     sha1    5e5ce4fdc9aa53e545fc0fbd22eea6adcf7dfc0b \
    24                     rmd160  67fcd4cce612a5af705e1db5a57549444d4c4e57
    25 
    26 use_bzip2       yes
    27 
    28 conflicts       wireshark-devel
    29 
    30 patchfiles      patch-configure.diff
    31 
    32 depends_build           \
    33                 port:pkgconfig
    34 depends_lib             \
    35                 port:c-ares \
    36                 path:lib/pkgconfig/glib-2.0.pc:glib2 \
    37                 port:libpcap \
    38                 port:kerberos5 \
    39                 port:zlib
    40 
    41 configure.args  \
    42                 --without-libsmi \
    43                 --disable-usr-local \
    44                 --without-adns \
    45                 --with-c-ares=${prefix} \
    46                 --without-geoip \
    47                 --without-gnutls \
    48                 --with-gcrypt=no \
    49                 --without-lua \
    50                 --disable-ipv6 \
    51                 --with-pcap=${prefix} \
    52                 --with-ssl=${prefix} \
    53                 --with-zlib=${prefix} \
    54                 --mandir=\\\${prefix}/share/man \
    55                 --infodir=\\\${prefix}/share/info \
    56                 --without-portaudio \
    57                 --disable-warnings-as-errors \
    58                 --with-krb5=${prefix} \
    59                 --without-ssl \
    60                 --disable-wireshark
     4PortSystem      1.0
    615
     6name                wireshark
     7version             1.10.6
     8revision            0
     9categories          net
     10license             {GPL-2 GPL-3}
     11maintainers         darkart.com:opendarwin.org
     12description         Graphical network analyzer and capture tool
     13homepage            http://wireshark.org/
     14platforms           darwin
     15
     16long_description    A network analyzer that lets you capture and \
     17                    interactively browse Ethernet frames. \
     18                    Packet data can be read from a file, or live from a local \
     19                    network interface.
     20
     21master_sites        http://www.wireshark.org/download/src/            \
     22                    http://www.wireshark.org/download/src/all-versions/
     23
     24checksums           rmd160  3018f4d60d1ac86dfffd875a53373c85f5be44e8 \
     25                    sha256  a9de3fd3002d4df0946cfea2f5a33557666e14c7014dbc42d1f78dfe113f6b5d
     26
     27use_bzip2           yes
     28
     29conflicts           wireshark-devel
     30
     31patchfiles          patch-configure.diff
     32
     33depends_build         \
     34        port:pkgconfig
     35depends_lib         \
     36        port:c-ares \
     37        path:lib/pkgconfig/glib-2.0.pc:glib2 \
     38        port:libpcap \
     39        port:kerberos5 \
     40        port:zlib
     41
     42configure.args    \
     43        --without-libsmi \
     44        --disable-usr-local \
     45        --without-adns \
     46        --with-c-ares=${prefix} \
     47        --without-geoip \
     48        --without-gnutls \
     49        --with-gcrypt=no \
     50        --without-lua \
     51        --disable-ipv6 \
     52        --with-pcap=${prefix} \
     53        --without-ssl \
     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                --disable-wireshark
    6261
    6362configure.ldflags-append "-Wl,-search_paths_first"
    6463
    65 default_variants +adns +gnutls +libgcrypt +ipv6 +lua +libsmi +geoip +rtp +ssl +x11
    66 
    67 
    6864## 1.10.0 doesn't include python options in configure
    6965## if {[variant_isset no_python]} {
    7066## } elseif {[variant_isset python25]} {
    7167## } elseif {[variant_isset python26]} {
    7268## } elseif {[variant_isset python27]} {
    7369## } else {
    74 ##      default_variants +no_python
     70##     default_variants +no_python
    7571## }
    7672
    7773
    7874pre-destroot {
    79         xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/
    80         xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/
    81         xinstall -d ${destroot}${prefix}/include/wireshark/epan/dissectors/
    82         xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/
    83         xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/
    84         xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/
    85         eval xinstall -m 644 [glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
    86         eval xinstall -m 644 [glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
    87         eval xinstall -m 644 [glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
    88         eval xinstall -m 644 [glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
    89         eval xinstall -m 644 [glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
    90         eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
     75    xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/
     76    xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/
     77    xinstall -d ${destroot}${prefix}/include/wireshark/epan/dissectors/
     78    xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/
     79    xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/
     80    xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/
     81    eval xinstall -m 644 [glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
     82    eval xinstall -m 644 [glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
     83    eval xinstall -m 644 [glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
     84    eval xinstall -m 644 [glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
     85    eval xinstall -m 644 [glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
     86    eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
     87}
     88
     89post-configure {
     90    reinplace "s|cp -pr \$(srcdir)/packaging/macosx/Wireshark.app /Applications|cp -pr \$(srcdir)/packaging/macosx/Wireshark.app ${destroot}${applications_dir}|" ${worksrcpath}/Makefile
    9191}
    9292
    9393if {[string match *llvm-gcc-4.2* ${configure.compiler}]} {
    94         # see #32386
    95         configure.cflags -fno-var-tracking
     94    # see #32386
     95    configure.cflags -fno-var-tracking
     96}
     97
     98notes "
     99To use wireshark as non-root user, you need to give user access to /dev/bpf* like this for the group admin:
     100(default is root:wheel and 600)
     101    $ sudo /usr/bin/chgrp admin /dev/bpf*;
     102    $ sudo /bin/chmod g+r /dev/bpf*
     103
     104As an alternative, you can enabled variant setuid_root (not recommended).
     105"
     106
     107default_variants  +x11 +gnutls +libgcrypt +lua +libsmi +geoip +ssl +rtp
     108
     109## make: *** No rule to make target `ui/gtk/libgtkui.a', needed by `wireshark'.  Stop.
     110variant gui description { build osx app } {
     111    build.target     all osx-app
     112    destroot.target  install osx-install
    96113}
    97114
    98115variant adns description {use adns library for async. dns resolution instead of the default c-ares library} {
    99         configure.args-delete   --without-adns \
    100                                                         --with-c-ares=${prefix}
    101         configure.args-append   --with-adns=${prefix} \
    102                                                         --without-c-ares
    103         depends_lib-append      port:adns
    104         depends_lib-delete      port:c-ares
     116    configure.args-delete    --without-adns \
     117                --with-c-ares=${prefix}
     118    configure.args-append    --with-adns=${prefix} \
     119                --without-c-ares
     120    depends_lib-append    port:adns
     121    depends_lib-delete    port:c-ares
    105122}
    106123
    107 variant gnutls {
    108         configure.args-delete   --without-gnutls
    109         configure.args-append   --with-gnutls=yes
    110         depends_lib-append              port:gnutls
     124variant gnutls description { gnutls support } {
     125    configure.args-delete    --without-gnutls
     126    configure.args-append    --with-gnutls=yes
     127    depends_lib-append    port:gnutls
    111128}
    112129
    113 variant libgcrypt {
    114         configure.args-delete   --with-gcrypt=no
    115         configure.args-append   --with-libgcrypt-prefix=${prefix}
    116         depends_lib-append              port:libgcrypt
     130variant libgcrypt description { libgcrypt support } {
     131    configure.args-delete    --with-gcrypt=no
     132    configure.args-append    --with-libgcrypt-prefix=${prefix}
     133    depends_lib-append    port:libgcrypt
    117134}
    118135
    119 variant ipv6 {
    120         configure.args-delete   --disable-ipv6
    121         configure.args-append   --enable-ipv6
     136variant ipv6 description { ipv6 support } {
     137    configure.args-delete   --disable-ipv6
     138    configure.args-append    --enable-ipv6
    122139}
    123140
    124 variant lua {
    125         configure.args-delete   --without-lua
    126         configure.args-append   --with-lua=${prefix}
    127         depends_lib-append              port:lua
     141variant lua description { lua support } {
     142    configure.args-delete    --without-lua
     143    configure.args-append    --with-lua=${prefix}
     144    depends_lib-append    port:lua
    128145}
    129146
    130 variant libsmi {
    131         configure.args-delete   --without-libsmi
    132         configure.args-append   --with-libsmi=${prefix}
    133         depends_lib-append              port:libsmi
     147variant libsmi description { libsmi support } {
     148    configure.args-delete    --without-libsmi
     149    configure.args-append    --with-libsmi=${prefix}
     150    depends_lib-append    port:libsmi
    134151}
    135152
    136 variant geoip {
    137         configure.args-delete   --without-geoip
    138         configure.args-append   --with-geoip=${prefix}
    139         depends_lib-append              port:libgeoip
     153variant geoip description { libgeoip support } {
     154    configure.args-delete    --without-geoip
     155    configure.args-append    --with-geoip=${prefix}
     156    depends_lib-append    port:libgeoip
    140157}
    141158
    142159## 1.10.0 doesn't include python options in configure
    143160## variant python25 description {use python25 for the experimental python interface} conflicts no_python python26 python27 {
    144 ##      configure.args-append   --with-python=${prefix}
    145 ##      depends_lib-append      port:python25
     161##     configure.args-append    --with-python=${prefix}
     162##     depends_lib-append    port:python25
    146163## }
    147 ## 
     164##
    148165## variant python26 description {use python26 for the experimental python interface} conflicts no_python python25 python27 {
    149 ##      configure.args-append   --with-python=${prefix}
    150 ##      depends_lib-append      port:python26
     166##     configure.args-append    --with-python=${prefix}
     167##     depends_lib-append    port:python26
    151168## }
    152 ## 
     169##
    153170## variant python27 description {use python27 for the experimental python interface} conflicts no_python python25 python26 {
    154 ##      configure.args-append   --with-python=${prefix}/lib/wireshark/python/${version}
    155 ##      depends_lib-append      port:python27
     171##     configure.args-append    --with-python=${prefix}/lib/wireshark/python/${version}
     172##     depends_lib-append    port:python27
    156173## }
    157 ## 
     174##
    158175## variant no_python description {do not build python interface} conflicts python25 python26 python27 {
    159 ##      configure.args-append   --without-python
     176##     configure.args-append    --without-python
    160177## }
    161178
    162 variant rtp description {add rtp support} {
    163         configure.args-delete   --without-portaudio
    164         configure.args-append   --with-portaudio=${prefix}
    165         depends_lib-append      port:portaudio
     179variant rtp description {rtp support} {
     180    configure.args-delete   --without-portaudio
     181    configure.args-append   --with-portaudio=${prefix}
     182    depends_lib-append      port:portaudio
    166183}
    167184
    168 variant ssl {
    169         configure.args-delete   --without-ssl
    170         depends_lib-append              port:openssl
     185variant ssl description { openssl support } {
     186    configure.args-delete --without-ssl
     187    depends_lib-append    port:openssl
    171188}
    172189
    173 variant x11     {
    174         depends_lib-append              port:gtk2
    175         configure.args-delete   --disable-wireshark
     190variant x11 description { x11 support with gtk2 } {
     191    depends_lib-append    port:gtk2
     192    configure.args-append    --disable-gtk2
     193    configure.args-delete    --disable-wireshark
    176194}
    177195
     196variant setuid_root description {install dumpcap binary as setuid root} {
     197        configure.args-append   --enable-setuid-install
     198        destroot.asroot         yes
     199        install.asroot          yes
     200}
    178201
    179202#
    180203##EOF