From 1122fc3d1e715c3ceb2bb3d112960f8be52ae3e3 Mon Sep 17 00:00:00 2001 From: Neil Flood Date: Fri, 14 Sep 2018 23:11:16 +1000 Subject: r-nloptr: Explicit depends_on(nlopt). Previously there was a hidden d… (#9176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * r-nloptr: Explicit depends_on(nlopt). Previously there was a hidden dependency, masked by the package's configure script. * r-nloptr: Change spelling of variables to satisfy pyflake8 * r-nloptr: Break a long line to satisfy pyflake8 * r-nloptr: larger indent on continuation, to satisfy pyflake8 * r-nloptr: another attempt at larger indent on continuation, to satisfy pyflake8 * r-nloptr: now a smaller indent on continuation, to satisfy pyflake8 * r-nloptr: Another attempt at right amount of indent. * r-nloptr: Another attempt at right amount of indent. * Use the correct attributes for finding the nlopt includes and libs. * Lines too long, split into pieces --- var/spack/repos/builtin/packages/r-nloptr/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/r-nloptr/package.py b/var/spack/repos/builtin/packages/r-nloptr/package.py index e5ac989522..f1fd3eaa83 100644 --- a/var/spack/repos/builtin/packages/r-nloptr/package.py +++ b/var/spack/repos/builtin/packages/r-nloptr/package.py @@ -42,3 +42,13 @@ class RNloptr(RPackage): version('1.0.4', 'f2775dfb4f7f5552d46937a04c062b0d') depends_on('r-testthat', type=('build', 'run')) + depends_on('nlopt') + + def configure_args(self): + include_flags = self.spec['nlopt'].headers.include_flags + libs = self.spec['nlopt'].libs.libraries[0] + args = [ + '--with-nlopt-cflags={0}'.format(include_flags), + '--with-nlopt-libs={0}'.format(libs) + ] + return args -- cgit v1.2.3-70-g09d2