Ticket #39365: Portfile-arpack.2.diff
File Portfile-arpack.2.diff, 9.3 KB (added by dstrubbe (David Strubbe), 11 years ago) |
---|
-
Portfile
old new 5 5 PortGroup active_variants 1.1 6 6 7 7 name arpack 8 version 3.1.2 9 revision 1 8 version 3.1.3 10 9 categories math 11 10 license BSD 12 11 platforms darwin 13 12 maintainers mmoll 14 description Package for solving large 13 description Package for solving large-scale eigenvalue problems 15 14 long_description \ 16 15 ARPACK is a collection of Fortran77 subroutines designed to solve large \ 17 16 scale eigenvalue problems. Parallel ARPACK (PARPACK) is included if built with an MPI variant. 18 17 homepage http://forge.scilab.org/index.php/p/arpack-ng 19 master_sites ${homepage}/downloads/497 20 distfiles get 21 dist_subdir ${name}/${version} 22 checksums md5 7644e234f219ec1a29849b6d7811a6b1 \ 23 sha1 f5453e2d576f131890ca023e1d853e18920f9c3c \ 24 rmd160 2c55eca384cc0a1aebacdef527f88426932bf57b 25 worksrcdir ${name}-ng_${version} 18 master_sites ${homepage}/downloads/get 19 distfiles arpack-ng-${version}.tar.gz 20 checksums md5 90ba42eae70b517ebdb72921cb4186df \ 21 sha1 c1ac96663916a4e11618e9557636ba1bd1a7b556 \ 22 rmd160 30a3b8a707417afeb3f8a794ee3aa0160fa3e745 23 worksrcdir ${name}-ng-${version} 26 24 27 25 configure.args-append home=${worksrcpath} --disable-mpi 28 # LDFLAGS needs to be defined here to avoid it having also a "-arch" option, considered illegal by gfortran29 26 if { ${build_arch}=="x86_64" || ${build_arch}=="ppc64" } { 30 configure.args-append FFLAGS='-O2 -m64' LDFLAGS='-L${prefix}/lib'27 configure.args-append FFLAGS='-O2 -m64' 31 28 } else { 32 configure.args-append FFLAGS='-O2 -m32' LDFLAGS='-L${prefix}/lib'29 configure.args-append FFLAGS='-O2 -m32' 33 30 } 31 # LDFLAGS needs to be cleared to avoid it having a "-arch" option, considered illegal by gfortran 32 # also, if it has ${prefix}/lib it will prevent +accelerate from working if atlas is present. 33 configure.args-append LDFLAGS='' 34 34 35 35 pre-fetch { 36 if {"darwin" == ${os.platform} && ${os.major} < 9} { 37 ui_error "${name} ${version} requires Mac OS X 10.5 or greater" 38 return -code error "incompatible Mac OS X version" 39 } 36 if {"darwin" == ${os.platform} && ${os.major} < 9} { 37 ui_error "${name} ${version} requires Mac OS X 10.5 or greater" 38 return -code error "incompatible Mac OS X version" 39 } 40 41 if {[variant_isset openmpi]} { 42 if { ![active_variants openmpi gcc43] && ![active_variants openmpi gcc44] && \ 43 ![active_variants openmpi gcc45] && ![active_variants openmpi gcc46] && \ 44 ![active_variants openmpi gcc47] && ![active_variants openmpi gcc48] } { 45 ui_error "${name} with +openmpi requires that openmpi was built with a Fortran variant (g95 won't work)" 46 return -code error "openmpi needs Fortran variant" 47 } 48 } 49 50 if {[variant_isset mpich]} { 51 # mpich has a path dependency on mpif77, which could be satisfied by mpich-devel instead 52 # Fortunately, if mpif77 is present, this check is not needed. 53 if { [_portnameactive mpich] } { 54 if { ![active_variants mpich gcc43] && ![active_variants mpich gcc44] && \ 55 ![active_variants mpich gcc45] && ![active_variants mpich gcc46] && \ 56 ![active_variants mpich gcc47] && ![active_variants mpich gcc48] } { 57 ui_error "${name} with +mpich requires that mpich was built with a Fortran variant" 58 return -code error "mpich needs Fortran variant" 59 } 60 } 61 } 62 40 63 } 41 64 42 65 # Fortran compilers can not cross-compile … … 47 70 } 48 71 49 72 variant openmpi description {build PARPACK, with OpenMPI} conflicts mpich universal { 50 depends_lib-append port:openmpi51 configure.args-delete --disable-mpi52 configure.args-append --enable-mpi53 configure.env-append MPIF77=${prefix}/bin/openmpif7773 depends_lib-append port:openmpi 74 configure.args-delete --disable-mpi 75 configure.args-append --enable-mpi 76 configure.env-append F77=${prefix}/bin/openmpif77 54 77 } 55 78 56 79 variant mpich description {build PARPACK, with MPICH} conflicts openmpi { 57 depends_lib-append path:bin/mpif77:mpich 58 configure.args-delete --disable-mpi 59 configure.args-append --enable-mpi 60 configure.env-append MPIF77=${prefix}/bin/mpif77 80 depends_lib-append path:bin/mpif77:mpich 81 # unfortunately, by default mpich builds without Fortran support, which won't work here. ticket #39428 82 configure.args-delete --disable-mpi 83 configure.args-append --enable-mpi 84 configure.env-append F77=${prefix}/bin/mpif77 61 85 } 62 86 63 if {![variant_isset mpich]} { 64 default_variants +openmpi 87 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] \ 88 && ![variant_isset gcc47] && ![variant_isset mpich]} { 89 default_variants +openmpi 65 90 } 66 91 67 92 68 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc44 gcc45 gcc46 gcc47 g95 universal{93 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc44 gcc45 gcc46 gcc47 universal openmpi mpich { 69 94 depends_build-append port:gcc43 70 configure.env-append F77=${prefix}/bin/gfortran-mp-4.3 71 if {[variant_isset mpich]} { require_active_variants mpich gcc43 } 72 if {[variant_isset openmpi]} { require_active_variants openmpi gcc43 } 95 configure.compiler macports-gcc-4.3 73 96 } 74 97 75 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc43 gcc45 gcc46 gcc47 g95{98 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc43 gcc45 gcc46 gcc47 openmpi mpich { 76 99 depends_build-append port:gcc44 77 configure.env-append F77=${prefix}/bin/gfortran-mp-4.4 78 if {[variant_isset mpich]} { require_active_variants mpich gcc44 } 79 if {[variant_isset openmpi]} { require_active_variants openmpi gcc44 } 100 configure.compiler macports-gcc-4.4 80 101 } 81 102 82 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc43 gcc44 gcc46 gcc47 g95{103 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc43 gcc44 gcc46 gcc47 openmpi mpich { 83 104 depends_build-append port:gcc45 84 configure.env-append F77=${prefix}/bin/gfortran-mp-4.5 85 if {[variant_isset mpich]} { require_active_variants mpich gcc45 } 86 if {[variant_isset openmpi]} { require_active_variants openmpi gcc45 } 105 configure.compiler macports-gcc-4.5 87 106 } 88 107 89 variant gcc46 description {build with gfortran-mp-4.6} conflicts gcc43 gcc44 gcc45 gcc47 g95{108 variant gcc46 description {build with gfortran-mp-4.6} conflicts gcc43 gcc44 gcc45 gcc47 openmpi mpich { 90 109 depends_build-append port:gcc46 91 configure.env-append F77=${prefix}/bin/gfortran-mp-4.6 92 if {[variant_isset mpich]} { require_active_variants mpich gcc46 } 93 if {[variant_isset openmpi]} { require_active_variants openmpi gcc46 } 110 configure.compiler macports-gcc-4.6 94 111 } 95 112 96 variant gcc47 description {build with gfortran-mp-4.7} conflicts gcc43 gcc44 gcc45 gcc46 g95{113 variant gcc47 description {build with gfortran-mp-4.7} conflicts gcc43 gcc44 gcc45 gcc46 openmpi mpich { 97 114 depends_build-append port:gcc47 98 configure.env-append F77=${prefix}/bin/gfortran-mp-4.7 99 if {[variant_isset mpich]} { require_active_variants mpich gcc47 } 100 if {[variant_isset openmpi]} { require_active_variants openmpi gcc47 } 101 } 102 variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 universal { 103 depends_build-append port:g95 104 configure.env-append F77=${prefix}/bin/g95 105 if {[variant_isset mpich]} { require_active_variants mpich g95 } 106 if {[variant_isset openmpi]} { require_active_variants openmpi g95 } 115 configure.compiler macports-gcc-4.7 107 116 } 108 117 109 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } { 118 # does not work, will not accept -force_load in linking stage 119 #variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 universal openmpi mpich { 120 # depends_build-append port:g95 121 # configure.env-append F77=${prefix}/bin/g95 122 #} 123 124 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] \ 125 && ![variant_isset openmpi] && ![variant_isset mpich]} { 110 126 default_variants +gcc47 111 127 } 112 128 113 129 variant accelerate conflicts atlas description {build with Accelerate framework} { 114 configure.args-append --with-blas=/usr/lib/libblas.dylib --with-lapack=/usr/lib/liblapack.dylib 115 patchfiles-append patch-ARPACK-cdot-and-zdot.diff 130 # the change of LDFLAGS is required to avoid linking against the ATLAS ones if they are present; 131 # if we specify /usr/lib/libblas.dylib directly, the linking fails. http://forge.scilab.org/index.php/p/arpack-ng/issues/1220/ 132 configure.args-delete LDFLAGS='' 133 configure.args-append LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack" 134 patchfiles-append patch-ARPACK-cdot-and-zdot.diff 116 135 if {[variant_isset openmpi] || [variant_isset mpich]} { 117 136 patchfiles-append patch-PARPACK-cdot-and-zdot.diff 118 137 } … … 120 139 121 140 variant atlas description {build with atlas} { 122 141 depends_lib-append port:atlas 123 configure.args-append --with-blas= ${prefix}/lib/libsatlas.dylib142 configure.args-append --with-blas="-L${prefix}/lib -lsatlas" 124 143 } 125 144 126 145 if {![variant_isset atlas]} {