Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2018 07:58:05 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r479762 - head/science/cp2k
Message-ID:  <201809140758.w8E7w5D9093846@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Fri Sep 14 07:58:05 2018
New Revision: 479762
URL: https://svnweb.freebsd.org/changeset/ports/479762

Log:
  science/cp2k: Require the option OPENMP=on in fftw3 for options OPENMP and OPENMP_MPI
  
  PR:		231163
  Submitted by:	jhale

Modified:
  head/science/cp2k/Makefile

Modified: head/science/cp2k/Makefile
==============================================================================
--- head/science/cp2k/Makefile	Fri Sep 14 07:44:45 2018	(r479761)
+++ head/science/cp2k/Makefile	Fri Sep 14 07:58:05 2018	(r479762)
@@ -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,9 +51,19 @@ 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-*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809140758.w8E7w5D9093846>