diff --git a/science/arbor/Makefile b/science/arbor/Makefile index e507aab7bd79..309220d39b3b 100644 --- a/science/arbor/Makefile +++ b/science/arbor/Makefile @@ -1,63 +1,60 @@ PORTNAME= arbor DISTVERSIONPREFIX= v -DISTVERSION= 0.11.0 -PORTREVISION= 1 +DISTVERSION= 0.12.1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org COMMENT= Multi-compartment neural network simulation library WWW= https://arbor-sim.org/ \ https://github.com/arbor-sim/arbor/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -#BROKEN_armv7= compilation fails: unknown type name 'float64x2_t' - 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 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 USES= cmake compiler:c++20-lang localbase pkgconfig python shebangfix USE_GITHUB= yes GH_ACCOUNT= arbor-sim -GH_TUPLE= cpm-cmake:CPM.cmake:v0.39.0:cpm +GH_TUPLE= cpm-cmake:CPM.cmake:v0.39.0:cpm \ + martinus:unordered_dense:v4.5.0:unordered_dense/external/unordered_dense SHEBANG_FILES= scripts/arbor-build-catalogue CMAKE_ON= BUILD_SHARED_LIBS -CMAKE_OFF= ARB_USE_BUNDLED_UNITS CMAKE_ARGS= -DPython3_EXECUTABLE=${PYTHON_CMD} CONFIGURE_ENV= CPM_REPO=${WRKSRC_cpm} CXXFLAGS+= -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE # prevent hardening issues with libc++, see https://github.com/arbor-sim/arbor/issues/2484 LDFLAGS+= -L${LOCALBASE}/lib -lunits OPTIONS_DEFINE= NATIVE NATIVE_CMAKE_ON= -DARB_ARCH=native NATIVE_CMAKE_OFF= -DARB_ARCH=none TEST_TARGET= tests post-install: @${RMDIR} ${STAGEDIR}${DOCSDIR} post-test: # run tests @${BUILD_WRKSRC}/bin/unit @${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 .include diff --git a/science/arbor/distinfo b/science/arbor/distinfo index ddd22577d041..0529d05af6a9 100644 --- a/science/arbor/distinfo +++ b/science/arbor/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1762075604 -SHA256 (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 6df68b308dd629df993eda40319676cd43407ae211d0846100b0cf42e8c9ad22 -SIZE (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 12511038 +TIMESTAMP = 1779763178 +SHA256 (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 6584ccfaef1c8f9eab6c8794d0f4f06745cbfb7c2d701815c74ed9e6a101a3dc +SIZE (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 12968222 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 +SIZE (martinus-unordered_dense-v4.5.0_GH0.tar.gz) = 901624 diff --git a/science/arbor/files/patch-CMakeLists.txt b/science/arbor/files/patch-CMakeLists.txt index 9a056733f8ea..944c1447fec3 100644 --- a/science/arbor/files/patch-CMakeLists.txt +++ b/science/arbor/files/patch-CMakeLists.txt @@ -1,24 +1,85 @@ ---- CMakeLists.txt.orig 2025-04-24 10:33:03 UTC +-- Lower CMake requirement to 3.31.10 +-- Disable -march=native +-- 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 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 4.0.0) ++cmake_minimum_required(VERSION 3.31.10) + include(CMakeDependentOption) + include(CheckIPOSupported) + @@ -60,7 +60,7 @@ check_cxx_compiler_flag("-march=native" CXX_HAS_NATIVE # Specify target architecture. 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() set(ARB_DEFAULT_ARCH "none") -@@ -302,11 +302,7 @@ install(TARGETS ext-hwloc EXPORT arbor-targets) +@@ -302,22 +302,16 @@ install(TARGETS ext-hwloc EXPORT arbor-targets) endif() install(TARGETS ext-hwloc EXPORT arbor-targets) --CPMFindPackage(NAME json -- GITHUB_REPOSITORY nlohmann/json -- VERSION 3.12.0 -- OPTIONS "CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON") --install(TARGETS nlohmann_json EXPORT arbor-targets) +-CPMFindPackage(NAME nlohmann_json +- GITHUB_REPOSITORY nlohmann/json +- VERSION 3.12.0) +find_package(nlohmann_json REQUIRED) + add_library(ext-json INTERFACE) + target_link_libraries(ext-json INTERFACE nlohmann_json::nlohmann_json) + install(TARGETS ext-json EXPORT arbor-targets) +-if(nlohmann_json_ADDED) +- install(TARGETS nlohmann_json EXPORT arbor-targets) +-endif() + add_library(ext-random123 INTERFACE) - CPMFindPackage(NAME random123 +-CPMFindPackage(NAME random123 +- DOWNLOAD_ONLY YES +- GITHUB_REPOSITORY DEShawResearch/random123 +- VERSION 1.14.0) ++set(random123_SOURCE_DIR /usr/local) ++set(random123_ADDED TRUE) ++ + if(random123_ADDED) + target_include_directories(ext-random123 INTERFACE $) + else() +@@ -360,10 +354,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") +- CPMFindPackage(NAME googletest +- GITHUB_REPOSITORY google/googletest +- VERSION 1.17.0 +- OPTIONS "INSTALL_GTEST OFF" "BUILD_GMOCK OFF") ++ find_package(GTest REQUIRED) ++set(googletest_ADDED FALSE) + if(benchmark_ADDED) + target_link_libraries(ext-bench INTERFACE benchmark) + else() +@@ -395,16 +387,13 @@ list(APPEND arbor_export_dependencies units) + endif() + list(APPEND arbor_export_dependencies units) + +-CPMFindPackage(NAME unordered_dense +- GITHUB_REPOSITORY martinus/unordered_dense +- VERSION 4.5.0 +- SYSTEM YES +- EXCLUDE_FROM_ALL YES) ++set(unordered_dense_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/unordered_dense) ++set(unordered_dense_ADDED TRUE) + +-CPMFindPackage(NAME tinyopt +- GITHUB_REPOSITORY halfflat/tinyopt +- GIT_TAG 7e6d707d49c6cb4be27ebd253856be65293288df +- DOWNLOAD_ONLY YES) ++ ++set(tinyopt_SOURCE_DIR /usr/local) ++set(tinyopt_ADDED TRUE) ++ + + add_library(ext-tinyopt INTERFACE) + if(tinyopt_ADDED) diff --git a/science/arbor/pkg-plist b/science/arbor/pkg-plist index e01333db8354..e83a92df1c19 100644 --- a/science/arbor/pkg-plist +++ b/science/arbor/pkg-plist @@ -1,122 +1,122 @@ bin/arbor-build-catalogue bin/lmorpho bin/modcc +include/arbor/adex_cell.hpp include/arbor/arb_types.h include/arbor/arb_types.hpp include/arbor/arb_types.inc include/arbor/arbexcept.hpp include/arbor/assert.hpp include/arbor/assert_macro.hpp include/arbor/benchmark_cell.hpp include/arbor/cable_cell.hpp include/arbor/cable_cell_param.hpp include/arbor/common_types.hpp include/arbor/communication/mpi_error.hpp include/arbor/communication/remote.hpp include/arbor/constants.hpp include/arbor/context.hpp include/arbor/cv_policy.hpp include/arbor/domain_decomposition.hpp include/arbor/domdecexcept.hpp include/arbor/event_generator.hpp include/arbor/export.hpp include/arbor/fvm_types.hpp include/arbor/gpu/cuda_api.hpp include/arbor/gpu/gpu_api.hpp include/arbor/gpu/gpu_common.hpp include/arbor/gpu/hip_api.hpp include/arbor/gpu/math_cu.hpp include/arbor/gpu/reduce_by_key.hpp include/arbor/iexpr.hpp include/arbor/lif_cell.hpp include/arbor/load_balance.hpp include/arbor/math.hpp include/arbor/mechanism.hpp include/arbor/mechanism_abi.h include/arbor/mechcat.hpp include/arbor/mechinfo.hpp include/arbor/morph/cv_data.hpp include/arbor/morph/embed_pwlin.hpp include/arbor/morph/isometry.hpp include/arbor/morph/label_dict.hpp include/arbor/morph/locset.hpp include/arbor/morph/mcable_map.hpp include/arbor/morph/morphexcept.hpp include/arbor/morph/morphology.hpp include/arbor/morph/mprovider.hpp include/arbor/morph/place_pwlin.hpp include/arbor/morph/primitives.hpp include/arbor/morph/region.hpp include/arbor/morph/segment_tree.hpp include/arbor/morph/stitch.hpp include/arbor/network.hpp include/arbor/network_generation.hpp include/arbor/profile/meter.hpp include/arbor/profile/meter_manager.hpp include/arbor/profile/profiler.hpp include/arbor/profile/timer.hpp include/arbor/recipe.hpp include/arbor/s_expr.hpp include/arbor/sampling.hpp include/arbor/schedule.hpp include/arbor/serdes.hpp include/arbor/simd/approx.hpp include/arbor/simd/avx.hpp include/arbor/simd/avx512.hpp include/arbor/simd/generic.hpp include/arbor/simd/implbase.hpp include/arbor/simd/native.hpp include/arbor/simd/neon.hpp include/arbor/simd/simd.hpp include/arbor/simd/simd_io.hpp include/arbor/simd/sve.hpp include/arbor/simd/sve_bits.hpp include/arbor/simd/vls_sve.hpp include/arbor/simd/vls_sve_bits.hpp include/arbor/simple_sampler.hpp include/arbor/simulation.hpp include/arbor/spike.hpp include/arbor/spike_event.hpp include/arbor/spike_source_cell.hpp include/arbor/symmetric_recipe.hpp include/arbor/units.hpp include/arbor/util/any_cast.hpp include/arbor/util/any_ptr.hpp include/arbor/util/any_visitor.hpp include/arbor/util/compat.hpp include/arbor/util/expected.hpp include/arbor/util/extra_traits.hpp include/arbor/util/handle_set.hpp include/arbor/util/hash_def.hpp include/arbor/util/pp_util.hpp include/arbor/util/scope_exit.hpp -include/arbor/util/typed_map.hpp include/arbor/util/uninitialized.hpp include/arbor/util/unique_any.hpp include/arbor/util/visibility.hpp include/arbor/version.hpp include/arborenv/arbenvexcept.hpp include/arborenv/concurrency.hpp include/arborenv/default_env.hpp include/arborenv/export.hpp include/arborenv/gpu_env.hpp include/arborenv/with_mpi.hpp include/arborio/cableio.hpp include/arborio/cv_policy_parse.hpp include/arborio/debug.hpp include/arborio/export.hpp include/arborio/json_serdes.hpp include/arborio/label_parse.hpp include/arborio/loaded_morphology.hpp include/arborio/networkio.hpp include/arborio/neurolucida.hpp include/arborio/neuroml.hpp include/arborio/swcio.hpp lib/cmake/arbor/arbor-config-version.cmake lib/cmake/arbor/arbor-config.cmake lib/cmake/arbor/arbor-targets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/arbor/arbor-targets.cmake lib/libarbor.so lib/libarborenv.so lib/libarborio.so %%DATADIR%%/BuildModules.cmake diff --git a/science/py-arbor/Makefile b/science/py-arbor/Makefile index abab73f7c1f3..516011a0e577 100644 --- a/science/py-arbor/Makefile +++ b/science/py-arbor/Makefile @@ -1,52 +1,48 @@ PORTNAME= arbor DISTVERSIONPREFIX= v -DISTVERSION= 0.11.0 -PORTREVISION= 2 +DISTVERSION= 0.12.1 CATEGORIES= science PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Multi-compartment neural network simulation library WWW= https://arbor-sim.org/ \ https://github.com/arbor-sim/arbor/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/../LICENSE -BUILD_DEPENDS= gmake:devel/gmake \ - pybind11>0:devel/pybind11 \ +BUILD_DEPENDS= pybind11>0:devel/pybind11 \ nlohmann-json>0:devel/nlohmann-json LIB_DEPENDS= libarbor.so:science/arbor RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16: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_GITHUB= yes GH_ACCOUNT= arbor-sim WRKSRC_SUBDIR= python 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} -BINARY_ALIAS= make=${GMAKE} - post-patch: @${ECHO} ${DISTVERSION} > ${WRKSRC}/VERSION 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 @cd ${BUILD_WRKSRC} && \ ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -munittest discover -v -s ${WRKSRC} .include diff --git a/science/py-arbor/distinfo b/science/py-arbor/distinfo index a707d5b502e0..9f2ee3e81697 100644 --- a/science/py-arbor/distinfo +++ b/science/py-arbor/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1762102979 -SHA256 (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 6df68b308dd629df993eda40319676cd43407ae211d0846100b0cf42e8c9ad22 -SIZE (arbor-sim-arbor-v0.11.0_GH0.tar.gz) = 12511038 +TIMESTAMP = 1779761416 +SHA256 (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 6584ccfaef1c8f9eab6c8794d0f4f06745cbfb7c2d701815c74ed9e6a101a3dc +SIZE (arbor-sim-arbor-v0.12.1_GH0.tar.gz) = 12968222 diff --git a/science/py-arbor/files/patch-CMakeLists.txt b/science/py-arbor/files/patch-CMakeLists.txt index e8b0d0cf39e4..e8629681df85 100644 --- a/science/py-arbor/files/patch-CMakeLists.txt +++ b/science/py-arbor/files/patch-CMakeLists.txt @@ -1,40 +1,43 @@ +-- Lower CMake requirement and use system pybind11 +-- Fix installation paths for __init__.py and VERSION + --- CMakeLists.txt.orig 2025-04-24 10:33:03 UTC +++ CMakeLists.txt @@ -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(pyarb_source @@ -73,14 +83,14 @@ endif() endif() # For unit tests on C++ side of Python wrappers -add_subdirectory(test) +#add_subdirectory(test) # Create the Python module in the build directory. # The module contains the dynamic library, __init__.py and VERSION information. set(python_mod_path "${CMAKE_CURRENT_BINARY_DIR}/arbor") set_target_properties(pyarb PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${python_mod_path}") -file(COPY "${PROJECT_SOURCE_DIR}/python/__init__.py" DESTINATION "${python_mod_path}") -file(COPY "${PROJECT_SOURCE_DIR}/VERSION" DESTINATION "${python_mod_path}") +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py" DESTINATION "${python_mod_path}") +file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DESTINATION "${python_mod_path}") # Set the installation path @@ -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(FILES ${PROJECT_SOURCE_DIR}/VERSION ${PROJECT_SOURCE_DIR}/README.md ${PROJECT_SOURCE_DIR}/LICENSE 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 deleted file mode 100644 index ab3bb94cf316..000000000000 --- a/science/py-arbor/files/patch-pyarb.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- 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