Index: head/science/lammps/Makefile =================================================================== --- head/science/lammps/Makefile +++ head/science/lammps/Makefile @@ -2,6 +2,7 @@ PORTNAME= lammps PORTVERSION= ${GH_TAGNAME:C/(stable|patch)_([0-9]{1,2})([A-Z][a-z][a-z])([0-9]{4})/\4.\3.\2/S/Jan/01/S/Feb/02/S/Mar/03/S/Apr/04/S/May/05/S/Jun/06/S/Jul/07/S/Aug/08/S/Sep/09/S/Oct/10/S/Nov/11/S/Dec/12/} +PORTREVISION= 1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -20,21 +21,21 @@ SHEBANG_FILES= lib/kokkos/bin/nvcc_wrapper CMAKE_SOURCE_PATH= ${WRKSRC}/cmake -CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS" +CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS" ${CMAKE_ARGS_${CHOSEN_COMPILER_TYPE}} +CMAKE_ARGS_gcc= -DBUILD_OMP:BOOL=false OPTIONS_DEFINE= JPEG PNG GZIP FFMPEG VORONOI LATTE +OPTIONS_DEFINE_clang= OPENMP OPTIONS_GROUP= PARALLEL -OPTIONS_GROUP_PARALLEL= MPI OPENMP -OPTIONS_DEFAULT= MPI OPENMP JPEG PNG GZIP FFMPEG VORONOI LATTE +OPTIONS_GROUP_PARALLEL= MPI ${OPTIONS_DEFINE_${CHOSEN_COMPILER_TYPE}} +OPTIONS_DEFAULT= MPI JPEG PNG GZIP FFMPEG VORONOI LATTE ${OPTIONS_DEFAULT_${CHOSEN_COMPILER_TYPE}} +OPTIONS_DEFAULT_clang= OPENMP PARALLEL_DESC= Enable parallelizations: MPI_CMAKE_BOOL= BUILD_MPI MPI_LIB_DEPENDS= libmpi.so:net/openmpi +MPI_USES= compiler:c11 -OPENMP_USES= localbase -OPENMP_CMAKE_BOOL= BUILD_OMP -OPENMP_LIB_DEPENDS= libomp.so:devel/openmp - FFMPEG_BUILD_DEPENDS= ffmpeg:multimedia/ffmpeg FFMPEG_RUN_DEPENDS= ffmpeg:multimedia/ffmpeg @@ -57,6 +58,14 @@ LATTE_LIB_DEPENDS= liblatte.so:science/latte PORTSCOUT= ignore # due to a special version tagging scheme that this project uses portscout fails to find new versions, watching their GitHub release page instead + +.include + +.if ${PORT_OPTIONS:MOPENMP} +USES+= localbase +CMAKE_ARGS+= -DBUILD_OMP:BOOL=true +LIB_DEPENDS+= libomp.so:devel/openmp +.endif post-patch: @${REINPLACE_CMD} 's|SHELL = /bin/bash|SHELL = ${LOCALBASE}/bin/bash|' ${WRKSRC}/src/Makefile