From 14612fd0ca2c811348e8982ee113fc8a428b0199 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Fri, 20 May 2022 15:26:34 +0000
Subject: [PATCH] Resolve "Track madx upstreaming and cherry-pick when ready"

---
 .gitlab-ci.yml                 |  3 ++-
 spack.yaml                     |  2 +-
 spack/packages/madx/package.py | 30 ------------------------------
 3 files changed, 3 insertions(+), 32 deletions(-)
 delete mode 100644 spack/packages/madx/package.py

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c795c5685..92d886a4d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,13 +11,14 @@ variables:
   ## Spack github version
   SPACK_VERSION: "e974b44e8673ded449ce4a3ed5844398b68e81a2"
   ## Space-separated list of spack cherry-picks
-  SPACK_CHERRYPICKS: "0ab5828d0dfe2182ad108b7e7c56772303065f6e a294acfb73839c9782aff976953a969fb44e161e f181b6fef6da3b576b267799d9c47fa5c8ade67a 5f10562ad13c803bf5d22552a9f07c8c379fdd23 4c0f5f85c0dc27903280ba64d129c2e3d128573d"
+  SPACK_CHERRYPICKS: "0ab5828d0dfe2182ad108b7e7c56772303065f6e a294acfb73839c9782aff976953a969fb44e161e f181b6fef6da3b576b267799d9c47fa5c8ade67a 5f10562ad13c803bf5d22552a9f07c8c379fdd23 4c0f5f85c0dc27903280ba64d129c2e3d128573d 6610c50414cdb451c2073a28ffc4bc3c5fd7b721"
   ## Ref: https://github.com/spack/spack/commit/[hash]
   ## 0ab5828d0dfe2182ad108b7e7c56772303065f6e: gdk-pixbuf: Fix 2.42.2 and add 2.42.6
   ## a294acfb73839c9782aff976953a969fb44e161e: pythia8: bugfix for pythia8 +fastjet
   ## f181b6fef6da3b576b267799d9c47fa5c8ade67a: root: depends_on fcgi and re-enabled +http support
   ## 5f10562ad13c803bf5d22552a9f07c8c379fdd23: [geant4] new version geant4@10.7.3
   ## 4c0f5f85c0dc27903280ba64d129c2e3d128573d: EDM4hep version 0.4
+  ## 6610c50414cdb451c2073a28ffc4bc3c5fd7b721: madx: new package, versions 5.07.00, 5.08.00, 5.08.01
 
   ## We need to enable Docker Buildkit to use cache mounts and better
   ## build performance overal
diff --git a/spack.yaml b/spack.yaml
index 262f74089..8ec166244 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -20,7 +20,7 @@ spack:
     - heppdt@3.04.01
     - igprof@5.9.16
     - imagemagick@7.0.8-7
-    - madx@5.07.00
+    - madx@5.08.01
     - mesa@21.2.3 swr=none +glx -llvm +opengl +opengles +osmesa
     - mesa-demos
     - nlohmann-json@3.10.4
diff --git a/spack/packages/madx/package.py b/spack/packages/madx/package.py
deleted file mode 100644
index bbefda84b..000000000
--- a/spack/packages/madx/package.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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('master', branch='master')
-    version('5.07.00', sha256='77c0ec591dc3ea76cf57c60a5d7c73b6c0d66cca1fa7c4eb25a9071e8fc67e60')
-    version('5.06.01', sha256='cd2cd9f12463530950dab1c9a26730bb7c38f378c13afb7223fb9501c71a84be')
-
-    # 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("libx11")
-    depends_on("zlib")
-- 
GitLab