Revision: 74740 http://trac.macports.org/changeset/74740 Author: jmr@macports.org Date: 2010-12-31 10:01:50 -0800 (Fri, 31 Dec 2010) Log Message: ----------- octave: add accelerate variant as an alternative to atlas (#21797), fix build with g95, add gcc45 variant, make sure that a compiler variant is used Modified Paths: -------------- trunk/dports/math/octave/Portfile Modified: trunk/dports/math/octave/Portfile =================================================================== --- trunk/dports/math/octave/Portfile 2010-12-31 18:01:07 UTC (rev 74739) +++ trunk/dports/math/octave/Portfile 2010-12-31 18:01:50 UTC (rev 74740) @@ -31,7 +31,6 @@ port:texinfo depends_lib port:arpack \ - port:atlas \ port:curl \ port:fftw-3 \ port:fftw-3-single \ @@ -80,24 +79,64 @@ test.run yes test.target check -variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc44 g95 { +variant atlas conflicts accelerate description {use BLAS from ATLAS} { + depends_lib-append port:atlas +} +variant accelerate conflicts atlas description {use BLAS from Accelerate.framework} { + configure.fflags-append -ff2c + if {![variant_isset g95]} { + configure.args-append --with-blas="-framework Accelerate" + } + configure.args-append --with-lapack="-framework Accelerate" + + if {[string match *64* $build_arch] && ${os.major} == 10} { + # see http://www.macresearch.org/lapackblas-fortran-106#comment-17217 + pre-fetch { + return -code error "Accelerate.framework cannot be used by 64-bit FORTRAN code on Snow Leopard." + } + } +} +if {[variant_isset g95]} { + default_variants +accelerate +} elseif {![variant_isset accelerate]} { + default_variants +atlas +} +if {![variant_isset atlas] && ![variant_isset accelerate]} { + pre-fetch { + return -code error "You must use either the atlas or accelerate variant." + } +} + +variant gcc43 description {build with the macports gcc43 toolchain} conflicts gcc44 gcc45 g95 { depends_build-append port:gcc43 configure.compiler macports-gcc-4.3 } -variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc43 g95 { +variant gcc44 description {build with the macports gcc44 toolchain} conflicts gcc43 gcc45 g95 { depends_build-append port:gcc44 configure.compiler macports-gcc-4.4 } -variant g95 description {build with g95} conflicts gcc43 gcc44 { +variant gcc45 description {build with the macports gcc45 toolchain} conflicts gcc43 gcc44 g95 { + depends_build-append port:gcc45 + configure.compiler macports-gcc-4.5 +} + +variant g95 description {build with g95} requires accelerate conflicts atlas gcc43 gcc44 gcc45 { depends_build-append port:g95 + depends_lib-append port:dotwrp configure.f77 "${prefix}/bin/g95" + configure.args-append --with-blas="-ldotwrp -framework Accelerate" } -if { ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset g95] } { +if { ![variant_isset gcc43] && ![variant_isset gcc45] && ![variant_isset g95] } { default_variants +gcc44 } +if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95]} { + pre-fetch { + return -code error "You must use one of the compiler variants." + } +} patchfiles patch-lo-specfun.cc.diff patch-configure-no_x11.diff
participants (1)
-
jmr@macports.org