From 6e706ac0869888e2cefc6a52e2baf47530b1b02e Mon Sep 17 00:00:00 2001 From: nonamedotc Date: Jun 05 2014 19:33:42 +0000 Subject: Correct patch added --- diff --git a/cmpfit.spec b/cmpfit.spec index b7bec3e..8190c4d 100644 --- a/cmpfit.spec +++ b/cmpfit.spec @@ -17,9 +17,6 @@ Source0: http://cow.physics.wisc.edu/~craigm/idl/down/%{name}-%{version}.zip Patch0: header_file.patch Patch1: source_file.patch -# this patch was authored by fityk developer -Patch2: https://raw.githubusercontent.com/wojdyr/fityk/master/fityk/cmpfit/mpfit.patch - %description CMPFIT uses the Levenberg-Marquardt technique to solve the least-squares problem. In its typical use, CMPFIT will be used to fit a user-supplied @@ -40,7 +37,9 @@ application. %setup -q %patch0 %patch1 -%patch2 + +# patching obtained from fityk github repo +sed -i 's/if (config->maxiter > 0)/if (config->maxiter >= 0)/' mpfit.c %build # Manual build, makefile only does static library @@ -72,6 +71,9 @@ popd %{_libdir}/libmpfit.so %changelog +* Thu Jun 05 2014 Mukundan Ragavan - 1.2-4 +- Correct patch added + * Thu Jun 05 2014 Mukundan Ragavan - 1.2-3 - Updating package to version available from fityk github repo - update obtained via email from original author of mpfit by fityk devel diff --git a/mpfit.patch b/mpfit.patch deleted file mode 100644 index 838b615..0000000 --- a/mpfit.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- mpfit.c.orig 2012-10-01 00:30:51.533258108 +0100 -+++ mpfit.c 2012-10-01 01:46:42.106809470 +0100 -@@ -322,7 +322,7 @@ - if (config->stepfactor > 0) conf.stepfactor = config->stepfactor; - 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 >= 0) conf.maxiter = config->maxiter; - if (config->douserscale != 0) conf.douserscale = config->douserscale; - if (config->covtol > 0) conf.covtol = config->covtol; - if (config->nofinitecheck > 0) conf.nofinitecheck = config->nofinitecheck; -@@ -624,7 +624,10 @@ - */ - if (gnorm <= conf.gtol) info = MP_OK_DIR; - if (info != 0) goto L300; -- if (conf.maxiter == 0) goto L300; -+ if (conf.maxiter == 0) { -+ info = MP_MAXITER; -+ goto L300; -+ } - - /* - * rescale if necessary.