ports/155655: [patch] science/meep Add Option to support MPI build

Klaus Aehlig aehlig at linta.de
Fri Mar 18 09:20:10 UTC 2011


>Number:         155655
>Category:       ports
>Synopsis:       [patch] science/meep Add Option to support MPI build
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 18 09:20:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Klaus Aehlig
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD curry.linta.de 8.2-STABLE FreeBSD 8.2-STABLE #11: Sun Feb 27 03:33:40 GMT 2011 aehlig at curry.linta.de:/usr/obj/usr/src/sys/CURRY amd64


>Description:
	meep supports building for MPI, but the current state of the port does not support
	this configure option. MPI support, however, is very usefull for larger simulations
	on multi-processor machines.

	I therefore suggest to add an Option (default: Off) to build the MPI version of meep.
>How-To-Repeat:
	
>Fix:

	Apply the following patch.

	Note:
	- the patch also contains the missing (semantical) gsed-dependency noted in ports/155469; I 
	  nevertheless decided to send a new report rather than a follow-up, as this is a new issue 
	  with a much larger change-request
	- while there, the patch also removes MD5 checksum

--- meep.diff begins here ---
diff -ruN meep.orig/Makefile meep/Makefile
--- meep.orig/Makefile	2011-03-18 09:06:52.000000000 +0000
+++ meep/Makefile	2011-03-18 09:07:25.000000000 +0000
@@ -27,11 +27,27 @@
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LDFLAGS="${LDFLAGS}"
 
 BUILD_DEPENDS+=	bash:${PORTSDIR}/shells/bash \
-		harminv:${PORTSDIR}/science/harminv
+		harminv:${PORTSDIR}/science/harminv \
+		gsed:${PORTSDIR}/textproc/gsed
 LIB_DEPENDS+=	guile.20:${PORTSDIR}/lang/guile \
 		blas.2:${PORTSDIR}/math/blas \
 		ctl.4:${PORTSDIR}/science/libctl \
 		hdf5.0:${PORTSDIR}/science/hdf5
 RUN_DEPENDS+=	harminv:${PORTSDIR}/science/harminv
 
-.include <bsd.port.mk>
+OPTIONS=	OPENMPI "Enable MPI support using openmpi" Off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OPENMPI)
+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
+PLIST_SUB+=	MPI="" NOMPI="@comment "
+.else
+CONFIGURE_ARGS+=--without-mpi
+PLIST_SUB+=	MPI="@comment " NOMPI=""
+.endif
+
+.include <bsd.port.post.mk>
diff -ruN meep.orig/distinfo meep/distinfo
--- meep.orig/distinfo	2011-03-18 09:06:52.000000000 +0000
+++ meep/distinfo	2011-03-18 09:08:39.000000000 +0000
@@ -1,3 +1,2 @@
-MD5 (meep-1.1.1.tar.gz) = 415e0cd312b6caa22b5dd612490e1ccf
 SHA256 (meep-1.1.1.tar.gz) = 7a97b5555da1f9ea2ec6eed5c45bd97bcd6ddbd54bdfc181f46c696dffc169f2
 SIZE (meep-1.1.1.tar.gz) = 751244
diff -ruN meep.orig/pkg-plist meep/pkg-plist
--- meep.orig/pkg-plist	2011-03-18 09:06:52.000000000 +0000
+++ meep/pkg-plist	2011-03-18 09:07:15.000000000 +0000
@@ -1,10 +1,14 @@
-bin/meep
+%%NOMPI%%bin/meep
+%%MPI%%bin/meep-mpi
 include/meep.hpp
 include/meep/mympi.hpp
 include/meep/vec.hpp
-lib/libmeep.a
-lib/libmeep.la
-lib/pkgconfig/meep.pc
+%%NOMPI%%lib/libmeep.a
+%%MPI%%lib/libmeep_mpi.a
+%%NOMPI%%lib/libmeep.la
+%%MPI%%lib/libmeep_mpi.la
+%%NOMPI%%lib/pkgconfig/meep.pc
+%%MPI%%lib/pkgconfig/meep_mpi.pc
 share/meep/casimir.scm
 share/meep/meep-enums.scm
 share/meep/meep.scm
--- meep.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list