aboutsummaryrefslogtreecommitdiffstats
path: root/science
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2015-07-29 03:31:27 +0800
committerThierry Thomas <thierry@FreeBSD.org>2015-07-29 03:31:27 +0800
commit44c871a4f5086ae107785468cfca5ea65083908b (patch)
tree7f78e474c9af4859b728aeffa1edc8fba9b7eaa4 /science
parent85411195a8a99ab9845dbb11414e8a5f8eaf9125 (diff)
downloadfreebsd-ports-gnome-44c871a4f5086ae107785468cfca5ea65083908b.tar.gz
freebsd-ports-gnome-44c871a4f5086ae107785468cfca5ea65083908b.tar.zst
freebsd-ports-gnome-44c871a4f5086ae107785468cfca5ea65083908b.zip
Add an option for mpich2, and set de default according the OS version.
Submitted by: Stas Timokhin (maintainer)
Diffstat (limited to 'science')
-rw-r--r--science/meep/Makefile44
1 files changed, 29 insertions, 15 deletions
diff --git a/science/meep/Makefile b/science/meep/Makefile
index 577045a1716c..dfca3ed9d4ac 100644
--- a/science/meep/Makefile
+++ b/science/meep/Makefile
@@ -3,7 +3,7 @@
PORTNAME= meep
PORTVERSION= 1.2.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= science
MASTER_SITES= http://ab-initio.mit.edu/meep/
@@ -25,22 +25,36 @@ CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ARGS+= CC="${CC}" CXX="${CXX}"
-OPTIONS_DEFINE= OPENMPI
-OPTIONS_DEFAULT= OPENMPI
-OPENMPI_DESC= MPI support
+OPTIONS_RADIO= MPI
+OPTIONS_RADIO_MPI= OPENMPI MPICH2
+OPTIONS_DEFAULT= ${MPI_DEFAULT}
+OPENMPI_DESC= MPI support (with OpenMPI)
-.include <bsd.port.options.mk>
+OPENMPI_BUILD_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpiCC:${PORTSDIR}/net/openmpi
+OPENMPI_RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
+OPENMPI_CONFIGURE_ENV= MPICXX=${LOCALBASE}/mpi/openmpi/bin/mpiCC
+OPENMPI_CFLAGS= -I${LOCALBASE}/mpi/openmpi/include
-.if ${PORT_OPTIONS:MOPENMPI}
-BUILD_DEPENDS+= ${LOCALBASE}/mpi/openmpi/bin/mpiCC:${PORTSDIR}/net/openmpi
-RUN_DEPENDS+= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi
-CONFIGURE_ARGS+=--with-mpi
-CONFIGURE_ENV+= MPICXX=${LOCALBASE}/mpi/openmpi/bin/mpiCC
-CFLAGS+= -I${LOCALBASE}/mpi/openmpi/include
-PLIST_SUB+= MPI="" NOMPI="@comment "
+MPICH2_LIB_DEPENDS= libmpich.so.8:${PORTSDIR}/net/mpich2
+MPICH2_CONFIGURE_ENV= MPICXX=${LOCALBASE}/bin/mpicc
+MPICH2_CFLAGS= -I${LOCALBASE}/include
+
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD
+. if ${OSVERSION} < 1000000
+MPI_DEFAULT= OPENMPI
+. else
+MPI_DEFAULT= MPICH2
+. endif
+.endif
+
+.if ${PORT_OPTIONS:MMPICH2} || ${PORT_OPTIONS:MOPENMPI}
+CONFIGURE_ARGS+= --with-mpi
+PLIST_SUB+= MPI="" NOMPI="@comment "
.else
-CONFIGURE_ARGS+=--without-mpi
-PLIST_SUB+= MPI="@comment " NOMPI=""
+CONFIGURE_ARGS+= --without-mpi
+PLIST_SUB+= MPI="@comment " NOMPI=""
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>