From fb097b3a8ab94b1de76354a6f9f70db4603d9b30 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 3 Sep 2009 07:29:47 -0400 Subject: [PATCH] nginx: enhanced .conf to enable/disable based on pkginstalled --- network/nginx/nginx.conf | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/network/nginx/nginx.conf b/network/nginx/nginx.conf index f37c345ec..8c88fe6ec 100644 --- a/network/nginx/nginx.conf +++ b/network/nginx/nginx.conf @@ -41,12 +41,21 @@ logdir="$localstatedir/log/$pkg" var_append confopt ' ' "--http-log-path=$logdir/access.log" var_append confopt ' ' "--error-log-path=$logdir/error.log" -# ssl support -if pkginstalled openssl; then - var_append confopt ' ' "--with-http_ssl_module" -fi +# --with- with dependency +for x in openssl:ssl libgd:image_filter zlib:gzip_static; do + if pkginstalled "${x%:*}"; then + var_append confopt ' ' "--with-http_${x#*:}_module" + fi +done + +# --without- because of dependency +for x in pcre:http_rewrite_module openssl:http-cache; do + if ! pkginstalled "${x%:*}"; then + var_append confopt ' ' "--without-${x#*:}" + fi +done -# add some optional modules not built by default -for x in stub_status flv realip gzip_static image_filter; do +# --with- without dependency +for x in stub_status flv realip; do var_append confopt ' ' "--with-http_${x}_module" done