summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/wireshark/README7
-rw-r--r--network/wireshark/wireshark.SlackBuild20
2 files changed, 26 insertions, 1 deletions
diff --git a/network/wireshark/README b/network/wireshark/README
index 03021c4631..6214c771c0 100644
--- a/network/wireshark/README
+++ b/network/wireshark/README
@@ -32,3 +32,10 @@ Optional dependencies:
- lz4
NOTE: Wireshark 2.6 is the last release to support the legacy GTK-based UI.
+
+NOTE: Although lua is listed as a requirement, it's possible to build
+using lua52. This may be needed for some third-party Lua plugins (but,
+it may break other third-party Lua plugins; your mileage may vary). The
+default is to build with lua52 if it's installed, or lua otherwise. If
+you have both lua versions installed, you can build with LUA52=no in
+the environment to build with the older lua.
diff --git a/network/wireshark/wireshark.SlackBuild b/network/wireshark/wireshark.SlackBuild
index 7a2d3e496a..29ac2cdf63 100644
--- a/network/wireshark/wireshark.SlackBuild
+++ b/network/wireshark/wireshark.SlackBuild
@@ -27,10 +27,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by Mario Preksavec <mario@slackware.hr>
+# Modified by B. Watson <yalhcru@gmail.com> to add lua52 support.
PRGNAM=wireshark
VERSION=${VERSION:-2.6.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -76,6 +77,23 @@ find -L . \
# systems with 32bit compat libs install. Thanks to Heinz Wiesinger.
sed -i "s|/lib)|/lib$LIBDIRSUFFIX)|g" configure.ac
+# We have 3 lua versions on SBo: lua is v5.1, lua52 is 5.2, lua53 is 5.3.
+# Wireshark only supports 5.1 and 5.2, not 5.3. The lua version doesn't
+# affect core wireshark, only 3rd-party plugins written in lua. Most
+# plugins should work with either version, but at least one (2ping.lua)
+# fails with 5.1. There are also probably some older plugins written
+# for 5.1 that would fail with 5.2. So we support both versions here.
+# There are 2 possible settings for LUA52:
+# - yes (default): use lua52 if it's installed, fall back to lua otherwise.
+# - no: don't use lua52; always use lua.
+if [ "${LUA52:-yes}" = "yes" -a -x /usr/bin/lua5.2 ]; then
+ export LUA_CFLAGS="$( pkg-config lua5.2 --cflags )"
+ export LUA_LIBS="$( pkg-config lua5.2 --libs )"
+ echo "=== Building with lua52"
+else
+ echo "=== Building with lua (v5.1)"
+fi
+
# run autoreconf so it'll use the correct automake version.
autoreconf -f -i