- Add optional dependency net/openmpi

- Add lib_depends textproc/gsed
- Make datadir safe
- Move pkgconfig from lib to libdata
- Make patches to configure prefix friendly

PR:		ports/155655
Submitted by:	Klaus Aehlig <aehlig@linta.de>
Approved by:	maho (mentor) and
			Stas Timokhin <devel@stasyan.com> (maintainer)
This commit is contained in:
Stephen Montgomery-Smith 2011-06-21 02:19:07 +00:00
parent 5f0076f93b
commit 252b0b6404
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275959
5 changed files with 92 additions and 40 deletions

View file

@ -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
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_FORTRAN= yes
USE_GCC= 4.4+
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}"
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>
USE_GMAKE= yes
GNU_CONFIGURE= yes
USE_FORTRAN= yes
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+= LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" LDFLAGS="${LDFLAGS}"
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.post.mk>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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