Ticket #30336: Portfile_accelerate.diff

File Portfile_accelerate.diff, 3.7 KB (added by tenomoto (Takeshi Enomoto), 13 years ago)
  • Portfile

     
    2323worksrcdir      ARPACK
    2424patchfiles      patch-arpack.diff
    2525
     26
    2627use_parallel_build      no
    2728
    2829pre-fetch {
     
    4546                build.args-append FFLAGS='-O2 -m64'
    4647        } else {
    4748                build.args-append FFLAGS='-O2 -m32'
    48         }
     49        }
    4950} else {
    5051        foreach arch {x86_64 i386 ppc ppc64} {
    5152                set merger_build_args(${arch}) home=${worksrcpath}-${arch}
     
    7879        build.args-append FC=${configure.fc} MAKE=${build.cmd}
    7980}
    8081
     82set lapacklibs "-latlas -llapack -lblas"
     83set flibs -lgfortran
     84set mpilibs "-lSystem"
     85if {![variant_isset g95]} {
    8186post-build {
    8287    set curVer ${version}
    8388    set comVer [join [lrange [split ${version} '.'] 0 1 ] '.']
     
    95100            set dir ${worksrcpath}-${arch}
    96101        }
    97102
    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         }
     103        make_dylib arpack ${dir} ${arch} "${lapacklibs} ${flibs} ${mpilibs}" ${version}
    103104    }
    104105}
     106}
    105107
    106108post-configure {
    107109        if { [variant_isset mpi] } {
    108110            set stlibs "libarpack.a libparpack.a"
    109111            set shlibs "libarpack.1.dylib libparpack.1.dylib"
     112        } elseif {![variant_isset g95]} {
     113            set stlibs "libarpack.a"
     114            set shlibs "libarpack.1.dylib"
    110115        } else {
    111116            set stlibs "libarpack.a"
    112             set shlibs "libarpack.1.dylib"
     117            set shlibs ""
    113118        }
    114119
    115120        if { ![variant_isset universal] } {
     
    139144        }
    140145}
    141146
    142 variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 universal {
     147variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 g95 universal {
    143148        depends_build-append    port:gcc42
    144149        configure.fc ${prefix}/bin/gfortran-mp-4.2
    145150}
    146151
    147 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 universal {
     152variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 g95 universal {
    148153        depends_build-append    port:gcc43
    149154        configure.fc ${prefix}/bin/gfortran-mp-4.3
    150155}
    151156
    152 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 {
     157variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 g95 {
    153158        depends_build-append    port:gcc44
    154159        configure.fc ${prefix}/bin/gfortran-mp-4.4
    155160}
    156161
    157 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 {
     162variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 g95 {
    158163        depends_build-append    port:gcc45
    159164        configure.fc ${prefix}/bin/gfortran-mp-4.5
    160165}
    161166
    162 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] } {
     167variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 universal {
     168        depends_build-append    port:g95
     169        configure.fc ${prefix}/bin/g95
     170}
     171
     172if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95] } {
    163173        default_variants      +gcc44
    164174}
    165175
     
    187197
    188198        depends_build port:openmpi
    189199        configure.fc ${prefix}/bin/openmpif77
     200        set mpilibs "-lmpi_f77 -lSystem -larpack.1"
    190201}
    191202
     203variant accelerate conflicts atlas description {build with Accelerate framework} {
     204        set lapacklibs "-framework Accelerate"
     205}
    192206
     207variant arpack description {build with atlas} {
     208        depends_lib-append port:atlas
     209        set lapacklibs "-latlas -llapack -lblas"
     210}
    193211
     212if {![variant_isset atlas]} {
     213    default_variants +accelerate
     214}
     215
    194216livecheck.type  none