diff options
author | yuri <yuri@FreeBSD.org> | 2018-09-14 15:58:05 +0800 |
---|---|---|
committer | yuri <yuri@FreeBSD.org> | 2018-09-14 15:58:05 +0800 |
commit | 8ba9579b7b313b86a5bdf1bf311d482af33b7e93 (patch) | |
tree | e0356257072bb818c9ad53ea0cac4b9919d43e87 | |
parent | 68c1aaea0f70099d9e29c1183fb5b02ef6dbad31 (diff) | |
download | freebsd-ports-gnome-8ba9579b7b313b86a5bdf1bf311d482af33b7e93.tar.gz freebsd-ports-gnome-8ba9579b7b313b86a5bdf1bf311d482af33b7e93.tar.zst freebsd-ports-gnome-8ba9579b7b313b86a5bdf1bf311d482af33b7e93.zip |
science/cp2k: Require the option OPENMP=on in fftw3 for options OPENMP and OPENMP_MPI
PR: 231163
Submitted by: jhale
-rw-r--r-- | science/cp2k/Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/science/cp2k/Makefile b/science/cp2k/Makefile index a8d485451f0b..0b6039879acd 100644 --- a/science/cp2k/Makefile +++ b/science/cp2k/Makefile @@ -43,7 +43,6 @@ SERIAL_DESC= Single core (no multiprocessing) SERIAL_VARS= VERSION=sopt OPENMP_VARS= VERSION=ssmp -OPENMP_BROKEN= undefined reference to `dfftw_plan_with_nthreads_': https://github.com/cp2k/cp2k/issues/12 (need OPENMP=on in math/fftw3 ?) MPI_VARS= VERSION=popt MPI_LIB_DEPENDS= libmpich.so:net/mpich2 \ @@ -52,10 +51,20 @@ MPI_LIB_DEPENDS= libmpich.so:net/mpich2 \ OPENMP_MPI_DESC= Enable both OpenMP and MPI OPENMP_MPI_VARS= VERSION=psmp OPENMP_MPI_LIB_DEPENDS= ${MPI_LIB_DEPENDS} -OPENMP_MPI_BROKEN= ${OPENMP_BROKEN} PLIST_FILES= bin/${PORTNAME} +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPENMP} || ${PORT_OPTIONS:MOPENMP_MPI} +pre-configure: + @if [ ! -e ${LOCALBASE}/lib/libfftw3_omp.so ] ; then \ + ${ECHO_MSG} "The OPENMP and OPENMP_MPI options require math/fftw3" ; \ + ${ECHO_MSG} "to be built and installed with the OPENMP option ON" ; \ + exit 1; \ + fi +.endif + post-patch: @${REINPLACE_CMD} 's|LIBS.*=.*|& ${LDFLAGS}|; s|^FCFLAGS.*=.*|& -I${LOCALBASE}/include|' ${WRKSRC}/arch/FreeBSD-* |