summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/pvm/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/pvm/package.py b/var/spack/repos/builtin/packages/pvm/package.py
index 75b61871c8..fe74061922 100644
--- a/var/spack/repos/builtin/packages/pvm/package.py
+++ b/var/spack/repos/builtin/packages/pvm/package.py
@@ -21,6 +21,9 @@ class Pvm(MakefilePackage):
depends_on('m4', type='build')
depends_on('libtirpc', type='link')
+ variant('fpic', default=False,
+ description='Enables -fPIC compilation flag on static libraries.')
+
parallel = False
@property
@@ -34,6 +37,17 @@ class Pvm(MakefilePackage):
# variable "PVM_ROOT" to the path where PVM resides
env['PVM_ROOT'] = self.stage.source_path
+ def patch(self):
+
+ pvm_arch = self.pvm_arch
+
+ if '+fpic' in self.spec:
+ filter_file(
+ '^SHAREDCFLAGS =',
+ 'SHAREDCFLAGS = -fPIC',
+ join_path('conf', pvm_arch + '.def')
+ )
+
def setup_build_environment(self, env):
tirpc = self.spec['libtirpc'].prefix
env.prepend_path(