diff options
-rw-r--r-- | var/spack/repos/builtin/packages/chgcentre/main.patch | 11 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/chgcentre/package.py | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/chgcentre/main.patch b/var/spack/repos/builtin/packages/chgcentre/main.patch new file mode 100644 index 0000000000..fbc7cd064e --- /dev/null +++ b/var/spack/repos/builtin/packages/chgcentre/main.patch @@ -0,0 +1,11 @@ +--- a/main.cpp 2022-05-02 15:00:00 +0800 ++++ b/main.cpp 2022-05-02 15:01:00 +0800 +@@ -415,7 +415,7 @@ + MDirection::Ref(MDirection::J2000))(); + std::vector<Muvw> uvws(antennas.size()); + MEpoch time(MVEpoch(-1.0)); +- for(unsigned row=0; row!=std::min(set.nrow(),50u); ++row) ++ for(unsigned row=0; row!=std::min(static_cast<unsigned int>(set.nrow()),50u); ++row) + { + if(fieldIdCol(row) == fieldIndex) + { diff --git a/var/spack/repos/builtin/packages/chgcentre/package.py b/var/spack/repos/builtin/packages/chgcentre/package.py index ebd8242bea..78d8ceaea7 100644 --- a/var/spack/repos/builtin/packages/chgcentre/package.py +++ b/var/spack/repos/builtin/packages/chgcentre/package.py @@ -18,3 +18,9 @@ class Chgcentre(CMakePackage): depends_on("casacore") depends_on("gsl") + + # this patch is required to fix a programming error that is not acceptable by + # latest compilers. In particular, the `std::min` function was given `int` and + # `unsigned int` arguments. The `int` argument is explicitly casted to `unsigned int`. + # This patch was created by the staff at the Pawsey Supercomputing Research Centre. + patch("main.patch") |