[136797] trunk/dports/science/Gyoto/Portfile

thibaut at macports.org thibaut at macports.org
Wed May 27 05:51:51 PDT 2015


Revision: 136797
          https://trac.macports.org/changeset/136797
Author:   thibaut at macports.org
Date:     2015-05-27 05:51:51 -0700 (Wed, 27 May 2015)
Log Message:
-----------
Gyoto: update to 1.0.1; add py??-gyoto subports; add openmpi and mpich variants.

Modified Paths:
--------------
    trunk/dports/science/Gyoto/Portfile

Modified: trunk/dports/science/Gyoto/Portfile
===================================================================
--- trunk/dports/science/Gyoto/Portfile	2015-05-27 10:12:27 UTC (rev 136796)
+++ trunk/dports/science/Gyoto/Portfile	2015-05-27 12:51:51 UTC (rev 136797)
@@ -3,8 +3,9 @@
 
 PortSystem          1.0
 PortGroup           github 1.0
+PortGroup           active_variants 1.1
 
-github.setup        gyoto Gyoto 0.2.3
+github.setup        gyoto Gyoto 1.0.1
 license             GPL-3+
 categories          science yorick
 platforms           darwin
@@ -17,8 +18,8 @@
                     language. Gyoto can be extended with plug-ins.
 homepage            http://gyoto.obspm.fr
 
-checksums           rmd160  bd26e736a4589e3d4d145b7014c6e8c86af42588 \
-                    sha256  ffb29ed6e495dbcd930dcb7f2c1a633958ae788b189dded62c242a19d60c8630
+checksums           rmd160  773c9fe40ea2a17b5fad0b75a0f1376d28927d94 \
+                    sha256  643c1955fdef5ec8747cd42a4fe075ddaeb822e924f9f49ba895a6f0d8832cb1
 
 depends_lib         port:cfitsio \
                     port:xercesc3 \
@@ -31,18 +32,72 @@
 # yorick is not universal
 universal_variant   no
 
-patchfiles          patch-yorick-Makefile.in.diff
+configure.args      --with-yorick=${prefix}/bin/yorick \
+                    --without-lorene \
+                    --with-xerces \
+                    --disable-doc \
+                    --with-cfitsio \
+                    --with-udunits-inc=${prefix}/include/udunits2/ \
+                    --with-udunits-lib=-L${prefix}/lib/ \
+                    --enable-release \
+                    --without-mpi
 
-configure.args      --with-yorick=${prefix}/bin/yorick --without-lorene --with-xerces --disable-doc --with-cfitsio \
-                    --with-udunits-inc=${prefix}/include/udunits2/ --with-udunits-lib=-L${prefix}/lib/
-
 build.args-append    Y_CFLAGS="${configure.cxxflags}" Y_CPPFLAGS="${configure.cppflags}" CC="${configure.cc}" COPT_DEFAULT="" Y_LDFLAGS="${configure.ldflags}"
 
+test.target          check
+test.run             yes
+
+
+if {![catch {set result [active_variants boost openmpi {}]}]} {
+  if {$result} {
+    default_variants +openmpi
+  } else {
+      if {[active_variants boost mpich {}]} {
+          default_variants +mpich
+      }
+  }
+} else {
+  default_variants +openmpi
+}
+
+foreach nodot [list 27 33 34] wdot [list 2.7 3.3 3.4] {
+    subport py${nodot}-gyoto {
+        depends_lib-append   port:python${nodot} port:Gyoto
+        categories    python science
+        configure.args-append PYTHON=${prefix}/bin/python${wdot}
+        use_parallel_build no
+        build.args    -C python
+        destroot.args -C python INSTALL_DATA=true prefix=${frameworks_dir}/Python.framework/Versions/${wdot}
+        test.run no
+    }
+}
+
+subport Gyoto {
+    post-destroot {
+        xinstall -W ${worksrcpath}/python gyoto.i gyoto_std.i gyoto_lorene.i numpy.i ${destroot}/${prefix}/include/Gyoto/
+    }
+}
+
 if {[string match libc++ ${configure.cxx_stdlib}]} {
+
     depends_lib-append port:boost
+    
+    variant openmpi conflicts mpich \
+        description {Add MPI parallelization using OpenMPI} {
+        require_active_variants boost openmpi {}
+        depends_lib-append port:openmpi
+        configure.args-delete --without-mpi
+        configure.args-append --with-mpi MPICC=mpicc-openmpi-mp MPICXX=mpicxx-openmpi-mp
+    }
+
+    variant mpich conflicts openmpi \
+        description {Add MPI parallelization using MPICH} {
+        require_active_variants boost mpich {}
+        depends_lib-append port:mpich
+        configure.args-delete --without-mpi
+        configure.args-append --with-mpi MPICC=mpicc-mpich-mp MPICXX=mpicxx-mpich-mp
+    }
+
 } else {
     configure.args-append --disable-c++11
 }
-
-test.target          check
-test.run             yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150527/2c44948c/attachment.html>


More information about the macports-changes mailing list