[110049] trunk/dports/math/blitz/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Sun Aug 25 09:55:54 PDT 2013
Revision: 110049
https://trac.macports.org/changeset/110049
Author: jeremyhu at macports.org
Date: 2013-08-25 09:55:54 -0700 (Sun, 25 Aug 2013)
Log Message:
-----------
blitz: Support +universal and just use compiler variants to choose fortran compiler
Modified Paths:
--------------
trunk/dports/math/blitz/Portfile
Modified: trunk/dports/math/blitz/Portfile
===================================================================
--- trunk/dports/math/blitz/Portfile 2013-08-25 16:44:42 UTC (rev 110048)
+++ trunk/dports/math/blitz/Portfile 2013-08-25 16:55:54 UTC (rev 110049)
@@ -2,10 +2,11 @@
# $Id$
PortSystem 1.0
+PortGroup muniversal 1.0
name blitz
version 0.10
-revision 2
+revision 3
categories math devel
license {LGPL-3+ BSD Artistic-2}
platforms darwin
@@ -34,22 +35,6 @@
destroot.args docdir=${prefix}/share/doc/${name}
-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Use the gcc43 compiler} {
- configure.compiler macports-gcc-4.3
-}
-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Use the gcc44 compiler} {
- configure.compiler macports-gcc-4.4
-}
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Use the gcc45 compiler} {
- configure.compiler macports-gcc-4.5
-}
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Use the gcc46 compiler} {
- configure.compiler macports-gcc-4.6
-}
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Use the gcc47 compiler} {
- configure.compiler macports-gcc-4.7
-}
-
pre-build {
build.env-append CC="${configure.cc}" \
CXX="${configure.cxx}" \
@@ -61,7 +46,65 @@
F77="${configure.f77}"
}
-# does not build universal software
-universal_variant no
+set gcc_versions {4.3 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} "."] ""]
+
+ variant gcc${ver_no_dot} description {build with gfortran from gcc${ver_no_dot}} {}
+
+ variant gcc${ver_no_dot} conflicts g95 {}
+ variant g95 conflicts gcc${ver_no_dot} {}
+
+ foreach over ${gcc_versions} {
+ if {${ver} == ${over}} {
+ continue
+ }
+
+ set over_no_dot [join [split ${over} "."] ""]
+ variant gcc${ver_no_dot} conflicts gcc${over_no_dot} {}
+ }
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+ set default_fortran_variant ""
+ }
+ }
+}
+
+variant g95 description {build with g95} {}
+
+if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
+}
+
+if {${default_fortran_variant} != ""} {
+ default_variants "${default_fortran_variant}"
+}
+
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ depends_lib-append port: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}
+ }
+}
+
+if {[variant_isset g95]} {
+ depends_lib-append port:libgcc
+ depends_build-append port:g95
+
+ configure.fc ${prefix}/bin/g95
+ configure.f77 ${prefix}/bin/g95
+ configure.f90 ${prefix}/bin/g95
+}
+
livecheck.regex /${name}-(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130825/7241633a/attachment.html>
More information about the macports-changes
mailing list