Changeset 36833


Ignore:
Timestamp:
May 16, 2008, 9:16:22 AM (12 years ago)
Author:
ryandesign@…
Message:

oracle-instantclient: now works on Intel Macs; closes #15296

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/databases/oracle-instantclient/Portfile

    r31890 r36833  
    1010homepage                http://www.oracle.com/technology/software/tech/oci/instantclient/
    1111use_zip                 yes
    12 worksrcdir              instantclient[join [lrange [split ${version} .] 0 1] _]
     12set weird_prefix        ""
    1313
    1414description \
     
    1818    Oracle Instant Client allows you to run your applications without installing the standard Oracle client or having an ORACLE_HOME.
    1919
    20 master_sites \
    21     http://download.oracle.com/otn/mac/instantclient/
     20platform powerpc {
     21    worksrcdir          instantclient[join [lrange [split ${version} .] 0 1] _]
     22    set weird_prefix    /b/729
     23   
     24    master_sites \
     25        http://download.oracle.com/otn/mac/instantclient/
     26   
     27    distfiles \
     28        instantclient-basic-macosx-${version}${extract.suffix} \
     29        instantclient-sdk-macosx-${version}${extract.suffix}
     30   
     31    checksums \
     32        instantclient-basic-macosx-${version}${extract.suffix} \
     33            md5 5b38ab0565d6189d2069a4abe0bf2ab2 \
     34            sha1 2f3aa35e99228fd08b686b19eba84ec34db8277b \
     35            rmd160 d1f056f8f1b308c5493f4938b29b55fcb32452cf \
     36        instantclient-sdk-macosx-${version}${extract.suffix} \
     37            md5 79c7cb3f8afaff076fb20bad75b37cc9 \
     38            sha1 486fe1c9a6c5cfc32401e72728ff821a50a22cf9 \
     39            rmd160 c819db7f739b8ca468c8059dfbac31a6a6965938
     40}
    2241
    23 distfiles \
    24     instantclient-basic-macosx-${version}${extract.suffix} \
    25     instantclient-sdk-macosx-${version}${extract.suffix}
    26 
    27 checksums \
    28     instantclient-basic-macosx-${version}${extract.suffix} \
    29         md5 5b38ab0565d6189d2069a4abe0bf2ab2 \
    30         sha1 2f3aa35e99228fd08b686b19eba84ec34db8277b \
    31         rmd160 d1f056f8f1b308c5493f4938b29b55fcb32452cf \
    32     instantclient-sdk-macosx-${version}${extract.suffix} \
    33         md5 79c7cb3f8afaff076fb20bad75b37cc9 \
    34         sha1 486fe1c9a6c5cfc32401e72728ff821a50a22cf9 \
    35         rmd160 c819db7f739b8ca468c8059dfbac31a6a6965938
    36 
    37 pre-fetch {
    38     if { [string compare ${os.endian} "big"] != 0 } {
    39         return -code error "${name} is only available for PowerPC-based Macs at this time. Oracle says they will release a version for Intel-based Macs in Q1 CY2008."
    40     }
     42platform i386 {
     43    version             10.2.0.4.0
     44    worksrcdir          instantclient_[join [lrange [split ${version} .] 0 1] _]
     45    set weird_prefix    /scratch/plebld/208
     46   
     47    master_sites \
     48        http://download.oracle.com/otn/mac/instantclient/10204/
     49   
     50    distfiles \
     51        instantclient-basic-macosx-${version}${extract.suffix} \
     52        instantclient-sdk-macosx-${version}${extract.suffix}
     53   
     54    checksums \
     55        instantclient-basic-macosx-${version}${extract.suffix} \
     56            md5 383826be2873ece610da63b833eff052 \
     57            sha1 91e408a580dc5a415e5906ff71c837d6a8b628c9 \
     58            rmd160 fdd5d8a7d6034ba852a06ce378e1775f13a1519d \
     59        instantclient-sdk-macosx-${version}${extract.suffix} \
     60            md5 8aa52afeb9529d953c494e0233eb7c52 \
     61            sha1 6f32cda591c61112c6f963698fdc829ab6a59e7f \
     62            rmd160 e672eadc6fb0eccbe42cd49663128f011abfe493
    4163}
    4264
     
    4769
    4870build {
    49     # The pre-built libraries use weird prefixes like /b/729/rdbms and Oracle
    50     # recommends setting DYLD_LIBRARY_PATH to deal with this. I find that ill-
    51     # advised and would rather fix the paths in the libraries at install time.
     71    # The pre-built libraries use weird prefixes and Oracle recommends setting
     72    # DYLD_LIBRARY_PATH to deal with this. I would rather fix the paths in the
     73    # libraries at install time.
     74    # Annoyingly, I can't do that for the Intel version right now because
     75    # install_name_tool says "malformed object (unknown load command 8)" (or 7).
    5276   
    53     # For each dylib in the distribution, change the directory of its own
    54     # "soname" to our ${lib_dir}.
    55     foreach lib [glob -directory ${worksrcpath} *.dylib*] {
    56         system "install_name_tool -id ${lib_dir}/[strsed ${lib} /^.*\\///] ${lib}"
    57        
    58         # Then for each dependent dylib with a weird path that this dylib
    59         # references, fix the reference to use our ${lib_dir}.
    60         foreach dep [exec otool -L ${lib}] {
    61             if [string match "/b/729/*" ${dep}] {
    62                 system "install_name_tool -change ${dep} ${lib_dir}/[strsed ${dep} /^.*\\///] ${lib}"
     77    if {![variant_isset i386]} {
     78        # For each dylib in the distribution, change the directory of its own
     79        # "soname" to our ${lib_dir}.
     80        foreach lib [glob -directory ${worksrcpath} *.dylib*] {
     81            system "install_name_tool -id ${lib_dir}/[strsed ${lib} /^.*\\///] ${lib}"
     82           
     83            # Then for each dependent dylib with a weird path that this dylib
     84            # references, fix the reference to use our ${lib_dir}.
     85            foreach dep [exec otool -L ${lib}] {
     86                if [string match "${weird_prefix}/*" ${dep}] {
     87                    system "install_name_tool -change ${dep} ${lib_dir}/[strsed ${dep} /^.*\\///] ${lib}"
     88                }
    6389            }
    6490        }
Note: See TracChangeset for help on using the changeset viewer.