diff options
author | 健美猫 <weijianwen@gmail.com> | 2017-04-08 02:11:22 +0800 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-04-07 13:11:22 -0500 |
commit | 3ad6754c1a92b8205e4d5b9ba71303307988c8ed (patch) | |
tree | e79aa223f26129c6b8fa6b84254a8516754df3d3 | |
parent | f166f57f0958db6dad07d261a3517279795db813 (diff) | |
download | spack-3ad6754c1a92b8205e4d5b9ba71303307988c8ed.tar.gz spack-3ad6754c1a92b8205e4d5b9ba71303307988c8ed.tar.bz2 spack-3ad6754c1a92b8205e4d5b9ba71303307988c8ed.tar.xz spack-3ad6754c1a92b8205e4d5b9ba71303307988c8ed.zip |
Add the 'shared' variant for protobuf. (#3703)
-rw-r--r-- | var/spack/repos/builtin/packages/protobuf/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index e8010a496b..14eaf3739e 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -40,3 +40,14 @@ class Protobuf(AutotoolsPackage): depends_on('autoconf', type='build') depends_on('libtool', type='build') depends_on('m4', type='build') + + variant('shared', default=True, description='Build shared libraries.') + + def configure_args(self): + if '+shared' in self.spec: + return ['--enable-shared=yes', + '--enable-static=no'] + else: + return ['--enable-shared=no', + '--enable-static=yes', + '--with-pic=yes'] |