Ticket #26039: php5-fpm-variant.diff
File php5-fpm-variant.diff, 2.9 KB (added by info@…, 14 years ago) |
---|
-
(a) Portfile vs. (b) (clipboard)
a b 105 105 --with-ldap=/usr 106 106 } 107 107 108 variant no_web conflicts apache apache2 fastcgi description {Don't include any web server support} {}108 variant no_web conflicts apache apache2 fastcgi fpm description {Don't include any web server support} {} 109 109 110 110 # Build an Apache 1 module. On Mac OS X, it uses Apple's provided Apache 1 server. 111 111 # On other platforms, the MacPorts apache port is used. Keep the options here … … 152 152 } 153 153 } 154 154 155 # FPM options 156 variant fpm conflicts no_web description {Add FPM (Fast Process Management) web server binary} { 157 depends_lib-append port:libevent 158 159 set fpm_pidfile ${prefix}/var/run/${my_name}-fpm.pid 160 set fpm_conf_installed 0 161 162 startupitem.create yes 163 startupitem.executable ${prefix}/sbin/php-fpm 164 startupitem.pidfile auto ${fpm_pidfile} 165 166 if { ![variant_isset apache] && ![variant_isset apache2] } { 167 configure.args-delete \ 168 --disable-fpm 169 configure.args-append \ 170 --enable-fpm 171 } 172 } 173 155 174 foreach {old_variant new_port} { 156 175 gmp gmp 157 176 imap imap … … 187 206 --enable-sysvmsg 188 207 } 189 208 190 if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset fastcgi] && ![variant_isset no_web]} {209 if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset fastcgi] && ![variant_isset fpm] && ![variant_isset no_web]} { 191 210 default_variants +apache2 192 211 } 193 212 … … 290 309 # conflict with the cli version. 291 310 xinstall -m 755 ${worksrcpath}/sapi/cgi/php-cgi ${destroot}${prefix}/bin 292 311 } 312 313 if { [variant_isset fpm] } { 314 # Copy the FPM binary to the bin dir under a new name so it doesn't 315 # conflict with the cli version. 316 xinstall -m 755 ${worksrcpath}/sapi/fpm/php-fpm ${destroot}${prefix}/sbin 317 } 293 318 294 319 #file rename ${destroot}${prefix}/etc/pear.conf ${destroot}${prefix}/etc/pear.conf.sample 295 320 … … 299 324 php.ini-development \ 300 325 php.ini-production \ 301 326 ${destroot}${phpinidir} 327 328 if { [variant_isset fpm] } { 329 if {![file exists ${phpinidir}/php-fpm.conf]} { 330 # Only install php-fpm.conf if doesn't exist so we don't overwrite user's file by mistake 331 xinstall -m 644 ${worksrcpath}/sapi/fpm/php-fpm.conf ${destroot}${phpinidir} 332 } 333 } 302 334 303 335 # Copy mysqlnd headers. 304 336 xinstall -d ${destroot}${prefix}/include/php/ext/mysqlnd … … 330 362 ui_msg "${phpinidir}/php.ini-production (if this is a production server)." 331 363 } 332 364 365 if { [variant_isset fpm] } { 366 ui_msg "" 367 ui_msg "FPM configuration file installed to ${phpinidir}/php-fpm.conf." 368 } 369 333 370 if {![variant_isset no_web]} { 334 371 ui_msg "" 335 372 ui_msg "If this is your first install, you need to activate PHP in your web server."