summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2017-11-06 19:14:34 +0100
committerChristoph Junghans <christoph.junghans@gmail.com>2017-11-06 11:14:34 -0700
commit450f2fa03458318a82c95c4b4a1f0aef7998c80b (patch)
treed616a337ac5dadb90eace5950893e361bfd07fad /var
parent47b15feec3f3679fe5b336e6910dfa7e2c11002c (diff)
downloadspack-450f2fa03458318a82c95c4b4a1f0aef7998c80b.tar.gz
spack-450f2fa03458318a82c95c4b4a1f0aef7998c80b.tar.bz2
spack-450f2fa03458318a82c95c4b4a1f0aef7998c80b.tar.xz
spack-450f2fa03458318a82c95c4b4a1f0aef7998c80b.zip
likwid: Use external lua if possible (#6009)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/likwid/package.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/likwid/package.py b/var/spack/repos/builtin/packages/likwid/package.py
index 124d3b388b..edba82da40 100644
--- a/var/spack/repos/builtin/packages/likwid/package.py
+++ b/var/spack/repos/builtin/packages/likwid/package.py
@@ -45,8 +45,7 @@ class Likwid(Package):
# The reason is that the internal hwloc is patched to contain extra
# functionality and functions are prefixed with "likwid_".
- # TODO: how to specify those?
- # depends_on('lua')
+ depends_on('lua', when='@4.2.0:')
# TODO: check
# depends_on('gnuplot', type='run')
@@ -88,5 +87,22 @@ class Likwid(Package):
'INSTALL_CHOWN = -o $(USER)',
'config.mk')
+ if spec.satisfies('^lua'):
+ filter_file('^#LUA_INCLUDE_DIR.*',
+ 'LUA_INCLUDE_DIR = {0}'.format(
+ spec['lua'].prefix.include),
+ 'config.mk')
+ filter_file('^#LUA_LIB_DIR.*',
+ 'LUA_LIB_DIR = {0}'.format(
+ spec['lua'].prefix.lib),
+ 'config.mk')
+ filter_file('^#LUA_LIB_NAME.*',
+ 'LUA_LIB_NAME = lua',
+ 'config.mk')
+ filter_file('^#LUA_BIN.*',
+ 'LUA_BIN = {0}'.format(
+ spec['lua'].prefix.bin),
+ 'config.mk')
+
make()
make('install')