[116395] trunk/dports/math/petsc/Portfile

sean at macports.org sean at macports.org
Thu Jan 23 12:15:54 PST 2014


Revision: 116395
          https://trac.macports.org/changeset/116395
Author:   sean at macports.org
Date:     2014-01-23 12:15:54 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
petsc: update to 3.4.3 and use new port groups

Modified Paths:
--------------
    trunk/dports/math/petsc/Portfile

Modified: trunk/dports/math/petsc/Portfile
===================================================================
--- trunk/dports/math/petsc/Portfile	2014-01-23 20:15:49 UTC (rev 116394)
+++ trunk/dports/math/petsc/Portfile	2014-01-23 20:15:54 UTC (rev 116395)
@@ -2,12 +2,12 @@
 # $Id$
 
 PortSystem          1.0
-PortGroup           conflicts_build 1.0
-PortGroup           active_variants 1.1
+PortGroup           bitbucket 1.0
+PortGroup           mpi 1.0
 
-name                petsc
-version             3.3-p6
-revision            3
+mpi.setup
+
+bitbucket.setup     petsc petsc 3.4.3 v
 categories          math science
 maintainers         sean
 description         Portable, Extensible Toolkit for Scientific Computation
@@ -21,94 +21,146 @@
                     \texport PETSC_DIR=${prefix}/lib/petsc"
 
 platforms           darwin
-homepage            http://www.mcs.anl.gov/petsc/petsc-as/
-master_sites        ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/ \
-                    http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/
-distname            ${name}-lite-${version}
-worksrcdir          ${name}-${version}
 universal_variant   no
 
-checksums           rmd160  a0aedc01995d60340e302140293d82dcb1ca356c \
-                    sha256  09e03c1d871a44e4322d61b007bbefd0a3e0cea5f5568b8ce243b4ef7c19b0b0
+checksums           rmd160  4956e7161431759efd924b5e897715c63c5343d2 \
+                    sha256  60e2ae4d11bd6481cc8182bada23a7a0c9b9b849a986e33c12d6850147cf50a6
 
-depends_build-append \
-                    port:cmake
-depends_lib-append  port:hdf5-18 \
-                    port:libyaml
+use_parallel_build  no
 
-require_active_variants hdf5-18 fortran
+depends_build       port:cmake
 
 configure.args      --prefix=${prefix}/lib/petsc \
-                    --with-mpi=1 \
-                    --with-clanguage=C++ \
-                    --download-ml \
-                    --download-metis \
-                    --download-parmetis \
-                    --download-blacs \
-                    --download-scalapack \
-                    --download-mumps \
-                    --download-ptscotch \
-                    --with-hdf5-dir=${prefix} \
-                    --with-yaml-dir=${prefix}
+                    --with-valgrind=0 \
+                    --with-mpi=0 \
+                    --with-fc=0 \
+                    --with-shared-libraries
 
 pre-configure {
-    if {![file exists ${prefix}/lib/libhdf5_fortran.a]} {
-        return -code error "Please install hdf5-18 with the +fortran variant enabled first."
-    }
     configure.args-append \
+        --CC="${configure.cc}" \
+        --CXX="${configure.cxx}" \
+        --FC="${configure.fc}" \
         --COPTFLAGS="${configure.optflags}" \
         --CXXOPTFLAGS="${configure.optflags}" \
         --FOPTFLAGS="${configure.optflags}" \
         --LDFLAGS="${configure.ldflags}" \
         --CFLAGS="${configure.cflags}" \
         --CXXFLAGS="${configure.cxxflags}"
+
+    if {[mpi_variant_isset]} {
+        configure.args-delete --with-mpi=0 \
+                              --with-fc=0
+    } elseif {[fortran_variant_isset]} {
+        configure.args-delete --with-fc=0
+    }
+
 }
 
-conflicts_build     petsc
+variant accelerate description {Use Accelerate framework for LAPACK} conflicts atlas {
+    configure.args-append --with-blas-lapack-lib=/System/Library/Frameworks/Accelerate.framework/Versions/Current/Accelerate
+}
 
-variant openmpi description {Build using the OpenMPI compiler} conflicts mpich {
-    depends_lib-append port:openmpi
-    configure.args-append \
-        --with-cc=${prefix}/bin/openmpicc \
-        --with-cxx=${prefix}/bin/openmpicxx \
-        --with-fc=${prefix}/bin/openmpif90 \
-        --with-mpiexec=${prefix}/bin/openmpiexec
+variant atlas description {Use Atlas for LAPACK} conflicts accelerate {
+    configure.args-append --with-blas-lapack-lib=${prefix}/lib/libtatlas.dylib
 }
 
-variant mpich description {Build using the MPICH compiler} conflicts openmpi {
-    depends_lib-append path:bin/mpicc-mp:mpich-default
-    configure.args-append \
-        --with-cc=${prefix}/bin/mpicc-mp \
-        --with-cxx=${prefix}/bin/mpicxx-mp \
-        --with-fc=${prefix}/bin/mpif90-mp \
-        --with-mpiexec=${prefix}/bin/mpiexec-mp
+variant complex description {Build with support for complex numbers} conflicts sundials {
+    configure.args-append --with-scalar-type=complex
+    configure.args-append --with-clanguage=C++
 }
 
-variant accelerate description {Use Accelerate framework for LAPACK} conflicts atlas {
-    configure.args-append \
-        --with-blas-lib=/usr/lib/libblas.dylib \
-        --with-lapack-lib=/usr/lib/liblapack.dylib
-    post-configure {
-        reinplace "s|-L/usr/lib -llapack -lblas|-Wl,-framework -Wl,Accelerate|g" ${worksrcpath}/arch-darwin-cxx-debug/conf/petscvariables
-    }
+variant suitesparse description {Build with CHOLDMOD and UMFPACK} {
+    depends_lib-append    port:SuiteSparse
+    configure.args-append --with-cholmod-dir=${prefix} \
+                          --with-umfpack-dir=${prefix}
 }
 
-variant atlas description {Use Atlas for LAPACK} conflicts accelerate {
-    configure.args-append \
-        --with-blas-lapack-lib=${prefix}/lib/libtatlas.dylib
+variant sundials description {Build with CVODE interface for TS} {
+    depends_lib-append    port:sundials
+    configure.args-append --with-sundials-dir=${prefix}
+    mpi.enforce_variant   sundials
 }
 
-if {![variant_isset mpich]} {
-    default_variants +openmpi
+variant superlu description {Build with SuperLU interface for a serial direct solver} {
+    depends_lib-append    port:superlu
+    configure.args-append --with-superlu-dir=${prefix}
 }
+
+variant mumps description {Build with MUMPS interface for a parallel direct solver} {
+    depends_lib-append    port:mumps
+    configure.args-append --with-scalapack-dir=${prefix} \
+                          --with-mumps-dir=${prefix}
+    mpi.enforce_variant   mumps
+}
+
+variant superlu_dist description {Build with SuperLU_DIST interface for a parallel direct solver} requires parmetis {
+    depends_lib-append    port:superlu_dist
+    configure.args-append --with-superlu_dist-dir=${prefix}
+    mpi.enforce_variant   superlu_dist
+}
+
+variant ml description {Build with ML interface for a sparse parallel solver} {
+    depends_lib-append    port:ml
+    configure.args-append --with-ml-dir=${prefix}
+    mpi.enforce_variant   ml
+}
+
+variant hypre description {Build with HYPRE interface for a sparse parallel solver} {
+    depends_lib-append    port:hypre
+    configure.args-append --with-hypre-dir=${prefix}
+    mpi.enforce_variant   hypre
+}
+
+variant parmetis description {Build with ParMetis interface for parallel graph partitioning} {
+    depends_lib-append    port:metis \
+                          port:parmetis
+    configure.args-append --with-metis-dir=${prefix} \
+                          --with-parmetis-dir=${prefix}
+    mpi.enforce_variant   parmetis
+}
+
+variant hdf5 description {Build with HDF5 interface for parallel file io} {
+    depends_lib-append    port:hdf5-18
+    configure.args-append --with-hdf5-dir=${prefix}
+
+    mpi.enforce_variant   hdf5-18
+}
+
+variant netcdf description {Build with NetCDF interface for parallel file io} {
+    depends_lib-append    port:netcdf
+    configure.args-append --with-netcdf-dir=${prefix}
+    mpi.enforce_variant   netcdf
+}
+
+variant fftw description {Build with FFTW interface (requires MPI)} {
+    depends_lib-append    port:fftw-3
+    configure.args-append --with-fftw-dir=${prefix}
+    mpi.enforce_variant   fftw-3
+}
+
+variant yaml description {Build with YAML interface for option reading} {
+    depends_lib-append    port:libyaml
+    configure.args-append --with-yaml-dir=${prefix}
+}
+
+variant valgrind description {Build with valgrind support} {
+    depends_lib-append    port:valgrind
+    configure.args-delete --with-valgrind=0
+    configure.args-append --with-valgrind-dir=${prefix}
+}
+
+variant debug description {Build with debug support} {
+    configure.args-delete --with-debugging=0
+    configure.args-append --with-debugging=1
+}
+
+if {![mpi_variant_isset]} {
+    default_variants +mpich
+}
+
 if {![variant_isset atlas]} {
     default_variants +accelerate
 }
 
 destroot.destdir    DESTDIR=${destroot}${prefix}/lib/petsc
-
-livecheck.type      regex
-livecheck.url       http://www.mcs.anl.gov/petsc/petsc-2/download/index.html
-livecheck.regex     petsc-lite-(\[0-9.\]+(-p\[0-9\]+))\\.tar\\.gz
-
-variant mpich2 requires mpich description {Legacy compatibility variant} {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/c02f73e6/attachment-0001.html>


More information about the macports-changes mailing list