git: 773d13870c68 - main - science/{,py-}spglib: update 2.0.2 → 2.1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 11 Sep 2023 06:51:47 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=773d13870c68007ee3b01e6b40bfdaadad32bac1 commit 773d13870c68007ee3b01e6b40bfdaadad32bac1 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-09-11 06:50:09 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-09-11 06:51:41 +0000 science/{,py-}spglib: update 2.0.2 → 2.1.0 Reported by: portscout --- science/avogadrolibs/Makefile | 2 +- science/octopus/Makefile | 2 +- science/py-spglib/Makefile | 15 +++++---- science/py-spglib/distinfo | 6 ++-- science/py-spglib/files/patch-CMakeLists.txt | 39 +++++++++++++++++++++++ science/py-spglib/pkg-plist | 3 ++ science/sirius/Makefile | 1 + science/spglib/Makefile | 19 ++++------- science/spglib/distinfo | 6 ++-- science/spglib/files/patch-fortran_CMakeLists.txt | 13 ++++++++ science/spglib/pkg-plist | 22 +++++++------ 11 files changed, 93 insertions(+), 35 deletions(-) diff --git a/science/avogadrolibs/Makefile b/science/avogadrolibs/Makefile index 80d49b2cea1b..c4a14c195afb 100644 --- a/science/avogadrolibs/Makefile +++ b/science/avogadrolibs/Makefile @@ -1,6 +1,6 @@ PORTNAME= avogadrolibs DISTVERSION= 1.97.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org diff --git a/science/octopus/Makefile b/science/octopus/Makefile index 2db6784a4d57..1440b846b8b8 100644 --- a/science/octopus/Makefile +++ b/science/octopus/Makefile @@ -1,6 +1,6 @@ PORTNAME= octopus DISTVERSION= 11.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= science # chemistry MASTER_SITES= https://octopus-code.org/download/${DISTVERSION}/ diff --git a/science/py-spglib/Makefile b/science/py-spglib/Makefile index 00be8b2ed1ba..3a1a7b4d8bc3 100644 --- a/science/py-spglib/Makefile +++ b/science/py-spglib/Makefile @@ -1,7 +1,6 @@ PORTNAME= spglib DISTVERSIONPREFIX= v -DISTVERSION= 2.0.2 -PORTREVISION= 1 +DISTVERSION= 2.1.0 CATEGORIES= science python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,15 +11,19 @@ WWW= https://atztogo.github.io/spglib/ LICENSE= BSD3CLAUSE BUILD_DEPENDS= ${PYNUMPY} +LIB_DEPENDS= libsymspg.so:science/spglib RUN_DEPENDS= ${PYNUMPY} -USES= python -USE_PYTHON= distutils autoplist pytest # tests fail to run, see https://github.com/spglib/spglib/issues/192 +USES= cmake python +USE_PYTHON= flavors pytest # tests fail to run, see https://github.com/spglib/spglib/issues/192 USE_GITHUB= yes +CMAKE_ARGS= -DPython3_EXECUTABLE=${PYTHON_CMD} + WRKSRC_SUBDIR= python -post-install: - @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/spglib/_spglib*.so +post-patch: + #@cd ${WRKSRC} && ${RLN} ../test . + @cd ${WRKSRC} && ${CP} -r ../test . .include <bsd.port.mk> diff --git a/science/py-spglib/distinfo b/science/py-spglib/distinfo index 4b1eec8259f9..3f4784db3f19 100644 --- a/science/py-spglib/distinfo +++ b/science/py-spglib/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1674925944 -SHA256 (spglib-spglib-v2.0.2_GH0.tar.gz) = 10e44a35099a0a5d0fc6ee0cdb39d472c23cb98b1f5167c0e2b08f6069f3db1e -SIZE (spglib-spglib-v2.0.2_GH0.tar.gz) = 2880537 +TIMESTAMP = 1694412381 +SHA256 (spglib-spglib-v2.1.0_GH0.tar.gz) = 31bca273a1bc54e1cff4058eebe7c0a35d5f9b489579e84667d8e005c73dcc13 +SIZE (spglib-spglib-v2.1.0_GH0.tar.gz) = 2901649 diff --git a/science/py-spglib/files/patch-CMakeLists.txt b/science/py-spglib/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..ffabaf7a1e8c --- /dev/null +++ b/science/py-spglib/files/patch-CMakeLists.txt @@ -0,0 +1,39 @@ +--- CMakeLists.txt.orig 2023-09-10 07:23:28 UTC ++++ CMakeLists.txt +@@ -1,8 +1,13 @@ ++cmake_minimum_required(VERSION 3.15) ++ ++find_package(Spglib REQUIRED) ++find_package(Python3 COMPONENTS REQUIRED Interpreter Development.Module NumPy) ++ + Python3_add_library(Spglib_python MODULE WITH_SOABI _spglib.c) + set_target_properties(Spglib_python PROPERTIES + OUTPUT_NAME _spglib) + target_link_libraries(Spglib_python PRIVATE +- Spglib_symspg Python3::NumPy) ++ Spglib::symspg Python3::NumPy) + if (NOT Python_INSTALL_DIR) + if (SKBUILD) + # If built with scikit-build-core, let it handle the installation +@@ -12,7 +17,7 @@ if (NOT Python_INSTALL_DIR) + set(Python_INSTALL_DIR ${Python3_SITEARCH}/spglib) + endif () + endif () +-if (SPGLIB_INSTALL) ++if (TRUE) + if (WIN32) + # Windows needs RUNTIME as well to install the .dll file to + install(TARGETS Spglib_symspg +@@ -22,9 +27,9 @@ if (SPGLIB_INSTALL) + else () + # TODO: Cmake forces to install PUBLIC_HEADER when defined + # https://gitlab.kitware.com/cmake/cmake/-/issues/24326 +- install(TARGETS Spglib_symspg +- LIBRARY DESTINATION ${Python_INSTALL_DIR} COMPONENT Spglib_Runtime +- PUBLIC_HEADER DESTINATION ${Python_INSTALL_DIR} COMPONENT Spglib_Runtime) ++ #install(TARGETS Spglib_symspg ++ # LIBRARY DESTINATION ${Python_INSTALL_DIR} COMPONENT Spglib_Runtime ++ # PUBLIC_HEADER DESTINATION ${Python_INSTALL_DIR} COMPONENT Spglib_Runtime) + endif () + install(TARGETS Spglib_python + LIBRARY DESTINATION ${Python_INSTALL_DIR} COMPONENT Spglib_Runtime) diff --git a/science/py-spglib/pkg-plist b/science/py-spglib/pkg-plist new file mode 100644 index 000000000000..55a2e8a2dc92 --- /dev/null +++ b/science/py-spglib/pkg-plist @@ -0,0 +1,3 @@ +%%PYTHON_SITELIBDIR%%/spglib/__init__.py +%%PYTHON_SITELIBDIR%%/spglib/_spglib%%PYTHON_EXT_SUFFIX%%.so +%%PYTHON_SITELIBDIR%%/spglib/spglib.py diff --git a/science/sirius/Makefile b/science/sirius/Makefile index 87a6b3de5ccf..2dead0619269 100644 --- a/science/sirius/Makefile +++ b/science/sirius/Makefile @@ -1,6 +1,7 @@ PORTNAME= sirius DISTVERSIONPREFIX= v DISTVERSION= 7.4.3 +PORTREVISION= 1 CATEGORIES= science PKGNAMESUFFIX= -quantum-chemistry # other software also has the name "sirius" diff --git a/science/spglib/Makefile b/science/spglib/Makefile index 0f3dcdf481fb..2196e898c783 100644 --- a/science/spglib/Makefile +++ b/science/spglib/Makefile @@ -1,7 +1,6 @@ PORTNAME= spglib DISTVERSIONPREFIX= v -DISTVERSION= 2.0.2 -PORTREVISION= 1 +DISTVERSION= 2.1.0 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -11,12 +10,15 @@ WWW= https://spglib.github.io/spglib/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING -USES= cmake +USES= cmake:testing USE_GITHUB= yes USE_LDCONFIG= yes +CMAKE_OFF= SPGLIB_WITH_TESTS +CMAKE_TESTING_ON= SPGLIB_WITH_TESTS + .if !exists(/usr/include/omp.h) -CMAKE_OFF+= USE_OMP +CMAKE_OFF+= SPGLIB_USE_OMP .else FORTRAN_LDFLAGS= -lomp # workaround for: undefined reference to `__kmpc_fork_call' .endif @@ -26,13 +28,6 @@ OPTIONS_DEFAULT= FORTRAN OPTIONS_SUB= yes FORTRAN_USES= fortran -FORTRAN_CMAKE_BOOL= WITH_Fortran - -do-test: # from test/README.md - cd ${WRKSRC}/test && \ - ${CMAKE_BIN} -S . -B build -DUSE_SANITIZER="Address" -DCMAKE_BUILD_TYPE="Debug" && \ - ${CMAKE_BIN} --build build -j ${_MAKE_JOBS} && \ - cd build && \ - ctest +FORTRAN_CMAKE_BOOL= SPGLIB_WITH_Fortran .include <bsd.port.mk> diff --git a/science/spglib/distinfo b/science/spglib/distinfo index ae6151d27fc1..0fba2daad36c 100644 --- a/science/spglib/distinfo +++ b/science/spglib/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1674925518 -SHA256 (spglib-spglib-v2.0.2_GH0.tar.gz) = 10e44a35099a0a5d0fc6ee0cdb39d472c23cb98b1f5167c0e2b08f6069f3db1e -SIZE (spglib-spglib-v2.0.2_GH0.tar.gz) = 2880537 +TIMESTAMP = 1694406506 +SHA256 (spglib-spglib-v2.1.0_GH0.tar.gz) = 31bca273a1bc54e1cff4058eebe7c0a35d5f9b489579e84667d8e005c73dcc13 +SIZE (spglib-spglib-v2.1.0_GH0.tar.gz) = 2901649 diff --git a/science/spglib/files/patch-fortran_CMakeLists.txt b/science/spglib/files/patch-fortran_CMakeLists.txt new file mode 100644 index 000000000000..5cbec0d72be8 --- /dev/null +++ b/science/spglib/files/patch-fortran_CMakeLists.txt @@ -0,0 +1,13 @@ +- remove compiler ID from include path + +--- fortran/CMakeLists.txt.orig 2023-09-11 04:42:53 UTC ++++ fortran/CMakeLists.txt +@@ -22,7 +22,7 @@ if (SPGLIB_INSTALL) + # Adapting the standard from fortran-stdlib + # https://gitlab.kitware.com/cmake/cmake/-/issues/19608 + # https://discourse.cmake.org/t/api-design-c-modules-source-listings-and-interface-properties/5389/14 +- cmake_path(APPEND CMAKE_INSTALL_INCLUDEDIR ${PROJECT_NAME} "${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}" ++ cmake_path(APPEND CMAKE_INSTALL_INCLUDEDIR + OUTPUT_VARIABLE _DEFAULT_CMAKE_INSTALL_MODULEDIR) + set(CMAKE_INSTALL_MODULEDIR ${_DEFAULT_CMAKE_INSTALL_MODULEDIR} + CACHE STRING diff --git a/science/spglib/pkg-plist b/science/spglib/pkg-plist index 241ebc0b5c93..065a9b090382 100644 --- a/science/spglib/pkg-plist +++ b/science/spglib/pkg-plist @@ -1,14 +1,18 @@ -%%FORTRAN%%bin/spglib_example_fortran.X include/spglib.h -include/spglib_f08.f90 -%%FORTRAN%%lib/libspglib_f08.a +%%FORTRAN%%include/spglib_f08.F90 +%%FORTRAN%%include/spglib_f08.mod +lib/cmake/Spglib/PackageCompsHelper.cmake +lib/cmake/Spglib/SpglibConfig.cmake +lib/cmake/Spglib/SpglibConfigVersion.cmake +%%FORTRAN%%lib/cmake/Spglib/SpglibTargets_fortran-%%CMAKE_BUILD_TYPE%%.cmake +%%FORTRAN%%lib/cmake/Spglib/SpglibTargets_fortran.cmake +lib/cmake/Spglib/SpglibTargets_shared-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/Spglib/SpglibTargets_shared.cmake %%FORTRAN%%lib/libspglib_f08.so -%%FORTRAN%%lib/libspglib_f08.so.1 -%%FORTRAN%%lib/libspglib_f08.so.2.0.2 -lib/libsymspg.a +%%FORTRAN%%lib/libspglib_f08.so.2 +%%FORTRAN%%lib/libspglib_f08.so.2.1.0 lib/libsymspg.so -lib/libsymspg.so.1 -lib/libsymspg.so.2.0.2 -%%FORTRAN%%lib/spglib_f08.mod +lib/libsymspg.so.2 +lib/libsymspg.so.2.1.0 libdata/pkgconfig/spglib.pc %%FORTRAN%%libdata/pkgconfig/spglib_f08.pc