[58844] trunk/dports/lang/php4

ryandesign at macports.org ryandesign at macports.org
Tue Oct 6 00:13:36 PDT 2009


Revision: 58844
          http://trac.macports.org/changeset/58844
Author:   ryandesign at macports.org
Date:     2009-10-06 00:13:33 -0700 (Tue, 06 Oct 2009)
Log Message:
-----------
php4: merge r58589 from php5: update to 5.2.11_1:

 * fix php-config --includes so it contains -I${prefix}/include (#20627)
 * move conf file from extras-conf to extra to match the rest of apache2's extra conf files (#21217)
 * prevent installation with the +apache2/+apache20 variant when apache2/apache20 is not built with the +preforkmpm variant (#21281)

Also fix mod_php.conf which appears to have been incorrect ever since the php5 port was created in r7758.

Revision Links:
--------------
    http://trac.macports.org/changeset/58589
    http://trac.macports.org/changeset/7758

Modified Paths:
--------------
    trunk/dports/lang/php4/Portfile
    trunk/dports/lang/php4/files/mod_php.conf

Added Paths:
-----------
    trunk/dports/lang/php4/files/patch-scripts-php-config.in.diff

Property Changed:
----------------
    trunk/dports/lang/php4/


Property changes on: trunk/dports/lang/php4
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/dports/lang/php5:56403
   + /trunk/dports/lang/php5:56403,58589

Modified: trunk/dports/lang/php4/Portfile
===================================================================
--- trunk/dports/lang/php4/Portfile	2009-10-06 06:56:01 UTC (rev 58843)
+++ trunk/dports/lang/php4/Portfile	2009-10-06 07:13:33 UTC (rev 58844)
@@ -4,7 +4,7 @@
 
 name                    php4
 version                 4.4.9
-revision                7
+revision                8
 set major               [lindex [split ${version} .] 0]
 set my_name             php${major}
 dist_subdir             ${my_name}
@@ -52,6 +52,8 @@
 
 # Use -p1 to accommodate the Suhosin patch
 patch.pre_args          -p1
+patchfiles \
+    patch-scripts-php-config.in.diff
 
 set phpinidir           ${prefix}/etc/${my_name}
 set extraphpinidir      ${prefix}/var/db/${my_name}
@@ -126,6 +128,14 @@
 }
 
 variant apache2 conflicts apache apache20 no_web description {Add Apache 2.2 web server module} {
+    pre-extract {
+        # Checking for mod_cgi.so is a convenient way to verify apache2 is using its
+        # +preforkmpm variant. (+eventmpm and +workermpm instead provide mod_cgid.so.)
+        if {![file exists ${prefix}/apache2/modules/mod_cgi.so]} {
+            ui_error "To use ${name} with the +apache2 variant, apache2 must be installed with the +preforkmpm variant."
+            return -code error "incompatible apache2 installation"
+        }
+    }
     destroot.violate_mtree yes
     depends_lib-append \
         port:apache2
@@ -134,6 +144,14 @@
 }
 
 variant apache20 conflicts apache apache2 no_web description {Add Apache 2.0 web server module} {
+    pre-extract {
+        # Checking for mod_cgi.so is a convenient way to verify apache20 is using its
+        # +preforkmpm variant. (+workermpm instead provides mod_cgid.so.)
+        if {![file exists ${prefix}/apache20/modules/mod_cgi.so]} {
+            ui_error "To use ${name} with the +apache20 variant, apache20 must be installed with the +preforkmpm variant."
+            return -code error "incompatible apache20 installation"
+        }
+    }
     destroot.violate_mtree yes
     depends_lib-append \
         port:apache20
@@ -277,23 +295,23 @@
     #copy module
     if { [variant_isset apache] } {
         xinstall -m 755 -d ${destroot}${prefix}/libexec/apache \
-            ${destroot}${prefix}/etc/apache/extras-conf
+            ${destroot}${prefix}/etc/apache/extra
         xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/libexec/apache/
-        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}$prefix/etc/apache/extras-conf/mod_php.conf.sample
+        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}$prefix/etc/apache/extra/mod_php.conf.sample
     }
     
     if { [variant_isset apache2] } {
         xinstall -m 755 -d ${destroot}${prefix}/apache2/modules \
-            ${destroot}${prefix}/apache2/conf/extras-conf
+            ${destroot}${prefix}/apache2/conf/extra
         xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache2/modules/
-        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache2/conf/extras-conf/mod_php.conf.sample
+        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache2/conf/extra/mod_php.conf.sample
     }
     
     if { [variant_isset apache20] } {
         xinstall -m 755 -d ${destroot}${prefix}/apache20/modules \
-            ${destroot}${prefix}/apache20/conf/extras-conf
+            ${destroot}${prefix}/apache20/conf/extra
         xinstall -m 755 ${worksrcpath}/libs/libphp4.so ${destroot}${prefix}/apache20/modules/
-        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache20/conf/extras-conf/mod_php.conf.sample
+        xinstall -m 755 -c ${filespath}/mod_php.conf ${destroot}${prefix}/apache20/conf/extra/mod_php.conf.sample
     }
     
     if { [variant_isset fastcgi] } {

Modified: trunk/dports/lang/php4/files/mod_php.conf
===================================================================
--- trunk/dports/lang/php4/files/mod_php.conf	2009-10-06 06:56:01 UTC (rev 58843)
+++ trunk/dports/lang/php4/files/mod_php.conf	2009-10-06 07:13:33 UTC (rev 58844)
@@ -1,4 +1,4 @@
-<IfModule mod_php5.c>
+<IfModule mod_php4.c>
 
 AddType  application/x-httpd-php         .php
 AddType  application/x-httpd-php-source  .phps

Copied: trunk/dports/lang/php4/files/patch-scripts-php-config.in.diff (from rev 58840, trunk/dports/lang/php5/files/patch-scripts-php-config.in.diff)
===================================================================
--- trunk/dports/lang/php4/files/patch-scripts-php-config.in.diff	                        (rev 0)
+++ trunk/dports/lang/php4/files/patch-scripts-php-config.in.diff	2009-10-06 07:13:33 UTC (rev 58844)
@@ -0,0 +1,11 @@
+--- a/scripts/php-config.in.orig	2005-03-16 00:37:03.000000000 -0600
++++ b/scripts/php-config.in	2009-10-06 01:58:17.000000000 -0500
+@@ -3,7 +3,7 @@
+ prefix="@prefix@"
+ version="@PHP_VERSION@"
+ includedir="@includedir@/php"
+-includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend"
++includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I at prefix@/include"
+ ldflags="@PHP_LDFLAGS@"
+ libs="@EXTRA_LIBS@"
+ extension_dir='@EXTENSION_DIR@'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091006/832053fa/attachment-0001.html>


More information about the macports-changes mailing list