Revision
116761
Author
ryandesign@macports.org
Date
2014-02-05 23:15:01 -0800 (Wed, 05 Feb 2014)

Log Message

php: fix php56-postgresql build problem; now use pdo headers extracted from the tarball instead of those installed by the ${php} port, because the ${php} port doesn't install the private pdo headers

Modified Paths

Diff

Modified: trunk/dports/lang/php/Portfile (116760 => 116761)


--- trunk/dports/lang/php/Portfile	2014-02-06 06:49:28 UTC (rev 116760)
+++ trunk/dports/lang/php/Portfile	2014-02-06 07:15:01 UTC (rev 116761)
@@ -1192,7 +1192,17 @@
     default homepage    http://www.php.net/${php.rootname}
     
     php.build_dirs
+    set pdo no
     foreach extension [concat ${php.extensions} ${php.extensions.zend}] {
+        if {[regexp {^pdo_} ${extension}]} {
+            # The PDO extensions need the PDO headers.
+            set pdo yes
+            post-extract {
+                file mkdir ${worksrcpath}/ext/${extension}/ext
+                ln -s ${worksrcpath}/ext/pdo ${worksrcpath}/ext/${extension}/ext
+            }
+        }
+        
         # Speed up extraction by extracting only the modules we're going to be building.
         extract.post_args-append ${worksrcdir}/ext/${extension}
         
@@ -1200,14 +1210,9 @@
         php.build_dirs-append ${worksrcpath}/ext/${extension}
     }
     
-    post-extract {
-        # The PDO extensions need the PDO headers which are installed by the ${php} port.
-        foreach extension [concat ${php.extensions} ${php.extensions.zend}] {
-            if {[regexp {^pdo_} ${extension}]} {
-                file mkdir ${worksrcpath}/ext/${extension}/ext
-                ln -s ${prefix}/include/${php}/php/ext/pdo ${worksrcpath}/ext/${extension}/ext
-            }
-        }
+    if {${pdo}} {
+        # The PDO extensions need the PDO headers.
+        extract.post_args-append ${worksrcdir}/ext/pdo
     }
     
     pre-configure {