Ticket #43121: abinit-7.4.3-Portfile-rev0-rev1.diff
File abinit-7.4.3-Portfile-rev0-rev1.diff, 10.8 KB (added by cram5431@…, 11 years ago) |
---|
-
(a) Portfile_0 vs. (b) Portfile_1
a b 3 3 4 4 PortSystem 1.0 5 5 PortGroup active_variants 1.1 6 PortGroup mpi 1.0 6 7 7 8 name abinit 8 9 version 7.4.3 10 revision 1 9 11 categories science 10 12 platforms darwin 11 13 license GPL-3 … … 34 36 checksums rmd160 6e3629a94721440f8afacbcaf2b046b5c6e9b23d \ 35 37 sha256 3593dc96c124c0e1ad29a5ec13e9e8f8dc391b328cf06ed461e34f5a9298b246 36 38 39 #Restrict to gcc/clang because of dependencies 40 compilers.choose fc cc cxx cpp 41 compilers.setup -clang -dragonegg -llvm 42 mpi.setup 43 37 44 depends_lib port:atlas 38 45 39 46 configure.args --with-linalg-flavor="atlas" --enable-gw-dpc … … 44 51 use_parallel_build no 45 52 46 53 default_variants +etsf_io +libxc +wannier90 47 if { ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48] } {48 if { ![variant_isset openmpi] } {49 default_variants +mpich50 } elseif { ![variant_isset mpich] } {51 default_variants +openmpi52 } else {53 default_variants +gcc4854 }55 }56 57 pre-fetch {58 set fortran unknown59 set fortrans { gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 g95 }60 54 61 foreach fc_name ${fortrans} { 62 if { [variant_isset ${fc_name}] } { 63 set fortran ${fc_name} 64 } elseif { [variant_isset openmpi] } { 65 if { [_portnameactive openmpi-default] } { 66 if { [active_variants openmpi-default ${fc_name}] } { set fortran ${fc_name} } 67 } elseif { [_portnameactive openmpi-devel-default] } { 68 if { [active_variants openmpi-devel-default ${fc_name}] } { set fortran ${fc_name} } 69 } 70 } elseif { [variant_isset mpich] } { 71 if { [_portnameactive mpich-default] } { 72 if { [active_variants mpich-default ${fc_name}] } { set fortran ${fc_name} } 73 } elseif { [_portnameactive mpich-devel-default] } { 74 if { [active_variants mpich-devel-default ${fc_name}] } { set fortran ${fc_name} } 75 } 55 #Select mpi/gcc default 56 set current_mpi "none" 57 if { ![variant_isset no_mpi] } { 58 if { [mpi_variant_isset] } { 59 set current_mpi [mpi_variant_name] 60 } else { 61 if {![catch {set current_mpi [file link ${prefix}/etc/select/mpi/current]}]} { 62 if { ${current_mpi} eq "base" } { set current_mpi "none" } 76 63 } 77 } 78 79 if { ${fortran} eq "unknown" } { 80 if { [variant_isset openmpi] } { 81 ui_error "Variant +openmpi requires openmpi to have been built with Fortran support." 82 return -code error "Variant +openmpi requires openmpi to have been built with Fortran support." 83 } elseif { [variant_isset mpich] } { 84 ui_error "Variant +mpich requires mpich-default/mpich-devel-default to have been built with Fortran support." 85 return -code error "Variant +mpich requires mpich-default/mpich-devel-default to have been built with Fortran support." 86 } else { 87 ui_error "Internal error: cannot determine Fortran compiler." 88 return -code error "Internal error: cannot determine Fortran compiler." 64 if { ${current_mpi} eq "none"} { 65 default_variants-append +mpich 89 66 } 90 67 } 68 } else { 69 default_variants-append +gcc48 70 } 91 71 72 pre-fetch { 92 73 if { [variant_isset libxc] } { 93 if { ![active_variants libxc ${fortran}] } {94 ui_error " libxc must have been built with +${fortran}."95 return -code error "libxc must have been built with + ${fortran}."74 if { ![active_variants libxc [c_variant_name]] } { 75 ui_error "\nlibxc must have been built with +[c_variant_name]\n" 76 return -code error "libxc must have been built with +[c_variant_name]" 96 77 } 97 78 } 98 99 79 if { [variant_isset netcdf] } { 100 if {![active_variants netcdf-fortran ${fortran}] } {101 ui_error " netcdf-fortran must have been built with +${fortran}."102 return -code error "netcdf-fortran must have been built with + ${fortran}."80 if {![active_variants netcdf-fortran [c_variant_name]] } { 81 ui_error "\nnetcdf-fortran must have been built with +[c_variant_name]\n" 82 return -code error "netcdf-fortran must have been built with +[c_variant_name]" 103 83 } 104 84 } 105 106 85 if { [variant_isset etsf_io] } { 107 if {![active_variants etsf_io ${fortran}] } { 108 ui_error "etsf_io must have been built with +${fortran}." 109 return -code error "etsf_io must have been built with +${fortran}." 86 if {![active_variants etsf_io [fortran_variant_name]] } { 87 ui_error "\netsf_io must have been built with +[fortran_variant_name]\n" 88 return -code error "etsf_io must have been built with +[fortran_variant_name]" 89 } 90 } 91 if { [variant_isset fftw3] } { 92 if {![active_variants fftw-3 gfortran] || \ 93 ![active_variants fftw-3-single gfortran]} { 94 ui_error "\nfftw-3 and nfftw-3-single must have been built with +gfortran:" 95 ui_error "This can be achieved by : sudo port -f install fftw-3-single +gfortran\n" 96 return -code error "fftw-3/fftw-3-single must have been built with +gfortran" 110 97 } 111 98 } 112 113 # No need to check compiler for wannier90114 # No need to check compiler for fftw-3115 99 } 116 100 117 101 pre-configure { … … 122 106 } else { 123 107 configure.args-append --with-trio-flavor="none" 124 108 } 125 126 set dft-flavor "none" 109 set dft-flavor "none" 127 110 if { [variant_isset libxc] } { 128 if { ${dft-flavor} eq "none" } { 111 if { ${dft-flavor} eq "none" } { 129 112 set dft-flavor "libxc" 130 113 } else { 131 set dft-flavor ${dft-flavor}"+libxc" 114 set dft-flavor ${dft-flavor}"+libxc" 132 115 } 133 116 } 134 117 if { [variant_isset wannier90] } { 135 if { ${dft-flavor} eq "none" } { 118 if { ${dft-flavor} eq "none" } { 136 119 set dft-flavor "wannier90" 137 120 } else { 138 set dft-flavor ${dft-flavor}"+wannier90" 121 set dft-flavor ${dft-flavor}"+wannier90" 139 122 } 140 123 } 141 124 if { [variant_isset bigdft] } { 142 if { ${dft-flavor} eq "none" } { 125 if { ${dft-flavor} eq "none" } { 143 126 set dft-flavor "bigdft" 144 127 } else { 145 set dft-flavor ${dft-flavor}"+bigdft" 128 set dft-flavor ${dft-flavor}"+bigdft" 146 129 } 147 130 } 148 131 if { [variant_isset atompaw] } { 149 if { ${dft-flavor} eq "none" } { 132 if { ${dft-flavor} eq "none" } { 150 133 set dft-flavor "atompaw" 151 134 } else { 152 set dft-flavor ${dft-flavor}"+atompaw" 135 set dft-flavor ${dft-flavor}"+atompaw" 153 136 } 154 137 } 155 138 configure.args-append --with-dft-flavor="${dft-flavor}" 139 140 configure.args-append FCCPP="${configure.cpp} -ansi" 141 142 if { ${current_mpi} ne "none"} { 143 configure.args-append --enable-mpi="yes" --enable-mpi-io="yes" 144 if {[string match *openmpi* ${current_mpi}]} { 145 configure.args-append --with-mpi-level="1" 146 } 147 if { ![mpi_variant_isset] } { 148 configure.fc ${mpi.fc} 149 configure.cc ${mpi.cc} 150 configure.cxx ${mpi.cxx} 151 } 152 if { ${mpi.exec} ne "" } { 153 configure.args-append MPI_RUNNER=${mpi.exec} 154 test.env-append MPIEXEC=${mpi.exec} 155 } 156 } else { 157 configure.args-append --enable-mpi="no" --enable-mpi-io="no" 158 } 156 159 } 157 160 158 161 destroot { … … 173 176 test.run yes 174 177 test.target check-full 175 178 176 177 variant gcc46 conflicts gcc47 gcc48 openmpi mpich description {Build with GCC 4.6} { 178 configure.compiler macports-gcc-4.6 179 configure.args-append FCCPP="${configure.cpp} -ansi" 180 } 181 182 variant gcc47 conflicts gcc46 gcc48 openmpi mpich description {Build with GCC 4.7} { 183 configure.compiler macports-gcc-4.7 184 configure.args-append FCCPP="${configure.cpp} -ansi" 185 } 186 187 variant gcc48 conflicts gcc46 gcc47 openmpi mpich description {Build with GCC 4.8} { 188 configure.compiler macports-gcc-4.8 189 configure.args-append FCCPP="${configure.cpp} -ansi" 190 } 191 192 variant openmpi conflicts gcc46 gcc47 gcc48 mpich description {Build parallel version with OpenMPI} { 193 depends_lib-append path:bin/mpif90-openmpi-mp:openmpi-default 194 configure.fc mpif90-openmpi-mp 195 configure.cc mpicc-openmpi-mp 196 configure.cxx mpicxx-openmpi-mp 197 configure.args-append FCCPP="${configure.cc} -E -ansi" 198 configure.args-append --enable-mpi="yes" --enable-mpi-io="yes" --with-mpi-level="1" 199 configure.args-append MPI_RUNNER=${prefix}/bin/mpiexec-openmpi-mp 200 test.env-append MPIEXEC=${prefix}/bin/mpiexec-openmpi-mp 201 } 202 203 variant mpich conflicts gcc46 gcc47 gcc48 openmpi description {Build parallel version with MPICH} { 204 depends_lib-append path:bin/mpif90-mpich-mp:mpich-default 205 configure.fc mpif90-mpich-mp 206 configure.cc mpicc-mpich-mp 207 configure.cxx mpicxx-mpich-mp 208 configure.args-append FCCPP="${configure.cc} -E -ansi" 209 configure.args-append --enable-mpi="yes" --enable-mpi-io="yes" 210 configure.args-append MPI_RUNNER=${prefix}/bin/mpiexec-mpich-mp 211 test.env-append MPIEXEC=${prefix}/bin/mpiexec-mpich-mp 212 } 213 214 variant fftw-3 description {Build with support for fftw-3 FFT library} { 179 variant fftw3 description {Build with support for fftw-3 FFT library} { 215 180 depends_lib-append port:fftw-3 181 depends_lib-append port:fftw-3-single 182 # require_active_variants fftw-3 gfortran 183 # require_active_variants fftw-3-single gfortran 216 184 if { [variant_isset threads] } { 217 185 configure.args-append --with-fft-flavor="fftw3-threads" 218 configure.args-append --with-fft-libs="-lfftw3_threads -lfftw3 "186 configure.args-append --with-fft-libs="-lfftw3_threads -lfftw3 -lfftw3f" 219 187 } else { 220 188 configure.args-append --with-fft-flavor="fftw3" 221 configure.args-append --with-fft-libs="-lfftw3 "189 configure.args-append --with-fft-libs="-lfftw3 -lfftw3f" 222 190 } 223 191 } 224 192 … … 252 220 } 253 221 254 222 variant bigdft description {Build with support for the wavelet BigDFT library} { 255 # Patch bigdft-abi-1.0.4 (missing config. Sub and config.guess)223 # Patch bigdft-abi-1.0.4 (missing config.sub and config.guess) 256 224 patchfiles-append patch-bigdft-config.diff 257 225 } 258 226 259 227 variant atompaw description {Build including AtomPAW atomic dataset generator} { 260 228 } 261 229 230 variant no_mpi conflicts mpich mpich_devel openmpi openmpi_devel description {Build without MPI support} { 231 } 232 262 233 livecheck.type regex 263 234 livecheck.url ${homepage}/downloads/source-packages/abinit-1/releases/index.html 264 235 livecheck.regex ABINIT (\[0-9.\]+)