Fixing problems with lammps dependencies voropp and latte (#9909)

* Fixing problems with lammps dependencies voropp and latte.

* Always replacing CFLAGS in voropp and specifying voropp+pic dependency in lammps.
This commit is contained in:
Jon Rood 2018-11-27 16:55:21 -07:00 committed by Christoph Junghans
parent 2164181d0a
commit 4c3091b05e
3 changed files with 13 additions and 2 deletions

View File

@ -59,7 +59,7 @@ def url_for_version(self, version):
depends_on('mpi', when='+mpi') depends_on('mpi', when='+mpi')
depends_on('mpi', when='+mpiio') depends_on('mpi', when='+mpiio')
depends_on('fftw', when='+kspace') depends_on('fftw', when='+kspace')
depends_on('voropp', when='+voronoi') depends_on('voropp+pic', when='+voronoi')
depends_on('netcdf+mpi', when='+user-netcdf') depends_on('netcdf+mpi', when='+user-netcdf')
depends_on('blas', when='+user-atc') depends_on('blas', when='+user-atc')
depends_on('lapack', when='+user-atc') depends_on('lapack', when='+user-atc')

View File

@ -17,7 +17,7 @@ class Latte(CMakePackage):
tags = ['ecp', 'ecp-apps'] tags = ['ecp', 'ecp-apps']
version('develop', branch='master') version('develop', branch='master')
version('1.2.1', '56db44afaba2a89e6ca62ac565c3c012') version('1.2.1', '9a0690bf4e0e1cab057475a67052b0a8')
version('1.2.0', 'b9bf8f84a0e0cf7b0e278a1bc7751b3d') version('1.2.0', 'b9bf8f84a0e0cf7b0e278a1bc7751b3d')
version('1.1.1', 'ab11867ba6235189681cf6e50a50cc50') version('1.1.1', 'ab11867ba6235189681cf6e50a50cc50')
version('1.0.1', 'd0b99edbcf7a19abe0a68a192d6f6234') version('1.0.1', 'd0b99edbcf7a19abe0a68a192d6f6234')

View File

@ -14,6 +14,9 @@ class Voropp(MakefilePackage):
homepage = "http://math.lbl.gov/voro++/about.html" homepage = "http://math.lbl.gov/voro++/about.html"
url = "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz" url = "http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz"
variant('pic', default=True,
description='Position independent code')
version('0.4.6', '2338b824c3b7b25590e18e8df5d68af9') version('0.4.6', '2338b824c3b7b25590e18e8df5d68af9')
def edit(self, spec, prefix): def edit(self, spec, prefix):
@ -23,3 +26,11 @@ def edit(self, spec, prefix):
filter_file(r'PREFIX=/usr/local', filter_file(r'PREFIX=/usr/local',
'PREFIX={0}'.format(self.prefix), 'PREFIX={0}'.format(self.prefix),
'config.mk') 'config.mk')
# We can safely replace the default CFLAGS which are:
# CFLAGS=-Wall -ansi -pedantic -O3
cflags = ''
if '+pic' in spec:
cflags += self.compiler.pic_flag
filter_file(r'CFLAGS=.*',
'CFLAGS={0}'.format(cflags),
'config.mk')