Ticket #39773: patch-nginx-Portfile.upload--sans-upload_progress-fiddling.diff

File patch-nginx-Portfile.upload--sans-upload_progress-fiddling.diff, 3.0 KB (added by anthropologoi@…, 11 years ago)
  • Portfile

    old new  
    55
    66name                nginx
    77version             1.4.1
    8 revision            1
     8revision            5
    99categories          www mail
    1010platforms           darwin
    1111license             BSD
     
    4545set nginx_pidfile   ${nginx_rundir}/${name}.pid
    4646set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params}
    4747
     48# portfile-scoped vars for variant routines to re-def and use in port-stages (post-extract, pre-patch, etc)
     49set nginx_upload_mod_dirname   ""
     50
     51
     52# for aforementioned re-defs of portfile-scoped vars in variant routines
     53proc nginx_set_portfile_var {var_name new_value} {
     54    upvar   $var_name   portfile_var
     55    set portfile_var   $new_value
     56}
     57
     58
     59
    4860configure.args-append \
    4961                    --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \
    5062                    --with-ld-opt=\"${configure.ldflags}\" \
     
    6072                    --with-ipv6
    6173
    6274# remove --disable-dependency-tracking
    63 configure.universal_args
     75configure.universal_args-delete   --disable-dependency-tracking
    6476
    6577build.target        build
    6678destroot.keepdirs   ${destroot}${nginx_logdir} \
     
    7789    file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx
    7890}
    7991
     92
    8093startupitem.create      yes
    8194startupitem.pidfile     auto ${nginx_pidfile}
    8295startupitem.executable  ${prefix}/sbin/nginx
    8396
     97
    8498notes                   \
    8599    "A sample nginx configuration file has been installed in
    86100    ${nginx_confdir}/nginx.conf.default.\nCopy the configuration to
    87101    ${nginx_confdir}/nginx.conf\nand adjust it to your needs before starting\
    88102    nginx."
    89103
     104
     105
    90106variant addition description {Append text to pages} {
    91107    configure.args-append   --with-http_addition_module
    92108}
     
    177193                            rmd160  5734af837be3fe8ec444a7e5e7f6707118594098 \
    178194                            sha256  b1c26abe0427180602e257627b4ed21848c93cc20cefc33af084983767d65805
    179195    configure.args-append   --add-module=${workpath}/${upload_distname}
     196
     197    # v2.2.0 release references members of ngx_http_request_body_t that were renamed in later nginx versions.
     198    # Patch nginx_upload_module.c with fixed version from https://github.com/TimothyKlim/nginx-upload-module.
     199    patchfiles-append       patch-nginx_upload_module.tmp-ngx_http_upload_module.c.diff
     200
     201
     202    nginx_set_portfile_var   nginx_upload_mod_dirname    "${upload_distname}"
     203
     204    # patch routine balks on file names with "../", but rel-paths in patchfiles start from $worksrcpath
     205    pre-patch {
     206        ln -s   "${workpath}/${nginx_upload_mod_dirname}" "${worksrcpath}/nginx_upload_module.tmp"
     207    }
     208    post-patch {
     209        file delete   "${worksrcpath}/nginx_upload_module.tmp"
     210    }
    180211}
    181212
    182213variant upload_progress description {Enable Brice Figureau's upload progress module (https://github.com/masterzen/nginx-upload-progress-module)} {