LuaRocks bundles an outdated wget.exe for downloading packages on Windows. It is too old to support GitHub's TLS, so this patch will replace it with curl.
Tracking master subjects us to breakages (as happened when
luacheck-scm-1.rockspec got renamed to luacheck-dev-1.rockspec) and
makes older releases unbuildable when that happens.
LuaRocks 2.3 and onwards changed the /P option to no longer include the
version number which made newer releases of LuaRocks fail when compiling
on Windows.
https://github.com/mpeterv/luacheck/pull/81#issuecomment-261099606
> If you really want to use bleeding-edge version you should get the
> rockspec from master branch, not a fixed commit ...
> The correct way to install from a specific commit is cloning that
> commit and running "luarocks make" from project directory. The reason
> is that running "install" or "build" on an scm rockspec fetches
> sources from master but uses build description from the rockspec
> itself, which may be outdated.
Using /MT was causing issues when building luarocks, revert it, use the
dynammic runtime and generate release DLLs for the dependencies.
Some refactoring was required because for linking cmake looks for the
import libraries (.lib) but on runtime executables we need the .dll files
to be in the same folder.
The DLLs are placed in the bin/ folder in order for nvim.exe to run
during the build and tests. The install target installs the DLLs with
the nvim binary - uses GetPrerequisites to find runtime DLLs.
Some minor issues that required adjustments:
- [MSVC] FindMsgpack.cmake now looks for msgpack_import.lib instead of
msgpack.lib
- The lua-client fails to find libuv.lib, instead it looks for uv.lib,
added second copy of the file to the install command.
- [MSVC] CMAKE_BUILD_TYPE affects the output paths, default to Release.
Part of these changes are credited to @jasonwilliams200OK who fixed the
third-party recipes to consistently use the same build type.
Luv is a simple lua binding to libuv, which is now used by neovim lua client.
The bundled luv installation a bit different from other dependencies in that it
is installed two times:
- The "BuildLuv.cmake" script downloads and installs a static version of luv
using its normal cmake build script. This static version will be used later.
- Luv default rockspec is replaced with the alternate under the "rockspecs"
directory(the alternate rockspec plays nicer with neovim build system)
- The alternate rockspec is used to build/install the lua module and make it
available to lua scripts.
So far luacheck's rockspec specified only the git protocol. Hence people
behind firewalls/proxies, that block port 9814, had trouble fetching this
dependency via luarocks.
The latest commit updated the rockspec to use either git or https. Thus common
workarounds like this are not needed anymore:
git config --global url."https://".insteadOf git://
References #3769.
Introduce ALLOW_EXISTING_SRC_DIR option, turned off by default.
The Homebrew formula, which downloads and extracts the third-party
dependency sources before starting the build, would turn this option
ON.
This effectively reverts 585e5d32a3
The pinning was done at a time when `lua_cliargs` caused test failures,
so an older version which didn't was pinned. We're now using the latest
version (2.5-1), so the cause of those failures were presumably fixed.