From 84fb02d14f63eed5dcc542055a3d03fab2c51d88 Mon Sep 17 00:00:00 2001
From: Robson R S Peixoto <robsonpeixoto@gmail.com>
Date: Tue, 24 Apr 2012 03:05:14 -0300
Subject: [PATCH] Add passenger, all official modules, bugfix.
- Added passenger. Based on
https://trac.macports.org/ticket/33609
- Add Perl patch to compile with perl 5.12 and 5.14
http://www.ruby-forum.com/topic/2542637#1021400
- Don't replace configuration files
https://trac.macports.org/ticket/31004
- Reorganize the variants using this [2] order
[2] http://wiki.nginx.org/Modules
- Added all offial modules. Used
https://trac.macports.org/ticket/33050
---
dports/www/nginx/Portfile | 77 ++++++++++++++++++---------
dports/www/nginx/files/patch-perl_bool.diff | 15 ++++++
2 files changed, 66 insertions(+), 26 deletions(-)
create mode 100644 dports/www/nginx/files/patch-perl_bool.diff
diff --git a/dports/www/nginx/Portfile b/dports/www/nginx/Portfile
index e46aca4..b60c51b 100644
a
|
b
|
|
1 | | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
| 1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4 |
2 | 2 | # $Id$ |
3 | 3 | |
4 | 4 | PortSystem 1.0 |
… |
… |
homepage http://nginx.org/ |
24 | 24 | master_sites http://nginx.org/download:nginx \ |
25 | 25 | http://www.grid.net.ru/nginx/download/:upload_module \ |
26 | 26 | googlecode:mod-zip:zip_module \ |
27 | | http://people.freebsd.org/~osa/:redis_module |
| 27 | http://people.freebsd.org/~osa/:redis_module \ |
| 28 | http://files.rubyforge.vm.bytemark.co.uk/passenger/:passenger_module |
28 | 29 | |
29 | 30 | distfiles ${name}-${version}${extract.suffix}:nginx |
30 | 31 | checksums ${name}-${version}${extract.suffix} \ |
31 | 32 | rmd160 b2dc5e6cd7f436e56d1bab7cfcde64955f38c11f \ |
32 | | sha256 ac06b3aa55bf4f634b7e779272685536607183e8669809ce497151e47e518f2d \ |
| 33 | sha256 ac06b3aa55bf4f634b7e779272685536607183e8669809ce497151e47e518f2d |
33 | 34 | |
34 | 35 | depends_lib port:pcre \ |
35 | 36 | port:zlib |
… |
… |
set nginx_confdir ${prefix}/etc/${name} |
41 | 42 | set nginx_logdir ${prefix}/var/log/${name} |
42 | 43 | set nginx_rundir ${prefix}/var/run/${name} |
43 | 44 | set nginx_pidfile ${nginx_rundir}/${name}.pid |
| 45 | set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params} |
44 | 46 | |
45 | 47 | configure.args-append \ |
46 | 48 | --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \ |
… |
… |
destroot.keepdirs ${destroot}${nginx_logdir} \ |
65 | 67 | |
66 | 68 | set nginx_conf ${prefix}/etc/${name}/${name}.conf |
67 | 69 | post-destroot { |
68 | | delete ${destroot}${nginx_conf} |
| 70 | foreach del ${nginx_all_confs} { |
| 71 | delete ${destroot}${nginx_confdir}/${del} |
| 72 | } |
69 | 73 | file mkdir ${destroot}${prefix}/share/nginx |
70 | 74 | file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx |
71 | 75 | } |
… |
… |
startupitem.create yes |
74 | 78 | startupitem.pidfile auto ${nginx_pidfile} |
75 | 79 | startupitem.executable ${prefix}/sbin/nginx |
76 | 80 | |
77 | | variant addition description {Append text to pages} { |
78 | | configure.args-append --with-http_addition_module |
| 81 | variant debug description {Enable debug mode} { |
| 82 | configure.args-append --with-debug |
79 | 83 | } |
80 | 84 | |
81 | | variant dav description {Add WebDAV support to server} { |
82 | | configure.args-append --with-http_dav_module |
| 85 | variant addition description {Append text to pages} { |
| 86 | configure.args-append --with-http_addition_module |
83 | 87 | } |
84 | 88 | |
85 | 89 | variant degradation description {Allow to return 204 or 444 code for some locations on low memory condition} { |
86 | 90 | configure.args-append --with-http_degradation_module |
87 | 91 | } |
88 | 92 | |
| 93 | variant perl5 description {Add perl support to the server directly within nginx and call perl via SSI} { |
| 94 | depends_run-append path:bin/perl:perl5 |
| 95 | patchfiles-append patch-perl_bool.diff |
| 96 | configure.args-append --with-http_perl_module \ |
| 97 | --with-perl=${prefix}/bin/perl |
| 98 | } |
| 99 | |
89 | 100 | variant flv description {Add FLV (Flash Video) streaming support to server} { |
90 | 101 | configure.args-append --with-http_flv_module |
91 | 102 | } |
… |
… |
variant image_filter description {Transform images with libgd} { |
109 | 120 | depends_lib-append port:gd2 |
110 | 121 | } |
111 | 122 | |
112 | | variant mail description {Add IMAP4/POP3 mail proxy support} { |
113 | | configure.args-append --with-mail |
114 | | if {[variant_isset ssl]} { |
115 | | configure.args-append --with-mail_ssl_module |
116 | | } |
117 | | } |
118 | | |
119 | 123 | variant mp4 description {Enables mp4 streaming with seeking ability} { |
120 | 124 | configure.args-append --with-http_mp4_module |
121 | 125 | } |
122 | 126 | |
123 | | variant perl5 description {Add perl support to the server directly within nginx and call perl via SSI} { |
124 | | depends_run-append path:bin/perl:perl5 |
125 | | configure.args-append --with-http_perl_module \ |
126 | | --with-perl=${prefix}/bin/perl |
127 | | } |
128 | | |
129 | 127 | variant random_index description {Randomize directory indexes} { |
130 | 128 | configure.args-append --with-http_random_index_module |
131 | 129 | } |
… |
… |
variant substitution description {Replace text in pages} { |
151 | 149 | configure.args-append --with-http_sub_module |
152 | 150 | } |
153 | 151 | |
154 | | variant upload description {Enable Valery Kholodkov's upload module (http://grid.net.ru/nginx/upload.en.html)} { |
| 152 | variant dav description {Add WebDAV support to server} { |
| 153 | configure.args-append --with-http_dav_module |
| 154 | } |
| 155 | |
| 156 | variant xslt description { Post-process pages with XSLT} { |
| 157 | configure.args-append --with-http_xslt_module |
| 158 | } |
| 159 | |
| 160 | variant mail description {Add IMAP4/POP3 mail proxy support} { |
| 161 | configure.args-append --with-mail |
| 162 | if {[variant_isset ssl]} { |
| 163 | configure.args-append --with-mail_ssl_module |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | variant passenger description {Enable Nginx passenger module} { |
| 168 | set passenger_filename passenger |
| 169 | set passenger_version 3.0.12 |
| 170 | set passenger_distname ${passenger_filename}-${passenger_version} |
| 171 | depends_lib-append port:rb-rubygems |
| 172 | |
| 173 | distfiles-append ${passenger_distname}.tar.gz:passenger_module |
| 174 | checksums-append ${passenger_distname}.tar.gz \ |
| 175 | md5 fedcf948a46b76e00ddd25527dac4b6d \ |
| 176 | sha1 86020b361477d3fc83267352a3c2f5b3c79604d4 \ |
| 177 | rmd160 ef2c59456ffd629d8b366edc14ba5638da1f9d13 |
| 178 | |
| 179 | configure.args-append --add-module=${workpath}/${passenger_distname}/ext/nginx |
| 180 | } |
| 181 | |
| 182 | variant upload description {Enable Valery Kholodkov's upload module\ |
| 183 | (http://grid.net.ru/nginx/upload.en.html)} { |
155 | 184 | set upload_filename nginx_upload_module |
156 | 185 | set upload_version 2.2.0 |
157 | 186 | set upload_distname ${upload_filename}-${upload_version} |
… |
… |
variant upload description {Enable Valery Kholodkov's upload module (http://grid |
162 | 191 | configure.args-append --add-module=${workpath}/${upload_distname} |
163 | 192 | } |
164 | 193 | |
165 | | variant xslt description {Post-process pages with XSLT} { |
166 | | configure.args-append --with-http_xslt_module |
167 | | } |
168 | | |
169 | 194 | variant zip description {Enable Ngx zip download module \ |
170 | 195 | (http://code.google.com/p/mod-zip/)} { |
171 | 196 | |
diff --git a/dports/www/nginx/files/patch-perl_bool.diff b/dports/www/nginx/files/patch-perl_bool.diff
new file mode 100644
index 0000000..4efebc4
-
|
+
|
|
| 1 | Index: src/os/unix/ngx_atomic.h |
| 2 | =================================================================== |
| 3 | --- src/os/unix/ngx_atomic.h (revision 4608) |
| 4 | +++ src/os/unix/ngx_atomic.h (working copy) |
| 5 | @@ -47,10 +47,6 @@ |
| 6 | |
| 7 | #include <libkern/OSAtomic.h> |
| 8 | |
| 9 | -/* "bool" conflicts with perl's CORE/handy.h */ |
| 10 | -#undef bool |
| 11 | - |
| 12 | - |
| 13 | #define NGX_HAVE_ATOMIC_OPS 1 |
| 14 | |
| 15 | #if (NGX_PTR_SIZE == 8) |