Ticket #48835: wireshark-2.0-with-lua-5.2.diff

File wireshark-2.0-with-lua-5.2.diff, 2.9 KB (added by ben@…, 8 years ago)
  • Portfile

    diff --git a/Portfile b/Portfile
    index 01174d3..fe6e6f4 100644
    a b  
    22
    33PortSystem 1.0
    44name            wireshark
    5 version         1.12.8
    6 revision        1
     5version         2.0.0rc2
     6revision        0
    77categories      net
    88license         {GPL-2 GPL-3}
    99maintainers     darkart.com:opendarwin.org
    long_description A network analyzer that lets you capture and \ 
    1919master_sites    http://www.wireshark.org/download/src/                  \
    2020                http://www.wireshark.org/download/src/all-versions/
    2121
    22 checksums           md5     988a4595a4a87dafb3c4870ea40e89b5 \
    23                     sha1    d8c23120525a2f3505e822b7684e7367bcd0ba70 \
    24                     rmd160  bf87fd1e3404d04f6123d09798b46ea5b2af49e9
     22checksums           md5     e533e26ae9372b3d58c7d54eddd2ef1e \
     23                    sha1    3bef75cd106dbf6fba8529394202b90cfcc9f5b2 \
     24                    rmd160  907eefeae0519986d7d62a288fac3568efda020e
    2525
    2626use_bzip2       yes
    2727
    28 conflicts       wireshark-devel
    29 
    30 patchfiles      patch-configure.diff
     28conflicts       wireshark-devel lua
    3129
    3230depends_build           \
    3331                port:pkgconfig
    configure.args \ 
    4543                --disable-osx-deploy-target \
    4644                --without-libsmi \
    4745                --disable-usr-local \
     46                --disable-osx-deploy-target \
    4847                --without-adns \
    4948                --with-c-ares=${prefix} \
    5049                --without-geoip \
    variant ipv6 { 
    129128}
    130129
    131130# https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10881
    132 #variant lua {
    133 #       configure.args-delete   --without-lua
    134 #       configure.args-append   --with-lua=${prefix}
    135 #       depends_lib-append              port:lua
    136 #}
     131variant lua {
     132        configure.args-delete   --without-lua
     133        configure.args-append   --with-lua=${prefix}
     134        configure.cflags-append -I${prefix}/include/lua-5.2
     135        configure.ldflags-append -L${prefix}/lib/lua-5.2 -llua-5.2
     136        depends_lib-append              port:lua52
     137        patchfiles-append               patch-epan-wslua.diff
     138        patchfiles-append               configure-lua-macports-prefix.diff
     139}
    137140
    138141variant libsmi {
    139142        configure.args-delete   --without-libsmi
  • new file files/configure-lua-macports-prefix.diff

    diff --git a/files/configure-lua-macports-prefix.diff b/files/configure-lua-macports-prefix.diff
    new file mode 100644
    index 0000000..7272972
    - +  
     1--- configure.orig      2015-10-30 16:12:50.000000000 -0400
     2+++ configure   2015-11-02 13:10:25.000000000 -0500
     3@@ -37552,6 +37552,12 @@
     4                                        lua_dir=$dir
     5                                        break
     6                                fi
     7+                               if test -r "$dir/include/lua-$ver/lua.h"
     8+                               then
     9+                                       header_dir="$dir/include/lua-$ver"
     10+                                       lua_dir=$dir
     11+                                       break
     12+                               fi
     13                        done
     14                done
     15 
  • new file files/patch-epan-wslua.diff

    diff --git a/files/patch-epan-wslua.diff b/files/patch-epan-wslua.diff
    new file mode 100644
    index 0000000..0bcdad7
    - +  
     1--- epan/wslua/lua_bitop.c.orig  2015-08-12 11:47:43.000000000 -0500
     2+++ epan/wslua/lua_bitop.c 2015-10-03 13:50:48.000000000 -0500
     3@@ -29,8 +29,8 @@
     4 #define LUA_BITOP_VERSION "1.0.2"
     5 
     6 #define LUA_LIB
     7-#include <lua.h>
     8-#include <lauxlib.h>
     9+#include <lua-5.2/lua.h>
     10+#include <lua-5.2/lauxlib.h>
     11 
     12 #include "lua_bitop.h"