git: 8feba41c4afa - main - science/py-arbor: New port: Multi-compartment neural network simulation library
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 27 Nov 2022 10:12:25 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=8feba41c4afa8d9ad4df7e10bb3992c79b32a03d commit 8feba41c4afa8d9ad4df7e10bb3992c79b32a03d Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2022-11-27 10:11:32 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2022-11-27 10:12:21 +0000 science/py-arbor: New port: Multi-compartment neural network simulation library --- science/Makefile | 1 + science/py-arbor/Makefile | 35 +++++++++++++++++++++++++++++ science/py-arbor/distinfo | 3 +++ science/py-arbor/files/patch-CMakeLists.txt | 28 +++++++++++++++++++++++ science/py-arbor/pkg-descr | 3 +++ science/py-arbor/pkg-plist | 3 +++ 6 files changed, 73 insertions(+) diff --git a/science/Makefile b/science/Makefile index c67e3684888c..e9d5ac65faf8 100644 --- a/science/Makefile +++ b/science/Makefile @@ -283,6 +283,7 @@ SUBDIR += py-SimpleSpectral SUBDIR += py-abipy SUBDIR += py-access + SUBDIR += py-arbor SUBDIR += py-asap3 SUBDIR += py-asdf SUBDIR += py-asdf-standard diff --git a/science/py-arbor/Makefile b/science/py-arbor/Makefile new file mode 100644 index 000000000000..567c01f16f9c --- /dev/null +++ b/science/py-arbor/Makefile @@ -0,0 +1,35 @@ +PORTNAME= arbor +DISTVERSIONPREFIX= v +DISTVERSION= 0.8 +CATEGORIES= science +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Multi-compartment neural network simulation library +WWW= https://arbor-sim.org/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/../LICENSE + +BUILD_DEPENDS= pybind11>0:devel/pybind11 +LIB_DEPENDS= libarbor.so:science/arbor + +USES= cmake compiler:c++17-lang localbase:ldflags python + +USE_GITHUB= yes +GH_ACCOUNT= arbor-sim + +WRKSRC_SUBDIR= python + +CMAKE_ARGS= -DPython3_EXECUTABLE=${PYTHON_CMD} \ + -DARB_PYTHON_LIB_PATH=${PYTHONPREFIX_SITELIBDIR} + +CXXFLAGS+= -fPIC + +post-patch: + @${ECHO} ${DISTVERSION} > ${WRKSRC}/VERSION + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/arbor/_arbor${PYTHON_EXT_SUFFIX}.so + +.include <bsd.port.mk> diff --git a/science/py-arbor/distinfo b/science/py-arbor/distinfo new file mode 100644 index 000000000000..6a64e8f1e731 --- /dev/null +++ b/science/py-arbor/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1669535366 +SHA256 (arbor-sim-arbor-v0.8_GH0.tar.gz) = ee6b2486b1142cf4412dddd1caece0926d1712b8d1868283e3bfe73e4ec2cb71 +SIZE (arbor-sim-arbor-v0.8_GH0.tar.gz) = 7794543 diff --git a/science/py-arbor/files/patch-CMakeLists.txt b/science/py-arbor/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..9441da10091c --- /dev/null +++ b/science/py-arbor/files/patch-CMakeLists.txt @@ -0,0 +1,28 @@ +--- CMakeLists.txt.orig 2022-11-15 15:19:19 UTC ++++ CMakeLists.txt +@@ -1,3 +1,7 @@ ++cmake_minimum_required(VERSION 3.19) ++ ++find_package(Python3 ${arb_py_version} COMPONENTS Interpreter Development REQUIRED) ++ + include(GNUInstallDirs) + + set(PYBIND11_CPP_STANDARD -std=c++17) +@@ -79,14 +83,14 @@ if (ARB_WITH_MPI) + 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 + diff --git a/science/py-arbor/pkg-descr b/science/py-arbor/pkg-descr new file mode 100644 index 000000000000..6350b89f2e28 --- /dev/null +++ b/science/py-arbor/pkg-descr @@ -0,0 +1,3 @@ +Arbor is a multi-compartment neuron simulation library; compatible with +next-generation accelerators; best-practices applied to research software; +focussed on community-driven development. diff --git a/science/py-arbor/pkg-plist b/science/py-arbor/pkg-plist new file mode 100644 index 000000000000..c4ff5834b200 --- /dev/null +++ b/science/py-arbor/pkg-plist @@ -0,0 +1,3 @@ +%%PYTHON_SITELIBDIR%%/arbor/VERSION +%%PYTHON_SITELIBDIR%%/arbor/__init__.py +%%PYTHON_SITELIBDIR%%/arbor/_arbor%%PYTHON_EXT_SUFFIX%%.so