1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class GosamContrib(AutotoolsPackage):
"""Additional libraries for GoSam MC generator"""
homepage = "https://gosam.hepforge.org"
url = "https://gosam.hepforge.org/downloads/?f=gosam-contrib-2.0.tar.gz"
tags = ['hep']
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 = []
args += self.enable_or_disable('libs')
return args
@property
def parallel(self):
return False
|