Provide nlopt-doc package with HTML documentation Debian patch docs_skip_mdx_math.patch skips mdx_math in docs. It is provided by python-markdown-math which is not packaged yet. Needed to render inline TeX maths e.g. $lb_i = ub_i$, so we'll manage without that for now.
Fix installation path of Octave files Without this patch, the Octave files would be installed in a path that contains the version number of the Octave version against which they were compiled. Thus, the package would need to be recompiled after each new (minor) version of Octave. The present patch makes the installation path independent from the Octave version (of course, rebuilds may still be needed because of ABI bumps).
Do not link against Octave libraries Since Octave 5, the .oct files are no longer linked against Octave libraries. And since Octave 6.4.0-2 in Debian, those libraries have been made private (as does upstream by default), hence linking against them leads to a FTBFS.