From: Ian Jackson Date: Sat, 23 Feb 2019 11:07:30 +0000 (+0000) Subject: git-debrebase convert-from-dgit-view: drop upstream changes from breakwater X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0e3625acb108abff1b9083713a4e343f27e16a8a;p=nlopt.git git-debrebase convert-from-dgit-view: drop upstream changes from breakwater Drop upstream changes, and delete debian/patches, as part of converting to git-debrebase format. Upstream changes will appear as commits. [git-debrebase convert-from-dgit-view drop-patches] --- diff --git a/configure.ac b/configure.ac index d620794..3b93080 100644 --- a/configure.ac +++ b/configure.ac @@ -408,7 +408,7 @@ AC_DEFINE_UNQUOTED(BUGFIX_VERSION, $vers, [Bugfix version number.]) dnl ----------------------------------------------------------------------- -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile nlopt.pc api/Makefile diff --git a/debian/patches/configure.patch b/debian/patches/configure.patch deleted file mode 100644 index a716a72..0000000 --- a/debian/patches/configure.patch +++ /dev/null @@ -1,19 +0,0 @@ -Description: update configure script -Author: Christophe Trophime -Forwarded: no - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -408,7 +408,7 @@ - - dnl ----------------------------------------------------------------------- - --AC_CONFIG_FILES([ -+AC_OUTPUT([ - Makefile - nlopt.pc - api/Makefile diff --git a/debian/patches/octave-4.0.patch b/debian/patches/octave-4.0.patch deleted file mode 100644 index c7cc2c4..0000000 --- a/debian/patches/octave-4.0.patch +++ /dev/null @@ -1,66 +0,0 @@ -Description: Fix FTBFS against Octave 4.0 - Replace Octave_map by octave_map. -Origin: upstream, https://github.com/stevengj/nlopt/commit/131148eb02b770da0e5c1049b4e82c78e4a50fa2 -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792826 -Reviewed-by: Sébastien Villemot -Last-Update: 2015-07-20 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ -diff --git a/octave/nlopt_optimize-oct.cc b/octave/nlopt_optimize-oct.cc -index 4e08421..a66da8e 100644 ---- a/octave/nlopt_optimize-oct.cc -+++ b/octave/nlopt_optimize-oct.cc -@@ -29,7 +29,7 @@ - #include "nlopt.h" - #include "nlopt_optimize_usage.h" - --static int struct_val_default(Octave_map &m, const std::string& k, -+static int struct_val_default(octave_map &m, const std::string& k, - int dflt) - { - if (m.contains(k)) { -@@ -39,7 +39,7 @@ static int struct_val_default(Octave_map &m, const std::string& k, - return dflt; - } - --static double struct_val_default(Octave_map &m, const std::string& k, -+static double struct_val_default(octave_map &m, const std::string& k, - double dflt) - { - if (m.contains(k)) { -@@ -49,7 +49,7 @@ static double struct_val_default(Octave_map &m, const std::string& k, - return dflt; - } - --static Matrix struct_val_default(Octave_map &m, const std::string& k, -+static Matrix struct_val_default(octave_map &m, const std::string& k, - Matrix &dflt) - { - if (m.contains(k)) { -@@ -140,7 +140,7 @@ static double user_function1(unsigned n, const double *x, - - #define CHECK1(cond, msg) if (!(cond)) { fprintf(stderr, msg "\n\n"); nlopt_destroy(opt); nlopt_destroy(local_opt); return NULL; } - --nlopt_opt make_opt(Octave_map &opts, int n) -+nlopt_opt make_opt(octave_map &opts, int n) - { - nlopt_opt opt = NULL, local_opt = NULL; - -@@ -195,7 +195,7 @@ nlopt_opt make_opt(Octave_map &opts, int n) - CHECK1(opts.contents("local_optimizer").length() == 1 - && (opts.contents("local_optimizer"))(0).is_map(), - "opt.local_optimizer must be a structure"); -- Octave_map local_opts = (opts.contents("local_optimizer"))(0).map_value(); -+ octave_map local_opts = (opts.contents("local_optimizer"))(0).map_value(); - CHECK1((local_opt = make_opt(local_opts, n)), - "error initializing local optimizer"); - nlopt_set_local_optimizer(opt, local_opt); -@@ -216,7 +216,7 @@ DEFUN_DLD(nlopt_optimize, args, nargout, NLOPT_OPTIMIZE_USAGE) - CHECK(args.length() == 2 && nargout <= 3, "wrong number of args"); - - CHECK(args(0).is_map(), "opt must be structure") -- Octave_map opts = args(0).map_value(); -+ octave_map opts = args(0).map_value(); - - CHECK(args(1).is_real_matrix() || args(1).is_real_scalar(), - "x must be real vector"); diff --git a/debian/patches/octave4.4.patch b/debian/patches/octave4.4.patch deleted file mode 100644 index 661d3e2..0000000 --- a/debian/patches/octave4.4.patch +++ /dev/null @@ -1,44 +0,0 @@ -Description: Fix FTBFS against Octave 4.4 -Origin: backport, https://github.com/stevengj/nlopt/commit/1fcbcbf2fe8e34234e016cc43a6c41d3e8453e1f -Reviewed-by: Sébastien Villemot -Last-Update: 2018-06-11 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/octave/nlopt_optimize-oct.cc -+++ b/octave/nlopt_optimize-oct.cc -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -79,7 +80,12 @@ static double user_function(unsigned n, - for (unsigned i = 0; i < n; ++i) - xm(i) = x[i]; - args(0) = xm; -- octave_value_list res = data->f->do_multi_index_op(gradient ? 2 : 1, args); -+ octave_value_list res -+#if (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSION > 2) -+ = octave::feval(data->f, args, gradient ? 2 : 1); -+#else -+ = data->f->do_multi_index_op(gradient ? 2 : 1, args); -+#endif - if (res.length() < (gradient ? 2 : 1)) - gripe_user_supplied_eval("nlopt_optimize"); - else if (!res(0).is_real_scalar() -@@ -116,7 +122,12 @@ static double user_function1(unsigned n, - for (unsigned i = 0; i < n; ++i) - xm(i) = x[i]; - args(0) = xm; -- octave_value_list res = f->do_multi_index_op(gradient ? 2 : 1, args); -+ octave_value_list res -+#if (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSION > 2) -+ = octave::feval(f, args, gradient ? 2 : 1); -+#else -+ = f->do_multi_index_op(gradient ? 2 : 1, args); -+#endif - if (res.length() < (gradient ? 2 : 1)) - gripe_user_supplied_eval("nlopt_optimize"); - else if (!res(0).is_real_scalar() diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 8f4def4..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,4 +0,0 @@ -configure.patch -spelling-fixes.patch -octave-4.0.patch -octave4.4.patch diff --git a/debian/patches/spelling-fixes.patch b/debian/patches/spelling-fixes.patch deleted file mode 100644 index fdc46ec..0000000 --- a/debian/patches/spelling-fixes.patch +++ /dev/null @@ -1,107 +0,0 @@ -Descriptions: spelling fixes to make lintian happy -Author: Sergey B Kirpichev -Forwarded: no - ---- - direct/DIRect.c | 20 ++++++++++---------- - swig/nlopt-python.cpp | 2 +- - swig/numpy.i | 2 +- - 3 files changed, 12 insertions(+), 12 deletions(-) - ---- a/swig/nlopt-python.cpp -+++ b/swig/nlopt-python.cpp -@@ -4895,7 +4895,7 @@ SWIG_AsVal_unsigned_SS_int (PyObject * o - if (PyInstance_Check(py_obj)) return "instance" ; - #endif - -- return "unkown type"; -+ return "unknown type"; - } - - /* Given a NumPy typecode, return a string describing the type. ---- a/swig/numpy.i -+++ b/swig/numpy.i -@@ -89,7 +89,7 @@ - if (PyInstance_Check(py_obj)) return "instance" ; - %#endif - -- return "unkown type"; -+ return "unknown type"; - } - - /* Given a NumPy typecode, return a string describing the type. ---- a/direct/DIRect.c -+++ b/direct/DIRect.c -@@ -162,17 +162,17 @@ - /* | for the function within the hyper-box. | */ - /* | | */ - /* | minf -- The value of the function at x. | */ --/* | Ierror -- Error flag. If Ierror is lower 0, an error has occured. The| */ --/* | values of Ierror mean | */ -+/* | Ierror -- Error flag. If Ierror is lower 0, an error has occurred. | */ -+/* | The values of Ierror mean | */ - /* | Fatal errors : | */ - /* | -1 u(i) <= l(i) for some i. | */ - /* | -2 maxf is too large. | */ - /* | -3 Initialization in DIRpreprc failed. | */ - /* | -4 Error in DIRSamplepoints, that is there was an error | */ - /* | in the creation of the sample points. | */ --/* | -5 Error in DIRSamplef, that is an error occured while | */ -+/* | -5 Error in DIRSamplef, that is an error occurred while | */ - /* | the function was sampled. | */ --/* | -6 Error in DIRDoubleInsert, that is an error occured | */ -+/* | -6 Error in DIRDoubleInsert, that is an error occurred | */ - /* | DIRECT tried to add all hyperrectangles with the same| */ - /* | size and function value at the center. Either | */ - /* | increase maxdiv or use our modification (Jones = 1). | */ -@@ -355,7 +355,7 @@ - algmethod, &MAXFUNC, &MAXDEEP, fglobal, fglper, ierror, &epsfix, & - iepschange, volper, sigmaper); - /* +-----------------------------------------------------------------------+ */ --/* | If an error has occured while writing the header (we do some checking | */ -+/* | If an error has occurred while writing the header (we do some checking| */ - /* | of variables there), return to the main program. | */ - /* +-----------------------------------------------------------------------+ */ - if (*ierror < 0) { -@@ -383,7 +383,7 @@ - direct_dirinitlist_(anchor, &ifree, point, f, &MAXFUNC, &MAXDEEP); - /* +-----------------------------------------------------------------------+ */ - /* | Call the routine to initialise the mapping of x from the n-dimensional| */ --/* | unit cube to the hypercube given by u and l. If an error occured, | */ -+/* | unit cube to the hypercube given by u and l. If an error occurred, | */ - /* | give out a error message and return to the main program with the error| */ - /* | flag set. | */ - /* | JG 07/16/01 Changed call to remove unused data. | */ -@@ -413,12 +413,12 @@ - if (*ierror < 0) { - if (*ierror == -4) { - if (logfile) -- fprintf(logfile, "WARNING: Error occured in routine DIRsamplepoints.\n"); -+ fprintf(logfile, "WARNING: Error occurred in routine DIRsamplepoints.\n"); - goto cleanup; - } - if (*ierror == -5) { - if (logfile) -- fprintf(logfile, "WARNING: Error occured in routine DIRsamplef..\n"); -+ fprintf(logfile, "WARNING: Error occurred in routine DIRsamplef..\n"); - goto cleanup; - } - if (*ierror == -102) goto L100; -@@ -535,7 +535,7 @@ - MAXDEEP, &oops); - if (oops > 0) { - if (logfile) -- fprintf(logfile, "WARNING: Error occured in routine DIRsamplepoints.\n"); -+ fprintf(logfile, "WARNING: Error occurred in routine DIRsamplepoints.\n"); - *ierror = -4; - goto cleanup; - } -@@ -558,7 +558,7 @@ - } - if (oops > 0) { - if (logfile) -- fprintf(logfile, "WARNING: Error occured in routine DIRsamplef.\n"); -+ fprintf(logfile, "WARNING: Error occurred in routine DIRsamplef.\n"); - *ierror = -5; - goto cleanup; - } diff --git a/direct/DIRect.c b/direct/DIRect.c index 6aba0b7..f0a7c1a 100644 --- a/direct/DIRect.c +++ b/direct/DIRect.c @@ -162,17 +162,17 @@ /* | for the function within the hyper-box. | */ /* | | */ /* | minf -- The value of the function at x. | */ -/* | Ierror -- Error flag. If Ierror is lower 0, an error has occurred. | */ -/* | The values of Ierror mean | */ +/* | Ierror -- Error flag. If Ierror is lower 0, an error has occured. The| */ +/* | values of Ierror mean | */ /* | Fatal errors : | */ /* | -1 u(i) <= l(i) for some i. | */ /* | -2 maxf is too large. | */ /* | -3 Initialization in DIRpreprc failed. | */ /* | -4 Error in DIRSamplepoints, that is there was an error | */ /* | in the creation of the sample points. | */ -/* | -5 Error in DIRSamplef, that is an error occurred while | */ +/* | -5 Error in DIRSamplef, that is an error occured while | */ /* | the function was sampled. | */ -/* | -6 Error in DIRDoubleInsert, that is an error occurred | */ +/* | -6 Error in DIRDoubleInsert, that is an error occured | */ /* | DIRECT tried to add all hyperrectangles with the same| */ /* | size and function value at the center. Either | */ /* | increase maxdiv or use our modification (Jones = 1). | */ @@ -355,7 +355,7 @@ algmethod, &MAXFUNC, &MAXDEEP, fglobal, fglper, ierror, &epsfix, & iepschange, volper, sigmaper); /* +-----------------------------------------------------------------------+ */ -/* | If an error has occurred while writing the header (we do some checking| */ +/* | If an error has occured while writing the header (we do some checking | */ /* | of variables there), return to the main program. | */ /* +-----------------------------------------------------------------------+ */ if (*ierror < 0) { @@ -383,7 +383,7 @@ direct_dirinitlist_(anchor, &ifree, point, f, &MAXFUNC, &MAXDEEP); /* +-----------------------------------------------------------------------+ */ /* | Call the routine to initialise the mapping of x from the n-dimensional| */ -/* | unit cube to the hypercube given by u and l. If an error occurred, | */ +/* | unit cube to the hypercube given by u and l. If an error occured, | */ /* | give out a error message and return to the main program with the error| */ /* | flag set. | */ /* | JG 07/16/01 Changed call to remove unused data. | */ @@ -413,12 +413,12 @@ if (*ierror < 0) { if (*ierror == -4) { if (logfile) - fprintf(logfile, "WARNING: Error occurred in routine DIRsamplepoints.\n"); + fprintf(logfile, "WARNING: Error occured in routine DIRsamplepoints.\n"); goto cleanup; } if (*ierror == -5) { if (logfile) - fprintf(logfile, "WARNING: Error occurred in routine DIRsamplef..\n"); + fprintf(logfile, "WARNING: Error occured in routine DIRsamplef..\n"); goto cleanup; } if (*ierror == -102) goto L100; @@ -535,7 +535,7 @@ MAXDEEP, &oops); if (oops > 0) { if (logfile) - fprintf(logfile, "WARNING: Error occurred in routine DIRsamplepoints.\n"); + fprintf(logfile, "WARNING: Error occured in routine DIRsamplepoints.\n"); *ierror = -4; goto cleanup; } @@ -558,7 +558,7 @@ } if (oops > 0) { if (logfile) - fprintf(logfile, "WARNING: Error occurred in routine DIRsamplef.\n"); + fprintf(logfile, "WARNING: Error occured in routine DIRsamplef.\n"); *ierror = -5; goto cleanup; } diff --git a/octave/nlopt_optimize-oct.cc b/octave/nlopt_optimize-oct.cc index 536ec97..4e08421 100644 --- a/octave/nlopt_optimize-oct.cc +++ b/octave/nlopt_optimize-oct.cc @@ -23,14 +23,13 @@ #include #include #include -#include #include #include #include "nlopt.h" #include "nlopt_optimize_usage.h" -static int struct_val_default(octave_map &m, const std::string& k, +static int struct_val_default(Octave_map &m, const std::string& k, int dflt) { if (m.contains(k)) { @@ -40,7 +39,7 @@ static int struct_val_default(octave_map &m, const std::string& k, return dflt; } -static double struct_val_default(octave_map &m, const std::string& k, +static double struct_val_default(Octave_map &m, const std::string& k, double dflt) { if (m.contains(k)) { @@ -50,7 +49,7 @@ static double struct_val_default(octave_map &m, const std::string& k, return dflt; } -static Matrix struct_val_default(octave_map &m, const std::string& k, +static Matrix struct_val_default(Octave_map &m, const std::string& k, Matrix &dflt) { if (m.contains(k)) { @@ -80,12 +79,7 @@ static double user_function(unsigned n, const double *x, for (unsigned i = 0; i < n; ++i) xm(i) = x[i]; args(0) = xm; - octave_value_list res -#if (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSION > 2) - = octave::feval(data->f, args, gradient ? 2 : 1); -#else - = data->f->do_multi_index_op(gradient ? 2 : 1, args); -#endif + octave_value_list res = data->f->do_multi_index_op(gradient ? 2 : 1, args); if (res.length() < (gradient ? 2 : 1)) gripe_user_supplied_eval("nlopt_optimize"); else if (!res(0).is_real_scalar() @@ -122,12 +116,7 @@ static double user_function1(unsigned n, const double *x, for (unsigned i = 0; i < n; ++i) xm(i) = x[i]; args(0) = xm; - octave_value_list res -#if (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSION > 2) - = octave::feval(f, args, gradient ? 2 : 1); -#else - = f->do_multi_index_op(gradient ? 2 : 1, args); -#endif + octave_value_list res = f->do_multi_index_op(gradient ? 2 : 1, args); if (res.length() < (gradient ? 2 : 1)) gripe_user_supplied_eval("nlopt_optimize"); else if (!res(0).is_real_scalar() @@ -151,7 +140,7 @@ static double user_function1(unsigned n, const double *x, #define CHECK1(cond, msg) if (!(cond)) { fprintf(stderr, msg "\n\n"); nlopt_destroy(opt); nlopt_destroy(local_opt); return NULL; } -nlopt_opt make_opt(octave_map &opts, int n) +nlopt_opt make_opt(Octave_map &opts, int n) { nlopt_opt opt = NULL, local_opt = NULL; @@ -206,7 +195,7 @@ nlopt_opt make_opt(octave_map &opts, int n) CHECK1(opts.contents("local_optimizer").length() == 1 && (opts.contents("local_optimizer"))(0).is_map(), "opt.local_optimizer must be a structure"); - octave_map local_opts = (opts.contents("local_optimizer"))(0).map_value(); + Octave_map local_opts = (opts.contents("local_optimizer"))(0).map_value(); CHECK1((local_opt = make_opt(local_opts, n)), "error initializing local optimizer"); nlopt_set_local_optimizer(opt, local_opt); @@ -227,7 +216,7 @@ DEFUN_DLD(nlopt_optimize, args, nargout, NLOPT_OPTIMIZE_USAGE) CHECK(args.length() == 2 && nargout <= 3, "wrong number of args"); CHECK(args(0).is_map(), "opt must be structure") - octave_map opts = args(0).map_value(); + Octave_map opts = args(0).map_value(); CHECK(args(1).is_real_matrix() || args(1).is_real_scalar(), "x must be real vector"); diff --git a/swig/nlopt-python.cpp b/swig/nlopt-python.cpp index ecc7c09..30a2dad 100644 --- a/swig/nlopt-python.cpp +++ b/swig/nlopt-python.cpp @@ -4895,7 +4895,7 @@ SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) if (PyInstance_Check(py_obj)) return "instance" ; #endif - return "unknown type"; + return "unkown type"; } /* Given a NumPy typecode, return a string describing the type. diff --git a/swig/numpy.i b/swig/numpy.i index 05ae90b..f2714cc 100644 --- a/swig/numpy.i +++ b/swig/numpy.i @@ -89,7 +89,7 @@ if (PyInstance_Check(py_obj)) return "instance" ; %#endif - return "unknown type"; + return "unkown type"; } /* Given a NumPy typecode, return a string describing the type.