[110670] trunk/dports/science/magicspp/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Mon Sep 2 22:20:53 PDT 2013
Revision: 110670
https://trac.macports.org/changeset/110670
Author: jeremyhu at macports.org
Date: 2013-09-02 22:20:53 -0700 (Mon, 02 Sep 2013)
Log Message:
-----------
magicspp: Fortran recipe and update blacklisting
Modified Paths:
--------------
trunk/dports/science/magicspp/Portfile
Modified: trunk/dports/science/magicspp/Portfile
===================================================================
--- trunk/dports/science/magicspp/Portfile 2013-09-03 05:17:34 UTC (rev 110669)
+++ trunk/dports/science/magicspp/Portfile 2013-09-03 05:20:53 UTC (rev 110670)
@@ -5,7 +5,7 @@
name magicspp
version 2.18.15
-revision 4
+revision 5
platforms darwin
maintainers takeshi
license Apache-2
@@ -43,11 +43,19 @@
port:proj47 \
port:swig-python
+platform darwin {
+ if {${os.major} >= 13} {
+ depends_lib
+ depends_run
+ pre-fetch {
+ ui_error "$name does not build on Mavericks or later."
+ error "unsupported platform"
+ }
+ }
+}
+
use_parallel_build no
universal_variant no
-if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46]} {
- default_variants +gcc47
-}
if {![variant_isset python25] && ![variant_isset python26]} {
default_variants-append +python27
}
@@ -76,29 +84,53 @@
--with-boost \
--with-boost-libdir=${prefix}/lib
-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {for emos +gcc43} {
- configure.compiler macports-gcc-4.3
- configure.args-append --with-fortran-libraries=${prefix}/lib/gcc43
-}
+# fatal error: 'bits/stream_iterator.h' file not found
+compiler.blacklist *clang*
-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {for emos +gcc44} {
- configure.compiler macports-gcc-4.4
- configure.args-append --with-fortran-libraries=${prefix}/lib/gcc44
-}
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {for emos +gcc45} {
- configure.compiler macports-gcc-4.5
- configure.args-append --with-fortran-libraries=${prefix}/lib/gcc45
+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}"}
+
+ 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 ""
+ }
+ }
}
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {for emos +gcc46} {
- configure.compiler macports-gcc-4.6
- configure.args-append --with-fortran-libraries=${prefix}/lib/gcc46
+if {${default_fortran_variant} != ""} {
+ default_variants-append "${default_fortran_variant}"
}
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {for emos +gcc47} {
- configure.compiler macports-gcc-4.7
- configure.args-append --with-fortran-libraries=${prefix}/lib/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}
+
+ configure.args-append --with-fortran-libraries=${prefix}/lib/gcc${ver_no_dot}
+ }
}
variant python25 description {Add support for python25} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130902/7ac94837/attachment.html>
More information about the macports-changes
mailing list