From 3e7f5250c0b39d963521269a0d0d68f5d4892be9 Mon Sep 17 00:00:00 2001 From: Paul Chelarescu Date: Fri, 22 Jun 2018 18:27:25 +0200 Subject: Added minuit package (#8536) * Added minuit package * Removed default method and template * Different URLs for old versions * Patches for versions down to 1.5.0 * Reverted ROOT package changes * Removed print statement * Added checksums for older versions * Consistent version names --- .../builtin/packages/minuit/LASymMatrix.h.patch | 117 +++++++++++++++++++++ var/spack/repos/builtin/packages/minuit/package.py | 66 ++++++++++++ .../builtin/packages/minuit/sprintf.cxx.patch | 10 ++ .../repos/builtin/packages/minuit/sprintf.patch | 10 ++ 4 files changed, 203 insertions(+) create mode 100644 var/spack/repos/builtin/packages/minuit/LASymMatrix.h.patch create mode 100644 var/spack/repos/builtin/packages/minuit/package.py create mode 100644 var/spack/repos/builtin/packages/minuit/sprintf.cxx.patch create mode 100644 var/spack/repos/builtin/packages/minuit/sprintf.patch diff --git a/var/spack/repos/builtin/packages/minuit/LASymMatrix.h.patch b/var/spack/repos/builtin/packages/minuit/LASymMatrix.h.patch new file mode 100644 index 0000000000..645d2ccd35 --- /dev/null +++ b/var/spack/repos/builtin/packages/minuit/LASymMatrix.h.patch @@ -0,0 +1,117 @@ +commit 62772d5fb0c6c7661c7acaa73d21de4205579d73 +Author: Paul Chelarescu +Date: Fri Jun 22 15:34:20 2018 +0200 + + Patched LASymMatrix.h + +diff --git a/Minuit/LASymMatrix.h b/Minuit/LASymMatrix.h +index 755eb11..976c0de 100644 +--- a/Minuit/LASymMatrix.h ++++ b/Minuit/LASymMatrix.h +@@ -16,6 +16,7 @@ + // #include + + #include "Minuit/StackAllocator.h" ++#include + //extern StackAllocator StackAllocatorHolder::get(); + + int mndaxpy(unsigned int, double, const double*, int, double*, int); +@@ -37,7 +38,7 @@ public: + + LASymMatrix(unsigned int n) : theSize(n*(n+1)/2), theNRow(n), theData((double*)StackAllocatorHolder::get().allocate(sizeof(double)*n*(n+1)/2)) { + // assert(theSize>0); +- memset(theData, 0, theSize*sizeof(double)); ++ std::memset(theData, 0, theSize*sizeof(double)); + // std::cout<<"LASymMatrix(unsigned int n), n= "<& v)"< + LASymMatrix(const ABObj, T>, T>& inv) : theSize(inv.obj().obj().obj().size()), theNRow(inv.obj().obj().obj().nrow()), theData((double*)StackAllocatorHolder::get().allocate(sizeof(double)*inv.obj().obj().obj().size())) { +- memcpy(theData, inv.obj().obj().obj().data(), theSize*sizeof(double)); ++ std::memcpy(theData, inv.obj().obj().obj().data(), theSize*sizeof(double)); + mndscal(theSize, double(inv.obj().obj().f()), theData, 1); + invert(*this); + mndscal(theSize, double(inv.f()), theData, 1); +@@ -236,7 +237,7 @@ public: + assert(theSize == v.obj().size()); + } + //std::cout<<"theData= "< LASymMatrix& operator=(const ABObj, T>& something)"< Version('5.0.0'): + url = "http://www.cern.ch/mathlibs/sw/{0}/Minuit2/Minuit2-{1}.tar.gz" + return url.format(version.underscored, version) + else: + url = "http://seal.web.cern.ch/seal/minuit/releases/Minuit-{0}.tar.gz" + return url.format(version.underscored) + + patch('sprintf.cxx.patch', when='@5.08.00:5.18.00') + patch('sprintf.patch', when='@:1.7.9') + patch('LASymMatrix.h.patch', when='@:1.7.6') diff --git a/var/spack/repos/builtin/packages/minuit/sprintf.cxx.patch b/var/spack/repos/builtin/packages/minuit/sprintf.cxx.patch new file mode 100644 index 0000000000..f6bf81cbc3 --- /dev/null +++ b/var/spack/repos/builtin/packages/minuit/sprintf.cxx.patch @@ -0,0 +1,10 @@ +--- a/src/MnUserTransformation.cxx 2008-01-17 15:05:38.000000000 +0100 ++++ b/src/MnUserTransformation.cxx 2018-06-22 13:44:02.629389848 +0200 +@@ -11,6 +11,7 @@ + #include "Minuit2/MnUserCovariance.h" + + #include ++#include + + namespace ROOT { + diff --git a/var/spack/repos/builtin/packages/minuit/sprintf.patch b/var/spack/repos/builtin/packages/minuit/sprintf.patch new file mode 100644 index 0000000000..be49ed772a --- /dev/null +++ b/var/spack/repos/builtin/packages/minuit/sprintf.patch @@ -0,0 +1,10 @@ +--- a/src/MnUserTransformation.cpp 2018-06-22 11:35:34.476798087 +0200 ++++ b/src/MnUserTransformation.cpp 2018-06-22 11:08:01.729725829 +0200 +@@ -2,6 +2,7 @@ + #include "Minuit/MnUserCovariance.h" + + #include ++#include + + class MnParStr { + -- cgit v1.2.3-70-g09d2