Add the 'shared' variant for protobuf. (#3703)

This commit is contained in:
健美猫 2017-04-08 02:11:22 +08:00 committed by Adam J. Stewart
parent f166f57f09
commit 3ad6754c1a

View file

@ -40,3 +40,14 @@ class Protobuf(AutotoolsPackage):
depends_on('autoconf', type='build') depends_on('autoconf', type='build')
depends_on('libtool', type='build') depends_on('libtool', type='build')
depends_on('m4', 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']