osm2pgsql: handle multiple local Luas (#13990)
Fixes https://github.com/Homebrew/homebrew-core/pull/13977.
This commit is contained in:
parent
286867c991
commit
16372af6df
1 changed files with 10 additions and 1 deletions
|
@ -27,7 +27,16 @@ class Osm2pgsql < Formula
|
|||
|
||||
def install
|
||||
args = std_cmake_args
|
||||
args << "-DWITH_LUA=OFF" if build.without? "lua"
|
||||
|
||||
if build.with? "lua"
|
||||
# This is essentially a CMake disrespects superenv problem
|
||||
# rather than an upstream issue to handle.
|
||||
lua_version = Formula["lua"].version.to_s.match(/\d\.\d/)
|
||||
inreplace "cmake/FindLua.cmake", "LUA_VERSIONS5 5.3 5.2 5.1 5.0",
|
||||
"LUA_VERSIONS5 #{lua_version}"
|
||||
else
|
||||
args << "-DWITH_LUA=OFF"
|
||||
end
|
||||
|
||||
mkdir "build" do
|
||||
system "cmake", "..", *args
|
||||
|
|
Loading…
Reference in a new issue