blob: 85fa7cf568c9ab64486facbe4d05383af75f9c94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
PORTNAME= sundials
DISTVERSION= 6.2.0
PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= https://github.com/LLNL/sundials/releases/download/v${DISTVERSION}/
MAINTAINER= yuri@FreeBSD.org
COMMENT= SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers
WWW= https://computation.llnl.gov/projects/sundials
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake:testing fortran localbase:ldflags python:build
USE_LDCONFIG= yes
CMAKE_ARGS= -DENABLE_PTHREAD:BOOL=ON \
-DBUILD_STATIC_LIBS:BOOL=OFF \
-DCMAKE_C_STANDARD=99
CMAKE_OFF= EXAMPLES_ENABLE_C EXAMPLES_ENABLE_CXX EXAMPLES_ENABLE_F77 EXAMPLES_ENABLE_F90
CMAKE_TESTING_ON= SUNDIALS_TEST_UNITTESTS \
EXAMPLES_ENABLE_C EXAMPLES_ENABLE_CXX EXAMPLES_ENABLE_F77 EXAMPLES_ENABLE_F90
FCFLAGS:= ${FFLAGS} # project checks that these flags are equal
OPTIONS_DEFINE= BLAS EXAMPLES LAPACK MPI OPENMP
OPTIONS_DEFAULT= LAPACK
OPTIONS_GROUP= VECTORS
OPTIONS_GROUP_VECTORS= HYPRE PETSC
VECTORS_DESC= Alternative vector libraries
OPTIONS_SUB= yes
BLAS_DESC= Enable BLAS support
BLAS_CMAKE_BOOL= ENABLE_BLAS
BLAS_USES= blaslapack:openblas
#EXAMPLES_CMAKE_BOOL= EXAMPLES_ENABLE_C EXAMPLES_ENABLE_CXX EXAMPLES_ENABLE_F77 EXAMPLES_ENABLE_F90
#EXAMPLES_CMAKE_ON= -DEXAMPLES_INSTALL_PATH=${EXAMPLESDIR}
#PORTEXAMPLES= *
HYPRE_DESC= HYPRE vectors support (also enables MPI)
HYPRE_CMAKE_BOOL= ENABLE_HYPRE
HYPRE_CMAKE_ON= -DHYPRE_INCLUDE_DIR=${LOCALBASE}/include \
-DHYPRE_LIBRARY_DIR=${LOCALBASE}/lib
HYPRE_LIB_DEPENDS= libHYPRE.so:science/hypre # maybe is broken due to https://github.com/hypre-space/hypre/issues/464
HYPRE_IMPLIES= MPI
HYPRE_PREVENTS= LAPACK # error: Incompatible sunindextype for LAPACK; disable LAPACK and rebuild
HYPRE_BROKEN= ERROR: SUNDIALS interface to HYPRE is not functional.
LAPACK_DESC= Use Lapack linear algebra (sets SUNDIALS_INDEX_TYPE=int32)
LAPACK_USES= blaslapack:openblas
LAPACK_CMAKE_BOOL= ENABLE_LAPACK
MPI_CMAKE_BOOL= ENABLE_MPI
MPI_LIB_DEPENDS= libmpich.so:net/mpich
OPENMP_CMAKE_BOOL= ENABLE_OPENMP
PETSC_DESC= PETSc vectors support (also enables MPI)
PETSC_CMAKE_BOOL= ENABLE_PETSC
PETSC_CMAKE_ON= -DPETSC_DIR=${LOCALBASE} \
-DPETSC_INCLUDE_DIR=${LOCALBASE}/include \
-DPETSC_LIBRARY_DIR=${LOCALBASE}/lib
PETSC_LIB_DEPENDS= libpetsc.so:science/PETSc
PETSC_IMPLIES= MPI
PETSC_PREVENTS= LAPACK # error: Incompatible sunindextype for LAPACK; disable LAPACK and rebuild
PETSC_BROKEN= ERROR: PETSc not functional due to index size mismatch: SUNDIALS_INDEX_SIZE=64, but PETSc was built with 32-bit indices
post-install:
@${RM} ${STAGEDIR}${PREFIX}/include/sundials/LICENSE
.include <bsd.port.mk>
|