Ticket #25186: Portfile_g95_atlas_accelerate.diff

File Portfile_g95_atlas_accelerate.diff, 3.5 KB (added by tenomoto (Takeshi Enomoto), 14 years ago)
  • Portfile

    old new  
    55
    66name          arpack
    77version       1
    8 revision      4
     8revision      5
    99categories    math
    1010platforms     darwin
    1111maintainers             mmoll
     
    2323worksrcdir      ARPACK
    2424patchfiles      patch-arpack.diff
    2525
     26depends_lib     port:atlas
     27
    2628use_parallel_build      no
    2729
    2830pre-fetch {
     
    7880        build.args-append FC=${configure.fc} MAKE=${build.cmd}
    7981}
    8082
     83set lapacklibs "-latlas -llapack -lblas"
     84set flibs -lgfortran
     85set mpilibs "-lSystem"
     86if {![variant_isset g95]} {
    8187post-build {
    8288    set curVer ${version}
    8389    set comVer [join [lrange [split ${version} '.'] 0 1 ] '.']
     
    95101            set dir ${worksrcpath}-${arch}
    96102        }
    97103
    98         make_dylib arpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lSystem" ${version}
    99 
    100         if { [variant_isset mpi] } {
    101             make_dylib parpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lmpi_f77 -lSystem -larpack.1" ${version}
    102         }
     104        make_dylib arpack ${dir} ${arch} "${lapacklibs} ${flibs} ${mpilibs}" ${version}
    103105    }
    104106}
     107}
    105108
    106109post-configure {
    107110        if { [variant_isset mpi] } {
    108111            set stlibs "libarpack.a libparpack.a"
    109112            set shlibs "libarpack.1.dylib libparpack.1.dylib"
    110         } else {
     113        } elseif {![variant_isset g95]} {
    111114            set stlibs "libarpack.a"
    112115            set shlibs "libarpack.1.dylib"
     116        } else {
     117            set stlibs "libarpack.a"
     118            set shlibs ""
    113119        }
    114120
    115121        if { ![variant_isset universal] } {
     
    139145        }
    140146}
    141147
    142 variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 universal {
     148variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 g95 universal {
    143149        depends_build-append    port:gcc42
    144150        configure.fc ${prefix}/bin/gfortran-mp-4.2
    145151}
    146152
    147 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 universal {
     153variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 g95 universal {
    148154        depends_build-append    port:gcc43
    149155        configure.fc ${prefix}/bin/gfortran-mp-4.3
    150156}
    151157
    152 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 {
     158variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 g95 {
    153159        depends_build-append    port:gcc44
    154160        configure.fc ${prefix}/bin/gfortran-mp-4.4
    155161}
    156162
    157 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 {
     163variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 g95 {
    158164        depends_build-append    port:gcc45
    159165        configure.fc ${prefix}/bin/gfortran-mp-4.5
    160166}
    161167
    162 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] } {
     168variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 universal {
     169        depends_build-append    port:g95
     170        configure.fc ${prefix}/bin/g95
     171}
     172
     173if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95] } {
    163174        default_variants      +gcc44
    164175}
    165176
     
    187198
    188199        depends_build port:openmpi
    189200        configure.fc ${prefix}/bin/openmpif77
     201        set mpilibs "-lmpi_f77 -lSystem -larpack.1"
    190202}
    191203
     204variant no_atlas description {build with Accelerate framework} {
     205        depends_lib-delete port:atlas
     206        set lapacklibs "-framework Accelerate"
     207}
     208if {[variant_isset g95]} {
     209    default_variants +no_atlas
     210}
     211
     212
    192213
    193214
    194215livecheck.type  none