New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20106: Portfile-atlas-gcc.diff

File Portfile-atlas-gcc.diff, 3.7 KB (added by max@…, 3 years ago)
  • math/atlas/Portfile

    old new  
    3737                    sha1    c75223fdef3258c461370af5d2b889d580d7f38a \ 
    3838                    rmd160  e8fabba2fdd944afbc02a83599cf45a0d721030d 
    3939 
    40  
    4140# the following patch corrects extension conventions for osx's dynamic libs 
    4241set make_patch      patch-build-Make.top.diff 
    4342use_parallel_build  no 
     
    4645 
    4746destroot.dir        ${build.dir} 
    4847destroot.destdir    DESTDIR=${destroot}${prefix} 
    49 depends_lib         port:gcc43 \ 
    50                     port:bzip2 \ 
     48depends_lib         port:bzip2 \ 
    5149                    port:gzip 
    5250 
    53 # Set fortran compiler flags 
    54 set myf77           ${prefix}/bin/gfortran-mp-4.3 
     51variant gcc42 conflicts gcc43 gcc44 description "Use gcc-4.2 as compiler" { 
     52          depends_lib-append    port:gcc42 
     53      configure.compiler        macports-gcc-4.2 
     54} 
    5555 
    56 configure.args      -C xc ${prefix}/bin/gcc-mp-4.3 \ 
    57                     -C gc ${prefix}/bin/gcc-mp-4.3 \ 
    58                     -C if ${myf77} \ 
    59                     -C ic ${prefix}/bin/gcc-mp-4.3 \ 
    60                     -C dm ${prefix}/bin/gcc-mp-4.3 \ 
    61                     -C sm ${prefix}/bin/gcc-mp-4.3 \ 
    62                     -C dk ${prefix}/bin/gcc-mp-4.3 \ 
    63                     -C sk ${prefix}/bin/gcc-mp-4.3 \ 
    64                     --cc=${prefix}/bin/gcc-mp-4.3 \ 
    65                     -b 32 \ 
    66                     -Fa alg -fPIC  
    67                      
    68 configure.compiler macports-gcc-4.3 
     56variant gcc43 conflicts gcc42 gcc44 description "Use gcc-4.3 as compiler" { 
     57          depends_lib-append    port:gcc43 
     58      configure.compiler macports-gcc-4.3 
     59} 
    6960 
    70          
     61variant gcc44 conflicts gcc42 gcc43 description "Use gcc4.4 as compiler" { 
     62          depends_lib-append    port:gcc44 
     63      configure.compiler macports-gcc-4.4 
     64} 
    7165 
     66if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } { 
     67          default_variants      +gcc43 
     68} 
     69 
     70if {[variant_isset gcc42]} { 
     71        set myf77               ${prefix}/bin/gfortran-mp-4.2 
     72        set mygcc               ${prefix}/bin/gcc-mp-4.2 
     73        set gcc_libdir  gcc42 
     74} elseif {[variant_isset gcc43]} { 
     75        set myf77               ${prefix}/bin/gfortran-mp-4.3 
     76        set mygcc               ${prefix}/bin/gcc-mp-4.3 
     77        set gcc_libdir  gcc43 
     78} elseif {[variant_isset gcc44]} { 
     79        set myf77               ${prefix}/bin/gfortran-mp-4.4 
     80        set mygcc               ${prefix}/bin/gcc-mp-4.4 
     81        set gcc_libdir  gcc44 
     82}  
     83  
     84configure.args      -C xc ${mygcc} \ 
     85                    -C gc ${mygcc} \ 
     86                                        -C if ${myf77} \ 
     87                                        -C ic ${mygcc} \ 
     88                    -C dm ${mygcc} \ 
     89                    -C sm ${mygcc} \ 
     90                    -C dk ${mygcc} \ 
     91                    -C sk ${mygcc} \ 
     92                    --cc=${mygcc} \ 
     93                    -b 32 \ 
     94                    -Fa alg -fPIC          
     95       
    7296# we are configuring from the build directory 
    7397configure.dir       ${workpath}/${name}-${version}/build 
    7498configure.cmd       ../configure 
    7599 
    76 # change the default compilers to those of gcc43 and make into shared library 
    77  
    78100extract { 
    79101    # extract atlas and move to a consistent working directory name 
    80102    system "cd ${workpath} && bunzip2 -dc ${distpath}/${atlasdist} | \ 
     
    86108         gnutar --no-same-owner -xf -" 
    87109} 
    88110 
    89  
    90  
    91111pre-configure { 
    92112    # Get some system specific variables for maximum optimization 
    93113    set cpufreq [expr {[exec sysctl -n hw.cpufrequency]/1000000}] 
     
    160180    } 
    161181   
    162182  set ld "ld -arch ${myarch} -dynamic -dylib -single_module -dead_strip -x \ 
    163           -all_load -L. -L${prefix}/lib/gcc43 -ldylib1.o -dylib_install_name" 
     183          -all_load -L. -L${prefix}/lib/${gcc_libdir} -ldylib1.o -dylib_install_name" 
    164184   
    165185  system "cd ${workpath}/${name}-${version}/build/lib && \ 
    166186          ${ld} ${prefix}/lib/libatlas.dylib libatlas.a -o libatlas.dylib \