This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Ngninx: correctly use homebrew installed version of PCRE

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...
1 parent cea872d commit b84845cd703fea9b2b87577be9c101a0e1fd810c @LoonyPandora LoonyPandora committed with jacknagel Apr 7, 2012
Showing with 2 additions and 25 deletions.
  1. +2 −25 Library/Formula/nginx.rb
View
@@ -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
@@ -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"]
@@ -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 @@

0 comments on commit b84845c

Please sign in to comment.