[50545] trunk/dports/lang/php4/Portfile
ryandesign at macports.org
ryandesign at macports.org
Sat May 2 23:13:31 PDT 2009
Revision: 50545
http://trac.macports.org/changeset/50545
Author: ryandesign at macports.org
Date: 2009-05-02 23:13:28 -0700 (Sat, 02 May 2009)
Log Message:
-----------
php4: back-port fastcgi variant from php5 port
Modified Paths:
--------------
trunk/dports/lang/php4/Portfile
Modified: trunk/dports/lang/php4/Portfile
===================================================================
--- trunk/dports/lang/php4/Portfile 2009-05-03 04:40:19 UTC (rev 50544)
+++ trunk/dports/lang/php4/Portfile 2009-05-03 06:13:28 UTC (rev 50545)
@@ -126,7 +126,7 @@
--with-iodbc=/usr
}
-variant no_web conflicts apache apache2 apache20 description {Don't include any web server support} {}
+variant no_web conflicts apache apache2 apache20 fastcgi description {Don't include any web server support} {}
variant apache conflicts apache2 apache20 no_web description {Add Apache 1 web server module} {
if { ! [variant_isset macosx] } {
@@ -162,6 +162,14 @@
--with-apxs2=${prefix}/apache20/bin/apxs
}
+variant fastcgi conflicts no_web description {Add FastCGI web server binary} {
+ if { ![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache20] } {
+ configure.args-append \
+ --enable-fastcgi \
+ --enable-force-cgi-redirect
+ }
+}
+
variant mysql3 conflicts mysql4 mysql5 description {MySQL 3 functions} {
depends_lib-append \
port:mysql3
@@ -253,7 +261,7 @@
--with-iconv-dir=${prefix}
}
-if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache20] && ![variant_isset no_web]} {
+if {![variant_isset apache] && ![variant_isset apache2] && ![variant_isset apache20] && ![variant_isset fastcgi] && ![variant_isset no_web]} {
default_variants +apache2
}
@@ -300,6 +308,47 @@
xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache20/conf/extras-conf/mod_php.conf.sample
}
+ if { [variant_isset fastcgi] } {
+ # If we've built an Apache module (any version) then the FastCGI binary
+ # will not have been built, so we need to run through the whole process
+ # again and build just the FastCGI binary. Keep the options here in sync
+ # with the options specified in the apache, apache2 and apache20 variants.
+ if { [variant_isset apache] } {
+ if { ![variant_isset macosx] } {
+ configure.args-delete \
+ --with-apxs=${prefix}/sbin/apxs
+ } else {
+ configure.args-delete \
+ --with-apxs=/usr/sbin/apxs
+ }
+ }
+ if { [variant_isset apache2] } {
+ configure.args-delete \
+ --with-apxs2=${prefix}/apache2/bin/apxs
+ }
+ if { [variant_isset apache20] } {
+ configure.args-delete \
+ --with-apxs2=${prefix}/apache20/bin/apxs
+ }
+
+ # Run the build again to get the FastCGI binary. Keep the options here
+ # in sync with those in the fastcgi variant.
+ if { [variant_isset apache] || [variant_isset apache2] || [variant_isset apache20] } {
+ configure.args-append \
+ --enable-fastcgi \
+ --enable-force-cgi-redirect
+ ui_msg "$UI_PREFIX Configuring ${name} again for fastcgi"
+ command_exec configure
+ ui_msg "$UI_PREFIX Building ${name} again for fastcgi"
+ command_exec build
+ ui_msg "$UI_PREFIX Staging ${name} fastcgi into destroot"
+ }
+
+ # Copy the FastCGI binary to the bin dir under a new name so it doesn't
+ # conflict with the cli version.
+ xinstall -m 755 ${worksrcpath}/sapi/cgi/php ${destroot}${prefix}/bin/php-cgi${major}
+ }
+
file rename ${destroot}${prefix}/etc/php4/pear.conf ${destroot}${prefix}/etc/php4/pear.conf.sample
#copy php.ini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090502/c0b6aa91/attachment.html>
More information about the macports-changes
mailing list