Ticket #48363: ForReference-Portfile-vs-wireshark-port.2.diff

File ForReference-Portfile-vs-wireshark-port.2.diff, 8.7 KB (added by mdeaudelin (Mathieu Deaudelin-Lemay), 9 years ago)

(For reference only:) Diff comparing the current wireshark Portfile to my proposed wireshark-devel Portfile. (revised)

  • Portfile

    old new  
    1 # $Id: Portfile 137761 2015-06-18 20:07:17Z 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 131578 2015-01-15 00:14:59Z larryv@macports.org $
    23
    34PortSystem 1.0
    4 name            wireshark
    5 version         1.12.6
     5
     6name            wireshark-devel
     7epoch           2
     8version         1.99.7
    69revision        0
    710categories      net
    811license         {GPL-2 GPL-3}
    9 maintainers     darkart.com:opendarwin.org
     12maintainers     gmail.com:hsivank
    1013description     Graphical network analyzer and capture tool
    1114homepage        http://wireshark.org/
    1215platforms       darwin
    1316
     17distname        wireshark-${version}
     18dist_subdir     wireshark
     19
    1420long_description A network analyzer that lets you capture and \
    1521                 interactively browse Ethernet frames. \
    1622                 Packet data can be read from a file, or live from a local \
     
    1925master_sites    http://www.wireshark.org/download/src/                  \
    2026                http://www.wireshark.org/download/src/all-versions/
    2127
    22 checksums           md5     25ad2bc1c2a21396827c238fcff51bf3 \
    23                     sha1    5b592bd0389b76d3bdee6a7336e9492f8162c94d \
    24                     rmd160  46d0ceb05ea26670e73fc89928d54c0a00151cbe
     28checksums       rmd160  7a9a0a50fdeb91fc97871129167329fc694b09b4 \
     29                sha256  3d34d51edabc07ceb13734f222421f2fb012a870c837ffb313dc1af51c16b28a
    2530
    2631use_bzip2       yes
    2732
    2833conflicts       wireshark-devel
    2934
    30 patchfiles      patch-configure.diff    \
    31                         patch-configure.pixmap-fix.diff
    32 
    3335depends_build           \
    3436                port:pkgconfig
    3537depends_lib             \
    3638                port:c-ares \
    3739                port:gettext \
    38                 port:kerberos5 \
    3940                port:libcomerr \
    4041                port:libgpg-error \
    4142                path:lib/pkgconfig/glib-2.0.pc:glib2 \
     
    4344                port:zlib
    4445
    4546configure.args  \
    46                 --without-libsmi \
    4747                --disable-usr-local \
     48        --disable-warnings-as-errors \
    4849                --without-adns \
    4950                --with-c-ares=${prefix} \
    5051                --without-geoip \
    5152                --without-gnutls \
    5253                --with-gcrypt=no \
     54        --without-libsmi \
    5355                --without-lua \
    5456                --disable-ipv6 \
    5557                --with-pcap=${prefix} \
    56                 --with-ssl=${prefix} \
    5758                --with-zlib=${prefix} \
    5859                --mandir=\\\${prefix}/share/man \
    5960                --infodir=\\\${prefix}/share/info \
    6061                --without-portaudio \
    61                 --disable-warnings-as-errors \
    62                 --with-krb5=${prefix} \
     62        --without-krb5 \
    6363                --without-ssl \
    6464                --disable-wireshark
    6565
    6666
    6767configure.ldflags-append "-Wl,-search_paths_first"
    6868
    69 default_variants +gnutls +libgcrypt +ipv6 +lua +libsmi +geoip +rtp +ssl
     69default_variants +gnutls +libgcrypt +ipv6 +krb5 +lua +libsmi +geoip +rtp +ssl
    7070
    71 if {![variant_isset qt] && ![variant_isset gtk3]} {
    72         default_variants        +x11
     71if {![variant_isset qt] && ![variant_isset x11] && ![variant_isset gtk3]} {
     72    default_variants    +qt5
    7373}
    7474
    75 ## 1.10.0 doesn't include python options in configure
    76 ## if {[variant_isset no_python]} {
    77 ## } elseif {[variant_isset python25]} {
    78 ## } elseif {[variant_isset python26]} {
    79 ## } elseif {[variant_isset python27]} {
    80 ## } else {
    81 ##      default_variants +no_python
    82 ## }
    83 
    84 
    8575pre-destroot {
    8676        xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/
    8777        xinstall -d ${destroot}${prefix}/include/wireshark/epan/dfilter/
     
    8979        xinstall -d ${destroot}${prefix}/include/wireshark/epan/ftypes/
    9080        xinstall -d ${destroot}${prefix}/include/wireshark/wiretap/
    9181        xinstall -m 644 -W ${worksrcpath}/ color.h config.h register.h ${destroot}${prefix}/include/wireshark/
    92         eval xinstall -m 644 [glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
    93         eval xinstall -m 644 [glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
    94         eval xinstall -m 644 [glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
    95         eval xinstall -m 644 [glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
    96         eval xinstall -m 644 [glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
    97         eval xinstall -m 644 [glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
     82    xinstall -m 644 {*}[glob ${worksrcpath}/epan/*.h] ${destroot}${prefix}/include/wireshark/epan/
     83    xinstall -m 644 {*}[glob ${worksrcpath}/epan/crypt/*.h] ${destroot}${prefix}/include/wireshark/epan/crypt/
     84    xinstall -m 644 {*}[glob ${worksrcpath}/epan/dfilter/*.h] ${destroot}${prefix}/include/wireshark/epan/dfilter/
     85    xinstall -m 644 {*}[glob ${worksrcpath}/epan/dissectors/*.h] ${destroot}${prefix}/include/wireshark/epan/dissectors/
     86    xinstall -m 644 {*}[glob ${worksrcpath}/epan/ftypes/*.h] ${destroot}${prefix}/include/wireshark/epan/ftypes/
     87    xinstall -m 644 {*}[glob ${worksrcpath}/wiretap/*.h] ${destroot}${prefix}/include/wireshark/wiretap/
    9888}
    9989
    10090if {[string match *llvm-gcc-4.2* ${configure.compiler}]} {
     
    117107        depends_lib-append              port:gnutls
    118108}
    119109
     110variant krb5 {
     111    configure.args-delete   --without-krb5
     112    configure.args-append   --with-krb5=${prefix}
     113    depends_lib-append      port:kerberos5
     114}
     115
    120116variant libgcrypt {
    121117        configure.args-delete   --with-gcrypt=no
    122118        configure.args-append   --with-libgcrypt-prefix=${prefix}
     
    146142        depends_lib-append              port:libgeoip
    147143}
    148144
    149 ## 1.10.0 doesn't include python options in configure
    150 ## variant python25 description {use python25 for the experimental python interface} conflicts no_python python26 python27 {
    151 ##      configure.args-append   --with-python=${prefix}
    152 ##      depends_lib-append      port:python25
    153 ## }
    154 ##
    155 ## variant python26 description {use python26 for the experimental python interface} conflicts no_python python25 python27 {
    156 ##      configure.args-append   --with-python=${prefix}
    157 ##      depends_lib-append      port:python26
    158 ## }
    159 ##
    160 ## variant python27 description {use python27 for the experimental python interface} conflicts no_python python25 python26 {
    161 ##      configure.args-append   --with-python=${prefix}/lib/wireshark/python/${version}
    162 ##      depends_lib-append      port:python27
    163 ## }
    164 ##
    165 ## variant no_python description {do not build python interface} conflicts python25 python26 python27 {
    166 ##      configure.args-append   --without-python
    167 ## }
    168 
    169 variant qt description {use qt for the GUI} conflicts x11 gtk3  {
    170 ## qt 5.3.1 doesn't work at this point, wireshark needs to be adjusted for Qt 5.
    171 ##      depends_lib-append              port:qt5-mac
     145variant qt description {use qt4 for the GUI} conflicts x11 gtk3 qt5 {
    172146        depends_lib-append              port:qt4-mac
    173147        configure.args-delete   --disable-wireshark
    174         configure.args-append   --with-qt=yes
     148    configure.args-append   --with-qt=4
    175149        configure.args-append   --with-gtk2=no
    176150        configure.args-append   --with-gtk3=no
    177151}
     152
     153variant qt5 description {use qt5 for the GUI} conflicts x11 gtk3 qt {
     154    depends_lib-append      port:qt5-mac
     155    configure.args-delete   --disable-wireshark
     156    configure.args-append   --with-qt=5
     157    configure.args-append   --with-gtk2=no
     158    configure.args-append   --with-gtk3=no
     159
     160    configure.pkg_config_path   ${configure.pkg_config_path}:${prefix}/libexec/qt5-mac/lib/pkgconfig
     161    configure.env-append        PATH=$env(PATH):${prefix}/libexec/qt5-mac/bin
     162    build.env-append            PATH=$env(PATH):${prefix}/libexec/qt5-mac/bin
     163}
     164
    178165variant rtp description {add rtp support} {
    179166        configure.args-delete   --without-portaudio
    180167        configure.args-append   --with-portaudio=${prefix}
     
    183170
    184171variant ssl {
    185172        configure.args-delete   --without-ssl
     173    configure.args-append   --with-ssl=${prefix}
    186174        depends_lib-append              port:openssl
    187175}
    188176
    189 ## variant x11 conflicts qt     {
    190 variant x11 description {use X11 (gtk2) for GUI} conflicts qt gtk3      {
     177variant x11 description {use X11 (gtk2) for GUI} conflicts qt qt5 gtk3  {
    191178        depends_lib-append              port:gtk2 \
    192179                                                        port:atk \
    193180                                                        path:lib/pkgconfig/cairo.pc:cairo \
     
    212199        configure.args-append   --with-gtk3=no
    213200}
    214201
    215 variant gtk3 description {use X11 (gtk3) for GUI} conflicts qt x11      {
    216         depends_lib-append              port:gtk3
     202variant gtk3 description {use X11 (gtk3) for GUI} conflicts qt qt5 x11  {
     203    depends_lib-append      port:gtk3 \
     204                            port:adwaita-icon-theme
     205
    217206        configure.args-delete   --disable-wireshark
    218207        configure.args-append   --with-qt=no
    219208        configure.args-append   --with-gtk2=no
    220209        configure.args-append   --with-gtk3=yes
    221210}
    222211
     212platform macosx {
     213    if { [variant_isset qt] || [variant_isset qt5] || [variant_isset x11] || [variant_isset gtk3] } {
     214        patchfiles-append       patch-osxapp.diff
     215        destroot.target-append  osx-install
     216        destroot.env-append     APPLICATIONS_DIR=${applications_dir}
     217    }
     218}
    223219
    224220livecheck.type  regex
    225221livecheck.url   ${homepage}download.html
    226 livecheck.regex "Stable Release \\((\\d+(?:\\.\\d+)*)"
    227 #
    228 ##EOF
    229 
    230 
    231 #
    232 ##EOF
     222livecheck.regex "Development Release \\((\\d+(?:\\.\\d+)*)"