[92300] trunk/dports/www/nginx

cal at macports.org cal at macports.org
Tue Apr 24 12:35:58 PDT 2012


Revision: 92300
          https://trac.macports.org/changeset/92300
Author:   cal at macports.org
Date:     2012-04-24 12:35:57 -0700 (Tue, 24 Apr 2012)
Log Message:
-----------
nginx: Make sure all config files are moved to $name.example, fix build with +perl5, #31004, #34188

Modified Paths:
--------------
    trunk/dports/www/nginx/Portfile

Added Paths:
-----------
    trunk/dports/www/nginx/files/patch-perl_bool.diff

Modified: trunk/dports/www/nginx/Portfile
===================================================================
--- trunk/dports/www/nginx/Portfile	2012-04-24 17:48:58 UTC (rev 92299)
+++ trunk/dports/www/nginx/Portfile	2012-04-24 19:35:57 UTC (rev 92300)
@@ -5,6 +5,7 @@
 
 name                nginx
 version             1.2.0
+revision            1
 categories          www mail
 platforms           darwin
 license             BSD
@@ -41,6 +42,7 @@
 set nginx_logdir    ${prefix}/var/log/${name}
 set nginx_rundir    ${prefix}/var/run/${name}
 set nginx_pidfile   ${nginx_rundir}/${name}.pid
+set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params}
 
 configure.args-append \
                     --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \
@@ -63,9 +65,15 @@
 destroot.keepdirs   ${destroot}${nginx_logdir} \
                     ${destroot}${nginx_rundir}
 
-set nginx_conf ${prefix}/etc/${name}/${name}.conf
 post-destroot {
-    delete ${destroot}${nginx_conf}
+    foreach conf ${nginx_all_confs} {
+        set conf_target "${destroot}${nginx_confdir}/${conf}.example"
+        if {![file exists "${conf_target}"]} {
+            file rename "${destroot}${nginx_confdir}/${conf}" "${destroot}${nginx_confdir}/${conf}.example"
+        } else {
+            file delete "${destroot}${nginx_confdir}/${conf}"
+        }
+    }
     file mkdir ${destroot}${prefix}/share/nginx
     file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx
 }
@@ -122,6 +130,7 @@
 
 variant perl5 description {Add perl support to the server directly within nginx and call perl via SSI} {
     depends_run-append      path:bin/perl:perl5
+    patchfiles-append       patch-perl_bool.diff
     configure.args-append   --with-http_perl_module \
                             --with-perl=${prefix}/bin/perl
 }

Added: trunk/dports/www/nginx/files/patch-perl_bool.diff
===================================================================
--- trunk/dports/www/nginx/files/patch-perl_bool.diff	                        (rev 0)
+++ trunk/dports/www/nginx/files/patch-perl_bool.diff	2012-04-24 19:35:57 UTC (rev 92300)
@@ -0,0 +1,15 @@
+Index: src/os/unix/ngx_atomic.h
+===================================================================
+--- src/os/unix/ngx_atomic.h	(revision 4608)
++++ src/os/unix/ngx_atomic.h	(working copy)
+@@ -47,10 +47,6 @@
+ 
+ #include <libkern/OSAtomic.h>
+ 
+-/* "bool" conflicts with perl's CORE/handy.h */
+-#undef bool
+-
+-
+ #define NGX_HAVE_ATOMIC_OPS  1
+ 
+ #if (NGX_PTR_SIZE == 8)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120424/411d16be/attachment.html>


More information about the macports-changes mailing list