Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Ngninx: correctly use homebrew installed version of PCRE
Browse files Browse the repository at this point in the history
Fixes homebrew issue #11494 which was introduced in nginx 1.1.14.

Closes #11506.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
LoonyPandora authored and jacknagel committed Apr 7, 2012
1 parent cea872d commit b84845c
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions Library/Formula/nginx.rb
Expand Up @@ -15,7 +15,6 @@ class Nginx < Formula
skip_clean 'logs'

# Changes default port to 8080
# Tell configure to look for pcre in HOMEBREW_PREFIX
def patches
DATA
end
Expand Down Expand Up @@ -44,6 +43,8 @@ def install
args = ["--prefix=#{prefix}",
"--with-http_ssl_module",
"--with-pcre",
"--with-cc-opt='-I#{HOMEBREW_PREFIX}/include'",
"--with-ld-opt='-L#{HOMEBREW_PREFIX}/lib'",
"--conf-path=#{etc}/nginx/nginx.conf",
"--pid-path=#{var}/run/nginx.pid",
"--lock-path=#{var}/nginx/nginx.lock"]
Expand Down Expand Up @@ -107,30 +108,6 @@ def startup_plist
end

__END__
--- a/auto/lib/pcre/conf
+++ b/auto/lib/pcre/conf
@@ -155,6 +155,21 @@ else
. auto/feature
fi

+ if [ $ngx_found = no ]; then
+
+ # Homebrew
+ ngx_feature="PCRE library in HOMEBREW_PREFIX"
+ ngx_feature_path="HOMEBREW_PREFIX/include"
+
+ if [ $NGX_RPATH = YES ]; then
+ ngx_feature_libs="-RHOMEBREW_PREFIX/lib -LHOMEBREW_PREFIX/lib -lpcre"
+ else
+ ngx_feature_libs="-LHOMEBREW_PREFIX/lib -lpcre"
+ fi
+
+ . auto/feature
+ fi
+
if [ $ngx_found = yes ]; then
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -33,7 +33,7 @@
Expand Down

0 comments on commit b84845c

Please sign in to comment.