gosamcontrib: add libs variants (#26030)
This commit is contained in:
parent
2bcdb33666
commit
1299c714c4
1 changed files with 21 additions and 1 deletions
|
@ -17,6 +17,26 @@ class GosamContrib(AutotoolsPackage):
|
|||
version('2.0', sha256='c05beceea74324eb51c1049773095e2cb0c09c8c909093ee913d8b0da659048d')
|
||||
version('1.0', sha256='a29d4232d9190710246abc2ed97fdcd8790ce83580f56a360f3456b0377c40ec')
|
||||
|
||||
variant('libs', default='shared,static', values=('shared', 'static'),
|
||||
multi=True, description='Build shared libs, static libs or both')
|
||||
variant('pic', default=False, description='Build position-independent code')
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
if name in ['cflags', 'cxxflags', 'cppflags']:
|
||||
if '+pic' in self.spec:
|
||||
flags.append(self.compiler.cc_pic_flag)
|
||||
|
||||
if name == 'fflags':
|
||||
if 'gfortran' in self.compiler.fc:
|
||||
flags.append('-std=legacy')
|
||||
|
||||
if '+pic' in self.spec:
|
||||
flags.append(self.compiler.fc_pic_flag)
|
||||
|
||||
return (None, flags, None)
|
||||
|
||||
def configure_args(self):
|
||||
args = ["FFLAGS=-std=legacy"]
|
||||
args = []
|
||||
args += self.enable_or_disable('libs')
|
||||
|
||||
return args
|
||||
|
|
Loading…
Reference in a new issue