diff options
-rw-r--r-- | var/spack/repos/builtin/packages/perl/package.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index ef1c11289f..95b2ae8726 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -69,6 +69,9 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package variant('cpanm', default=True, description='Optionally install cpanm with the core packages.') + variant('shared', default=True, + description='Build a shared libperl.so library') + resource( name="cpanm", url="http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7042.tar.gz", @@ -87,14 +90,18 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package '-des', '-Dprefix={0}'.format(prefix), '-Dlocincpth=' + self.spec['gdbm'].prefix.include, - '-Dloclibpth=' + self.spec['gdbm'].prefix.lib + '-Dloclibpth=' + self.spec['gdbm'].prefix.lib, ] # Discussion of -fPIC for Intel at: - # https://github.com/LLNL/spack/pull/3081 + # https://github.com/LLNL/spack/pull/3081 and + # https://github.com/LLNL/spack/pull/4416 if spec.satisfies('%intel'): config_args.append('-Accflags={0}'.format(self.compiler.pic_flag)) + if '+shared' in spec: + config_args.append('-Duseshrplib') + return config_args def configure(self, spec, prefix): |