Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nlopt for openSUSE:Leap:16.0 checked 
in at 2025-07-02 16:41:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:16.0/nlopt (Old)
 and      /work/SRC/openSUSE:Leap:16.0/.nlopt.new.7067 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nlopt"

Wed Jul  2 16:41:44 2025 rev:2 rq:1289829 version:2.10.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:16.0/nlopt/nlopt.changes    2025-03-19 
11:52:15.343635369 +0100
+++ /work/SRC/openSUSE:Leap:16.0/.nlopt.new.7067/nlopt.changes  2025-07-02 
16:43:46.629926632 +0200
@@ -1,0 +2,40 @@
+Thu May 22 12:14:08 UTC 2025 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Add nlopt-dont-force-cxx-standard.patch: Don't force c++11 std
+  for builds to allow building octave bindings against octave 10+
+  [gh#stevengj/nlopt#616]; patch taken from upstream commit
+  [gh#stevengj/nlopt#597] and rebased for current version.
+- For default flavour, build non-python bindings only for default
+  python3 version. This reduces build times.
+- Do not force -D_FORTIFY_SOURCE=2 any more (fixed since version
+  2.9.1, see gh#stevengj/nlopt#563).
+
+-------------------------------------------------------------------
+Sun Feb  9 05:24:10 UTC 2025 - Bernhard Wiedemann <bwiedem...@suse.com>
+
+- Use strip-nondeterminism to normalize jar mtimes for reproducible builds
+
+-------------------------------------------------------------------
+Thu Feb  6 10:06:41 UTC 2025 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 2.10.0:
+  * New Java bindings (gh#stevengj/nlopt#578).
+  * Allow disabling exceptions with set_exceptions_enabled
+    (gh#stevengj/nlopt#580).
+  * Configurable tolg tolerance parameter for Luksan gradient
+    stopping condition (gh#stevengj/nlopt#585).
+  * Restored LD_LBFGS_NOCEDAL enum value (dropped in 2.9) to ease
+    backwards compatibility for wrappers in other languages
+    (though this algorithm is currently unimplemented)
+    (gh#stevengj/nlopt#587).
+- Build and install java bindings as part of a newly split
+  nlopt-java package.
+- Bump shlib name in keeping with upstream so version update.
+
+-------------------------------------------------------------------
+Fri Dec 20 10:42:58 UTC 2024 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 2.9.1:
+  * Fixed PRAXIS box constraints (gh#stevengj/nlopt#528).
+
+-------------------------------------------------------------------

Old:
----
  nlopt-2.9.0.tar.gz

New:
----
  nlopt-2.10.0.tar.gz
  nlopt-dont-force-cxx-standard.patch

----------(New B)----------
  New:
- Add nlopt-dont-force-cxx-standard.patch: Don't force c++11 std
  for builds to allow building octave bindings against octave 10+
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nlopt.spec ++++++
--- /var/tmp/diff_new_pack.AyaJOf/_old  2025-07-02 16:43:46.953940078 +0200
+++ /var/tmp/diff_new_pack.AyaJOf/_new  2025-07-02 16:43:46.957940244 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package nlopt
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,22 +26,30 @@
 %define psuffix -main
 %endif
 %define pname nlopt
+%define so_ver 1
+
+%if 0%{?suse_version} <= 1500
+%define gcc_ver 8
+%endif
 
 Name:           nlopt%{?psuffix}
-Version:        2.9.0
+Version:        2.10.0
 Release:        0
 Summary:        A library for nonlinear optimization
 License:        LGPL-2.1-or-later
-Group:          Development/Libraries/C and C++
 URL:            https://nlopt.readthedocs.io/en/latest/
 Source0:        
https://github.com/stevengj/nlopt/archive/v%{version}.tar.gz#/%{pname}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM nlopt-dont-force-cxx-standard.patch gh#stevengj/nlopt#597 
badshah...@gmail.com -- Do not force c++11 standard; this allows building 
octave bindings against octave 10+
+Patch0:         nlopt-dont-force-cxx-standard.patch
 BuildRequires:  cmake
 BuildRequires:  fdupes
-BuildRequires:  gcc-c++
+BuildRequires:  gcc%{?gcc_ver}-c++
 BuildRequires:  hdf5-devel
 BuildRequires:  pkgconfig
 %if %{with bindings}
 BuildRequires:  %{python_module numpy-devel}
+BuildRequires:  java-devel > 11
+BuildRequires:  strip-nondeterminism
 BuildRequires:  swig
 BuildRequires:  pkgconfig(octave)
 Requires:       python-numpy
@@ -54,11 +62,10 @@
 optimization routines available online as well as original
 implementations of various other algorithms.
 
-%package     -n lib%{pname}0
+%package     -n lib%{pname}%{so_ver}
 Summary:        A library for nonlinear optimization
-Group:          System/Libraries
 
-%description -n lib%{pname}0
+%description -n lib%{pname}%{so_ver}
 NLopt is a free/open-source library for nonlinear optimization,
 providing a common interface for a number of different free
 optimization routines available online as well as original
@@ -66,8 +73,7 @@
 
 %package -n     %{pname}-devel
 Summary:        Development files for %{pname}
-Group:          Development/Libraries/C and C++
-Requires:       lib%{pname}0 = %{version}
+Requires:       lib%{pname}%{so_ver} = %{version}
 
 %description -n %{pname}-devel
 The %{pname}-devel package contains libraries and header files for
@@ -75,8 +81,7 @@
 
 %if %{with bindings}
 %package     -n octave-nlopt_optimize
-Summary:        Octave interface to nonlinear optimization libray
-Group:          Productivity/Scientific/Math
+Summary:        Octave interface to nonlinear optimization library
 %requires_eq    octave-cli
 
 %description -n octave-nlopt_optimize
@@ -88,11 +93,23 @@
 This package contains the Octave interface for NLopt.
 %endif
 
+%package -n %{pname}-java
+Summary:        Java bindings for NLopt
+BuildArch:      noarch
+
+%description -n %{pname}-java
+This package provides java bindings for NLopt, a nonlinear optimization
+library.
+
 %prep
 %autosetup -p1 -n %{pname}-%{version}
 
 %build
-# Must be built with -D_FORTIFY_SOURCE=2 (not 3) for tests to pass, see 
<https://github.com/stevengj/nlopt/issues/563>
+%if 0%{?gcc_ver}
+export CC=gcc-%{gcc_ver}
+export CXX=g++-%{gcc_ver}
+%endif
+
 %if %{with bindings}
 %{python_expand # Necessary to run configure with all python flavors
 export PYTHON=$python
@@ -100,25 +117,27 @@
 cp -pr ./ ../${PYTHON}_build
 pushd ../${PYTHON}_build
 %cmake \
-   -DCMAKE_C_FLAGS="%(echo %optflags | sed 
's/-D_FORTIFY_SOURCE=3/-D_FORTIFY_SOURCE=2/g')" \
-   -DCMAKE_CXX_FLAGS="%(echo %optflags | sed 
's/-D_FORTIFY_SOURCE=3/-D_FORTIFY_SOURCE=2/g')" \
    -DCMAKE_SKIP_RPATH:BOOL=OFF \
    -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
    -DNLOPT_MATLAB=OFF \
-   -DNLOPT_CXX:BOOL=ON \
+   -DNLOPT_CXX:BOOL=OM \
    -DNLOPT_TESTS:BOOL=ON \
    -DNLOPT_PYTHON:BOOL=ON \
-   -DNLOPT_OCTAVE:BOOL=ON \
    -DNLOPT_SWIG:BOOL=ON \
    -DPython_EXECUTABLE=%{_bindir}/$python \
+%if "${python_flavor}" == "python3"  || "%{$python_provides}" == "python3"
+   -DNLOPT_JAVA:BOOL=ON \
+   -DNLOPT_OCTAVE:BOOL=ON \
+%else
+   -DNLOPT_JAVA:BOOL=OFF \
+   -DNLOPT_OCTAVE:BOOL=OFF \
+%endif
    %{nil}
 %cmake_build
 popd
 }
 %else
 %cmake \
-   -DCMAKE_C_FLAGS="%(echo %optflags | sed 
's/-D_FORTIFY_SOURCE=3/-D_FORTIFY_SOURCE=2/g')" \
-   -DCMAKE_CXX_FLAGS="%(echo %optflags | sed 
's/-D_FORTIFY_SOURCE=3/-D_FORTIFY_SOURCE=2/g')" \
    -DCMAKE_SKIP_RPATH:BOOL=OFF \
    -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
    -DNLOPT_MATLAB=OFF \
@@ -141,6 +160,7 @@
 for e in %{_includedir} %{_libdir}/lib\* %{_libdir}/pkgconfig %{_libdir}/cmake 
%{_mandir} ; do
     rm -R %{buildroot}/${e}
 done
+strip-all-nondeterminism %{buildroot}%{_datadir}/java/%{pname}.jar
 %fdupes %{buildroot}%{$python_sitearch}
 popd
 }
@@ -159,11 +179,11 @@
 %ctest
 %endif
 
-%post -n lib%{pname}0 -p /sbin/ldconfig
-%postun -n lib%{pname}0 -p /sbin/ldconfig
-
 %if "%{flavor}" == "main"
-%files -n lib%{pname}0
+
+%ldconfig_scriptlets -n lib%{pname}%{so_ver}
+
+%files -n lib%{pname}%{so_ver}
 %{_libdir}/*.so.*
 
 %files -n %{pname}-devel
@@ -190,5 +210,9 @@
 %dir %{_libdir}/octave/*/site/oct/*
 %{_libdir}/octave/*/site/oct/*/*.oct
 %{_datadir}/octave/*/site/m/*
+
+%files -n %{pname}-java
+%license COPYING
+%{_datadir}/java/%{pname}.jar
 %endif
 

++++++ nlopt-2.9.0.tar.gz -> nlopt-2.10.0.tar.gz ++++++
++++ 2765 lines of diff (skipped)

++++++ nlopt-dont-force-cxx-standard.patch ++++++
>From 91298d1f6af60719c284843ad61d7aaa32825859 Mon Sep 17 00:00:00 2001
From: Julien Schueller <schuel...@phimeca.com>
Date: Mon, 24 Feb 2025 15:17:39 +0100
Subject: [PATCH] CMake: Assume working c++ compiler

---
 CMakeLists.txt          | 19 +++----------------
 src/swig/CMakeLists.txt |  6 +++---
 test/CMakeLists.txt     | 38 ++++++++++++++++++--------------------
 3 files changed, 24 insertions(+), 39 deletions(-)

Index: nlopt-2.10.0/CMakeLists.txt
===================================================================
--- nlopt-2.10.0.orig/CMakeLists.txt
+++ nlopt-2.10.0/CMakeLists.txt
@@ -77,8 +77,6 @@ endif ()
 include (CheckIncludeFiles)
 include (CheckFunctionExists)
 include (CheckTypeSize)
-include (CheckCCompilerFlag)
-include (CheckCXXSymbolExists)
 include (CheckCSourceCompiles)
 include (CheckCXXCompilerFlag)
 include (CheckLibraryExists)
@@ -143,20 +141,6 @@ if (WITH_THREADLOCAL AND NOT DEFINED THR
   endforeach()
 endif ()
 
-
-if (NLOPT_CXX OR NLOPT_PYTHON OR NLOPT_GUILE OR NLOPT_OCTAVE OR NLOPT_JAVA)
-  check_cxx_symbol_exists (__cplusplus ciso646 SYSTEM_HAS_CXX)
-  if (SYSTEM_HAS_CXX)
-    set (CMAKE_CXX_STANDARD 11) # set the standard to C++11 but do not require 
it
-
-    if (NLOPT_CXX)
-      set (CMAKE_CXX_STANDARD_REQUIRED ON) # if we build C++ API, we do need 
C++11
-    endif ()
-  else()
-    message (FATAL_ERROR "The compiler doesn't support CXX.")
-  endif ()
-endif ()
-
 #==============================================================================
 # CREATE nlopt_config.h
 #==============================================================================
@@ -261,6 +245,9 @@ endif ()
 target_link_libraries (${nlopt_lib} ${M_LIBRARY})
 set_target_properties (${nlopt_lib} PROPERTIES SOVERSION ${SO_MAJOR})
 set_target_properties (${nlopt_lib} PROPERTIES VERSION 
"${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}")
+if (NLOPT_CXX)
+  target_compile_features (${nlopt_lib} PUBLIC cxx_lambdas)
+endif ()
 
 #==============================================================================
 # INCLUDE DIRECTORIES
Index: nlopt-2.10.0/src/swig/CMakeLists.txt
===================================================================
--- nlopt-2.10.0.orig/src/swig/CMakeLists.txt
+++ nlopt-2.10.0/src/swig/CMakeLists.txt
@@ -21,7 +21,7 @@ endif ()
 include_directories (${NLOPT_PRIVATE_INCLUDE_DIRS})
 set_source_files_properties (nlopt.i PROPERTIES CPLUSPLUS ON)
 
-if (Python_NumPy_FOUND)
+if (Python_NumPy_FOUND AND NLOPT_CXX)
 
   set (SWIG_MODULE_nlopt_python_EXTRA_DEPS nlopt-python.i numpy.i generate-cpp)
 
@@ -46,7 +46,7 @@ if (Python_NumPy_FOUND)
 endif ()
 
 
-if (GUILE_FOUND)
+if (GUILE_FOUND AND NLOPT_CXX)
 
   set (SWIG_MODULE_nlopt_guile_EXTRA_DEPS nlopt-guile.i generate-cpp)
   set (CMAKE_SWIG_FLAGS -scmstub)
@@ -74,7 +74,7 @@ if (GUILE_FOUND)
 endif ()
 
 
-if (JNI_FOUND AND Java_FOUND AND SWIG_FOUND)
+if (JNI_FOUND AND Java_FOUND AND SWIG_FOUND AND NLOPT_CXX)
 
   include (UseJava)
 
Index: nlopt-2.10.0/test/CMakeLists.txt
===================================================================
--- nlopt-2.10.0.orig/test/CMakeLists.txt
+++ nlopt-2.10.0/test/CMakeLists.txt
@@ -1,28 +1,26 @@
 add_custom_target (tests)
 
 macro(NLOPT_add_cpp_test test_name)
-  add_executable (${test_name} ${test_name}.cxx)
-  target_link_libraries (${test_name} ${nlopt_lib})
-  add_dependencies (tests ${test_name})
-  target_include_directories (${test_name} PRIVATE 
${NLOPT_PRIVATE_INCLUDE_DIRS})
-  foreach(arg IN ITEMS ${ARGN})
-    add_test (NAME check_${test_name}_${arg} COMMAND ${test_name} ${arg})
-    if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
-      set_tests_properties (check_${test_name}_${arg}
-        PROPERTIES ENVIRONMENT 
"PATH=${PROJECT_BINARY_DIR}\\${CMAKE_BUILD_TYPE};$ENV{PATH}")  # to load dll
-    endif ()
-  endforeach()
+  if (NLOPT_CXX)
+    add_executable (${test_name} ${test_name}.cxx)
+    target_link_libraries (${test_name} ${nlopt_lib})
+    add_dependencies (tests ${test_name})
+    target_include_directories (${test_name} PRIVATE 
${NLOPT_PRIVATE_INCLUDE_DIRS})
+    foreach(arg IN ITEMS ${ARGN})
+      add_test (NAME check_${test_name}_${arg} COMMAND ${test_name} ${arg})
+      if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
+        set_tests_properties (check_${test_name}_${arg}
+          PROPERTIES ENVIRONMENT 
"PATH=${PROJECT_BINARY_DIR}\\${CMAKE_BUILD_TYPE};$ENV{PATH}")  # to load dll
+      endif ()
+    endforeach()
+  endif ()
 endmacro()
 
 NLOPT_add_cpp_test(t_tutorial 24 25 31 40)
 NLOPT_add_cpp_test(cpp_functor 0)
 NLOPT_add_cpp_test(t_fbound 0)
 NLOPT_add_cpp_test(t_except 1 0)
-
 NLOPT_add_cpp_test(t_bounded 0 1 2 3 4 5 6 7 8 19 35 42 43)
-if (NOT NLOPT_CXX)
-  set_tests_properties (check_t_bounded_8 check_t_bounded_43 PROPERTIES 
DISABLED TRUE)
-endif ()
 
 # have to add timer.c and mt19937ar.c as symbols are declared extern
 set (testopt_sources testfuncs.c testfuncs.h testopt.c 
${PROJECT_SOURCE_DIR}/src/util/timer.c 
${PROJECT_SOURCE_DIR}/src/util/mt19937ar.c)
@@ -67,7 +65,7 @@ foreach (algo_index RANGE 28) # 42
   endforeach ()
 endforeach ()
 
-if (Python_NumPy_FOUND AND (SWIG_FOUND OR (EXISTS 
${PROJECT_SOURCE_DIR}/src/swig/nlopt-python.cpp)))
+if (TARGET nlopt_python)
   set (PYINSTALLCHECK_ENVIRONMENT 
"LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/src/swig"
                                   
"PYTHONPATH=$<SHELL_PATH:${PROJECT_BINARY_DIR}/src/swig/python;${PROJECT_BINARY_DIR}/src/swig>"
       )
@@ -85,7 +83,7 @@ endif ()
 # The binding itself should also compile with more ancient Java versions that
 # have already reached their end of life, but it is not worth uglifying the 
test
 # code for them, because people will then cargo-cult the legacy boilerplate.
-if (JNI_FOUND AND Java_FOUND AND SWIG_FOUND AND NOT Java_VERSION VERSION_LESS 
1.8)
+if (TARGET nlopt_java AND NOT Java_VERSION VERSION_LESS 1.8)
   include (UseJava)
   add_jar (t_java SOURCES t_java.java INCLUDE_JARS nlopt_jar ENTRY_POINT 
t_java)
   get_property (t_java_jar TARGET t_java PROPERTY JAR_FILE)
@@ -100,15 +98,15 @@ if (JNI_FOUND AND Java_FOUND AND SWIG_FO
   endforeach()
 endif ()
 
-if (OCTAVE_FOUND)
+if (TARGET nlopt_optimize)
   add_test (NAME test_octave COMMAND ${OCTAVE_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/t_octave.m ${PROJECT_SOURCE_DIR}/src/octave 
${PROJECT_BINARY_DIR}/src/octave)
 endif ()
 
-if (MATLAB_FOUND)
+if (TARGET nlopt_optimize-mex)
   add_test (NAME test_matlab COMMAND ${Matlab_MAIN_PROGRAM} -nodesktop 
-nosplash  -r "addpath('${PROJECT_SOURCE_DIR}/src/octave'); 
addpath('${PROJECT_BINARY_DIR}/src/octave'); try; 
run('${CMAKE_CURRENT_SOURCE_DIR}/t_matlab.m'); catch; exit(1); end; quit")
 endif ()
 
-if (GUILE_FOUND AND (SWIG_FOUND OR (EXISTS 
${PROJECT_SOURCE_DIR}/src/swig/nlopt-guile.cpp)))
+if (TARGET nlopt_guile)
   set (GUILECHECK_ENVIRONMENT "LD_LIBRARY_PATH=${PROJECT_BINARY_DIR}/src/swig"
                               
"GUILE_LOAD_PATH=$<SHELL_PATH:${PROJECT_BINARY_DIR}/src/swig/guile;${PROJECT_BINARY_DIR}/src/swig>"
                               "GUILE_AUTO_COMPILE=0")

Reply via email to