[116352] trunk/dports/lang/omnixmp/Portfile

sean at macports.org sean at macports.org
Thu Jan 23 12:13:05 PST 2014


Revision: 116352
          https://trac.macports.org/changeset/116352
Author:   sean at macports.org
Date:     2014-01-23 12:13:05 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
omnixmp: use mpi portgroup

Modified Paths:
--------------
    trunk/dports/lang/omnixmp/Portfile

Modified: trunk/dports/lang/omnixmp/Portfile
===================================================================
--- trunk/dports/lang/omnixmp/Portfile	2014-01-23 20:13:02 UTC (rev 116351)
+++ trunk/dports/lang/omnixmp/Portfile	2014-01-23 20:13:05 UTC (rev 116352)
@@ -2,9 +2,14 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           mpi 1.0
 
+mpi.choose
+mpi.setup           require_fortran -clang -dragonegg -fortran
+
 name                omnixmp
 version             0.6.1
+revision            1
 categories          lang devel parallel
 maintainers         takeshi openmaintainer
 description         Omni OpenMP/XcalableMP Compiler
@@ -29,11 +34,7 @@
                     patch-c-expr.c.diff \
                     patch-libxmpf-Makefile.in.diff
 
-post-patch {
-    if {${build_arch} eq "x86_64"} {
-        reinplace "s|CPU=i386|CPU=x86_64|g" ${worksrcpath}/configure
-    }
-}
+use_parallel_build  no
 
 configure.args      --prefix=${prefix}/lib/${name} \
                     --disable-xmpgpu \
@@ -42,73 +43,30 @@
                     --with-cflag=${configure.cflags} \
                     --with-cppflag="${configure.cppflags} -I${prefix}/include/libxml2 -I/usr/include -DSIMPLE_SPIN"
 
+post-patch {
+    if {${build_arch} eq "x86_64"} {
+        reinplace "s|CPU=i386|CPU=x86_64|g" ${worksrcpath}/configure
+    }
+}
+
 post-destroot {
     ln -s ${prefix}/lib/${name}/bin/xmpcc ${destroot}${prefix}/bin
 }
 
-if {![variant_isset mpich] && ![variant_isset universal]} {
-    default_variants-append +openmpi
-} else {
-    default_variants-append +mpich
+if {![fortran_variant_isset]} {
+    default_variants-append +gcc48
 }
 
-use_parallel_build  no
-
-set gcc_versions {4.4 4.5 4.6 4.7 4.8 4.9}
-set default_fortran_variant +gcc48
-
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    set variant_line {variant gcc${ver_no_dot} description "build with gcc${ver_no_dot}"}
-
-    foreach over ${gcc_versions} {
-        if {${ver} == ${over}} {
-            continue
-        }
-
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts gcc${over_no_dot}"
-    }
-    append variant_line { {}}
-
-    eval $variant_line
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
-            set default_fortran_variant ""
-        }
-    }
+if {![mpi_variant_isset]} {
+    default_variants-append +mpich
 }
 
-if {${default_fortran_variant} != ""} {
-    default_variants-append "${default_fortran_variant}"
-}
-
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-        depends_build-append port:gcc${ver_no_dot}
-
-        configure.compiler macports-gcc-${ver}
+pre-configure {
+    if {[mpi_variant_isset]} {
+        configure.args-append   --with-mpicc=${mpi.cc} \
+                                --with-mpif90=${mpi.fc}
     }
 }
 
-variant openmpi conflicts mpich universal description {build with OpenMPI} {
-    depends_lib-append      port:openmpi
-    configure.args-append   --with-mpicc=${prefix}/lib/openmpi/bin/mpicc
-    configure.args-append   --with-mpif90=${prefix}/lib/openmpi/bin/mpif90
-}
-
-variant mpich2 requires mpich description {Variant remaned as +mpich} {}
-
-variant mpich conflicts openmpi description {build with MPICH} {
-    depends_lib-append      path:bin/mpicc-mp:mpich-default
-    configure.args-append   --with-mpicc=${prefix}/bin/mpicc-mp
-    configure.args-append   --with-mpif90=${prefix}/bin/mpif90-mp
-}
-
 notes \
    ${name} is installed in ${prefix}/lib/${name}.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/1a9e8e8f/attachment-0001.html>


More information about the macports-changes mailing list