Skip to content

Commit

Permalink
fix brew doctor 'no-pool'
Browse files Browse the repository at this point in the history
  • Loading branch information
denji committed Jan 26, 2014
1 parent fb5a58c commit 1d0af48
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion extended-status-nginx-module.rb
Expand Up @@ -6,8 +6,8 @@ class ExtendedStatusNginxModule < Formula
sha1 '884f39921be512a4939be93bb0a5b64bf68fff06'

def patches
"https://raw.github.com/denji/ngx_http_extended_status_module/master/extended_status-1.4.2.patch" if build.stable?
"https://raw.github.com/denji/ngx_http_extended_status_module/master/extended_status-1.5.2.patch" if build.devel?
"https://raw.github.com/denji/ngx_http_extended_status_module/master/extended_status-1.4.2.patch" unless build.devel?
end

if build.head?
Expand Down
19 changes: 16 additions & 3 deletions nginx-full.rb
Expand Up @@ -32,7 +32,6 @@ module NginxConstants
'auto-keepalive' => 'Compile with support for Auto Disable KeepAlive module',
'ustats' => 'Compile with support for Upstream Statistics (HAProxy style) module',
'extended-status' => 'Compile with support for Extended Status module',
'no-pool-nginx' => 'Patch disable nginx pool machanism & valgrind memcheck to detect memory issues',
'upstream-hash' => 'Compile with support for Upstream Hash Module',
'consistent-hash' => 'Compile with support for Consistent Hash Upstream module',
'healthcheck' => 'Compile with support for Healthcheck Module',
Expand Down Expand Up @@ -74,6 +73,7 @@ class NginxFull < Formula
depends_on 'libxml2' if build.with? 'xslt'
depends_on 'libxslt' if build.with? 'xslt'
depends_on 'gd' if build.with? 'image-filter'
depends_on "valgrind" if build.include? 'without-pool-nginx'

# register third party flags
THIRD_PARTY.each { | name, desc |
Expand All @@ -88,6 +88,7 @@ def options_array
["with-#{name}-module", nil, desc]
} + [
['with-passenger', nil, 'Compile with support for Phusion Passenger module'],
['without-pool-nginx', nil, 'Disable nginx-pool, valgrind detect memory issues'],
# Internal modules
['with-webdav', 'with-http_dav_module', 'Compile with support for WebDAV module'],
['with-debug', 'with-debug', 'Compile with support for debug log'],
Expand Down Expand Up @@ -123,9 +124,21 @@ def options
options
end

# Changes default port to 8080
def patches
DATA
# Changes default port to 8080
patches = {
:p1 => DATA,
}

# replaces nginx's pool machanism
# with plain malloc & free to help tools like valgrind's memcheck to detect
# memory issues more reliably.
if build.include? 'without-pool-nginx'
patches[:p1] = 'https://raw.github.com/shrimp/no-pool-nginx/master/nginx-1.4.3-no_pool.patch' if build.stable?
patches[:p1] = 'https://raw.github.com/shrimp/no-pool-nginx/master/nginx-1.5.8-no_pool.patch' if build.devel?
end

patches
end

def passenger_config_args
Expand Down
15 changes: 0 additions & 15 deletions no-pool-nginx.rb

This file was deleted.

0 comments on commit 1d0af48

Please sign in to comment.