Ticket #29968: Portfile_wireshark-devel_python.diff

File Portfile_wireshark-devel_python.diff, 2.3 KB (added by hsivank@…, 13 years ago)
  • Portfile

    old new  
    4949                --infodir=\\\${prefix}/share/info \
    5050                --without-portaudio \
    5151                --disable-warnings-as-errors \
    52                 --without-gnutls
     52                --without-gnutls \
     53                --without-python
    5354
    5455configure.ldflags-append "-Wl,-search_paths_first"
    5556
     
    110111        configure.args-append --with-libsmi
    111112}
    112113
     114variant python25 description {use python25 for the experimental python interface} conflicts python26 python27 {
     115        configure.env-append    PYTHON=${prefix}/bin/python2.5
     116        depends_lib-append      port:python25
     117}
     118
     119variant python26 description {use python26 for the experimental python interface} conflicts python25 python27 {
     120        configure.env-append    PYTHON=${prefix}/bin/python2.6
     121        depends_lib-append      port:python26
     122}
     123
     124variant python27 description {use python27 for the experimental python interface} conflicts python25 python26 {
     125        configure.env-append    PYTHON=${prefix}/bin/python2.7
     126        depends_lib-append      port:python27
     127}
     128
     129pre-configure {
     130        if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} {
     131                configure.args-append   --with-python
     132                configure.args-delete   --without-python
     133        }
     134        if {[variant_isset python25]} {
     135                reinplace "s|python-config|python2.5-config|g" ${worksrcpath}/configure
     136        }
     137        if {[variant_isset python26]} {
     138                reinplace "s|python-config|python2.6-config|g" ${worksrcpath}/configure
     139        }
     140        if {[variant_isset python27]} {
     141                reinplace "s|python-config|python2.7-config|g" ${worksrcpath}/configure
     142        }
     143}
     144
    113145post-destroot {
     146        if {[variant_isset python25] || [variant_isset python26] || [variant_isset python27]} {
     147                reinplace "s|libwireshark.dylib|${prefix}/lib/libwireshark.dylib|g" ${worksrcpath}/epan/wspython/wspy_libws.py
     148        }
    114149        xinstall -d ${destroot}${prefix}/include/wireshark/epan/crypt/ \
    115150                    ${destroot}${prefix}/include/wireshark/epan/dfilter/ \
    116151                    ${destroot}${prefix}/include/wireshark/epan/dissectors/ \