Re: Andreas Tille > > Andreas, since there are a fair number of reverse-dependencies here, do you > > think it might make sense to instead cherry-pick the relevant changes onto a > > branch and then do the library transition a bit later once the CMake 4 stuff > > has settled down? > > This is probably the most sensible approach. Do you volunteer for this? > If not it might be probably me to sort out the mess I've created.
Hi, I've just uploaded a NMU that just does the minimal changes to build with cmake 4. Diff attached. Christoph
No differences were encountered between the control files diff -Nru nlopt-2.7.1/debian/changelog nlopt-2.7.1/debian/changelog --- nlopt-2.7.1/debian/changelog 2025-09-25 12:05:34.000000000 +0200 +++ nlopt-2.7.1/debian/changelog 2025-11-20 18:30:24.000000000 +0100 @@ -1,3 +1,10 @@ +nlopt (2.7.1-7.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix compatibility with cmake 4. (Closes: #1113328) + + -- Christoph Berg <[email protected]> Thu, 20 Nov 2025 17:30:24 +0000 + nlopt (2.7.1-7) unstable; urgency=medium * Team upload diff -Nru nlopt-2.7.1/debian/patches/cmake4 nlopt-2.7.1/debian/patches/cmake4 --- nlopt-2.7.1/debian/patches/cmake4 1970-01-01 01:00:00.000000000 +0100 +++ nlopt-2.7.1/debian/patches/cmake4 2025-11-20 18:30:24.000000000 +0100 @@ -0,0 +1,16 @@ +--- a/cmake/generate-cpp.cmake ++++ b/cmake/generate-cpp.cmake +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.2) ++cmake_minimum_required (VERSION 3.5) + + # generate nlopt.hpp from nlopt-in.hpp + file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/nlopt.hpp "") +--- a/cmake/generate-fortran.cmake ++++ b/cmake/generate-fortran.cmake +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.2) ++cmake_minimum_required (VERSION 3.5) + + # generate nlopt.f from nlopt.h enums + file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/nlopt.f "") diff -Nru nlopt-2.7.1/debian/patches/series nlopt-2.7.1/debian/patches/series --- nlopt-2.7.1/debian/patches/series 2025-09-25 12:05:34.000000000 +0200 +++ nlopt-2.7.1/debian/patches/series 2025-11-20 18:30:24.000000000 +0100 @@ -5,3 +5,4 @@ mkdocs-1.3.patch python3.13.patch octave-10.patch +cmake4 diff -Nru nlopt-2.7.1/debian/rules nlopt-2.7.1/debian/rules --- nlopt-2.7.1/debian/rules 2025-09-25 12:05:34.000000000 +0200 +++ nlopt-2.7.1/debian/rules 2025-11-20 18:30:24.000000000 +0100 @@ -12,9 +12,9 @@ dh $@ --buildsystem=cmake --with python3 override_dh_auto_configure: - dh_auto_configure -a -- -DNLOPT_FORTRAN=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python$(PY3_DEFAULT) -DCMAKE_SKIP_INSTALL_RPATH=TRUE - for py3alt in $(PY3_ALT); do dh_auto_configure -a --builddirectory=$(BUILDDIR)-python$${py3alt} -- -DNLOPT_FORTRAN=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python$${py3alt} -DCMAKE_SKIP_INSTALL_RPATH=TRUE; done - dh_auto_configure -a --builddirectory=$(BUILDDIR)-c-only -- -DNLOPT_CXX=OFF -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_GUILE=OFF -DNLOPT_SWIG=OFF -DCMAKE_SKIP_INSTALL_RPATH=TRUE + dh_auto_configure -a -- -DNLOPT_FORTRAN=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python$(PY3_DEFAULT) -DCMAKE_SKIP_INSTALL_RPATH=TRUE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + for py3alt in $(PY3_ALT); do dh_auto_configure -a --builddirectory=$(BUILDDIR)-python$${py3alt} -- -DNLOPT_FORTRAN=ON -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python$${py3alt} -DCMAKE_SKIP_INSTALL_RPATH=TRUE -DCMAKE_POLICY_VERSION_MINIMUM=3.5; done + dh_auto_configure -a --builddirectory=$(BUILDDIR)-c-only -- -DNLOPT_CXX=OFF -DNLOPT_PYTHON=OFF -DNLOPT_OCTAVE=OFF -DNLOPT_GUILE=OFF -DNLOPT_SWIG=OFF -DCMAKE_SKIP_INSTALL_RPATH=TRUE -DCMAKE_POLICY_VERSION_MINIMUM=3.5 execute_after_dh_auto_build-arch: for py3alt in $(PY3_ALT); do dh_auto_build --builddirectory=$(BUILDDIR)-python$${py3alt}; done

