Ticket #34188: 0001-Add-passenger-all-official-modules-bugfix.patch

File 0001-Add-passenger-all-official-modules-bugfix.patch, 7.7 KB (added by robsonpeixoto@…, 12 years ago)
  • dports/www/nginx/Portfile

    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
    22# $Id$
    33
    44PortSystem          1.0
    homepage http://nginx.org/ 
    2424master_sites        http://nginx.org/download:nginx \
    2525                    http://www.grid.net.ru/nginx/download/:upload_module \
    2626                    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
    2829
    2930distfiles           ${name}-${version}${extract.suffix}:nginx
    3031checksums           ${name}-${version}${extract.suffix} \
    3132                    rmd160  b2dc5e6cd7f436e56d1bab7cfcde64955f38c11f \
    32                     sha256  ac06b3aa55bf4f634b7e779272685536607183e8669809ce497151e47e518f2d \
     33                    sha256  ac06b3aa55bf4f634b7e779272685536607183e8669809ce497151e47e518f2d
    3334
    3435depends_lib         port:pcre \
    3536                    port:zlib
    set nginx_confdir ${prefix}/etc/${name} 
    4142set nginx_logdir    ${prefix}/var/log/${name}
    4243set nginx_rundir    ${prefix}/var/run/${name}
    4344set nginx_pidfile   ${nginx_rundir}/${name}.pid
     45set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params}
    4446
    4547configure.args-append \
    4648                    --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \
    destroot.keepdirs ${destroot}${nginx_logdir} \ 
    6567
    6668set nginx_conf ${prefix}/etc/${name}/${name}.conf
    6769post-destroot {
    68     delete ${destroot}${nginx_conf}
     70    foreach del ${nginx_all_confs} {
     71        delete ${destroot}${nginx_confdir}/${del}
     72    }
    6973    file mkdir ${destroot}${prefix}/share/nginx
    7074    file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx
    7175}
    startupitem.create yes 
    7478startupitem.pidfile     auto ${nginx_pidfile}
    7579startupitem.executable  ${prefix}/sbin/nginx
    7680
    77 variant addition description {Append text to pages} {
    78     configure.args-append   --with-http_addition_module
     81variant debug description {Enable debug mode} {
     82    configure.args-append   --with-debug
    7983}
    8084
    81 variant dav description {Add WebDAV support to server} {
    82     configure.args-append   --with-http_dav_module
     85variant addition description {Append text to pages} {
     86    configure.args-append   --with-http_addition_module
    8387}
    8488
    8589variant degradation description {Allow to return 204 or 444 code for some locations on low memory condition} {
    8690    configure.args-append   --with-http_degradation_module
    8791}
    8892
     93variant 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
    89100variant flv description {Add FLV (Flash Video) streaming support to server} {
    90101    configure.args-append   --with-http_flv_module
    91102}
    variant image_filter description {Transform images with libgd} { 
    109120    depends_lib-append      port:gd2
    110121}
    111122
    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 
    119123variant mp4 description {Enables mp4 streaming with seeking ability} {
    120124    configure.args-append   --with-http_mp4_module
    121125}
    122126
    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 
    129127variant random_index description {Randomize directory indexes} {
    130128    configure.args-append   --with-http_random_index_module
    131129}
    variant substitution description {Replace text in pages} { 
    151149    configure.args-append   --with-http_sub_module
    152150}
    153151
    154 variant upload description {Enable Valery Kholodkov's upload module (http://grid.net.ru/nginx/upload.en.html)} {
     152variant dav description {Add WebDAV support to server} {
     153    configure.args-append   --with-http_dav_module
     154}
     155
     156variant xslt description { Post-process pages with XSLT} {
     157    configure.args-append   --with-http_xslt_module
     158}
     159
     160variant 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
     167variant 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
     182variant upload description {Enable Valery Kholodkov's upload module\
     183        (http://grid.net.ru/nginx/upload.en.html)} {
    155184    set upload_filename     nginx_upload_module
    156185    set upload_version      2.2.0
    157186    set upload_distname     ${upload_filename}-${upload_version}
    variant upload description {Enable Valery Kholodkov's upload module (http://grid 
    162191    configure.args-append   --add-module=${workpath}/${upload_distname}
    163192}
    164193
    165 variant xslt description {Post-process pages with XSLT} {
    166     configure.args-append   --with-http_xslt_module
    167 }
    168 
    169194variant zip description {Enable Ngx zip download module \
    170195        (http://code.google.com/p/mod-zip/)} {
    171196
  • new file dports/www/nginx/files/patch-perl_bool.diff

    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
    - +  
     1Index: 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)