diff --git a/science/avogadrolibs/Makefile b/science/avogadrolibs/Makefile index 80d49b2cea1b..c4a14c195afb 100644 --- a/science/avogadrolibs/Makefile +++ b/science/avogadrolibs/Makefile @@ -1,78 +1,78 @@ PORTNAME= avogadrolibs DISTVERSION= 1.97.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org COMMENT= Avogadro2 libraries for chemical editor and visualization applications WWW= https://www.openchemistry.org/projects/avogadro2/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE TEST_DEPENDS= googletest>0:devel/googletest \ molequeue>0:misc/molequeue USES= cmake:testing compiler:c++17-lang eigen:3,build,run # eigen needs to be 'run' because it is written into cmake files USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= OpenChemistry GH_TUPLE= OpenChemistry:molecules:b1e16c5:molecules/../molecules \ OpenChemistry:crystals:73a5bbc:crystals/../crystals CMAKE_ON= BUILD_SHARED_LIBS CMAKE_TESTING_ON= ENABLE_TESTING OPTIONS_DEFINE= HDF5 LIBARCHIVE LIBMSYM MMTF OPENGL QT5 SPGLIB VTK OPTIONS_DEFAULT= LIBARCHIVE LIBMSYM OPENGL QT5 SPGLIB # MMTF OPTIONS_SUB= yes HDF5_CMAKE_BOOL= USE_HDF5 HDF5_LIB_DEPENDS= libhdf5.so:science/hdf5 \ libsz.so:science/libaec LIBARCHIVE_DESC= Enable optional Libarchive features LIBARCHIVE_CMAKE_BOOL= USE_LIBARCHIVE LIBARCHIVE_USES= libarchive LIBARCHIVE_IMPLIES= QT5 LIBMSYM_DESC= Enable optional features using libmsym LIBMSYM_CMAKE_BOOL= USE_LIBMSYM LIBMSYM_LIB_DEPENDS= libmsym.so:science/libmsym LIBMSYM_IMPLIES= QT5 # enables the 'symmetry' Qt plugin MMTF_DESC= Enable optional features using mmtf MMTF_CMAKE_BOOL= USE_MMTF MMTF_BUILD_DEPENDS= mmtf-cpp>0:science/mmtf-cpp MMTF_BROKEN= see https://github.com/OpenChemistry/avogadrolibs/issues/1185 OPENGL_CMAKE_BOOL= USE_OPENGL OPENGL_USES= gl OPENGL_USE= GL=gl,glew,glu QT5_CMAKE_BOOL= USE_QT QT5_USES= qt:5 QT5_USE= QT=core,concurrent,gui,network,svg,widgets,buildtools:build,qmake:build QT5_IMPLIES= OPENGL SPGLIB_DESC= Enable optional features using spglib SPGLIB_CMAKE_BOOL= USE_SPGLIB SPGLIB_CMAKE_ON= -DSPGLIB_INCLUDE_DIR=${LOCALBASE}/include/spglib SPGLIB_LIB_DEPENDS= libsymspg.so:science/spglib SPGLIB_IMPLIES= QT5 # USE_SPGLIB only installs header file without USE_QT, and also installs SpaceGroup.a with USE_QT, see https://github.com/OpenChemistry/avogadrolibs/issues/610 VTK_DESC= Enable libraries that use VTK VTK_USES= xorg VTK_USE= QT=opengl XORG=x11 VTK_CMAKE_BOOL= USE_VTK VTK_LIB_DEPENDS= libvtksys-${VTK_VER}.so:math/vtk${VTK_VER:R} \ libfreetype.so:print/freetype2 VTK_IMPLIES= QT5 VTK_BROKEN= Needs https://github.com/psavery/genXrdPattern, see https://github.com/OpenChemistry/avogadrolibs/issues/1186 post-install: @${RM} -r ${STAGEDIR}${PREFIX}/share/doc .include <../../math/vtk9/Makefile.version> .include diff --git a/science/octopus/Makefile b/science/octopus/Makefile index 2db6784a4d57..1440b846b8b8 100644 --- a/science/octopus/Makefile +++ b/science/octopus/Makefile @@ -1,67 +1,67 @@ PORTNAME= octopus DISTVERSION= 11.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= science # chemistry MASTER_SITES= https://octopus-code.org/download/${DISTVERSION}/ MAINTAINER= yuri@FreeBSD.org COMMENT= Scientific program aimed at the ab initio virtual experimentation WWW= https://octopus-code.org/wiki/Main_Page LICENSE= GPLv2 BROKEN_aarch64= undefined reference to `__aarch64_cas8_acq_rel' #'` BUILD_DEPENDS= bash:shells/bash LIB_DEPENDS= libarpack.so:math/arpack-ng \ libblas.so:math/blas \ libfftw3.so:math/fftw3 \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libgd.so:graphics/gd \ libgmp.so:math/gmp \ libgsl.so:math/gsl \ liblapack.so:math/lapack \ libmpfr.so:math/mpfr \ libnlopt.so:math/nlopt \ libpng.so:graphics/png \ libsymspg.so:science/spglib \ libtiff.so:graphics/tiff \ libvdwxcfort.so:science/libvdwxc \ libwebp.so:graphics/webp \ libxc.so:science/libxc \ libyaml.so:textproc/libyaml USES= compiler:c++14-lang fortran gmake jpeg libtool localbase:ldflags perl5 python shebangfix USE_CXXSTD= c++14 USE_LDCONFIG= yes USE_GCC= 11 # pending resolution of https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266196 (see also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266196) SHEBANG_FILES= src/fdep/fortran_dependencies.pl testsuite/performance/create_combinations.py GNU_CONFIGURE= yes CONFIGURE_SHELL= ${PREFIX}/bin/bash CONFIGURE_ARGS= --enable-shared --disable-static LDFLAGS+= -lsymspg FCFLAGS+= -I${LOCALBASE}/include -ffree-line-length-none INSTALL_TARGET= install-strip TEST_TARGET= check-short # some tests fail, see https://gitlab.com/octopus-code/octopus/-/issues/558 OPTIONS_DEFINE= OPENMP OPTIONS_DEFAULT= OPENMP OPENMP_CONFIGURE_ENABLE= openmp .include # workaround for: # Error: BOZ literal constant at (1) is neither a data-stmt-constant nor an actual argument to INT, REAL, DBLE, or CMPLX intrinsic function [see '-fno-allow-invalid-boz'] .if ${GCC_DEFAULT} >= 10 FCFLAGS+= -fallow-argument-mismatch -fallow-invalid-boz .endif post-stage: # https://gitlab.com/octopus-code/octopus/issues/108 @${RM} ${STAGEDIR}${PREFIX}/include/yaml.h .include 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,26 +1,29 @@ PORTNAME= spglib DISTVERSIONPREFIX= v -DISTVERSION= 2.0.2 -PORTREVISION= 1 +DISTVERSION= 2.1.0 CATEGORIES= science python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Library for finding and handling crystal symmetries (python binding) 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 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,48 +1,49 @@ PORTNAME= sirius DISTVERSIONPREFIX= v DISTVERSION= 7.4.3 +PORTREVISION= 1 CATEGORIES= science PKGNAMESUFFIX= -quantum-chemistry # other software also has the name "sirius" MAINTAINER= yuri@FreeBSD.org COMMENT= Domain specific library for electronic structure calculations WWW= https://github.com/electronic-structure/SIRIUS LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libcosta.so:math/costa \ libgsl.so:math/gsl \ libhdf5.so:science/hdf5 \ libopenblas.so:math/openblas \ libscalapack.so:math/scalapack \ libspfft.so:math/spfft \ libspla.so:math/spla \ libsymspg.so:science/spglib \ libxc.so:science/libxc USES= cmake:testing compiler:c++14-lang eigen:3,test fortran pkgconfig USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= electronic-structure GH_PROJECT= SIRIUS OPTIONS_DEFINE= NLCGLIB OPTIONS_SINGLE= MPI OPTIONS_SINGLE_MPI= MPICH OPENMPI OPTIONS_DEFAULT= MPICH # NLCGLIB NLCGLIB_DESC= Enable nlcglib NLCGLIB_CMAKE_BOOL= USE_NLCGLIB NLCGLIB_LIB_DEPENDS= libnlcglib.so:science/nlcglib \ libkokkoscore.so:devel/kokkos NLCGLIB_BROKEN= build breaks, see https://github.com/electronic-structure/SIRIUS/issues/759 MPICH_USES= mpi:mpich OPENMPI_USES= mpi:openmpi # many tests fail, see https://github.com/electronic-structure/SIRIUS/issues/760 .include diff --git a/science/spglib/Makefile b/science/spglib/Makefile index 0f3dcdf481fb..2196e898c783 100644 --- a/science/spglib/Makefile +++ b/science/spglib/Makefile @@ -1,38 +1,33 @@ PORTNAME= spglib DISTVERSIONPREFIX= v -DISTVERSION= 2.0.2 -PORTREVISION= 1 +DISTVERSION= 2.1.0 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org COMMENT= C library for finding and handling crystal symmetries 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 OPTIONS_DEFINE= FORTRAN 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 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