summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2022-03-04 03:25:40 -0600
committerGitHub <noreply@github.com>2022-03-04 10:25:40 +0100
commit6610c50414cdb451c2073a28ffc4bc3c5fd7b721 (patch)
tree8808bf666066ea5de45f405cc417a0fb6c96b94e /var
parentb0c63a65541209442327490a8b6c8f84c274768c (diff)
downloadspack-6610c50414cdb451c2073a28ffc4bc3c5fd7b721.tar.gz
spack-6610c50414cdb451c2073a28ffc4bc3c5fd7b721.tar.bz2
spack-6610c50414cdb451c2073a28ffc4bc3c5fd7b721.tar.xz
spack-6610c50414cdb451c2073a28ffc4bc3c5fd7b721.zip
madx: new package, versions 5.07.00, 5.08.00, 5.08.01 (#28932)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/madx/package.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/madx/package.py b/var/spack/repos/builtin/packages/madx/package.py
new file mode 100644
index 0000000000..0c0a27e5a3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/madx/package.py
@@ -0,0 +1,44 @@
+# 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 Madx(CMakePackage):
+ """MAD-X (Methodical Accelerator Design) is an application
+ for designing particle accelerators."""
+
+ homepage = "https://github.com/MethodicalAcceleratorDesign/MAD-X"
+ url = "https://github.com/MethodicalAcceleratorDesign/MAD-X/archive/refs/tags/5.07.00.tar.gz"
+ git = "https://github.com/MethodicalAcceleratorDesign/MAD-X.git"
+
+ maintainers = ['wdconinc']
+
+ # Supported MAD-X versions
+ version('5.08.01', sha256='89c943fcb474344a4f7d28de98e8eae0aec40f779bf908daff79043bf3520555')
+ version('5.08.00', sha256='0b3fe2aca8899289ef7bfb98d745f13b8c4082e239f54f2662c9cad8d1e63a53')
+ version('5.07.00', sha256='77c0ec591dc3ea76cf57c60a5d7c73b6c0d66cca1fa7c4eb25a9071e8fc67e60')
+
+ variant('x11', default=True, description='Turn on plotting using X11')
+
+ # patch for gcc-11 to avoid error due to variable shadowing
+ patch('https://github.com/MethodicalAcceleratorDesign/MAD-X/commit/e7a434290df675b894f70026ce0c7c217330cce5.patch',
+ sha256='ba9d00692250ab1eeeb7235a4ba7d899ecbbb4588f3ec08afc22d228dc1ea437',
+ when='@:5.07.00')
+
+ depends_on('cmake@2.8:', type='build')
+
+ depends_on("libx11")
+ depends_on("zlib")
+
+ def cmake_args(self):
+ args = [
+ self.define('MADX_STATIC', False), # Turn on for static linking
+ self.define('MADX_LAPACK', True), # Use system blas/lapack installation
+ self.define('MADX_NTPSA', True), # Build with NTPSA
+ self.define('MADX_ONLINE', False), # Build with Online model
+ self.define_from_variant('MADX_X11', 'x11'), # Turn on plotting using X11
+ ]
+ return args