[104525] trunk/dports

ryandesign at macports.org ryandesign at macports.org
Tue Mar 26 17:40:29 PDT 2013


Revision: 104525
          https://trac.macports.org/changeset/104525
Author:   ryandesign at macports.org
Date:     2013-03-26 17:40:29 -0700 (Tue, 26 Mar 2013)
Log Message:
-----------
php-oracle: rework for oracle-instantclient 11, now 64-bit compatible even on Lion and up (#37880)

Modified Paths:
--------------
    trunk/dports/lang/php/Portfile
    trunk/dports/php/php5-oracle/Portfile

Modified: trunk/dports/lang/php/Portfile
===================================================================
--- trunk/dports/lang/php/Portfile	2013-03-27 00:37:39 UTC (rev 104524)
+++ trunk/dports/lang/php/Portfile	2013-03-27 00:40:29 UTC (rev 104525)
@@ -768,26 +768,10 @@
 }
 
 subport ${php}-oracle {
+    revision                1
+    
     php.extensions          oci8 pdo_oci
     
-    if {${os.platform} == "darwin" && ${os.major} > 10} {
-        # oracle-instantclient 10.2.0.4.0 crashes in 64-bit mode on Lion and up.
-        supported_archs i386
-        
-        notes-append "
-On OS X 10.7 Lion and later, ${subport} is only available 32-bit, but ${php}\
-runs 64-bit by default. To use the Oracle functions in PHP, you must start\
-${php} in 32-bit mode using the arch command, i.e.:
-
-arch -i386 ${php} example.php
-
-If using PHP via a web server, configure the web server to start 32-bit.
-
-Using ${php} 64-bit while ${subport} is active will result in warning messages\
-and the Oracle functions being unavailable.
-"
-    }
-    
     categories-append       databases
     
     description             a PHP interface to Oracle, including the oci8 and \
@@ -797,8 +781,13 @@
     
     depends_lib-append      port:oracle-instantclient
     
-    configure.args-append   --with-oci8=instantclient,${prefix}/lib/oracle \
-                            --with-pdo-oci=instantclient,${prefix}/lib/oracle,10.1
+    set lib_dir             ${prefix}/lib/oracle
+    pre-configure {
+        regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version
+        configure.args-append \
+                            --with-oci8=instantclient,${lib_dir} \
+                            --with-pdo-oci=instantclient,${lib_dir},${library_version}
+    }
 }
 
 subport ${php}-pcntl {

Modified: trunk/dports/php/php5-oracle/Portfile
===================================================================
--- trunk/dports/php/php5-oracle/Portfile	2013-03-27 00:37:39 UTC (rev 104524)
+++ trunk/dports/php/php5-oracle/Portfile	2013-03-27 00:40:29 UTC (rev 104525)
@@ -5,6 +5,7 @@
 PortGroup                       php5extension 1.0
 
 php5extension.setup             oracle 5.3.23 bundled
+revision                        1
 php5extension.ini               oracle.ini
 php5extension.extensions        oci8 pdo_oci
 categories-append               databases
@@ -22,25 +23,11 @@
 
 depends_lib-append              port:oracle-instantclient
 
-configure.args-append           --with-oci8=instantclient,${prefix}/lib/oracle \
-                                --with-pdo-oci=instantclient,${prefix}/lib/oracle,10.1
+set lib_dir                     ${prefix}/lib/oracle
+pre-configure {
+    regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version
+    configure.args-append       --with-oci8=instantclient,${lib_dir} \
+                                --with-pdo-oci=instantclient,${lib_dir},${library_version}
+}
 
 use_parallel_build              yes
-
-if {${os.platform} == "darwin" && ${os.major} > 10} {
-    # oracle-instantclient 10.2.0.4.0 crashes in 64-bit mode on Lion and up.
-    supported_archs i386
-    
-    notes-append "
-On OS X 10.7 Lion and later, ${subport} is only available 32-bit, but php\
-runs 64-bit by default. To use the Oracle functions in PHP, you must start\
-php in 32-bit mode using the arch command, i.e.:
-
-arch -i386 php example.php
-
-If using PHP via a web server, configure the web server to start 32-bit.
-
-Using php 64-bit while ${subport} is active will result in warning messages\
-and the Oracle functions being unavailable.
-"
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130326/9a0ab078/attachment-0001.html>


More information about the macports-changes mailing list