[110089] trunk/dports/math/octave/Portfile
jeremyhu at macports.org
jeremyhu at macports.org
Sun Aug 25 23:28:56 PDT 2013
Revision: 110089
https://trac.macports.org/changeset/110089
Author: jeremyhu at macports.org
Date: 2013-08-25 23:28:56 -0700 (Sun, 25 Aug 2013)
Log Message:
-----------
octave: Use fortran recipe and note failure on Mavericks
Modified Paths:
--------------
trunk/dports/math/octave/Portfile
Modified: trunk/dports/math/octave/Portfile
===================================================================
--- trunk/dports/math/octave/Portfile 2013-08-26 06:00:16 UTC (rev 110088)
+++ trunk/dports/math/octave/Portfile 2013-08-26 06:28:56 UTC (rev 110089)
@@ -49,14 +49,34 @@
port:SuiteSparse \
port:gsed
-# octave requires a fortran compiler, so require the use of one of the
-# MacPorts GCC ports (for now).
+# TODO: Fix build with clang
+#./DiagArray2.h:97:19: error: dependent using declaration resolved to type without 'typename'
+# using Array<T>::element_type;
+# ^
+#./MDiagArray2.h:42:22: note: in instantiation of template class 'DiagArray2<std::complex<double> >' requested here
+#MDiagArray2 : public DiagArray2<T>
+# ^
+#./CDiagMatrix.h:39:28: note: in instantiation of template class 'MDiagArray2<std::complex<double> >' requested here
+#ComplexDiagMatrix : public MDiagArray2<Complex>
+# ^
+#./Array.h:103:13: note: target of using declaration
+# typedef T element_type;
+# ^
+compiler.blacklist *clang*
-compiler.blacklist gcc-3.3 gcc-4.0 gcc-4.2 llvm-gcc-4.2 \
- apple-gcc-4.0 apple-gcc-4.2 clang macports-clang-2.9 \
- macports-clang-3.0 macports-clang-3.1 macports-clang-3.2 \
- macports-clang-3.3 macports-llvm-gcc-4.2
+platform darwin {
+ if {${os.major} >= 13} {
+ # TODO: Test Mavericks once the clang build failures are addressed
+ depends_lib
+ depends_run
+ pre-fetch {
+ ui_error "$name does not build on Mavericks or later."
+ error "unsupported platform"
+ }
+ }
+}
+
patchfiles \
patch-configure-no_x11.diff \
patch-liboctave_oct-alloc.h.diff \
@@ -135,41 +155,67 @@
}
}
-variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc44 gcc45 gcc46 gcc47 g95 {
- 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 description {build with the macports gcc44 toolchain} conflicts gcc43 gcc45 gcc46 gcc47 g95 {
- configure.compiler macports-gcc-4.4
-}
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
-variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc43 gcc44 gcc46 gcc47 g95 {
- configure.compiler macports-gcc-4.5
-}
+ variant gcc${ver_no_dot} description {build with gfortran from gcc${ver_no_dot}} {}
-variant gcc46 description {build with the macports gcc46 toolchain} conflicts gcc43 gcc44 gcc45 gcc47 g95 {
- configure.compiler macports-gcc-4.6
-}
+ variant gcc${ver_no_dot} conflicts g95 {}
+ variant g95 conflicts gcc${ver_no_dot} {}
-variant gcc47 description {build with the macports gcc47 toolchain} conflicts gcc43 gcc44 gcc45 gcc46 g95 {
- configure.compiler macports-gcc-4.7
+ 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} requires accelerate conflicts atlas gcc43 gcc44 gcc45 gcc46 gcc47 {
- depends_build-append port:g95
- configure.f77 "${prefix}/bin/g95"
+variant g95 description {build with g95} {}
+
+if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
}
-if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset g95] } {
- default_variants +gcc47
+if {${default_fortran_variant} != ""} {
+ default_variants "${default_fortran_variant}"
}
-if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset g95]} {
- pre-fetch {
- return -code error "You must use one of the compiler variants."
+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.type regex
livecheck.url http://www.gnu.org/software/octave/news.html
livecheck.regex Version (\\d+(\\.\\d+)*)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130825/70c6fb6a/attachment-0001.html>
More information about the macports-changes
mailing list