[111703] trunk/dports/math/dotwrp/Portfile
takeshi at macports.org
takeshi at macports.org
Sat Sep 28 17:55:56 PDT 2013
Revision: 111703
https://trac.macports.org/changeset/111703
Author: takeshi at macports.org
Date: 2013-09-28 17:55:56 -0700 (Sat, 28 Sep 2013)
Log Message:
-----------
dotwrp: used Fortran recipe and set gcc48 as the default, closing #40609
Modified Paths:
--------------
trunk/dports/math/dotwrp/Portfile
Modified: trunk/dports/math/dotwrp/Portfile
===================================================================
--- trunk/dports/math/dotwrp/Portfile 2013-09-28 23:57:36 UTC (rev 111702)
+++ trunk/dports/math/dotwrp/Portfile 2013-09-29 00:55:56 UTC (rev 111703)
@@ -5,7 +5,7 @@
PortGroup github 1.0
github.setup tenomoto dotwrp 1.1 v
-revision 2
+revision 3
categories math science
platforms darwin
maintainers takeshi
@@ -21,27 +21,10 @@
use_configure no
-if { ![variant_isset g95] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc48]} {
- default_variants +gcc47
-}
-
-if {[variant_isset g95]} {
- set fc ${prefix}/bin/g95
-} elseif {[variant_isset gcc48]} {
- set fc ${prefix}/bin/gfortran-mp-4.8
-} elseif {[variant_isset gcc47]} {
- set fc ${prefix}/bin/gfortran-mp-4.7
-} elseif {[variant_isset gcc46]} {
- set fc ${prefix}/bin/gfortran-mp-4.6
-} elseif {[variant_isset gcc45]} {
- set fc ${prefix}/bin/gfortran-mp-4.5
-} else {
- set fc ${prefix}/bin/gfortran-mp-4.4
-}
-set fflags "${configure.fflags} -fno-underscoring"
+configure.fflags-append -fno-underscoring
build {
system "cd ${worksrcpath};
- ${fc} ${fflags} -c ${name}.f90;
+ ${configure.fc} ${configure.fflags} -c ${name}.f90;
/usr/bin/ar -cru lib${name}.a ${name}.o;
/usr/bin/ranlib lib${name}.a"
}
@@ -50,31 +33,66 @@
xinstall -m 644 ${worksrcpath}/lib${name}.a ${destroot}${prefix}/lib
}
-variant g95 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 description {compile with g95} {
- depends_build port:g95
-}
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
+set g95_conflicts {}
-variant gcc44 conflicts g95 gcc45 gcc46 gcc47 gcc48 description {compile with gfortran-mp-4.4} {
- depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build port:gcc44
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
+
+ set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
+
+ 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
+
+ append g95_conflicts " conflicts gcc${ver_no_dot}"
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+ set default_fortran_variant ""
+ }
+ }
}
-variant gcc45 conflicts g95 gcc44 gcc46 gcc47 gcc48 description {compile with gfortran-mp-4.5} {
- depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build port:gcc45
+eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
+
+if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
}
-variant gcc46 conflicts g95 gcc44 gcc45 gcc47 gcc48 description {compile with gfortran-mp-4.6} {
- depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build port:gcc46
+if {${default_fortran_variant} != ""} {
+ default_variants-append "${default_fortran_variant}"
}
-variant gcc47 conflicts g95 gcc44 gcc45 gcc46 gcc48 description {compile with gfortran-mp-4.7} {
- depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build port:gcc47
+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.fc ${prefix}/bin/gfortran-mp-${ver}
+ configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+ configure.f90 ${prefix}/bin/gfortran-mp-${ver}
+ }
}
-variant gcc48 conflicts g95 gcc44 gcc45 gcc46 gcc47 description {compile with gfortran-mp-4.8} {
- depends_lib path:lib/libgcc/libgcc_s.1.dylib:libgcc
- depends_build port:gcc48
+if {[variant_isset g95]} {
+ depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
+ depends_build-append port:g95
+
+ configure.fc ${prefix}/bin/g95
+ configure.f77 ${prefix}/bin/g95
+ configure.f90 ${prefix}/bin/g95
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130928/fbcae5e5/attachment.html>
More information about the macports-changes
mailing list