git: 11c19f031c20 - main - math/nlopt: Update from 2.9.1 to 2.10.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Mar 2025 15:09:48 UTC
The branch main has been updated by rhurlin:
URL: https://cgit.FreeBSD.org/ports/commit/?id=11c19f031c208fe9e53c4d5953d28fb888962f12
commit 11c19f031c208fe9e53c4d5953d28fb888962f12
Author: Älven <alster@vinterdalen.se>
AuthorDate: 2025-03-01 14:51:27 +0000
Commit: Rainer Hurling <rhurlin@FreeBSD.org>
CommitDate: 2025-03-01 15:09:11 +0000
math/nlopt: Update from 2.9.1 to 2.10.0
- New Java bindings
- Allow disabling exceptions with set_exceptions_enabled
- Configurable tolg tolerance parameter for Luksan gradient
stopping condition
- 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)
Changelog: https://github.com/stevengj/nlopt/blob/master/NEWS.md#nlopt-210
PR: 284934
Reported by: portscout, Repology
---
math/nlopt/Makefile | 37 +++++++++++++-------------
math/nlopt/distinfo | 6 ++---
math/nlopt/files/patch-src_swig_CMakeLists.txt | 13 +++++----
math/nlopt/pkg-plist | 4 +--
math/nlopt/pkg-plist.full | 18 +++++++++++++
5 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/math/nlopt/Makefile b/math/nlopt/Makefile
index 494d4cd211ad..283559daa8db 100644
--- a/math/nlopt/Makefile
+++ b/math/nlopt/Makefile
@@ -1,11 +1,12 @@
PORTNAME= nlopt
DISTVERSIONPREFIX= v
-DISTVERSION= 2.9.1
+DISTVERSION= 2.10.0
CATEGORIES= math
MAINTAINER= rhurlin@FreeBSD.org
COMMENT= Nonlinear optimization library
-WWW= https://nlopt.readthedocs.io/en/latest/
+WWW= https://nlopt.readthedocs.io/ \
+ https://github.com/stevengj/nlopt/
LICENSE= LGPL21 MIT
LICENSE_COMB= multi
@@ -15,6 +16,14 @@ BROKEN_armv6= fails to package: Unable to access file site-packages/_nlopt.a:No
BROKEN_armv7= fails to package: Unable to access file site-packages/_nlopt.a:No such file or directory
FLAVORS= full minimal
+FLAVOR?= ${FLAVORS:[1]}
+
+full_BUILD_DEPENDS= ${PYNUMPY} \
+ swig:devel/swig
+full_RUN_DEPENDS= ${PYNUMPY}
+full_CONFLICTS_INSTALL= ${PORTNAME}-minimal
+minimal_PKGNAMESUFFIX= -minimal
+minimal_CONFLICTS_INSTALL= ${PORTNAME}
USES= cmake:testing
USE_GITHUB= yes
@@ -22,27 +31,19 @@ GH_ACCOUNT= stevengj
USE_LDCONFIG= yes
# 'make test': 100% tests passed, 0 tests failed out of 83
-CMAKE_ON= NLOPT_TESTS
+CMAKE_TESTING_ON= NLOPT_TESTS
-.if ${FLAVOR:U} == minimal
-PKGNAMESUFFIX= -${FLAVOR}
-CMAKE_OFF= NLOPT_GUILE NLOPT_PYTHON NLOPT_SWIG
-CONFLICTS_INSTALL= ${PORTNAME}
-.else
+.if ${FLAVOR} == full
USES+= guile:3.0,alias localbase pkgconfig python
-BUILD_DEPENDS= swig:devel/swig ${PYNUMPY}
# Because guile-config-3.0 crashes, nlopt avoids this by using
# files/patch-cmake_FindGuile.cmake and setting GUILE_EXECUTABLE
# and GUILE_CONFIG_EXECUTABLE
-MAKE_ENV+= GUILE_EXECUTABLE=${PREFIX}/bin/guile3 \
- GUILE_CONFIG_EXECUTABLE=${PREFIX}/bin/guile-config-3
-RUN_DEPENDS= ${PYNUMPY}
-CONFLICTS_INSTALL= ${PORTNAME}-minimal
-PLIST_FILES+= lib/guile/3.0/extensions/nlopt_guile.so \
- %%PYTHON_SITELIBDIR%%/_nlopt.so \
- %%PYTHON_SITELIBDIR%%/nlopt-2.9.1.dist-info/METADATA \
- ${PYTHON_SITELIBDIR}/nlopt.py \
- ${GUILE_SITE_DIR}/nlopt.scm
+MAKE_ENV+= GUILE_EXECUTABLE=${PREFIX}/bin/guile-3.0 \
+ GUILE_CONFIG_EXECUTABLE=${PREFIX}/bin/guile-config-3.0
+CMAKE_OFF= NLOPT_JAVA
+PLIST= ${PKGDIR}/pkg-plist.${FLAVOR}
+.elif ${FLAVOR} == minimal
+CMAKE_OFF= NLOPT_GUILE NLOPT_JAVA NLOPT_PYTHON NLOPT_SWIG
.endif
.include <bsd.port.mk>
diff --git a/math/nlopt/distinfo b/math/nlopt/distinfo
index de3256df6bc9..68f5bffe9210 100644
--- a/math/nlopt/distinfo
+++ b/math/nlopt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1732643048
-SHA256 (stevengj-nlopt-v2.9.1_GH0.tar.gz) = 1e6c33f8cbdc4138d525f3326c231f14ed50d99345561e85285638c49b64ee93
-SIZE (stevengj-nlopt-v2.9.1_GH0.tar.gz) = 2054775
+TIMESTAMP = 1740060154
+SHA256 (stevengj-nlopt-v2.10.0_GH0.tar.gz) = 506f83a9e778ad4f204446e99509cb2bdf5539de8beccc260a014bd560237be1
+SIZE (stevengj-nlopt-v2.10.0_GH0.tar.gz) = 2065021
diff --git a/math/nlopt/files/patch-src_swig_CMakeLists.txt b/math/nlopt/files/patch-src_swig_CMakeLists.txt
index ca0d337b91fd..904492141700 100644
--- a/math/nlopt/files/patch-src_swig_CMakeLists.txt
+++ b/math/nlopt/files/patch-src_swig_CMakeLists.txt
@@ -1,14 +1,13 @@
---- src/swig/CMakeLists.txt.orig 2024-11-10 18:47:56 UTC
+--- src/swig/CMakeLists.txt.orig 2025-02-04 18:29:30 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)
+@@ -58,10 +58,10 @@ if (GUILE_FOUND)
+
+ set (CMAKE_SWIG_FLAGS)
- 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 ${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}")
diff --git a/math/nlopt/pkg-plist b/math/nlopt/pkg-plist
index 44abb6c21380..0f3a0325fb15 100644
--- a/math/nlopt/pkg-plist
+++ b/math/nlopt/pkg-plist
@@ -5,8 +5,8 @@ lib/cmake/nlopt/NLoptConfigVersion.cmake
lib/cmake/nlopt/NLoptLibraryDepends-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/nlopt/NLoptLibraryDepends.cmake
lib/libnlopt.so
-lib/libnlopt.so.0
-lib/libnlopt.so.0.13.0
+lib/libnlopt.so.1
+lib/libnlopt.so.1.0.0
libdata/pkgconfig/nlopt.pc
share/man/man3/nlopt.3.gz
share/man/man3/nlopt_minimize.3.gz
diff --git a/math/nlopt/pkg-plist.full b/math/nlopt/pkg-plist.full
new file mode 100644
index 000000000000..3a3a6db63e96
--- /dev/null
+++ b/math/nlopt/pkg-plist.full
@@ -0,0 +1,18 @@
+%%GUILE_SITE%%/nlopt.scm
+include/nlopt.h
+include/nlopt.hpp
+lib/cmake/nlopt/NLoptConfig.cmake
+lib/cmake/nlopt/NLoptConfigVersion.cmake
+lib/cmake/nlopt/NLoptLibraryDepends-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/nlopt/NLoptLibraryDepends.cmake
+lib/guile/%%GUILE_VER%%/extensions/nlopt_guile.so
+lib/libnlopt.so
+lib/libnlopt.so.1
+lib/libnlopt.so.1.0.0
+%%PYTHON_SITELIBDIR%%/_nlopt.so
+%%PYTHON_SITELIBDIR%%/nlopt-2.10.0.dist-info/METADATA
+%%PYTHON_SITELIBDIR%%/nlopt.py
+libdata/pkgconfig/nlopt.pc
+share/man/man3/nlopt.3.gz
+share/man/man3/nlopt_minimize.3.gz
+share/man/man3/nlopt_minimize_constrained.3.gz