aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authoryuri <yuri@FreeBSD.org>2018-11-07 05:31:42 +0800
committeryuri <yuri@FreeBSD.org>2018-11-07 05:31:42 +0800
commit218c083656c7e2404beffd7ebaba8e8bad20dc90 (patch)
treea3d51ee3e99410d85fff6bb4c4b88612669a64a4 /science
parente32bcf39cfd44654041ef103e8367fb8feacedc8 (diff)
downloadfreebsd-ports-gnome-218c083656c7e2404beffd7ebaba8e8bad20dc90.tar.gz
freebsd-ports-gnome-218c083656c7e2404beffd7ebaba8e8bad20dc90.tar.zst
freebsd-ports-gnome-218c083656c7e2404beffd7ebaba8e8bad20dc90.zip
science/lammps: Add port options for additional functionality
Diffstat (limited to 'science')
-rw-r--r--science/lammps/Makefile55
-rw-r--r--science/lammps/distinfo2
2 files changed, 48 insertions, 9 deletions
diff --git a/science/lammps/Makefile b/science/lammps/Makefile
index d67dac92d433..70f2982c1068 100644
--- a/science/lammps/Makefile
+++ b/science/lammps/Makefile
@@ -1,8 +1,8 @@
# $FreeBSD$
PORTNAME= lammps
-PORTVERSION= ${GH_TAGNAME:C/stable_([0-9]{1,2})([A-Z][a-z][a-z])([0-9]{4})/\3.\2.\1/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
+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= 2
CATEGORIES= science
MAINTAINER= yuri@FreeBSD.org
@@ -11,24 +11,63 @@ COMMENT= Classical molecular dynamics code with a focus on materials modeling
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
-LIB_DEPENDS= libpng16.so:graphics/png \
- libmpi_cxx.so:net/openmpi
+CONFLICTS_BUILD= ga # conflicts with include/error.h, already fixed in the head
-USES= cmake:outsource eigen:3 jpeg shebangfix
+USES= blaslapack:openblas cmake:outsource,noninja eigen:3 fortran shebangfix
USE_GITHUB= yes
GH_TAGNAME= stable_22Aug2018
SHEBANG_GLOB= *.sh *.bash
SHEBANG_FILES= lib/kokkos/bin/nvcc_wrapper
CMAKE_SOURCE_PATH= ${WRKSRC}/cmake
+CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS"
-OPTIONS_DEFINE= FFMPEG
-OPTIONS_DEFAULT= FFMPEG
+OPTIONS_DEFINE= JPEG PNG GZIP FFMPEG VORONOI LATTE
+OPTIONS_GROUP= PARALLEL
+OPTIONS_GROUP_PARALLEL= MPI OPENMP
+OPTIONS_DEFAULT= MPI OPENMP JPEG PNG GZIP FFMPEG VORONOI LATTE
+PARALLEL_DESC= Enable parallelizations:
+
+MPI_CMAKE_BOOL= BUILD_MPI
+MPI_LIB_DEPENDS= libmpi.so:net/openmpi
+
+OPENMP_CMAKE_BOOL= BUILD_OMP
+OPENMP_LIB_DEPENDS= libomp.so:devel/openmp
FFMPEG_BUILD_DEPENDS= ffmpeg:multimedia/ffmpeg
FFMPEG_RUN_DEPENDS= ffmpeg:multimedia/ffmpeg
+JPEG_CMAKE_BOOL= WITH_JPEG
+JPEG_USES= jpeg
+
+PNG_CMAKE_BOOL= WITH_PNG
+PNG_LIB_DEPENDS= libpng16.so:graphics/png
+
+GZIP_CMAKE_BOOL= WITH_GZIP
+
+FFMPEG_CMAKE_BOOL= WITH_FFMPEG
+
+VORONOI_DESC= Use voro++, Voronoi tessellation package
+VORONOI_CMAKE_BOOL= PKG_VORONOI
+LIB_DEPENDS= libvoro++.so:science/voro++
+
+LATTE_DESC= Use LATTE package
+LATTE_CMAKE_BOOL= PKG_LATTE
+LATTE_LIB_DEPENDS= liblatte.so:science/latte
+
+# use clang from ports because cmake can't find OpenMP with base clang, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
+LLVM_VER= 60
+BUILD_DEPENDS+= clang${LLVM_VER}:devel/llvm${LLVM_VER}
+CPP= clang-cpp${LLVM_VER}
+CC= clang${LLVM_VER}
+CXX= clang++${LLVM_VER}
+
+MAKE_ARGS= VERBOSE=1
+
+post-patch:
+ @${REINPLACE_CMD} 's|SHELL = /bin/bash|SHELL = ${LOCALBASE}/bin/bash|' ${WRKSRC}/src/Makefile
+
post-patch-FFMPEG-off:
- @${REINPLACE_CMD} 's|find_program(FFMPEG_EXECUTABLE|#&|' ${WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} 's|find_program(FFMPEG_EXECUTABLE|#&|' ${WRKSRC}/cmake/CMakeLists.txt
.include <bsd.port.mk>
diff --git a/science/lammps/distinfo b/science/lammps/distinfo
index 57f11abc5c11..9bbfb9aafdfe 100644
--- a/science/lammps/distinfo
+++ b/science/lammps/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1536211844
+TIMESTAMP = 1540967816
SHA256 (lammps-lammps-2018.08.22-stable_22Aug2018_GH0.tar.gz) = 78e7b389523d2fd5243a6f2daab72667907980d31bee22e44b64122c3afc9f04
SIZE (lammps-lammps-2018.08.22-stable_22Aug2018_GH0.tar.gz) = 108761541