From afa8449fbe9171ca3f6c82c4c82e2d0ad0d881a5 Mon Sep 17 00:00:00 2001 From: Alexander Ploumistos Date: Apr 21 2020 21:11:43 +0000 Subject: Update to version 1.4 --- diff --git a/.gitignore b/.gitignore index fe3a3bc..575f8fd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /source_file.patch /mpfit.patch /cmpfit-1.3a.tar.gz +/cmpfit-1.4.tar.gz diff --git a/cmpfit.spec b/cmpfit.spec index 3b5cbdd..fcabb20 100644 --- a/cmpfit.spec +++ b/cmpfit.spec @@ -2,14 +2,14 @@ %global liblongver 0.0.0 %global libshortver 0 -Name: cmpfit -Version: 1.3a -Release: 5%{?dist} -Summary: A MINPACK-1 Least Squares Fitting Library in C +Name: cmpfit +Version: 1.4 +Release: 1%{?dist} +Summary: A MINPACK-1 Least Squares Fitting Library in C -License: BSD -URL: http://cow.physics.wisc.edu/~craigm/idl/cmpfit.html -Source0: http://cow.physics.wisc.edu/~craigm/idl/down/%{name}-%{version}.tar.gz +License: BSD +URL: http://cow.physics.wisc.edu/~craigm/idl/cmpfit.html +Source0: http://cow.physics.wisc.edu/~craigm/idl/down/%{name}-%{version}.tar.gz BuildRequires: gcc @@ -21,8 +21,8 @@ a set of parameters. CMPFIT is based upon MINPACK-1 (LMDIF.F) by More' and collaborators. %package devel -Summary: Headers for developing programs that will use %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Headers for developing programs that will use %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel These are the header files and libraries needed to develop a %{name} @@ -57,6 +57,9 @@ popd %{_libdir}/libmpfit.so %changelog +* Tue Apr 21 2020 Alexander Ploumistos - 1.4-1 +- Update to version 1.4 + * Tue Jan 28 2020 Fedora Release Engineering - 1.3a-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/header_file.patch b/header_file.patch deleted file mode 100644 index c5f92af..0000000 --- a/header_file.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- mpfit.h.orig 2014-06-05 10:00:51.192261275 -0500 -+++ mpfit.h 2014-06-05 10:00:59.485296669 -0500 -@@ -13,7 +13,7 @@ - - /* Header file defining constants, data structures and functions of - mpfit library -- $Id: mpfit.h,v 1.14 2010/11/13 08:15:07 craigm Exp $ -+ $Id: mpfit.h,v 1.15 2013/04/09 17:55:32 craigm Exp $ - */ - - #ifndef MPFIT_H -@@ -74,12 +74,13 @@ - double epsfcn; /* Finite derivative step size Default: MP_MACHEP0 */ - double stepfactor; /* Initial step bound Default: 100.0 */ - double covtol; /* Range tolerance for covariance calculation Default: 1e-14 */ -- int maxiter; /* Maximum number of iterations. If maxiter == 0, -+ int maxiter; /* Maximum number of iterations. If maxiter == MP_NO_ITER, - then basic error checking is done, and parameter - errors/covariances are estimated based on input - parameter values, but no fitting iterations are done. - Default: 200 - */ -+#define MP_NO_ITER (-1) /* No iterations, just checking */ - int maxfev; /* Maximum number of function evaluations, or 0 for no limit - Default: 0 (no limit) */ - int nprint; /* Default: 1 */ diff --git a/source_file.patch b/source_file.patch deleted file mode 100644 index f7dfec3..0000000 --- a/source_file.patch +++ /dev/null @@ -1,222 +0,0 @@ ---- mpfit.c.orig 2014-06-05 10:02:14.819618639 -0500 -+++ mpfit.c 2014-06-05 10:02:21.131645649 -0500 -@@ -13,7 +13,7 @@ - */ - - /* Main mpfit library routines (double precision) -- $Id: mpfit.c,v 1.20 2010/11/13 08:15:35 craigm Exp $ -+ $Id: mpfit.c,v 1.23 2013/04/23 04:24:16 craigm Exp $ - */ - - #include -@@ -29,7 +29,8 @@ - double *wa, void *priv, int *nfev, - double *step, double *dstep, int *dside, - int *qulimited, double *ulimit, -- int *ddebug, double *ddrtol, double *ddatol); -+ int *ddebug, double *ddrtol, double *ddatol, -+ double *wa2, double **dvecptr); - static void mp_qrfac(int m, int n, double *a, int lda, - int pivot, int *ipvt, int lipvt, - double *rdiag, double *acnorm, double *wa); -@@ -274,7 +275,7 @@ - { - mp_config conf; - int i, j, info, iflag, nfree, npegged, iter; -- int qanylim = 0, qanypegged = 0; -+ int qanylim = 0; - - int ij,jj,l; - double actred,delta,dirder,fnorm,fnorm1,gnorm, orignorm; -@@ -297,6 +298,7 @@ - double *fvec = 0, *qtf = 0; - double *x = 0, *xnew = 0, *fjac = 0, *diag = 0; - double *wa1 = 0, *wa2 = 0, *wa3 = 0, *wa4 = 0; -+ double **dvecptr = 0; - int *ipvt = 0; - - int ldfjac; -@@ -323,6 +325,7 @@ - if (config->nprint >= 0) conf.nprint = config->nprint; - if (config->epsfcn > 0) conf.epsfcn = config->epsfcn; - if (config->maxiter > 0) conf.maxiter = config->maxiter; -+ if (config->maxiter == MP_NO_ITER) conf.maxiter = 0; - if (config->douserscale != 0) conf.douserscale = config->douserscale; - if (config->covtol > 0) conf.covtol = config->covtol; - if (config->nofinitecheck > 0) conf.nofinitecheck = config->nofinitecheck; -@@ -334,6 +337,7 @@ - nfree = 0; - npegged = 0; - -+ /* Basic error checking */ - if (funct == 0) { - return MP_ERR_FUNC; - } -@@ -442,6 +446,7 @@ - mp_malloc(wa3, double, npar); - mp_malloc(wa4, double, m); - mp_malloc(ipvt, int, npar); -+ mp_malloc(dvecptr, double *, npar); - - /* Evaluate user function with initial parameter values */ - iflag = mp_call(funct, m, npar, xall, fvec, 0, private_data); -@@ -483,30 +488,34 @@ - iflag = mp_fdjac2(funct, m, nfree, ifree, npar, xnew, fvec, fjac, ldfjac, - conf.epsfcn, wa4, private_data, &nfev, - step, dstep, mpside, qulim, ulim, -- ddebug, ddrtol, ddatol); -+ ddebug, ddrtol, ddatol, wa2, dvecptr); - if (iflag < 0) { - goto CLEANUP; - } - - /* Determine if any of the parameters are pegged at the limits */ -- qanypegged = 0; - if (qanylim) { - for (j=0; j 0)) { - ij = j*ldfjac; - for (i=0; i 2 */ - /* COMPUTE THE TWO-SIDED DERIVATIVE */ -- for (i=0; i da + fabs(fjold)*dr))) { - printf(" %10d %10.4g %10.4g %10.4g %10.4g %10.4g\n", -@@ -1196,17 +1208,16 @@ - (fjold == 0)?(0):((fjold-fjac[ij])/fjold)); - } - } -- } -+ } /* end debugging */ - -- } -- } -+ } /* if (dside > 2) */ -+ } /* if (has_numerical_derivative) */ - - if (has_debug_deriv) { - printf("FJAC DEBUG END\n"); - } - - DONE: -- if (dvec) free(dvec); - if (iflag < 0) return iflag; - return 0; - /* -@@ -1305,8 +1316,10 @@ - static double one = 1.0; - static double p05 = 0.05; - -- lda = 0; /* Prevent compiler warning */ -- lipvt = 0; /* Prevent compiler warning */ -+ lda = 0; /* Prevent compiler warning */ -+ lipvt = 0; /* Prevent compiler warning */ -+ if (lda) {} /* Prevent compiler warning */ -+ if (lipvt) {} /* Prevent compiler warning */ - - /* - * compute the initial column norms and initialize several arrays. diff --git a/sources b/sources index 1869a48..67b7cb5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cmpfit-1.3a.tar.gz) = 27025890d09a6e62658d332df454137671084739906beb5072bd69cc00409e007e6d888a83deb68bf3c7cef83d6e953fe00f846954ab7f427ed5a353cb6c8d01 +SHA512 (cmpfit-1.4.tar.gz) = 0a0c869bcf202a0dbc9fd6b6939a6382cc8701f09ca9aada90dde809135c2a8436709a84a8be53696e8d09f49f1d14f80c9d4c8c1c6cd418260939fc0ec5dced