mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
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
This commit is contained in:
parent
d1e83d22e0
commit
11c19f031c
5 changed files with 48 additions and 30 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}")
|
||||
|
|
|
@ -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
|
||||
|
|
18
math/nlopt/pkg-plist.full
Normal file
18
math/nlopt/pkg-plist.full
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue