[112742] trunk/dports/math/fgsl/Portfile
takeshi at macports.org
takeshi at macports.org
Wed Oct 30 14:11:23 PDT 2013
Revision: 112742
https://trac.macports.org/changeset/112742
Author: takeshi at macports.org
Date: 2013-10-30 14:11:22 -0700 (Wed, 30 Oct 2013)
Log Message:
-----------
fgsl: added gcc48 and gcc49 following PortfileRecipes#fortran
Modified Paths:
--------------
trunk/dports/math/fgsl/Portfile
Modified: trunk/dports/math/fgsl/Portfile
===================================================================
--- trunk/dports/math/fgsl/Portfile 2013-10-30 21:04:43 UTC (rev 112741)
+++ trunk/dports/math/fgsl/Portfile 2013-10-30 21:11:22 UTC (rev 112742)
@@ -5,7 +5,7 @@
name fgsl
version 0.9.4
-revision 1
+revision 2
categories math science
maintainers takeshi
license GPL-2
@@ -28,22 +28,71 @@
reinplace "s|error_3\.exe||" ${worksrcpath}/doc/examples/Makefile
}
-if {![variant_isset g95] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc48]} {
- default_variants +gcc47
+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 {}
+
+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 ""
+ }
+ }
}
+eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
+
if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
+}
+
+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.fc ${prefix}/bin/gfortran-mp-${ver}
+ configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+ configure.f90 ${prefix}/bin/gfortran-mp-${ver}
+ set f90 gfortran-mp-${ver}
+ }
+}
+
+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
set f90 g95
-} elseif {[variant_isset gcc45]} {
- set f90 gfortran-mp-4.5
-} elseif {[variant_isset gcc46]} {
- set f90 gfortran-mp-4.6
-} elseif {[variant_isset gcc47]} {
- set f90 gfortran-mp-4.7
-} elseif {[variant_isset gcc48]} {
- set f90 gfortran-mp-4.8
-}
-if {![variant_isset g95]} {
+} else {
post-patch {
reinplace "s|gfortran|${f90}|" ${worksrcpath}/configure
}
@@ -62,26 +111,6 @@
universal_variant no
-variant g95 conflicts gcc45 gcc46 gcc47 gcc48 description {build with g95} {
- depends_build-append port:g95
-}
-variant gcc45 conflicts g95 gcc46 gcc47 gcc48 description {build with gcc45} {
- depends_build-append port:gcc45
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-}
-variant gcc46 conflicts g95 gcc45 gcc47 gcc48 description {build with gcc46} {
- depends_build-append port:gcc46
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-}
-variant gcc47 conflicts g95 gcc45 gcc46 gcc48 description {build with gcc47} {
- depends_build-append port:gcc47
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-}
-variant gcc48 conflicts g95 gcc45 gcc46 gcc47 description {build with gcc48} {
- depends_build-append port:gcc48
- depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-}
-
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex {Download .*version ([0-9]+\.[0-9]+\.*[0-9]*)}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131030/84e88dac/attachment-0001.html>
More information about the macports-changes
mailing list