Ticket #30336: Portfile.diff

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

     
    2323worksrcdir      ARPACK
    2424patchfiles      patch-arpack.diff
    2525
     26depends_lib     port:atlas
     27
    2628use_parallel_build      no
    2729
    2830pre-fetch {
     
    4547                build.args-append FFLAGS='-O2 -m64'
    4648        } else {
    4749                build.args-append FFLAGS='-O2 -m32'
    48         }
     50        }
    4951} else {
    5052        foreach arch {x86_64 i386 ppc ppc64} {
    5153                set merger_build_args(${arch}) home=${worksrcpath}-${arch}
     
    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"
     113        } elseif {![variant_isset g95]} {
     114            set stlibs "libarpack.a"
     115            set shlibs "libarpack.1.dylib"
    110116        } else {
    111117            set stlibs "libarpack.a"
    112             set shlibs "libarpack.1.dylib"
     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 accelerate description {build with Accelerate framework} {
     205        depends_lib-delete port:atlas
     206        set lapacklibs "-framework Accelerate"
     207}
     208if {[variant_isset g95]} {
     209    default_variants +accelerate
     210}
    192211
    193 
    194212livecheck.type  none