summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authordownloadico <download@carc.unm.edu>2022-12-05 10:48:04 -0700
committerGitHub <noreply@github.com>2022-12-05 09:48:04 -0800
commit85b6bf99a446e2be4347dfafb55ca2e3ca092655 (patch)
tree1686eee50ba87467c0444e0472548e9bfbc3142f /var
parent78ec3d5662aaef03cac2f3ad9f9479b685c86c37 (diff)
downloadspack-85b6bf99a446e2be4347dfafb55ca2e3ca092655.tar.gz
spack-85b6bf99a446e2be4347dfafb55ca2e3ca092655.tar.bz2
spack-85b6bf99a446e2be4347dfafb55ca2e3ca092655.tar.xz
spack-85b6bf99a446e2be4347dfafb55ca2e3ca092655.zip
Add packages related to the LWA software stack (#34112)
* epsic: add epsic package to spack * psrcat: add psrcat to spack * psrchive: add psarchive to spack * tempo: add tempo package to spack
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/epsic/package.py27
-rw-r--r--var/spack/repos/builtin/packages/psrcat/package.py25
-rw-r--r--var/spack/repos/builtin/packages/psrchive/package.py96
-rw-r--r--var/spack/repos/builtin/packages/tempo/package.py23
4 files changed, 171 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/epsic/package.py b/var/spack/repos/builtin/packages/epsic/package.py
new file mode 100644
index 0000000000..a42a06c74e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/epsic/package.py
@@ -0,0 +1,27 @@
+# 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.package import *
+
+
+class Epsic(AutotoolsPackage):
+ """Electromagnetic Polarization Simulation in C++."""
+
+ homepage = "https://github.com/straten/epsic"
+ git = "https://github.com/straten/epsic.git"
+
+ version("develop", default=True)
+
+ # Version to match
+ # https://github.com/lwa-project/pulsar/blob/master/SoftwareStack.md
+ # last updated 10/17/2020
+ version("LWA-10-17-2020", commit="5315cc634f6539ea0a34e403e492472b97e0f086")
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("yacc", when="@develop", type="build")
+ depends_on("libtool", type="build")
+ depends_on("m4", type="build")
+ configure_directory = "src"
diff --git a/var/spack/repos/builtin/packages/psrcat/package.py b/var/spack/repos/builtin/packages/psrcat/package.py
new file mode 100644
index 0000000000..850fd16bd3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psrcat/package.py
@@ -0,0 +1,25 @@
+# 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.package import *
+
+
+class Psrcat(MakefilePackage):
+ """ATNF Pulsar Catalogue
+ A catalogue of pulsars provided by the Australian Telescope National
+ Facility"""
+
+ homepage = "https://www.atnf.csiro.au/research/pulsar/psrcat/"
+ url = "https://www.atnf.csiro.au/research/pulsar/psrcat/downloads/psrcat_pkg.v1.68.tar.gz"
+
+ version("1.68", sha256="fbe4710c9122e4f93dbca54cf42cc2906f948f76885b241d1da2f8caecfbc657")
+
+ def build(self, spec, prefix):
+ makeit = which("./makeit")
+ makeit()
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ install("psrcat", bindir)
diff --git a/var/spack/repos/builtin/packages/psrchive/package.py b/var/spack/repos/builtin/packages/psrchive/package.py
new file mode 100644
index 0000000000..ed1608f64f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/psrchive/package.py
@@ -0,0 +1,96 @@
+# 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.package import *
+
+
+class Psrchive(AutotoolsPackage):
+ """PSRCHIVE is a library for the analysis of pulsar astronomical data.
+ PSRCHIVE is an Open Source C++ development library for the analysis of
+ pulsar astronomical data. It implements an extensive range of algorithms
+ for use in pulsar timing, scintillation studies, polarimetric calibration,
+ single-pulse work, RFI mitigation, etc. These tools are utilized by a
+ powerful suite of user-end programs that come with the library."""
+
+ homepage = "http://psrchive.sourceforge.net/"
+ url = "https://sourceforge.net/projects/psrchive/files/psrchive/2022-05-14/psrchive-2022-05-14.tar.gz/download"
+ git = "https://git.code.sf.net/p/psrchive/code.git"
+
+ version(
+ "2022-05-14", sha256="4d25609837cba1be244fa8adc8f105afe31972f2650bc0b90438862cf35395e1"
+ )
+
+ # version specified in
+ # https://github.com/lwa-project/pulsar/blob/master/SoftwareStack.md
+ # as of Nov 23 2022
+ version("2020-10-17", commit="ca12b4a279f3d4adcca223508116d9d270df8cc6")
+
+ variant("mpi", default=True, description="Compile with MPI")
+ variant("mkl", default=False, description="Compile with MKL")
+ variant("armadillo", default=False, description="Compile with armadillo")
+ variant("cfitsio", default=False, description="Compile with cfitsio")
+ variant("eigen", default=False, description="Compile with eigen")
+ variant("xml", default=False, description="Compile with libxml2")
+ variant("x11", default=False, description="Compile with X11")
+ variant("qt", default=False, description="Compile with QT")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+ depends_on("psrcat")
+ depends_on("epsic")
+ depends_on("tempo")
+ depends_on("fftw@3:")
+ depends_on("python")
+ depends_on("pgplot")
+
+ depends_on("mpi", when="+mpi")
+ depends_on("mkl", when="+mkl")
+ depends_on("armadillo", when="+armadillo")
+ depends_on("cfitsio", when="+cfitsio")
+ depends_on("eigen", when="+eigen")
+ depends_on("libxml2", when="+xml")
+ depends_on("libx11", when="+x11")
+ depends_on("qt", when="+qt")
+
+ def configure_args(self):
+ spec = self.spec
+ args = ["--enable-shared"]
+ args.append("--with-python_prefix={0}".format(spec["python"].prefix))
+ args.append("--with-epsic-dir={}".format(spec["epsic"].prefix))
+ args.append("--with-epsic-include-dir={}".format(spec["epsic"].prefix.include))
+ args.append("--with-epsic-lib-dir={}".format(spec["epsic"].prefix.lib))
+ args.append("--with-psrcat={0}".format(spec["psrcat"].prefix.bin.psrcat))
+ args.append("--with-fftw3-dir={0}".format(spec["fftw"].prefix))
+
+ if spec.satisfies("+mpi"):
+ args.append("--with-mpi-dir={0}".format(spec["mpi"].prefix))
+ else:
+ args.append("--without-mpi")
+ if spec.satisfies("+mkl"):
+ args.append("--with-mkl-dir={0}".format(spec["mkl"].prefix))
+ else:
+ args.append("--without-mkl")
+ if spec.satisfies("+armadillo"):
+ args.append("--with-armadillo-dir={0}".format(spec["armadillo"].prefix))
+ else:
+ args.append("--without-armadillo")
+ if spec.satisfies("+cfitsio"):
+ args.append("--with-cfitsio-dir={0}".format(spec["cfitsio"].prefix))
+ else:
+ args.append("--without-cfitsio")
+ if spec.satisfies("+eigen"):
+ args.append("--with-eigen-dir={0}".format(spec["eigen"].prefix))
+ else:
+ args.append("--without-eigen")
+ if spec.satisfies("+xml"):
+ args.append("--with-xml-prefix={0}".format(spec["libxml2"].prefix))
+ else:
+ args.append("--without-xml")
+ if spec.satisfies("+qt"):
+ args.append("--with-qt-dir={0}".format(spec["qt"].prefix))
+ else:
+ args.append("--without-qt")
+ return args
diff --git a/var/spack/repos/builtin/packages/tempo/package.py b/var/spack/repos/builtin/packages/tempo/package.py
new file mode 100644
index 0000000000..3d67dfcefb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/tempo/package.py
@@ -0,0 +1,23 @@
+# 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.package import *
+
+
+class Tempo(AutotoolsPackage):
+ """Tempo is a program for pulsar timing data analysis."""
+
+ homepage = "http://tempo.sourceforge.net/"
+ git = "git://git.code.sf.net/p/tempo/tempo.git"
+
+ version("develop")
+ version("LWA-10-17-2020", commit="6bab1083350eca24745eafed79a55156bdd1e7d5")
+
+ depends_on("autoconf", type="build")
+ depends_on("automake", type="build")
+ depends_on("libtool", type="build")
+
+ def setup_dependent_run_environment(self, spack_env, dependent_spec):
+ spack_env.set("TEMPO_DIR", self.prefix)