1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

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
This commit is contained in:
Rainer Hurling 2024-11-12 16:17:26 +01:00
parent e1f70209b0
commit cdc0abb2c2
5 changed files with 39 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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})

View File

@ -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