diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/voropp/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/voropp/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/voropp/package.py b/var/spack/repos/builtin/packages/voropp/package.py index e0a63f6f8e..872a23cfce 100644 --- a/var/spack/repos/builtin/packages/voropp/package.py +++ b/var/spack/repos/builtin/packages/voropp/package.py @@ -14,6 +14,9 @@ class Voropp(MakefilePackage): homepage = "http://math.lbl.gov/voro++/about.html" 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') def edit(self, spec, prefix): @@ -23,3 +26,11 @@ class Voropp(MakefilePackage): filter_file(r'PREFIX=/usr/local', 'PREFIX={0}'.format(self.prefix), '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') |