Ticket #39365: Portfile-arpack.3.diff
File Portfile-arpack.3.diff, 10.1 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 ![active_variants openmpi g95] } { 46 ui_error "${name} with +openmpi requires that openmpi was built with a Fortran variant" 47 return -code error "openmpi needs Fortran variant" 48 } 49 } 50 51 if {[variant_isset mpich]} { 52 # mpich has a path dependency on mpif77, which could be satisfied by mpich-devel instead 53 # Fortunately, if mpif77 is present, this check is not needed. 54 if { [_portnameactive mpich] } { 55 if { ![active_variants mpich gcc43] && ![active_variants mpich gcc44] && \ 56 ![active_variants mpich gcc45] && ![active_variants mpich gcc46] && \ 57 ![active_variants mpich gcc47] } { 58 ui_error "${name} with +mpich requires that mpich was built with a Fortran variant" 59 return -code error "mpich needs Fortran variant" 60 } 61 } 62 } 63 40 64 } 41 65 42 66 # Fortran compilers can not cross-compile … … 46 70 set universal_archs_supported "ppc ppc64" 47 71 } 48 72 49 variant openmpi description {build PARPACK, with OpenMPI} conflicts mpich universal { 50 depends_lib-append port:openmpi 51 configure.args-delete --disable-mpi 52 configure.args-append --enable-mpi 53 configure.env-append MPIF77=${prefix}/bin/openmpif77 73 variant openmpi description {build PARPACK, with OpenMPI} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 g95 mpich universal { 74 depends_lib-append port:openmpi 75 configure.args-delete --disable-mpi 76 configure.args-append --enable-mpi 77 configure.env-append F77=${prefix}/bin/openmpif77 78 # see g95 variant below for explanation 79 if { [active_variants openmpi g95] } { 80 configure.args-append --disable-shared 81 } 54 82 } 55 83 56 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 84 variant mpich description {build PARPACK, with MPICH} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 g95 openmpi { 85 depends_lib-append path:bin/mpif77:mpich 86 # unfortunately, by default mpich builds without Fortran support, which won't work here. ticket #39428 87 configure.args-delete --disable-mpi 88 configure.args-append --enable-mpi 89 configure.env-append F77=${prefix}/bin/mpif77 61 90 } 62 91 63 if {![variant_isset mpich]} { 64 default_variants +openmpi 92 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] \ 93 && ![variant_isset gcc47] && ![variant_isset g95] && ![variant_isset mpich]} { 94 default_variants +openmpi 65 95 } 66 96 67 97 68 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc44 gcc45 gcc46 gcc47 g95 universal {98 variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc44 gcc45 gcc46 gcc47 g95 universal openmpi mpich { 69 99 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 } 100 configure.compiler macports-gcc-4.3 73 101 } 74 102 75 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc43 gcc45 gcc46 gcc47 g95 {103 variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc43 gcc45 gcc46 gcc47 g95 openmpi mpich { 76 104 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 } 105 configure.compiler macports-gcc-4.4 80 106 } 81 107 82 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc43 gcc44 gcc46 gcc47 g95 {108 variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc43 gcc44 gcc46 gcc47 g95 openmpi mpich { 83 109 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 } 110 configure.compiler macports-gcc-4.5 87 111 } 88 112 89 variant gcc46 description {build with gfortran-mp-4.6} conflicts gcc43 gcc44 gcc45 gcc47 g95 {113 variant gcc46 description {build with gfortran-mp-4.6} conflicts gcc43 gcc44 gcc45 gcc47 g95 openmpi mpich { 90 114 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 } 115 configure.compiler macports-gcc-4.6 94 116 } 95 117 96 variant gcc47 description {build with gfortran-mp-4.7} conflicts gcc43 gcc44 gcc45 gcc46 g95 {118 variant gcc47 description {build with gfortran-mp-4.7} conflicts gcc43 gcc44 gcc45 gcc46 g95 openmpi mpich { 97 119 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 } 120 configure.compiler macports-gcc-4.7 101 121 } 102 variant g95 description {build with g95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 universal { 122 123 # does not work without --shared-lib, will not accept -force_load in linking stage 124 variant g95 description {build with g95 (static only)} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 universal openmpi mpich { 103 125 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 } 126 configure.args-append --disable-shared 127 configure.env-append F77=${prefix}/bin/g95 107 128 } 108 129 109 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } { 130 if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] \ 131 && ![variant_isset g95] && ![variant_isset openmpi] && ![variant_isset mpich]} { 110 132 default_variants +gcc47 111 133 } 112 134 113 135 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 136 # the change of LDFLAGS is required to avoid linking against the ATLAS ones if they are present; 137 # if we specify /usr/lib/libblas.dylib directly, the linking fails. http://forge.scilab.org/index.php/p/arpack-ng/issues/1220/ 138 configure.args-delete LDFLAGS='' 139 configure.args-append LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack" 140 patchfiles-append patch-ARPACK-cdot-and-zdot.diff 116 141 if {[variant_isset openmpi] || [variant_isset mpich]} { 117 142 patchfiles-append patch-PARPACK-cdot-and-zdot.diff 143 # PARPACK unwisely uses 'second' from LAPACK (not provided by Accelerate) instead of internal 'arscnd' like ARPACK 144 # so, we make a 'second' which wraps 'arscnd'. Really, 'second' should just be replaced in PARPACK source. 145 # http://forge.scilab.org/index.php/p/arpack-ng/issues/1245/ 146 patchfiles-append patch-UTIL-second_NONE.f.diff 118 147 } 119 148 } 120 149 121 150 variant atlas description {build with atlas} { 122 151 depends_lib-append port:atlas 123 configure.args-append --with-blas= ${prefix}/lib/libsatlas.dylib152 configure.args-append --with-blas="-L${prefix}/lib -lsatlas" 124 153 } 125 154 126 155 if {![variant_isset atlas]} {