2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2019-02-14 13:04:38 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2022-03-18 07:42:07 +08:00
|
|
|
from spack.pkg.builtin.boost import Boost
|
2019-02-14 13:04:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Gaudi(CMakePackage):
|
|
|
|
"""An experiment-independent HEP event data processing framework"""
|
|
|
|
|
2021-09-02 14:46:27 +08:00
|
|
|
homepage = "https://gaudi.web.cern.ch/gaudi/"
|
2022-07-31 06:19:18 +08:00
|
|
|
git = "https://gitlab.cern.ch/gaudi/Gaudi.git"
|
|
|
|
url = "https://gitlab.cern.ch/gaudi/Gaudi/-/archive/v33r1/Gaudi-v33r1.tar.gz"
|
|
|
|
|
|
|
|
tags = ["hep"]
|
|
|
|
|
|
|
|
version("master", branch="master")
|
2022-08-15 16:21:21 +08:00
|
|
|
version("36.7", sha256="8dca43185ba11e1b33f5535d2e384542d84500407b0d1f8cb920be00f05c9716")
|
2022-07-31 06:19:18 +08:00
|
|
|
version("36.6", sha256="8fc7be0ce32f99cc6b0be4ebbb246f4bb5008ffbf0c012cb39c0aff813dce6af")
|
|
|
|
version("36.5", sha256="593e0316118411a5c5fde5d4d87cbfc3d2bb748a8c72a66f4025498fcbdb0f7e")
|
|
|
|
version("36.4", sha256="1a5c27cdc21ec136b47f5805406c92268163393c821107a24dbb47bd88e4b97d")
|
|
|
|
version("36.3", sha256="9ac228d8609416afe4dea6445c6b3ccebac6fab1e46121fcc3a056e24a5d6640")
|
|
|
|
version("36.2", sha256="a1b4bb597941a7a5b8d60382674f0b4ca5349c540471cd3d4454efbe7b9a09b9")
|
|
|
|
version("36.1", sha256="9f718c832313676249e5c3ac76ba4346978ee2328f8cdcb29176498b080402e9")
|
|
|
|
version("36.0", sha256="8a0458cef5b616532f9db7cca9fa0e892e602b64c9e93dc0cc6d972e03034830")
|
|
|
|
version("35.0", sha256="c01b822f9592a7bf875b9997cbeb3c94dea97cb13d523c12649dbbf5d69b5fa6")
|
|
|
|
version("34.0", sha256="28fc4abb5a6b08da5a6b1300451c7e8487f918b055939877219d454abf7668ae")
|
|
|
|
version("33.2", sha256="26aaf9c4ff237a60ec79af9bd18ad249fc91c16e297ba77e28e4a256123db6e5")
|
|
|
|
version("33.1", sha256="7eb6b2af64aeb965228d4b6ea66c7f9f57f832f93d5b8ad55c9105235af5b042")
|
|
|
|
version("33.0", sha256="76a967c41f579acc432593d498875dd4dc1f8afd5061e692741a355a9cf233c8")
|
|
|
|
version("32.2", sha256="e9ef3eb57fd9ac7b9d5647e278a84b2e6263f29f0b14dbe1321667d44d969d2e")
|
|
|
|
version("31.0", commit="aeb156f0c40571b5753a9e1dab31e331491b2f3e")
|
|
|
|
version("30.5", commit="2c70e73ee5b543b26197b90dd59ea4e4d359d230")
|
|
|
|
|
|
|
|
maintainers = ["drbenmorgan", "vvolkl"]
|
|
|
|
|
2022-08-10 18:11:13 +08:00
|
|
|
variant("aida", default=False, description="Build AIDA interfaces support")
|
|
|
|
variant("cppunit", default=False, description="Build with CppUnit unit testing")
|
2022-07-31 06:19:18 +08:00
|
|
|
variant("docs", default=False, description="Build documentation with Doxygen")
|
2022-08-10 18:11:13 +08:00
|
|
|
variant("examples", default=False, description="Build examples")
|
|
|
|
variant("gperftools", default=False, description="Build with Google PerfTools support")
|
|
|
|
variant("heppdt", default=False, description="Build with HEP Particle Data Table support")
|
|
|
|
variant("jemalloc", default=False, description="Build with jemalloc allocator support")
|
|
|
|
variant("unwind", default=False, description="Build with unwind call-chains")
|
2022-07-31 06:19:18 +08:00
|
|
|
variant("vtune", default=False, description="Build with Intel VTune profiler support")
|
2022-08-10 18:11:13 +08:00
|
|
|
variant("xercesc", default=False, description="Build with Xerces-C XML support")
|
2019-02-14 13:04:38 +08:00
|
|
|
|
2022-08-10 18:11:13 +08:00
|
|
|
# only build subdirectory GaudiExamples when +examples
|
2021-10-03 21:09:02 +08:00
|
|
|
patch("build_testing.patch", when="@:34")
|
2020-05-05 08:40:13 +08:00
|
|
|
# fixes for the cmake config which could not find newer boost versions
|
2021-10-03 21:09:02 +08:00
|
|
|
patch("link_target_fixes.patch", when="@33.0:34")
|
2020-05-05 08:40:13 +08:00
|
|
|
patch("link_target_fixes32.patch", when="@:32.2")
|
|
|
|
|
2019-02-14 13:04:38 +08:00
|
|
|
# These dependencies are needed for a minimal Gaudi build
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("aida")
|
|
|
|
depends_on("boost@1.67.0: +python")
|
2022-03-18 07:42:07 +08:00
|
|
|
|
|
|
|
# TODO: replace this with an explicit list of components of Boost,
|
|
|
|
# for instance depends_on('boost +filesystem')
|
|
|
|
# See https://github.com/spack/spack/pull/22303 for reference
|
|
|
|
depends_on(Boost.with_default_variants)
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("clhep")
|
|
|
|
depends_on("cmake", type="build")
|
|
|
|
depends_on("cppgsl")
|
|
|
|
depends_on("fmt", when="@33.2:")
|
|
|
|
depends_on("intel-tbb")
|
|
|
|
depends_on("uuid")
|
|
|
|
depends_on("nlohmann-json", when="@35.0:")
|
|
|
|
depends_on("python", type=("build", "run"))
|
|
|
|
depends_on("python@:3.7", when="@32.2:34", type=("build", "run"))
|
|
|
|
depends_on("python@:2", when="@:32.1", type=("build", "run"))
|
2022-08-10 18:11:13 +08:00
|
|
|
depends_on("py-networkx@:2.2", when="^python@:2.7")
|
|
|
|
depends_on("py-networkx", when="^python@3.0.0:")
|
|
|
|
depends_on("py-nose", type="test")
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("py-setuptools@:45", when="^python@:2.7", type="build")
|
|
|
|
depends_on("py-six", type=("build", "run"))
|
|
|
|
depends_on("py-xenv@1:", when="@:34.9", type=("build", "run"))
|
|
|
|
depends_on("range-v3")
|
|
|
|
depends_on("root +python +root7 +ssl +tbb +threads")
|
|
|
|
depends_on("zlib")
|
2019-02-14 13:04:38 +08:00
|
|
|
|
|
|
|
# Adding these dependencies triggers the build of most optional components
|
2022-08-10 18:11:13 +08:00
|
|
|
depends_on("cppgsl", when="+cppunit")
|
|
|
|
depends_on("cppunit", when="+cppunit")
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("doxygen +graphviz", when="+docs")
|
2022-08-10 18:11:13 +08:00
|
|
|
depends_on("gperftools", when="+gperftools")
|
|
|
|
depends_on("gdb")
|
|
|
|
depends_on("gsl", when="@:31 +examples")
|
|
|
|
depends_on("heppdt", when="@:34 +examples")
|
|
|
|
depends_on("heppdt", when="+heppdt")
|
|
|
|
depends_on("jemalloc", when="+jemalloc")
|
|
|
|
depends_on("libpng", when="@:34 +examples")
|
|
|
|
depends_on("libunwind", when="+unwind")
|
|
|
|
depends_on("relax", when="@:34 +examples")
|
|
|
|
depends_on("xerces-c", when="+xercesc")
|
2019-02-14 13:04:38 +08:00
|
|
|
# NOTE: pocl cannot be added as a minimal OpenCL implementation because
|
|
|
|
# ROOT does not like being exposed to LLVM symbols.
|
|
|
|
|
|
|
|
# The Intel VTune dependency is taken aside because it requires a license
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("intel-parallel-studio -mpi +vtune", when="+vtune")
|
2020-05-05 08:40:13 +08:00
|
|
|
|
|
|
|
def cmake_args(self):
|
|
|
|
args = [
|
2022-08-10 18:11:13 +08:00
|
|
|
self.define("BUILD_TESTING", self.run_tests or self.spec.satisfies("+examples")),
|
|
|
|
self.define_from_variant("GAUDI_USE_AIDA", "aida"),
|
|
|
|
self.define_from_variant("GAUDI_USE_CPPUNIT", "cppunit"),
|
|
|
|
self.define_from_variant("GAUDI_USE_GPERFTOOLS", "gperftools"),
|
|
|
|
self.define_from_variant("GAUDI_USE_HEPPDT", "heppdt"),
|
|
|
|
self.define_from_variant("GAUDI_USE_JEMALLOC", "jemalloc"),
|
|
|
|
self.define_from_variant("GAUDI_USE_UNWIND", "unwind"),
|
|
|
|
self.define_from_variant("GAUDI_USE_XERCESC", "xercesc"),
|
2022-07-31 06:19:18 +08:00
|
|
|
self.define_from_variant("GAUDI_USE_DOXYGEN", "docs"),
|
2020-11-24 19:17:28 +08:00
|
|
|
# needed to build core services like rndmsvc
|
|
|
|
self.define("GAUDI_USE_CLHEP", True),
|
2022-07-31 06:19:18 +08:00
|
|
|
self.define("GAUDI_USE_PYTHON_MAJOR", str(self.spec["python"].version.up_to(1))),
|
2020-11-13 04:43:06 +08:00
|
|
|
# todo:
|
2022-07-31 06:19:18 +08:00
|
|
|
self.define("GAUDI_USE_INTELAMPLIFIER", False),
|
|
|
|
]
|
2020-11-13 04:43:06 +08:00
|
|
|
# this is not really used in spack builds, but needs to be set
|
2022-07-31 06:19:18 +08:00
|
|
|
if self.spec.version < Version("34"):
|
2020-11-13 04:43:06 +08:00
|
|
|
args.append("-DHOST_BINARY_TAG=x86_64-linux-gcc9-opt")
|
2020-05-05 08:40:13 +08:00
|
|
|
return args
|
|
|
|
|
|
|
|
def setup_run_environment(self, env):
|
|
|
|
# environment as in Gaudi.xenv
|
2022-07-31 06:19:18 +08:00
|
|
|
env.prepend_path("PATH", self.prefix.scripts)
|
|
|
|
env.prepend_path("PYTHONPATH", self.prefix.python)
|
2020-05-05 08:40:13 +08:00
|
|
|
|
|
|
|
def url_for_version(self, version):
|
|
|
|
major = str(version[0])
|
|
|
|
minor = str(version[1])
|
2022-07-31 06:19:18 +08:00
|
|
|
url = "https://gitlab.cern.ch/gaudi/Gaudi/-/archive/v{0}r{1}/Gaudi-v{0}r{1}.tar.gz".format(
|
|
|
|
major, minor
|
|
|
|
)
|
2020-05-05 08:40:13 +08:00
|
|
|
return url
|