Ticket #39773: patch-nginx-Portfile.combined.diff
File patch-nginx-Portfile.combined.diff, 5.9 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 } … … 109 126 } 110 127 111 128 variant google_perftools description {Enable Google Performance Tools profiling for workers} { 112 configure.args-append --with-google_perftools_module113 129 depends_lib-append port:google-perftools 130 131 # If 'google_perftools' port doesn't find headers needed for the profiler lib, it just quietly skips it. 132 # Check if "-lprofiler" will fail -- if so, pre-empt configure-stage error with a more useful error msg. 133 if { [file exists "${prefix}/lib/libprofiler.dylib"] || 134 [file exists "${prefix}/lib/libprofiler.a"] 135 } { 136 configure.args-append --with-google_perftools_module 137 } \ 138 else { 139 ui_warn [ join [list \ 140 "On some OSX versions, the 'google_perftools' port is installed without library files " \ 141 "needed by the \"google_perftools\" variant ( libprofiler.dylib or libprofiler.a ). \n" \ 142 "Until the 'google_perftools' port is fixed, this variant is incompatible with these " \ 143 "OSX versions. \n\n" \ 144 "If the 'google_perftools' port HAS BEEN updated, running the command: \n" \ 145 " port -f upgrade --enforce-variants nginx +google_perftools \n" \ 146 "will indicate if this bug was fixed, based on whether it installs successfully and " \ 147 "DOES NOT display this message again. \n\n" \ 148 "Aborting 'nginx' port installation... " \ 149 ] "" ] 150 151 return -code error "Variant \"+google_perftools\" does not support current 'google_perftools' port." 152 } 114 153 } 115 154 116 155 variant gzip_static description {Avoids compressing the same file each time it is requested} { … … 177 216 rmd160 5734af837be3fe8ec444a7e5e7f6707118594098 \ 178 217 sha256 b1c26abe0427180602e257627b4ed21848c93cc20cefc33af084983767d65805 179 218 configure.args-append --add-module=${workpath}/${upload_distname} 219 220 # v2.2.0 release references members of ngx_http_request_body_t that were renamed in later nginx versions. 221 # Patch nginx_upload_module.c with fixed version from https://github.com/TimothyKlim/nginx-upload-module. 222 patchfiles-append patch-nginx_upload_module.tmp-ngx_http_upload_module.c.diff 223 224 225 nginx_set_portfile_var nginx_upload_mod_dirname "${upload_distname}" 226 227 # patch routine balks on file names with "../", but rel-paths in patchfiles start from $worksrcpath 228 pre-patch { 229 ln -s "${workpath}/${nginx_upload_mod_dirname}" "${worksrcpath}/nginx_upload_module.tmp" 230 } 231 post-patch { 232 file delete "${worksrcpath}/nginx_upload_module.tmp" 233 } 180 234 } 181 235 182 236 variant upload_progress description {Enable Brice Figureau's upload progress module (https://github.com/masterzen/nginx-upload-progress-module)} { 183 237 set uploadprg_filename nginx_uploadprogress_module 184 238 set uploadprg_version 0.9.0 185 239 set uploadprg_distname ${uploadprg_filename}-${uploadprg_version} 240 186 241 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 242 checksums-append ${uploadprg_distname}.tar.gz \ 191 243 rmd160 10ff91748a06afd81abb9fdb203f164ea369463a \ 192 244 sha256 3fb903dab595cf6656fa0fc5743a48daffbba2f6b5c554836be630800eaad4e2 193 245 configure.args-append --add-module=${workpath}/${uploadprg_distname} 246 247 248 nginx_set_portfile_var nginx_upload_progress_mod_dirname "${uploadprg_distname}" 249 250 post-extract { 251 move [glob -directory "${workpath}" masterzen-nginx-upload-progress-module*] \ 252 "${workpath}/${nginx_upload_progress_mod_dirname}" 253 } 194 254 } 195 255 196 256 variant xslt description {Post-process pages with XSLT} {