Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-30 08:04:16

0001 # Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
0002 # Spack Project Developers. See the top-level COPYRIGHT file for details.
0003 #
0004 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 
0006 from spack.package import *
0007 
0008 
0009 class OnlineDistribution(Package):
0010     """sPHENIX/EIC online data distribution system including event libraries
0011     and performance monitoring tools."""
0012 
0013     homepage = "https://github.com/sPHENIX-Collaboration/online_distribution"
0014     git = "https://github.com/sPHENIX-Collaboration/online_distribution.git"
0015 
0016     maintainers("wdconinc")
0017 
0018     tags = ["eic"]
0019 
0020     license("UNKNOWN", checked_by="wdconinc")
0021 
0022     version("ePIC", branch="ePIC")
0023 
0024     depends_on("cxx", type="build")
0025     depends_on("autoconf", type="build")
0026     depends_on("automake", type="build")
0027     depends_on("gmake", type="build")
0028     depends_on("libtool", type="build")
0029     depends_on("m4", type="build")
0030 
0031     depends_on("root")
0032     depends_on("boost")
0033     depends_on("lzo")
0034     depends_on("zlib-api")
0035     depends_on("bzip2")
0036 
0037     def patch(self):
0038         # Remove hardcoded /opt/local paths from eventlibraries/Makefile.am
0039         filter_file(r" -L/opt/local/lib", "", "eventlibraries/Makefile.am")
0040         filter_file(r" -I/opt/local/include", "", "eventlibraries/Makefile.am")
0041 
0042     def install(self, spec, prefix):
0043         for subdir in ["eventlibraries", "pmonitor"]:
0044             with working_dir(subdir):
0045                 autoreconf = Executable("autoreconf")
0046                 autoreconf("-fvi")
0047                 configure = Executable("./configure")
0048                 configure(f"--prefix={prefix}")
0049                 make("CPPFLAGS=-DLinux -DHAVE_GETOPT_H=1")
0050                 make("install")
0051 
0052     def setup_run_environment(self, env):
0053         env.set("ONLINE_MAIN", self.prefix)