aboutsummaryrefslogtreecommitdiff
path: root/science
diff options
context:
space:
mode:
authorStephen Montgomery-Smith <stephen@FreeBSD.org>2011-06-21 02:19:07 +0000
committerStephen Montgomery-Smith <stephen@FreeBSD.org>2011-06-21 02:19:07 +0000
commit252b0b640413a1e253ff843ffaabca042f72a0f7 (patch)
tree9b87bdf58c596169b234e0fe2a87a2f2e88680c6 /science
parent5f0076f93b2f01cb6fd2b1abbb97a8008f17c889 (diff)
downloadports-252b0b640413a1e253ff843ffaabca042f72a0f7.tar.gz
ports-252b0b640413a1e253ff843ffaabca042f72a0f7.zip
Notes
Diffstat (limited to 'science')
-rw-r--r--science/meep/Makefile42
-rw-r--r--science/meep/distinfo1
-rw-r--r--science/meep/files/patch-Makefile.in19
-rw-r--r--science/meep/files/patch-configure42
-rw-r--r--science/meep/pkg-plist20
5 files changed, 88 insertions, 36 deletions
diff --git a/science/meep/Makefile b/science/meep/Makefile
index 6a8cb9f49dd6..19d927604f9e 100644
--- a/science/meep/Makefile
+++ b/science/meep/Makefile
@@ -7,31 +7,51 @@
PORTNAME= meep
PORTVERSION= 1.1.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= science
MASTER_SITES= http://ab-initio.mit.edu/meep/
MAINTAINER= devel@stasyan.com
COMMENT= FDTD simulation software to model electromagnetic systems
+BUILD_DEPENDS+= bash:${PORTSDIR}/shells/bash \
+ 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
+
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_FORTRAN= yes
-USE_GCC= 4.4+
+USE_GCC= 4.5+
USE_ICONV= yes
USE_GETTEXT= yes
USE_AUTOTOOLS+= libltdl
CPPFLAGS+= -I${LOCALBASE}/include
LD_LIBRARY_PATH= -L${LOCALBASE}/lib -L/usr/lib
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ENV+= LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LDFLAGS="${LDFLAGS}"
-BUILD_DEPENDS+= bash:${PORTSDIR}/shells/bash \
- harminv:${PORTSDIR}/science/harminv
-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
+OPTIONS= OPENMPI "Enable MPI support using openmpi" On
+
+.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
+
+post-patch:
+ ${REINPLACE_CMD} -e 's+\#\! /bin/sh+\#\! ${PREFIX}/bin/bash+' \
+ -e s+\$$\(SHELL\)+${PREFIX}/bin/bash+ ${WRKSRC}/configure
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/science/meep/distinfo b/science/meep/distinfo
index 2e8ee0180c4a..4c7e391373eb 100644
--- a/science/meep/distinfo
+++ b/science/meep/distinfo
@@ -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 --git a/science/meep/files/patch-Makefile.in b/science/meep/files/patch-Makefile.in
new file mode 100644
index 000000000000..375273bfb20a
--- /dev/null
+++ b/science/meep/files/patch-Makefile.in
@@ -0,0 +1,19 @@
+--- Makefile.in.orig 2009-08-21 16:34:59.000000000 +0000
++++ Makefile.in 2011-06-19 22:14:02.000000000 +0000
+@@ -264,6 +264,7 @@
+ infodir = @infodir@
+ install_sh = @install_sh@
+ libdir = @libdir@
++libdatadir = @libdatadir@
+ libexecdir = @libexecdir@
+ localedir = @localedir@
+ localstatedir = @localstatedir@
+@@ -288,7 +289,7 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = src $(LIBCTL) tests examples
+ EXTRA_DIST = COPYRIGHT m4 meep-pkgconfig.in
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(libdatadir)/pkgconfig
+ pkgconfig_DATA = meep@MEEP_SUFFIX@.pc
+ DISTCLEANFILES = meep@MEEP_SUFFIX@.pc
+ all: config.h
diff --git a/science/meep/files/patch-configure b/science/meep/files/patch-configure
index 8fa222f9213e..32598264b014 100644
--- a/science/meep/files/patch-configure
+++ b/science/meep/files/patch-configure
@@ -1,17 +1,27 @@
---- configure.orig 2009-08-21 23:35:00.000000000 +0700
-+++ configure 2009-12-26 13:21:45.000000000 +0600
-@@ -1,4 +1,4 @@
--#! /bin/sh
-+#! /usr/local/bin/bash
- # Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.63 for meep 1.1.1.
- #
-@@ -10318,7 +10318,7 @@
- LIBTOOL_DEPS="$ltmain"
-
- # Always use our own libtool.
--LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='/usr/local/bin/bash $(top_builddir)/libtool'
-
-
+--- configure.orig 2009-08-21 16:35:00.000000000 +0000
++++ configure 2011-06-19 22:08:46.000000000 +0000
+@@ -920,6 +920,7 @@
+ datadir
+ datarootdir
+ libexecdir
++libdatadir
+ sbindir
+ bindir
+ program_transform_name
+@@ -1002,6 +1003,7 @@
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
++libdatadir='${exec_prefix}/libdata'
+ datarootdir='${prefix}/share'
+ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+@@ -1398,7 +1400,7 @@
+ fi
+ # Check all directory arguments for consistency.
+-for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++for ac_var in exec_prefix prefix bindir sbindir libexecdir libdatadir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
diff --git a/science/meep/pkg-plist b/science/meep/pkg-plist
index 2a0db0cf58a7..df1df70a9719 100644
--- a/science/meep/pkg-plist
+++ b/science/meep/pkg-plist
@@ -1,13 +1,17 @@
-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
-share/meep/casimir.scm
-share/meep/meep-enums.scm
-share/meep/meep.scm
-@dirrm share/meep
+%%NOMPI%%lib/libmeep.a
+%%MPI%%lib/libmeep_mpi.a
+%%NOMPI%%lib/libmeep.la
+%%MPI%%lib/libmeep_mpi.la
+%%NOMPI%%libdata/pkgconfig/meep.pc
+%%MPI%%libdata/pkgconfig/meep_mpi.pc
+%%DATADIR%%/casimir.scm
+%%DATADIR%%/meep-enums.scm
+%%DATADIR%%/meep.scm
+@dirrm %%DATADIR%%
@dirrmtry lib/pkgconfig
@dirrm include/meep