Skip to content

Commit

Permalink
math/py-nlopt: update 2.7.1 → 2.7.1.2
Browse files Browse the repository at this point in the history
Reported by:	portscout
  • Loading branch information
yurivict committed Apr 4, 2024
1 parent e6b2055 commit 9c26f66
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 12 deletions.
10 changes: 6 additions & 4 deletions math/py-nlopt/Makefile
@@ -1,6 +1,5 @@
PORTNAME= nlopt
DISTVERSION= 2.7.1
PORTREVISION= 1
DISTVERSION= 2.7.1.2
CATEGORIES= math
#MASTER_SITES= PYPI # https://github.com/DanielBok/nlopt-python/issues/15
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -24,10 +23,13 @@ USE_PYTHON= distutils # autoplist is broken, see https://github.com/DanielBok/nl
USE_GITHUB= yes
GH_ACCOUNT= DanielBok
GH_PROJECT= nlopt-python
GH_TUPLE= stevengj:nlopt:4a0e93c:nlopt/extern/nlopt
GH_TUPLE= stevengj:nlopt:7a7587e:nlopt/extern/nlopt

#CMAKE_ARGS= -DFREEBSD_PYTHON_VER=${PYTHON_VER}
MAKE_ENV= FREEBSD_PYTHON_VER=${PYTHON_VER}

post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/nlopt/_nlopt.so
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/nlopt/_nlopt${PYTHON_EXT_SUFFIX}.so

do-test:
@${SETENV} ${TEST_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} ${FILESDIR}/example.py
Expand Down
10 changes: 5 additions & 5 deletions math/py-nlopt/distinfo
@@ -1,5 +1,5 @@
TIMESTAMP = 1655669851
SHA256 (DanielBok-nlopt-python-2.7.1_GH0.tar.gz) = 838a46f67309b1e1f63227a27726e8a7be19f9b05f0972d40b98a52ccfb799fb
SIZE (DanielBok-nlopt-python-2.7.1_GH0.tar.gz) = 6749
SHA256 (stevengj-nlopt-4a0e93c_GH0.tar.gz) = 3d8036633821df60f387431fde51cd11c125743a24ccbda40221518ad21663a4
SIZE (stevengj-nlopt-4a0e93c_GH0.tar.gz) = 2044242
TIMESTAMP = 1712206116
SHA256 (DanielBok-nlopt-python-2.7.1.2_GH0.tar.gz) = 3fd3c49689f42adf2ff230fde768312ee55bd48c33f97cc8effd52b655aaa909
SIZE (DanielBok-nlopt-python-2.7.1.2_GH0.tar.gz) = 9079
SHA256 (stevengj-nlopt-7a7587e_GH0.tar.gz) = 0a5a0e349e3c59283ee9f309da2e5dea0e68d33d642e7ee6b6df3f4de5f0b013
SIZE (stevengj-nlopt-7a7587e_GH0.tar.gz) = 2049756
20 changes: 20 additions & 0 deletions math/py-nlopt/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
--- CMakeLists.txt.orig 2024-04-03 02:23:20 UTC
+++ CMakeLists.txt
@@ -2,6 +2,8 @@ project(nlopt-python)

project(nlopt-python)

+set(FREEBSD_PYTHON_VER $ENV{FREEBSD_PYTHON_VER})
+
set (CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
set (CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/nlopt)
set (INSTALL_PYTHON_DIR ${CMAKE_INSTALL_PREFIX})
@@ -9,7 +11,7 @@ if (NOT WIN32)
option (BUILD_SHARED_LIBS OFF)

if (NOT WIN32)
- find_package (PythonInterp)
+ find_package (PythonInterp ${FREEBSD_PYTHON_VER} EXACT)

execute_process(
COMMAND
4 changes: 2 additions & 2 deletions math/py-nlopt/files/patch-extensions.py
@@ -1,6 +1,6 @@
--- extensions.py.orig 2022-06-19 20:42:31 UTC
--- extensions.py.orig 2024-04-03 02:23:20 UTC
+++ extensions.py
@@ -25,7 +25,7 @@ class NLOptBuild(build_ext):
@@ -26,7 +26,7 @@ class NLOptBuild(build_ext):
except OSError:
raise RuntimeError("CMake must be installed")

Expand Down
14 changes: 14 additions & 0 deletions math/py-nlopt/files/patch-extern_nlopt_CMakeLists.txt
@@ -0,0 +1,14 @@
--- extern/nlopt/CMakeLists.txt.orig 2024-04-04 04:49:46 UTC
+++ extern/nlopt/CMakeLists.txt
@@ -317,9 +317,9 @@ if (NLOPT_PYTHON)

if (NLOPT_PYTHON)
if (CMAKE_VERSION VERSION_LESS 3.24)
- find_package (Python COMPONENTS Interpreter Development)
+ find_package (Python ${FREEBSD_PYTHON_VER} EXACT COMPONENTS Interpreter Development)
else ()
- find_package (Python COMPONENTS Interpreter Development.Module)
+ find_package (Python ${FREEBSD_PYTHON_VER} EXACT COMPONENTS Interpreter Development.Module)
endif ()

find_package (NumPy)
8 changes: 7 additions & 1 deletion math/py-nlopt/pkg-plist
@@ -1,7 +1,13 @@
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/PKG-INFO
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/SOURCES.txt
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/dependency_links.txt
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/not-zip-safe
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/requires.txt
%%PYTHON_SITELIBDIR%%/nlopt-2.7.1-py%%PYTHON_VER%%.egg-info/top_level.txt
%%PYTHON_SITELIBDIR%%/nlopt/__init__.py
%%PYTHON_SITELIBDIR%%/nlopt/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/nlopt/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/nlopt/__pycache__/nlopt%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%PYTHON_SITELIBDIR%%/nlopt/__pycache__/nlopt%%PYTHON_EXT_SUFFIX%%.pyc
%%PYTHON_SITELIBDIR%%/nlopt/_nlopt.so
%%PYTHON_SITELIBDIR%%/nlopt/_nlopt%%PYTHON_EXT_SUFFIX%%.so
%%PYTHON_SITELIBDIR%%/nlopt/nlopt.py

0 comments on commit 9c26f66

Please sign in to comment.