git: cdc0abb2c29b - main - math/nlopt: Update to 2.9.0

From: Rainer Hurling <rhurlin_at_FreeBSD.org>
Date: Tue, 12 Nov 2024 15:34:20 UTC
The branch main has been updated by rhurlin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cdc0abb2c29b44034ff3b6ec96213e8b93240752

commit cdc0abb2c29b44034ff3b6ec96213e8b93240752
Author:     Rainer Hurling <rhurlin@FreeBSD.org>
AuthorDate: 2024-11-12 15:17:26 +0000
Commit:     Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2024-11-12 15:34:04 +0000

    math/nlopt: Update to 2.9.0
    
    - New NLOPT_LUKSAN cmake option to build without Luksan LGPL code
    - Dropped unused LD_LBFGS_NOCEDAL enum value
    - Python 3.13 support
    - Fixed COBYLA not returning the optimum
    - Fixed SLSQP returning infeasible optimum
    - Fixed STOGO not registering new optimum
    - Various minor bugfixes
    
    Changelog: https://github.com/stevengj/nlopt/compare/v2.8.0...v2.9.0
    
    Reported by:    portscout, Repology
---
 math/nlopt/Makefile                            |  5 ++-
 math/nlopt/distinfo                            |  6 +--
 math/nlopt/files/patch-cmake_FindGuile.cmake   | 52 ++++++++++++++------------
 math/nlopt/files/patch-src_swig_CMakeLists.txt |  7 ++--
 math/nlopt/pkg-plist                           |  2 +-
 5 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/math/nlopt/Makefile b/math/nlopt/Makefile
index 3609c20c2617..4edbc1f6efa8 100644
--- a/math/nlopt/Makefile
+++ b/math/nlopt/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	nlopt
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.8.0
+DISTVERSION=	2.9.0
 CATEGORIES=	math
 
 MAINTAINER=	rhurlin@FreeBSD.org
@@ -36,7 +36,8 @@ MAKE_ENV+=	GUILE_EXECUTABLE=${PREFIX}/bin/guile3 \
 RUN_DEPENDS=	${PYNUMPY}
 CONFLICTS_INSTALL=	${PORTNAME}-minimal
 PLIST_FILES+=	lib/guile/3.0/extensions/nlopt_guile.so \
-		${PYTHON_SITELIBDIR}/_nlopt%%PYTHON_EXT_SUFFIX%%.so \
+		%%PYTHON_SITELIBDIR%%/_nlopt.so \
+		%%PYTHON_SITELIBDIR%%/nlopt-2.9.0.dist-info/METADATA \
 		${PYTHON_SITELIBDIR}/nlopt.py \
 		${GUILE_SITE_DIR}/nlopt.scm
 .endif
diff --git a/math/nlopt/distinfo b/math/nlopt/distinfo
index fe2610318c52..253c1e88d3a0 100644
--- a/math/nlopt/distinfo
+++ b/math/nlopt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1723360401
-SHA256 (stevengj-nlopt-v2.8.0_GH0.tar.gz) = e02a4956a69d323775d79fdaec7ba7a23ed912c7d45e439bc933d991ea3193fd
-SIZE (stevengj-nlopt-v2.8.0_GH0.tar.gz) = 2050287
+TIMESTAMP = 1731392424
+SHA256 (stevengj-nlopt-v2.9.0_GH0.tar.gz) = 6e899e297485e457ec1bf84844de29921aeef674f9d5caf60277df45dca6ff76
+SIZE (stevengj-nlopt-v2.9.0_GH0.tar.gz) = 2054092
diff --git a/math/nlopt/files/patch-cmake_FindGuile.cmake b/math/nlopt/files/patch-cmake_FindGuile.cmake
index 4a158cc25e70..95be5b31104c 100644
--- a/math/nlopt/files/patch-cmake_FindGuile.cmake
+++ b/math/nlopt/files/patch-cmake_FindGuile.cmake
@@ -1,6 +1,6 @@
---- cmake/FindGuile.cmake.orig	2024-08-09 20:31:24 UTC
+--- cmake/FindGuile.cmake.orig	2024-11-10 18:47:56 UTC
 +++ cmake/FindGuile.cmake
-@@ -12,87 +12,42 @@
+@@ -12,61 +12,9 @@
  # GUILE_SITE_DIR         - site dir
  # GUILE_EXTENSION_DIR    - extension dir
  # GUILE_ROOT_DIR         - prefix dir
@@ -19,7 +19,7 @@
 -    guile
 -  HINTS /opt/local/include
 -)
--
+ 
 -# Look for the library
 -find_library (GUILE_LIBRARY NAMES guile-3.0 guile-2.2 guile-2.0 guile
 -  HINTS
@@ -30,6 +30,10 @@
 -set (GUILE_LIBRARIES ${GUILE_LIBRARY})
 -set (GUILE_INCLUDE_DIRS ${GUILE_INCLUDE_DIR})
 -
+-find_path (GMP_INCLUDE_DIR gmp.h)
+-if (GMP_INCLUDE_DIR)
+-  list (APPEND GUILE_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
+-endif ()
 -
 -# check guile's version if we're using cmake >= 2.6
 -if (GUILE_INCLUDE_DIR)
@@ -59,11 +63,29 @@
  find_program(GUILE_EXECUTABLE
                NAMES guile3.0 guile2.2 guile2.0 guile
             )
--
- find_program(GUILE_CONFIG_EXECUTABLE
+@@ -75,28 +23,33 @@ find_program(GUILE_CONFIG_EXECUTABLE
                NAMES guile-config3.0 guile-config2.2 guile-config2.0 guile-config
             )
  
+-
+-if (GUILE_CONFIG_EXECUTABLE)
+-  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info prefix
+-                    OUTPUT_VARIABLE GUILE_ROOT_DIR
+-                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+-
+-  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info sitedir
+-                    OUTPUT_VARIABLE GUILE_SITE_DIR
+-                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+-
+-  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info extensiondir
+-                    OUTPUT_VARIABLE GUILE_EXTENSION_DIR
+-                    OUTPUT_STRIP_TRAILING_WHITESPACE)
+-endif ()
+-
+-# IF(GUILE_FOUND AND GUILE_VERSION_MAJOR EQUAL 2)
+-# 	ADD_DEFINITIONS(-DHAVE_GUILE2)
+-# ENDIF(GUILE_FOUND AND GUILE_VERSION_MAJOR EQUAL 2)
+-
 +pkg_check_modules(GUILE IMPORTED_TARGET guile)
 +if (GUILE_FOUND)
 +  pkg_get_variable(GUILE_ROOT_DIR guile prefix)
@@ -88,25 +110,7 @@
 +message(STATUS "GUILE_EXTENSION_DIR is set to ${GUILE_EXTENSION_DIR}")
 +message(STATUS "GUILE_EXECUTABLE is set to ${GUILE_EXECUTABLE}")
 +message(STATUS "GUILE_CONFIG_EXECUTABLE is set to ${GUILE_CONFIG_EXECUTABLE}")
- 
--if (GUILE_CONFIG_EXECUTABLE)
--  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info prefix
--                    OUTPUT_VARIABLE GUILE_ROOT_DIR
--                    OUTPUT_STRIP_TRAILING_WHITESPACE)
--
--  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info sitedir
--                    OUTPUT_VARIABLE GUILE_SITE_DIR
--                    OUTPUT_STRIP_TRAILING_WHITESPACE)
--
--  execute_process (COMMAND ${GUILE_CONFIG_EXECUTABLE} info extensiondir
--                    OUTPUT_VARIABLE GUILE_EXTENSION_DIR
--                    OUTPUT_STRIP_TRAILING_WHITESPACE)
--endif ()
--
--# IF(GUILE_FOUND AND GUILE_VERSION_MAJOR EQUAL 2)
--# 	ADD_DEFINITIONS(-DHAVE_GUILE2)
--# ENDIF(GUILE_FOUND AND GUILE_VERSION_MAJOR EQUAL 2)
--
++ 
  # handle REQUIRED and QUIET options
  include (FindPackageHandleStandardArgs)
 -find_package_handle_standard_args (Guile REQUIRED_VARS GUILE_EXECUTABLE GUILE_ROOT_DIR GUILE_INCLUDE_DIRS GUILE_LIBRARIES VERSION_VAR GUILE_VERSION_STRING)
diff --git a/math/nlopt/files/patch-src_swig_CMakeLists.txt b/math/nlopt/files/patch-src_swig_CMakeLists.txt
index 9f0885a76c59..ca0d337b91fd 100644
--- a/math/nlopt/files/patch-src_swig_CMakeLists.txt
+++ b/math/nlopt/files/patch-src_swig_CMakeLists.txt
@@ -1,15 +1,16 @@
---- src/swig/CMakeLists.txt.orig	2024-08-09 20:31:24 UTC
+--- src/swig/CMakeLists.txt.orig	2024-11-10 18:47:56 UTC
 +++ src/swig/CMakeLists.txt
 @@ -57,10 +57,10 @@ if (GUILE_FOUND)
    # swig_add_module is deprecated
    swig_add_library (nlopt_guile LANGUAGE guile SOURCES nlopt.i)
  
 -  target_include_directories (nlopt_guile PRIVATE ${GUILE_INCLUDE_DIRS})
+-
 +  target_compile_options(nlopt_guile PRIVATE ${GUILE_CFLAGS})
- 
++  
    swig_link_libraries (nlopt_guile ${nlopt_lib})
 -  target_link_libraries (nlopt_guile ${GUILE_LIBRARIES})
 +  target_link_options(nlopt_guile PRIVATE ${GUILE_LDFLAGS})
+   set_target_properties (nlopt_guile PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
  
    file (RELATIVE_PATH _REL_GUILE_SITE_PATH ${GUILE_ROOT_DIR} ${GUILE_SITE_DIR})
-   set (GUILE_SITE_PATH ${_REL_GUILE_SITE_PATH})
diff --git a/math/nlopt/pkg-plist b/math/nlopt/pkg-plist
index 1fc0a90a3d59..44abb6c21380 100644
--- a/math/nlopt/pkg-plist
+++ b/math/nlopt/pkg-plist
@@ -6,7 +6,7 @@ lib/cmake/nlopt/NLoptLibraryDepends-%%CMAKE_BUILD_TYPE%%.cmake
 lib/cmake/nlopt/NLoptLibraryDepends.cmake
 lib/libnlopt.so
 lib/libnlopt.so.0
-lib/libnlopt.so.0.12.0
+lib/libnlopt.so.0.13.0
 libdata/pkgconfig/nlopt.pc
 share/man/man3/nlopt.3.gz
 share/man/man3/nlopt_minimize.3.gz