git: 229b2942d677 - main - science/{,py-}arbor: update 0.12.1 → 0.12.2

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 19 Sep 2026 22:42:43 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=229b2942d677291d27b8b16cc5fd04c80a94b099

commit 229b2942d677291d27b8b16cc5fd04c80a94b099
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-19 18:31:17 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-19 22:42:20 +0000

    science/{,py-}arbor: update 0.12.1 → 0.12.2
---
 science/arbor/Makefile                               | 20 ++++++++++----------
 science/arbor/distinfo                               |  6 +++---
 science/arbor/files/patch-CMakeLists.txt             | 20 ++++++++++----------
 .../arbor/files/patch-modcc_printer_infoprinter.cpp  | 15 +++++++++++++++
 .../arbor/files/patch-scripts_arbor-build-catalogue  | 17 +++++++++++++++++
 science/py-arbor/Makefile                            | 16 ++++++++++------
 science/py-arbor/distinfo                            |  6 +++---
 7 files changed, 68 insertions(+), 32 deletions(-)

diff --git a/science/arbor/Makefile b/science/arbor/Makefile
index 309220d39b3b..4b86a749e0e4 100644
--- a/science/arbor/Makefile
+++ b/science/arbor/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	arbor
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.12.1
+DISTVERSION=	0.12.2
 CATEGORIES=	science
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -12,17 +12,17 @@ LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 BUILD_DEPENDS=	bash:shells/bash \
-		libfmt>0:devel/libfmt \
-		nlohmann-json>0:devel/nlohmann-json \
-		random123>0:devel/random123 \
-		${PYTHON_PKGNAMEPREFIX}svgwrite>0:graphics/py-svgwrite@${PY_FLAVOR} \
-		tinyopt>0:devel/tinyopt
-BUILD_DEPENDS+=	${LOCALBASE}/lib/cmake/GTest/GTestConfig.cmake:devel/googletest # https://github.com/arbor-sim/arbor/issues/2205
+		${LOCALBASE}/lib/cmake/GTest/GTestConfig.cmake:devel/googletest \
+		libfmt>=12.1.0:devel/libfmt \
+		nlohmann-json>=3.12.0:devel/nlohmann-json \
+		random123>=1.14.0:devel/random123 \
+		${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.3:graphics/py-svgwrite@${PY_FLAVOR} \
+		tinyopt>=1.0.8:devel/tinyopt
 LIB_DEPENDS=	libhwloc.so:devel/hwloc2 \
 		libpugixml.so:textproc/pugixml \
 		libunits.so:misc/units
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}svgwrite>0:graphics/py-svgwrite@${PY_FLAVOR}
-TEST_DEPENDS=	googletest>0:devel/googletest
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.3:graphics/py-svgwrite@${PY_FLAVOR}
+TEST_DEPENDS=	googletest>=1.16.0:devel/googletest
 
 USES=		cmake compiler:c++20-lang localbase pkgconfig python shebangfix
 
@@ -55,6 +55,6 @@ post-test: # run tests
 	@${BUILD_WRKSRC}/bin/unit-local
 	@${BUILD_WRKSRC}/bin/unit-modcc
 
-# tests fail with LIBCPP assertion for invalid array element access, see https://github.com/arbor-sim/arbor/issues/2484
+# tests as of 0.12.2: 1084 tests from 167 test suites ran and 111 tests from 19 test suites ran, all passed
 
 .include <bsd.port.mk>
diff --git a/science/arbor/distinfo b/science/arbor/distinfo
index 0529d05af6a9..be4cb6b898e6 100644
--- a/science/arbor/distinfo
+++ b/science/arbor/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1779763178
-SHA256 (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 6584ccfaef1c8f9eab6c8794d0f4f06745cbfb7c2d701815c74ed9e6a101a3dc
-SIZE (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 12968222
+TIMESTAMP = 1789490146
+SHA256 (arbor-sim-arbor-v0.12.2_GH0.tar.gz) = be51d13ec5308c337e592643c4cade21b27fa3bfee3467d1542ee80cd62261a8
+SIZE (arbor-sim-arbor-v0.12.2_GH0.tar.gz) = 12968355
 SHA256 (cpm-cmake-CPM.cmake-v0.39.0_GH0.tar.gz) = 621cfca03a5a0fcf316f08aee37d775a71620879e768ebf74be8495773f6b578
 SIZE (cpm-cmake-CPM.cmake-v0.39.0_GH0.tar.gz) = 100981
 SHA256 (martinus-unordered_dense-v4.5.0_GH0.tar.gz) = 2364ce4bc4c23bd02549bbb3a7572d881684cd46057f3737fd53be53669743aa
diff --git a/science/arbor/files/patch-CMakeLists.txt b/science/arbor/files/patch-CMakeLists.txt
index 944c1447fec3..70e1ad4620f5 100644
--- a/science/arbor/files/patch-CMakeLists.txt
+++ b/science/arbor/files/patch-CMakeLists.txt
@@ -3,7 +3,7 @@
 -- Use system libraries for nlohmann_json, random123, tinyopt, and googletest
 -- Use bundled unordered_dense
 
---- CMakeLists.txt.orig	2026-05-26 02:41:15 UTC
+--- CMakeLists.txt.orig	2026-05-18 07:07:58 UTC
 +++ CMakeLists.txt
 @@ -1,4 +1,4 @@
 -cmake_minimum_required(VERSION 4.0.0)
@@ -11,16 +11,16 @@
  include(CMakeDependentOption)
  include(CheckIPOSupported)
  
-@@ -60,7 +60,7 @@ check_cxx_compiler_flag("-march=native" CXX_HAS_NATIVE
- 
+@@ -61,7 +61,7 @@ if (NOT DEFINED ARB_DEFAULT_ARCH)
  # Specify target architecture.
- check_cxx_compiler_flag("-march=native" CXX_HAS_NATIVE)
--if(CXX_HAS_NATIVE)
-+if(FALSE AND CXX_HAS_NATIVE)
+ if (NOT DEFINED ARB_DEFAULT_ARCH)
+   check_cxx_compiler_flag("-march=native" CXX_HAS_NATIVE)
+-  if(CXX_HAS_NATIVE)
++  if(FALSE AND CXX_HAS_NATIVE)
      set(ARB_DEFAULT_ARCH "native")
- else()
+   else()
      set(ARB_DEFAULT_ARCH "none")
-@@ -302,22 +302,16 @@ install(TARGETS ext-hwloc EXPORT arbor-targets)
+@@ -306,22 +306,16 @@ install(TARGETS ext-hwloc EXPORT arbor-targets)
  endif()
  install(TARGETS ext-hwloc EXPORT arbor-targets)
  
@@ -47,7 +47,7 @@
  if(random123_ADDED)
      target_include_directories(ext-random123 INTERFACE $<BUILD_INTERFACE:${random123_SOURCE_DIR}/include>)
  else()
-@@ -360,10 +354,8 @@ if (BUILD_TESTING)
+@@ -364,10 +358,8 @@ if (BUILD_TESTING)
                    GITHUB_REPOSITORY google/benchmark
                    VERSION 1.8.3
                    OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "CMAKE_BUILD_TYPE release" "BUILD_SHARED_LIBS OFF")
@@ -60,7 +60,7 @@
      if(benchmark_ADDED)
          target_link_libraries(ext-bench INTERFACE benchmark)
      else()
-@@ -395,16 +387,13 @@ list(APPEND arbor_export_dependencies units)
+@@ -399,16 +391,13 @@ list(APPEND arbor_export_dependencies units)
  endif()
  list(APPEND arbor_export_dependencies units)
  
diff --git a/science/arbor/files/patch-modcc_printer_infoprinter.cpp b/science/arbor/files/patch-modcc_printer_infoprinter.cpp
new file mode 100644
index 000000000000..bbf76f9f1cb8
--- /dev/null
+++ b/science/arbor/files/patch-modcc_printer_infoprinter.cpp
@@ -0,0 +1,15 @@
+-- Generate C++ null pointer literals in mechanism headers.
+-- Clang 21 rejects generated headers that use NULL without a defining include.
+-- Needed for Arbor 0.12.2 local builds on FreeBSD; no upstream reference found.
+
+--- modcc/printer/infoprinter.cpp.orig	2026-09-15 16:51:36 UTC
++++ modcc/printer/infoprinter.cpp
+@@ -63,7 +63,7 @@ ARB_LIBMODCC_API std::string build_info_header(const M
+     auto print_array_head = [&](char const * type, char const * name, auto size) {
+         out << "    static " << type;
+         if (size) out << " " << name << "[] = {";
+-        else out << "* " << name << " = NULL;";
++        else out << "* " << name << " = nullptr;";
+     };
+     auto print_array_tail = [&](char const * type, char const * name, auto size) {
+         if (size) out << " };";
diff --git a/science/arbor/files/patch-scripts_arbor-build-catalogue b/science/arbor/files/patch-scripts_arbor-build-catalogue
new file mode 100644
index 000000000000..0b56491a2f15
--- /dev/null
+++ b/science/arbor/files/patch-scripts_arbor-build-catalogue
@@ -0,0 +1,17 @@
+-- Normalize imported CXX flags before invoking CMake.
+-- Arbor exports ARB_CXX_FLAGS as a CMake list, which otherwise reaches make as
+-- semicolon-separated shell commands and breaks catalogue builds in py-arbor tests.
+-- This fixes the long-standing local test failure noted in upstream issue #2395.
+
+--- scripts/arbor-build-catalogue.orig	2026-09-15 19:19:26 UTC
++++ scripts/arbor-build-catalogue
+@@ -188,7 +188,8 @@ cmake = f"""
+ find_package(arbor REQUIRED)
+ {gpu_support}
+ set(CMAKE_BUILD_TYPE release)
+ set(CMAKE_CXX_COMPILER  {args["cxx"]})
+-set(CMAKE_CXX_FLAGS     ${{ARB_CXX_FLAGS}})
++string(REPLACE ";" " " ARB_CXX_FLAGS_STR "${{ARB_CXX_FLAGS}}")
++set(CMAKE_CXX_FLAGS     "${{ARB_CXX_FLAGS_STR}}")
+ 
+ include(BuildModules.cmake)
diff --git a/science/py-arbor/Makefile b/science/py-arbor/Makefile
index 516011a0e577..97f512162b1b 100644
--- a/science/py-arbor/Makefile
+++ b/science/py-arbor/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	arbor
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.12.1
+DISTVERSION=	0.12.2
 CATEGORIES=	science
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -12,13 +12,14 @@ WWW=		https://arbor-sim.org/ \
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
-BUILD_DEPENDS=	pybind11>0:devel/pybind11 \
-		nlohmann-json>0:devel/nlohmann-json
+BUILD_DEPENDS=	nlohmann-json>=3.12.0:devel/nlohmann-json \
+		pybind11>=3.0.0:devel/pybind11 \
+		${PYTHON_PKGNAMEPREFIX}pybind11-stubgen>0:devel/py-pybind11-stubgen@${PY_FLAVOR}
 LIB_DEPENDS=	libarbor.so:science/arbor
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>0:math/py-numpy@${PY_FLAVOR}
 
 USES=		cmake compiler:c++17-lang localbase:ldflags python
-USE_PYTHON=	flavors unittest # tests fail to run, see https://github.com/arbor-sim/arbor/issues/2395
+USE_PYTHON=	flavors unittest
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	arbor-sim
@@ -26,6 +27,7 @@ GH_ACCOUNT=	arbor-sim
 WRKSRC_SUBDIR=	python
 
 CMAKE_ARGS=	-DPython3_EXECUTABLE=${PYTHON_CMD} \
+		-DARB_BUILD_PYTHON_STUBS=OFF \
 		-DARB_PYTHON_LIB_PATH=${PYTHONPREFIX_SITELIBDIR}
 
 CXXFLAGS+=	-fPIC
@@ -41,8 +43,10 @@ post-patch:
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/arbor/_arbor${PYTHON_TAG}.so
 
-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
+do-test:
 	@cd ${BUILD_WRKSRC} && \
 		${SETENV} ${TEST_ENV} ${PYTHON_CMD} -munittest discover -v -s ${WRKSRC}
 
+# tests as of 0.12.2: Ran 78 tests in 11.215s, OK (skipped=3)
+
 .include <bsd.port.mk>
diff --git a/science/py-arbor/distinfo b/science/py-arbor/distinfo
index 9f2ee3e81697..d784eb7485e9 100644
--- a/science/py-arbor/distinfo
+++ b/science/py-arbor/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1779761416
-SHA256 (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 6584ccfaef1c8f9eab6c8794d0f4f06745cbfb7c2d701815c74ed9e6a101a3dc
-SIZE (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 12968222
+TIMESTAMP = 1789490144
+SHA256 (arbor-sim-arbor-v0.12.2_GH0.tar.gz) = be51d13ec5308c337e592643c4cade21b27fa3bfee3467d1542ee80cd62261a8
+SIZE (arbor-sim-arbor-v0.12.2_GH0.tar.gz) = 12968355