diff --git a/math/py-gau2grid/Makefile b/math/py-gau2grid/Makefile index 502edcb3d1c1..04957f3fe134 100644 --- a/math/py-gau2grid/Makefile +++ b/math/py-gau2grid/Makefile @@ -1,39 +1,39 @@ PORTNAME= gau2grid DISTVERSIONPREFIX= v -DISTVERSION= 2.0.7 -PORTREVISION= 4 +DISTVERSION= 2.0.9 CATEGORIES= math python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Fast computation of a gaussian and its derivative on a grid WWW= https://github.com/dgasmith/gau2grid LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ cmake:devel/cmake-core RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} USES= cmake compiler:c11 python USE_GITHUB= yes GH_ACCOUNT= dgasmith USE_PYTHON= flavors CMAKE_ON= INSTALL_PYMOD CMAKE_ARGS= -DPYMOD_INSTALL_LIBDIR:STRING=${PYTHON_SITELIBDIR} -DFREEBSD_PYTHON_VER:STRING=${PYTHON_VER} OPTIONS_DEFINE= NATIVE NATIVE_CMAKE_BOOL= ENABLE_XHOST post-install: @${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/gau2grid/__pycache__ + @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/gau2grid/LICENSE @${RM} -r ${STAGEDIR}${LOCALBASE}//lib/usr # LICENSE is installed under there do-test: @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest .include diff --git a/math/py-gau2grid/distinfo b/math/py-gau2grid/distinfo index 17ee9ff57536..d6378b5a4741 100644 --- a/math/py-gau2grid/distinfo +++ b/math/py-gau2grid/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1610499660 -SHA256 (dgasmith-gau2grid-v2.0.7_GH0.tar.gz) = 66e7205646e1e3685e5dd4eea8281fc92b0b8b45ce97ae24b72a09e15a3fd62f -SIZE (dgasmith-gau2grid-v2.0.7_GH0.tar.gz) = 84398 +TIMESTAMP = 1780987642 +SHA256 (dgasmith-gau2grid-v2.0.9_GH0.tar.gz) = 7879bdddf3a52cd2a051086215977822bbe8d1af927fcf5b4fb0256a38b8a76c +SIZE (dgasmith-gau2grid-v2.0.9_GH0.tar.gz) = 82540 diff --git a/math/py-gau2grid/files/patch-CMakeLists.txt b/math/py-gau2grid/files/patch-CMakeLists.txt index e3c96f8eab3b..00101a6c4ab0 100644 --- a/math/py-gau2grid/files/patch-CMakeLists.txt +++ b/math/py-gau2grid/files/patch-CMakeLists.txt @@ -1,42 +1,56 @@ ---- CMakeLists.txt.orig 2020-12-15 13:54:30 UTC +--- CMakeLists.txt.orig 2026-06-09 06:48:58 UTC +++ CMakeLists.txt -@@ -51,7 +51,7 @@ message(STATUS "gau2grid install: ${CMAKE_INSTALL_PREF +@@ -51,17 +51,14 @@ message(STATUS "gau2grid install: ${CMAKE_INSTALL_PREF + message(STATUS "gau2grid install: ${CMAKE_INSTALL_PREFIX}") # << Python >> - set(Python_ADDITIONAL_VERSIONS 3.9 3.8 3.7 3.6 3.5) # adjust with CMake minimum FindPythonInterp --find_package(PythonLibsNew 3.6 REQUIRED) -+find_package(PythonLibsNew ${FREEBSD_PYTHON_VER} REQUIRED) - message(STATUS "${Cyan}Found Python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${ColourReset}: ${PYTHON_EXECUTABLE} (found version ${PYTHON_VERSION_STRING})") - - -@@ -110,6 +110,7 @@ target_include_directories(gg INTERFACE +-find_package(Python 3.6 REQUIRED COMPONENTS Interpreter) ++find_package(Python ${FREEBSD_PYTHON_VER} REQUIRED COMPONENTS Interpreter) + message(STATUS "${Cyan}Found Python ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}${ColourReset}: ${Python_EXECUTABLE} (found version ${Python_VERSION})") + + + ################################ Main Project ################################ + add_custom_command( + OUTPUT gau2grid/gau2grid.h gau2grid_orbital.c gau2grid_phi.c gau2grid_deriv1.c gau2grid_deriv2.c gau2grid_deriv3.c gau2grid_transform.c gau2grid_helper.c +- COMMAND Python::Interpreter -c "import sys; \ +- sys.path.append('${PROJECT_SOURCE_DIR}'); \ +- import gau2grid as gg; \ +- gg.c_gen.generate_c_gau2grid(${MAX_AM}, path='${CMAKE_CURRENT_BINARY_DIR}')" ++ COMMAND Python::Interpreter -c "import sys; sys.path.append('${PROJECT_SOURCE_DIR}'); import gau2grid as gg; gg.c_gen.generate_c_gau2grid(${MAX_AM}, path='${CMAKE_CURRENT_BINARY_DIR}')" + DEPENDS gau2grid/c_generator.py + gau2grid/c_generator.py + gau2grid/codegen.py +@@ -117,6 +114,7 @@ target_include_directories(gg PUBLIC $) # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share". +if (FALSE) # see https://github.com/dgasmith/gau2grid/issues/39#issuecomment-457856365 set(CMAKECONFIG_INSTALL_DIR "share/cmake/${PN}") configure_package_config_file(cmake/${PN}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PN}Config.cmake" -@@ -139,6 +140,7 @@ if(${NATIVE_PYTHON_INSTALL_WITH_LIB} OR (NOT(${INSTALL +@@ -148,6 +146,7 @@ endif() NAMESPACE "${PN}::" FILE "${PROJECT_BINARY_DIR}/${PN}Targets.cmake") endif() +endif() if(${INSTALL_PYMOD}) if(${NATIVE_PYTHON_INSTALL}) -@@ -162,12 +164,12 @@ if(${INSTALL_PYMOD}) +@@ -171,14 +170,14 @@ if(${INSTALL_PYMOD}) OUTPUT_STRIP_TRAILING_WHITESPACE) install(DIRECTORY gau2grid - DESTINATION ${CMAKE_INSTALL_LIBDIR}${PYMOD_INSTALL_LIBDIR} + DESTINATION ${PYMOD_INSTALL_LIBDIR} USE_SOURCE_PERMISSIONS FILES_MATCHING PATTERN "*.py") install(FILES $ - DESTINATION ${CMAKE_INSTALL_LIBDIR}${PYMOD_INSTALL_LIBDIR}/gau2grid + DESTINATION ${PYMOD_INSTALL_LIBDIR}/gau2grid RENAME "gg${PYLIB_EXTENSION}") install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE +- DESTINATION ${CMAKE_INSTALL_LIBDIR}${PYMOD_INSTALL_LIBDIR}/gau2grid) ++ DESTINATION ${PYMOD_INSTALL_LIBDIR}/gau2grid) + endif()