Skip to content

Commit

Permalink
universal prefix selection #407
Browse files Browse the repository at this point in the history
  • Loading branch information
denji committed Feb 22, 2023
1 parent eb3a903 commit 2fd59ff
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Formula/nginx-full.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class NginxFull < Formula
depends_on "libzip" if build.with?("unzip")
depends_on "pcre"
depends_on "valgrind" if build.with?("no-pool-nginx")
depends_on "luajit" if build.with?("lua-module")
depends_on "gd" => :optional
depends_on "geoip" => :optional
depends_on "gperftools" => :optional
Expand Down Expand Up @@ -294,13 +295,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["luajit"].pkg_version.to_s.sub(/^(\d+\.\d+).*/, '\1')
ENV["LUAJIT_INC"] = "#{Formula["luajit"].opt_include}/luajit-#{luajit_version}"
ENV["LUAJIT_LIB"] = "#{Formula["luajit"].opt_lib}"
end

if build.head?
Expand Down

0 comments on commit 2fd59ff

Please sign in to comment.