diff --git a/Formula/nginx-full.rb b/Formula/nginx-full.rb index 363fd50..4db8546 100644 --- a/Formula/nginx-full.rb +++ b/Formula/nginx-full.rb @@ -294,13 +294,9 @@ def install # Install LuaJit if build.with?("lua-module") - if(File.exist?('/usr/local/bin/brew')) - luajit_path = `/usr/local/bin/brew --prefix luajit`.chomp - else - luajit_path = `/opt/homebrew/bin/brew --prefix luajit`.chomp - end - ENV["LUAJIT_INC"] = "#{luajit_path}/include/luajit-2.1" - ENV["LUAJIT_LIB"] = "#{luajit_path}/lib" + luajit_version = Formula["pcre"].pkg_version.to_s.sub(/-\d+\.\d+$/, "") + ENV["LUAJIT_INC"] = "#{Formula["pcre"].opt_include}/luajit-#{luajit_version}" + ENV["LUAJIT_LIB"] = "#{Formula["pcre"].opt_lib}" end if build.head?