git: 958ab6b71fda - 2025Q4 - science/py-arbor: update 0.10.1 → 0.11.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 02 Nov 2025 18:21:36 UTC
The branch 2025Q4 has been updated by yuri:

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

commit 958ab6b71fda9f1312fd0eccd55aad03f75e6818
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-11-02 18:13:25 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-11-02 18:21:31 +0000

    science/py-arbor: update 0.10.1 → 0.11.0
    
    (cherry picked from commit 1d693e58083fddcb77e71eda49848fb6a246aa60)
---
 science/py-arbor/Makefile                   | 11 +++++++----
 science/py-arbor/distinfo                   |  6 +++---
 science/py-arbor/files/patch-CMakeLists.txt | 19 ++++++++++++-------
 science/py-arbor/files/patch-pyarb.hpp      | 11 +++++++++++
 4 files changed, 33 insertions(+), 14 deletions(-)

diff --git a/science/py-arbor/Makefile b/science/py-arbor/Makefile
index c7bf63b0a7b6..bd106edf2ffd 100644
--- a/science/py-arbor/Makefile
+++ b/science/py-arbor/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	arbor
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.10.1
+DISTVERSION=	0.11.0
 CATEGORIES=	science
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -16,9 +16,10 @@ BUILD_DEPENDS=	gmake:devel/gmake \
 		pybind11>0:devel/pybind11 \
 		nlohmann-json>0:devel/nlohmann-json
 LIB_DEPENDS=	libarbor.so:science/arbor
+RUN_DEPENDS=	${PYNUMPY}
 
 USES=		cmake compiler:c++17-lang localbase:ldflags python
-USE_PYTHON=	flavors pytest # tests fail to run, see https://github.com/arbor-sim/arbor/issues/2395
+USE_PYTHON=	flavors unittest # tests fail to run, see https://github.com/arbor-sim/arbor/issues/2395
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	arbor-sim
@@ -29,9 +30,11 @@ CMAKE_ARGS=	-DPython3_EXECUTABLE=${PYTHON_CMD} \
 		-DARB_PYTHON_LIB_PATH=${PYTHONPREFIX_SITELIBDIR}
 
 CXXFLAGS+=	-fPIC
+CXXFLAGS+=	-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE # prevent hardening issues with libc++, see https://github.com/arbor-sim/arbor/issues/2484
 
 TEST_WRKSRC=	${WRKSRC}/test/unit_distributed
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ENV=	${MAKE_ENV} \
+		PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 BINARY_ALIAS=	make=${GMAKE}
 
@@ -41,7 +44,7 @@ post-patch:
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/arbor/_arbor${PYTHON_TAG}.so
 
-do-test: # some tests fail with 'make'-related errors
+do-test: # tests fail to run due to a bug with nadling complex CXXFLAGS in the test runner, see https://github.com/arbor-sim/arbor/issues/2395
 	@cd ${BUILD_WRKSRC} && \
 		${SETENV} ${TEST_ENV} ${PYTHON_CMD} -munittest discover -v -s ${WRKSRC}
 
diff --git a/science/py-arbor/distinfo b/science/py-arbor/distinfo
index 4e401f03e334..a707d5b502e0 100644
--- a/science/py-arbor/distinfo
+++ b/science/py-arbor/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1724740903
-SHA256 (arbor-sim-arbor-v0.10.1_GH0.tar.gz) = 6a9a209dc20ab6edcf9847a70b0b4dbabf0c0d3c7e6e29b5bec7c00de9d7b8ae
-SIZE (arbor-sim-arbor-v0.10.1_GH0.tar.gz) = 10159032
+TIMESTAMP = 1762102979
+SHA256 (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 6df68b308dd629df993eda40319676cd43407ae211d0846100b0cf42e8c9ad22
+SIZE (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 12511038
diff --git a/science/py-arbor/files/patch-CMakeLists.txt b/science/py-arbor/files/patch-CMakeLists.txt
index b8d189dbb2b4..e8b0d0cf39e4 100644
--- a/science/py-arbor/files/patch-CMakeLists.txt
+++ b/science/py-arbor/files/patch-CMakeLists.txt
@@ -1,14 +1,20 @@
---- CMakeLists.txt.orig	2024-08-09 10:22:00 UTC
+--- CMakeLists.txt.orig	2025-04-24 10:33:03 UTC
 +++ CMakeLists.txt
-@@ -1,3 +1,7 @@
+@@ -1,3 +1,13 @@
 +cmake_minimum_required(VERSION 3.19)
 +
 +find_package(Python3 ${arb_py_version} COMPONENTS Interpreter Development REQUIRED)
++find_package(pybind11 REQUIRED)
++
++set(CMAKE_CXX_STANDARD 20)
++set(CMAKE_CUDA_STANDARD 20)
++set(CMAKE_CXX_STANDARD_REQUIRED ON)
++set(CMAKE_CXX_EXTENSIONS OFF)
 +
  include(GNUInstallDirs)
  
- set(PYBIND11_CPP_STANDARD -std=c++17)
-@@ -84,14 +88,14 @@ endif()
+ set(pyarb_source
+@@ -73,14 +83,14 @@ endif()
  endif()
  
  # For unit tests on C++ side of Python wrappers
@@ -26,10 +32,9 @@
  
  # Set the installation path
  
-@@ -121,5 +125,4 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py 
+@@ -122,4 +132,4 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py 
  
  install(TARGETS pyarb DESTINATION ${_python_module_install_path})
  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${_python_module_install_path})
--install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/stubs/arbor/ DESTINATION ${_python_module_install_path})
 -install(FILES ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION ${_python_module_install_path})
-+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION DESTINATION ${_python_module_install_path})
++install(FILES ${PROJECT_SOURCE_DIR}/../VERSION DESTINATION ${_python_module_install_path})
diff --git a/science/py-arbor/files/patch-pyarb.hpp b/science/py-arbor/files/patch-pyarb.hpp
new file mode 100644
index 000000000000..ab3bb94cf316
--- /dev/null
+++ b/science/py-arbor/files/patch-pyarb.hpp
@@ -0,0 +1,11 @@
+--- pyarb.hpp.orig	2025-11-02 17:35:26 UTC
++++ pyarb.hpp
+@@ -19,7 +19,7 @@ static_assert((PYBIND11_VERSION_HEX >= 0x02080100)
+ #define PB11_ERR(M, m, p) "Required version of pybind11 is 2.8.1 <= version < 3.0.0 Found " mk_ver(M, m, p)
+ static_assert((PYBIND11_VERSION_HEX >= 0x02080100)
+               &&
+-              (PYBIND11_VERSION_HEX  < 0x03000000),
++              (PYBIND11_VERSION_HEX  < 0x04000000),
+               PB11_ERR(PYBIND11_VERSION_MAJOR, PYBIND11_VERSION_MINOR, PYBIND11_VERSION_PATCH));
+ #undef PB11_ERR
+ #undef mk_ver