Opened 19 years ago

Closed 19 years ago

Last modified 9 years ago

#7549 closed enhancement (fixed)

UPDATE php5-1.20

Reported by: cremes@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.2
Keywords: Cc:
Port: php5

Description (last modified by ryandesign (Ryan Carsten Schmidt))

php5-1.20

Original portfile can be found at:

This update adds a new variant called fastcgi. When chosen it installs the php-fcgi binary in the appropriate bin directory. It lives side-by-side with the CLI binary and does not overwrite it. This variant will likely be used by people looking to install lighttpd or other non-Apache webservers.

Comment: the fastcgi variant turns off the apache variant behavior which is otherwise part of the default build. This shouldn't be a problem for people specifically building for non-Apache environments. Building with other variants leaves the Apache variant defaults intact.

Patch:

Index: Portfile
===================================================================
RCS file: /Volumes/src/cvs/od/projects/darwinports/dports/www/php5/Portfile,v
retrieving revision 1.20
diff -u -d -b -w -u -r1.20 Portfile
--- Portfile    26 Jan 2006 02:21:42 -0000      1.20
+++ Portfile    1 Mar 2006 16:50:05 -0000
@@ -128,6 +128,12 @@
        configure.args-append   --with-apxs2=${prefix}/apache2/bin/apxs
 }
 
+variant fastcgi {
+       configure.args-append --enable-fastcgi \
+                                       --enable-force-cgi-redirect \
+                                       --enable-memory-limit
+}
+
 variant mysql3 {
        depends_lib-append      port:mysql
        configure.args-delete   --without-mysql
@@ -156,8 +162,8 @@
        configure.args-append   --with-pgsql=${prefix}/lib/pgsql8/bin/
 }
 
-# if no apache/apache2 variant is set, we set it (waiting a better default variant management)
-if { ![variant_isset apache] && ![variant_isset apache2] } {
+# if no apache/apache2/fastcgi variant is set, we set it (need better default variant management)
+if { ![variant_isset apache] && ![variant_isset apache2] && ![variant_isset fastcgi] } {
        if { ! [variant_isset macosx] } {
                depends_lib-append      path:${prefix}/sbin/apxs:apache
                configure.args-append   --with-apxs=${prefix}/sbin/apxs
@@ -171,6 +177,11 @@
 destroot.target        install-cli install-pear install-build install-headers install-programs
 
 post-destroot  {
+       # copy fastcgi php binary to the bin dir under a new name so it doesn't overwrite cli version
+       if { [variant_isset fastcgi] } {
+               xinstall -m 755 ${worksrcpath}/sapi/cgi/php ${destroot}${prefix}/bin/php-fcgi
+       }
+
        #copy module
        if { [variant_isset apache] } {

Attachments (1)

Portfile.diff (1.6 KB) - added by cremes@… 19 years ago.
Made from a cvs diff against HEAD.

Download all attachments as: .zip

Change History (6)

Changed 19 years ago by cremes@…

Attachment: Portfile.diff added

Made from a cvs diff against HEAD.

comment:1 Changed 19 years ago by mww@…

have there always been these nasty files in the destroot or is this the fastcgi variant?

/.channels
/.channels/.alias
/.channels/.alias/pear.txt
/.channels/.alias/pecl.txt
/.channels/__uri.reg
/.channels/pear.php.net.reg
/.channels/pecl.php.net.reg
/.depdb
/.depdblock
/.filemap
/.lock
Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 19 years ago by cremes@…

(In reply to comment #2)

have there always been these nasty files in the destroot or is this the fastcgi variant?

The /.channel/* files were created as part of the previous version. They appear regardless of what variant is chosen. I believe they are created by the PEAR installation. There was some talk about making the PEAR stuff a separate Portfile but the conversation on the list ended without any concensus.

comment:3 Changed 19 years ago by mww@…

so, we're post-destroot deleting them?

comment:4 Changed 19 years ago by mww@…

Resolution: fixed
Status: newclosed

o.k., we do post-destroot nuke them - commited!

comment:5 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: php5 added
Type: defectenhancement
Note: See TracTickets for help on using tickets.