[110139] trunk/dports/science/jags/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Tue Aug 27 00:36:26 PDT 2013
Revision: 110139
https://trac.macports.org/changeset/110139
Author: jeremyhu at macports.org
Date: 2013-08-27 00:36:26 -0700 (Tue, 27 Aug 2013)
Log Message:
-----------
jags: Use fortran recipe. Fixes build on Mavericks
Modified Paths:
--------------
trunk/dports/science/jags/Portfile
Modified: trunk/dports/science/jags/Portfile
===================================================================
--- trunk/dports/science/jags/Portfile 2013-08-27 06:19:03 UTC (rev 110138)
+++ trunk/dports/science/jags/Portfile 2013-08-27 07:36:26 UTC (rev 110139)
@@ -5,6 +5,7 @@
name jags
version 3.3.0
+revision 1
set major [lindex [split ${version} .] 0]
categories science
platforms darwin
@@ -28,42 +29,55 @@
configure.args --with-blas='-framework vecLib' \
--with-lapack='-framework vecLib'
-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Use the gcc43 compiler} {
- configure.compiler macports-gcc-4.3
-}
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Use the gcc44 compiler} {
- configure.compiler macports-gcc-4.4
-}
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Use the gcc45 compiler} {
- configure.compiler macports-gcc-4.5
-}
+ variant gcc${ver_no_dot} description {build with gfortran from gcc${ver_no_dot}} {}
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Use the gcc46 compiler} {
- configure.compiler macports-gcc-4.6
-}
+ foreach over ${gcc_versions} {
+ if {${ver} == ${over}} {
+ continue
+ }
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Use the gcc47 compiler} {
- configure.compiler macports-gcc-4.7
-}
+ set over_no_dot [join [split ${over} "."] ""]
+ variant gcc${ver_no_dot} conflicts gcc${over_no_dot} {}
+ }
-if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46]} {
- default_variants +gcc47
+ if {[variant_isset gcc${ver_no_dot}]} {
+ if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+ set default_fortran_variant ""
+ }
+ }
}
-pre-build {
- build.env-append CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- F77="${configure.f77}"
+if {${default_fortran_variant} != ""} {
+ default_variants-append "${default_fortran_variant}"
}
-pre-destroot {
- destroot.env-append CC="${configure.cc}" \
- CXX="${configure.cxx}" \
- F77="${configure.f77}"
+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}
+ }
}
+build.env-append CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ F77="${configure.f77}"
+
+destroot.env-append CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ F77="${configure.f77}"
+
livecheck.type sourceforge
livecheck.name mcmc-jags
livecheck.regex /JAGS-(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130827/6a061e61/attachment.html>
More information about the macports-changes
mailing list