Commit Graph

21 Commits

Author SHA1 Message Date
João Valverde 7e6266d33d MSYS2: Add Lua 5.1 support and fix test suite failures 2023-01-16 11:54:43 +00:00
Pascal Quantin 2ba42a047e CMake: fix detection of Lua development package
See https://www.wireshark.org/lists/wireshark-dev/202003/msg00054.html

Change-Id: I10a854a4dcd5320fce8ca3e6ff5722225c56c5d9
Reviewed-on: https://code.wireshark.org/review/36494
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-19 08:50:29 +00:00
Guy Harris 20e9652179 Check for liblua-{version} as well as liblua{version}.
FreeBSD packages install liblua-{version}.

Change-Id: Ib28d2032a13baff9da42d61e3054a8b8e64b5cc9
Reviewed-on: https://code.wireshark.org/review/35994
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-01 00:40:56 +00:00
Peter Wu 604aef7164 Windows: fix handling of Unicode paths in Lua
Lua internally uses ANSI C APIs (such as fopen). On many systems (macOS
and Linux for example) these work fine with UTF-8. Windows however
requires special Unicode APIs (such as _wfopen), so patch the Lua
library to interpret paths are UTF-8 and call appropriate Unicode APIs.

Changes compared to the previous LuaBinaries zip archive:

- Patched with UTF-8 support for loadfile, os.execute, etc.
- Built with VS 2015 (VCRUNTIME140.dll) instead of MinGW (MSVCRT.dll).
- Includes PDB file for lua52.dll
- Includes lua52.exe and luac52.exe with UTF-8 argv support (wmain).
- Includes build scripts, source files and README.md.
- Extra subdirectory named after the zip file.

These zip files are taken from https://github.com/Lekensteyn/lua-unicode
(the "prepared" source zips can be found here as well.)

Bug: 15118
Change-Id: I219f046d6e0fd5093287b5d6503a48ba7d1fc6a4
Reviewed-on: https://code.wireshark.org/review/31165
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-29 08:27:08 +00:00
Peter Wu d703310749 cmake: optionally require Lua 5.1 or newer
doc/README.wslua reports support for 5.1 and 5.2 only. Even RHEL6 ships
with Lua 5.1, so it makes not sense to maintain support for Lua 5.0.

Change-Id: I34a8084c7fba19d631b90ce5d5a28198be6a7850
Reviewed-on: https://code.wireshark.org/review/29448
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07 04:02:36 +00:00
Pascal Quantin 40d180ec6d Lua: add include/lua-5.1 and include/lua-5.2 to CMake path suffixes
Bug: 14983
Change-Id: I8be206ace7f61c62e2e42bc53841067ec39e3a0a
Reviewed-on: https://code.wireshark.org/review/28726
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-16 17:39:57 +00:00
Graham Bloice bab9abfb7d CMake: Clean up Windows build
Remove options that aren't supported on Windows
Don't use pkgconfig on Windows

Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68
Reviewed-on: https://code.wireshark.org/review/24481
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 20:58:31 +00:00
Peter Wu 67ad1de0d0 FindLUA.cmake: reject version 5.3
Lua 5.3 could still be used when located at /usr/include/lua.h. Detect
and reject it in that case.

Rename LUA_VERSION to LUA_VERSION_NUM to avoid a conflict with
pkg-config (which uses a different version format). Ensure that the
regex matches a number only.

Bug: 11706
Change-Id: Idb7e3e1a8d9c6e4ab9ab1816c4dedea7de9dde8e
Reviewed-on: https://code.wireshark.org/review/11836
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-11-15 20:15:41 +00:00
Jeff Morriss 032ad5a7aa Update how we search for Lua with pkg-config.
First, search for packages with the version number without the period (bug
11219).

Second, don't look for Lua 5.3 because we don't work with it.  If what we find
(without pkg-config's help) is Lua 5.3, disable Lua support (bug 10881).

Cmake support by Peter Wu (originally Ie73e5b53640f10432881a9671c0a605f7f027ed8):
Note the check for "lua<=5.2.99" instead of "lua<5.3" since cmake does not
support the latter syntax. Tested with lua5.2, lua5.1 and lua (5.3) installed.

Bug: 11219
Ping-Bug: 10881
Change-Id: I382d07ca00eafc6111cd4e9faa2b66f6b8f95b6e
Reviewed-on: https://code.wireshark.org/review/8783
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08 08:13:09 +00:00
Graham Bloice 4e9ff477d9 CMake minor updates
Fix up generation messages for Windows build
Remove some superfluous Lua messages

Change-Id: I405e7edfcb043fc842fe4f0cca8d23d5755527f9
Reviewed-on: https://code.wireshark.org/review/8138
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-04-20 16:46:38 +00:00
Gerald Combs a988253fef CMake: Copy libwireshark dependent DLLs to the target directory.
Add a "copy_cli_dlls" target which copies the DLLs required to run our
command line programs to the run directory.

Fix the spelling of "KERBEROS". Start filling in variables so that we
can populate config.nsh.

Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521
Reviewed-on: https://code.wireshark.org/review/6513
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-13 19:25:10 +00:00
Gerald Combs f0bd31171c CMake: Don't cache LUA_LIBRARIES.
Don't cache the LUA_LIBRARIES variable. This matches the behavior of the
other library modules and fixes a compilation problem on my machine
where /usr/local/lib/liblua.dylib wasn't showing up in the various
build.make and link.txt files.

Change-Id: Ib75ef303f2e67b266a246621718d0ea2ab885dca
Reviewed-on: https://code.wireshark.org/review/5603
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-04 00:16:41 +00:00
Peter Wu 9506909223 cmake: use pkg-config for resolving dependencies
Changes:
 * Fix glib2 search path.
 * Add pkg-config support to CAP, GEOIP, GNUTLS, LUA, PortAudio (API
   19), zlib, kerberos.
 * Add pkg-config support to libnl3, libnl2 and libnl1 (but tested only
   with libnl3).

This makes it easier to do 32-bit builds on 64-bit hosts by just setting
`PKG_CONFIG_LIBDIR`. Due to how HINTS work, it is still fragile though:
missing 32-bit libraries will cause a fallback to 64-bit libraries.

A future patch could check for `<PREFIX>_FOUND` and remove the manual
`find_path` and `find_library` hackery since the paths are already
known.

Change-Id: Ieb4fb74695c96afb1a4c70168e84abb1fa4612c6
Reviewed-on: https://code.wireshark.org/review/4292
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-01 08:14:34 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Jörg Mayer d456079b7e Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
  Document how to (one day) run on Windows
- CMakeLists.txt
  Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
  New: Creates HINTS for finding includes and libraries
  inside the Wireshark support library installation.
- FindXXX.cmake
  Make use of HINTS generated by FindWSWinLibs.cmake

This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.

svn path=/trunk/; revision=52194
2013-09-23 21:45:55 +00:00
Jörg Mayer 6f872b0e17 Attempted fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8619
When there are several versions of lua installed, try to pick the library
version that matches the include file(s) we selected.

svn path=/trunk/; revision=49164
2013-05-04 23:06:15 +00:00
Jörg Mayer 10bd5631e4 Print the version of the include files that will be used.
svn path=/trunk/; revision=49106
2013-05-01 10:34:15 +00:00
Evan Huus 5e4108c347 Have CMake also consider the include path "lua5.2" (note the dot),
since that is where it can be found on recent Ubuntus, and without it
you get a mix of 5.1 includes and 5.2 libraries, which breaks the build.

svn path=/trunk/; revision=44669
2012-08-25 19:12:03 +00:00
Jörg Mayer f41c0b67d1 Try to detect Lua 5.2 as well
svn path=/trunk/; revision=43307
2012-06-17 12:08:42 +00:00
Jörg Mayer 878d7246b8 - Add $Id: $ tags
- FindHtmlViewer.cmake: Try to add reading the name of the
  html viewer from the HTML_VIEWER environment variable (untested)

svn path=/trunk/; revision=30104
2009-09-23 19:40:25 +00:00
Jörg Mayer ca6b1e2b21 CMAKE: Get most of of missing *build* pieces into place
svn path=/trunk/; revision=29819
2009-09-09 13:20:33 +00:00