From 3ad6754c1a92b8205e4d5b9ba71303307988c8ed Mon Sep 17 00:00:00 2001 From: 健美猫 Date: Sat, 8 Apr 2017 02:11:22 +0800 Subject: Add the 'shared' variant for protobuf. (#3703) --- var/spack/repos/builtin/packages/protobuf/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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'] -- cgit v1.2.3-70-g09d2