Homebrew on Apple M1 uses the prefix /opt/homebrew. This PR ensures LUA_PATH and LUA_CPATH are set appropriately in such case. (On Intel, homebrew uses /usr/local as its default prefix; as LuaJIT includes /usr/local/share/lua/5.1/ in its default list of Lua paths, the formula worked without the need for a patch.)
Additionally, the default Kong prefix is set to HOMEBREW_PREFIX rather than being hardcoded to /usr/local/opt/kong/ (which isn't writeable by Brew on M1).
Summary
Homebrew on Apple M1 uses the prefix
/opt/homebrew
. This PR ensures LUA_PATH and LUA_CPATH are set appropriately in such case. (On Intel, homebrew uses/usr/local
as its default prefix; as LuaJIT includes/usr/local/share/lua/5.1/
in its default list of Lua paths, the formula worked without the need for a patch.)Additionally, the default Kong prefix is set to
HOMEBREW_PREFIX
rather than being hardcoded to/usr/local/opt/kong/
(which isn't writeable by Brew on M1).Fixes Kong/kong#7705.