Ticket #39773: patch-nginx-Portfile.upload.diff
File patch-nginx-Portfile.upload.diff, 4.0 KB (added by anthropologoi@…, 11 years ago) |
---|
-
Portfile
old new 5 5 6 6 name nginx 7 7 version 1.4.1 8 revision 18 revision 5 9 9 categories www mail 10 10 platforms darwin 11 11 license BSD … … 45 45 set nginx_pidfile ${nginx_rundir}/${name}.pid 46 46 set nginx_all_confs {fastcgi.conf fastcgi_params mime.types nginx.conf scgi_params uwsgi_params} 47 47 48 # portfile-scoped vars for variant routines to re-def and use in port-stages (post-extract, pre-patch, etc) 49 set nginx_upload_mod_dirname "" 50 set nginx_upload_progress_mod_dirname "" 51 52 53 # for aforementioned re-defs of portfile-scoped vars in variant routines 54 proc nginx_set_portfile_var {var_name new_value} { 55 upvar $var_name portfile_var 56 set portfile_var $new_value 57 } 58 59 60 48 61 configure.args-append \ 49 62 --with-cc-opt=\"${configure.cppflags} ${configure.cflags}\" \ 50 63 --with-ld-opt=\"${configure.ldflags}\" \ … … 60 73 --with-ipv6 61 74 62 75 # remove --disable-dependency-tracking 63 configure.universal_args 76 configure.universal_args-delete --disable-dependency-tracking 64 77 65 78 build.target build 66 79 destroot.keepdirs ${destroot}${nginx_logdir} \ … … 77 90 file rename ${destroot}${prefix}/html ${destroot}${prefix}/share/nginx 78 91 } 79 92 93 80 94 startupitem.create yes 81 95 startupitem.pidfile auto ${nginx_pidfile} 82 96 startupitem.executable ${prefix}/sbin/nginx 83 97 98 84 99 notes \ 85 100 "A sample nginx configuration file has been installed in 86 101 ${nginx_confdir}/nginx.conf.default.\nCopy the configuration to 87 102 ${nginx_confdir}/nginx.conf\nand adjust it to your needs before starting\ 88 103 nginx." 89 104 105 106 90 107 variant addition description {Append text to pages} { 91 108 configure.args-append --with-http_addition_module 92 109 } … … 177 194 rmd160 5734af837be3fe8ec444a7e5e7f6707118594098 \ 178 195 sha256 b1c26abe0427180602e257627b4ed21848c93cc20cefc33af084983767d65805 179 196 configure.args-append --add-module=${workpath}/${upload_distname} 197 198 # v2.2.0 release references members of ngx_http_request_body_t that were renamed in later nginx versions. 199 # Patch nginx_upload_module.c with fixed version from https://github.com/TimothyKlim/nginx-upload-module. 200 patchfiles-append patch-nginx_upload_module.tmp-ngx_http_upload_module.c.diff 201 202 203 nginx_set_portfile_var nginx_upload_mod_dirname "${upload_distname}" 204 205 # patch routine balks on file names with "../", but rel-paths in patchfiles start from $worksrcpath 206 pre-patch { 207 ln -s "${workpath}/${nginx_upload_mod_dirname}" "${worksrcpath}/nginx_upload_module.tmp" 208 } 209 post-patch { 210 file delete "${worksrcpath}/nginx_upload_module.tmp" 211 } 180 212 } 181 213 182 214 variant upload_progress description {Enable Brice Figureau's upload progress module (https://github.com/masterzen/nginx-upload-progress-module)} { 183 215 set uploadprg_filename nginx_uploadprogress_module 184 216 set uploadprg_version 0.9.0 185 217 set uploadprg_distname ${uploadprg_filename}-${uploadprg_version} 218 186 219 distfiles-append ${uploadprg_distname}.tar.gz:uploadprogress_module 187 post-extract {188 move [glob ${workpath}/masterzen-nginx-upload-progress-module-a788dea] ${workpath}/nginx_uploadprogress_module-0.9.0189 }190 220 checksums-append ${uploadprg_distname}.tar.gz \ 191 221 rmd160 10ff91748a06afd81abb9fdb203f164ea369463a \ 192 222 sha256 3fb903dab595cf6656fa0fc5743a48daffbba2f6b5c554836be630800eaad4e2 193 223 configure.args-append --add-module=${workpath}/${uploadprg_distname} 224 225 226 nginx_set_portfile_var nginx_upload_progress_mod_dirname "${uploadprg_distname}" 227 228 post-extract { 229 move [glob -directory "${workpath}" masterzen-nginx-upload-progress-module*] \ 230 "${workpath}/${nginx_upload_progress_mod_dirname}" 231 } 194 232 } 195 233 196 234 variant xslt description {Post-process pages with XSLT} {