octave: add 4.2.0; fix Blas/Lapack; use AutotoolsPackage (#2858)

* octave: add 4.2.0; fix Blas/Lapack; use AutotoolsPackage

* fix a bug
This commit is contained in:
Denis Davydov 2017-01-18 18:33:46 +01:00 committed by becker33
parent 026e2d0fe6
commit ddfbb14ad9

View File

@ -26,7 +26,7 @@
import sys
class Octave(Package):
class Octave(AutotoolsPackage):
"""GNU Octave is a high-level language, primarily intended for numerical
computations. It provides a convenient command line interface for solving
linear and nonlinear problems numerically, and for performing other
@ -38,6 +38,7 @@ class Octave(Package):
extendable = True
version('4.2.0', '443ba73782f3531c94bcf016f2f0362a58e186ddb8269af7dcce973562795567')
version('4.0.2', 'c2a5cacc6e4c52f924739cdf22c2c687')
version('4.0.0', 'a69f8320a4f20a8480c1b278b1adb799')
@ -97,15 +98,18 @@ class Octave(Package):
depends_on('suite-sparse', when='+suitesparse')
depends_on('zlib', when='+zlib')
def install(self, spec, prefix):
config_args = [
"--prefix=%s" % prefix
]
def configure_args(self):
# See
# https://github.com/macports/macports-ports/blob/master/math/octave/
# https://github.com/Homebrew/homebrew-science/blob/master/octave.rb
spec = self.spec
config_args = []
# Required dependencies
config_args.extend([
"--with-blas=%s" % spec['blas'].prefix.lib,
"--with-lapack=%s" % spec['lapack'].prefix.lib
"--with-blas=%s" % spec['blas'].blas_libs.ld_flags,
"--with-lapack=%s" % spec['lapack'].lapack_libs.ld_flags
])
# Strongly recommended dependencies
@ -210,10 +214,7 @@ def install(self, spec, prefix):
else:
config_args.append("--without-z")
configure(*config_args)
make()
make("install")
return config_args
# ========================================================================
# Set up environment to make install easy for Octave extensions.