Changeset 104525


Ignore:
Timestamp:
Mar 27, 2013, 12:40:29 AM (7 years ago)
Author:
ryandesign@…
Message:

php-oracle: rework for oracle-instantclient 11, now 64-bit compatible even on Lion and up (#37880)

Location:
trunk/dports
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/php/Portfile

    r104277 r104525  
    769769
    770770subport ${php}-oracle {
     771    revision                1
     772   
    771773    php.extensions          oci8 pdo_oci
    772    
    773     if {${os.platform} == "darwin" && ${os.major} > 10} {
    774         # oracle-instantclient 10.2.0.4.0 crashes in 64-bit mode on Lion and up.
    775         supported_archs i386
    776        
    777         notes-append "
    778 On OS X 10.7 Lion and later, ${subport} is only available 32-bit, but ${php}\
    779 runs 64-bit by default. To use the Oracle functions in PHP, you must start\
    780 ${php} in 32-bit mode using the arch command, i.e.:
    781 
    782 arch -i386 ${php} example.php
    783 
    784 If using PHP via a web server, configure the web server to start 32-bit.
    785 
    786 Using ${php} 64-bit while ${subport} is active will result in warning messages\
    787 and the Oracle functions being unavailable.
    788 "
    789     }
    790774   
    791775    categories-append       databases
     
    798782    depends_lib-append      port:oracle-instantclient
    799783   
    800     configure.args-append   --with-oci8=instantclient,${prefix}/lib/oracle \
    801                             --with-pdo-oci=instantclient,${prefix}/lib/oracle,10.1
     784    set lib_dir             ${prefix}/lib/oracle
     785    pre-configure {
     786        regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version
     787        configure.args-append \
     788                            --with-oci8=instantclient,${lib_dir} \
     789                            --with-pdo-oci=instantclient,${lib_dir},${library_version}
     790    }
    802791}
    803792
  • trunk/dports/php/php5-oracle/Portfile

    r104126 r104525  
    66
    77php5extension.setup             oracle 5.3.23 bundled
     8revision                        1
    89php5extension.ini               oracle.ini
    910php5extension.extensions        oci8 pdo_oci
     
    2324depends_lib-append              port:oracle-instantclient
    2425
    25 configure.args-append           --with-oci8=instantclient,${prefix}/lib/oracle \
    26                                 --with-pdo-oci=instantclient,${prefix}/lib/oracle,10.1
     26set lib_dir                     ${prefix}/lib/oracle
     27pre-configure {
     28    regexp {\.dylib\.(.+)$} [glob -directory ${lib_dir} libclntsh.dylib.*] -> library_version
     29    configure.args-append       --with-oci8=instantclient,${lib_dir} \
     30                                --with-pdo-oci=instantclient,${lib_dir},${library_version}
     31}
    2732
    2833use_parallel_build              yes
    29 
    30 if {${os.platform} == "darwin" && ${os.major} > 10} {
    31     # oracle-instantclient 10.2.0.4.0 crashes in 64-bit mode on Lion and up.
    32     supported_archs i386
    33    
    34     notes-append "
    35 On OS X 10.7 Lion and later, ${subport} is only available 32-bit, but php\
    36 runs 64-bit by default. To use the Oracle functions in PHP, you must start\
    37 php in 32-bit mode using the arch command, i.e.:
    38 
    39 arch -i386 php example.php
    40 
    41 If using PHP via a web server, configure the web server to start 32-bit.
    42 
    43 Using php 64-bit while ${subport} is active will result in warning messages\
    44 and the Oracle functions being unavailable.
    45 "
    46 }
Note: See TracChangeset for help on using the changeset viewer.