summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2021-02-03 15:29:52 +0100
committerGitHub <noreply@github.com>2021-02-03 15:29:52 +0100
commit95fcd9ac135a75448d169730d6ff14f180b5083e (patch)
treed07618ccc6df06eebd774e26b7070a5209d3cad5
parentd5d1cb09ad17a0224e6aa4de682299c1e30b0d19 (diff)
downloadspack-95fcd9ac135a75448d169730d6ff14f180b5083e.tar.gz
spack-95fcd9ac135a75448d169730d6ff14f180b5083e.tar.bz2
spack-95fcd9ac135a75448d169730d6ff14f180b5083e.tar.xz
spack-95fcd9ac135a75448d169730d6ff14f180b5083e.zip
superchic: added new package (#21463)
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/superchic/package.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/superchic/package.py b/var/spack/repos/builtin/packages/superchic/package.py
new file mode 100644
index 0000000000..ad78f5a3cb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/superchic/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2021 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 Superchic(MakefilePackage):
+ """SuperChic is a Fortran based Monte Carlo event generator for exclusive and
+ photon-initiated production in proton and heavy ion collisions.
+
+ A range of Standard Model final states are implemented, in most cases with
+ spin correlations where relevant, and a fully differential treatment of the soft
+ survival factor is given. Arbitrary user-defined histograms and cuts may be
+ made, as well as unweighted events in the HEPEVT, HEPMC and LHE formats.
+ """
+
+ homepage = "https://superchic.hepforge.org/"
+ url = "https://superchic.hepforge.org/superchic4.01.tar.gz"
+
+ version('4.01', sha256='2d690e1cdb0fd0ee345028b0d823a76c8d93156aaa0c9cd1ecb5f18cde75acd6')
+ version('3.06', sha256='17b4f56e85634f3c9708d5263772d7035fe4d7fb91a11bbffe889e0860efbd02')
+ version('3.05', sha256='032f5c784f284ca02003a990234b099f61cd125791d56715680cd342e55c7da1')
+
+ depends_on('lhapdf')
+ depends_on('apfel', when='@4.01:')
+
+ def edit(self, spec, prefix):
+ makefile = FileFilter('makefile')
+ makefile.filter('LHAPDFLIB = .*',
+ 'LHAPDFLIB = ' + self.spec['lhapdf'].prefix.lib)
+ if self.spec.satisfies('@4.01:'):
+ makefile.filter('APFELLIB = .*',
+ 'APFELLIB = ' + self.spec['apfel'].prefix.lib)
+
+ def build(self, spec, prefix):
+ make('PWD=' + self.build_directory)
+
+ def install(self, spec, prefix):
+ mkdirp(self.prefix.bin)
+ install_tree('bin', self.prefix.bin)
+
+ mkdirp(self.prefix.lib)
+ install_tree('lib', self.prefix.lib)
+
+ if self.spec.satisfies('@3.05:'):
+ mkdirp(join_path(self.prefix, 'src', 'inc'))
+ install_tree(join_path('src', 'inc'), join_path(self.prefix, 'src', 'inc'))
+ mkdirp(join_path(self.prefix, 'obj'))
+ install_tree('obj', join_path(self.prefix, 'obj'))