Bump science/mpb to version 1.5_4
[dports.git] / science / mpb / Makefile
1 # Created by: ijliao
2 # $FreeBSD$
3
4 PORTNAME=       mpb
5 PORTVERSION=    1.5
6 PORTREVISION=   4
7 CATEGORIES=     science
8 MASTER_SITES=   http://ab-initio.mit.edu/mpb/
9
10 MAINTAINER=     rhurlin@gwdg.de
11 COMMENT=        MIT Photonic-Bands
12
13 LICENSE=        GPLv2
14
15 BUILD_DEPENDS=  bash:shells/bash
16 LIB_DEPENDS=    libfftw.so:math/fftw \
17                 libhdf5.so:science/hdf5 \
18                 libctl.so:science/libctl \
19                 libguile-2.0.so:lang/guile2
20
21 OPTIONS_DEFINE= ATLAS NLOPT
22 ATLAS_DESC=     Use math/atlas instead of math/lapack
23 NLOPT_DESC=     Use math/nlopt (check also in science/libctl)
24
25 USES=           fortran libtool pkgconfig
26 GNU_CONFIGURE=  yes
27 MAKE_JOBS_UNSAFE=       yes
28
29 CPPFLAGS+=      -I${LOCALBASE}/include
30 LDFLAGS+=       -L${LOCALBASE}/lib
31
32 NLOPT_LIB_DEPENDS=      libnlopt.so:math/nlopt
33
34 .include <bsd.port.options.mk>
35
36 .if ${PORT_OPTIONS:MATLAS}
37 LIB_DEPENDS+=   libatlas.so:math/atlas
38 CONFIGURE_ARGS+=        --with-lapack=-lalapack
39 .else
40 LIB_DEPENDS+=   libblas.so:math/blas \
41                 liblapack.so:math/lapack
42 CONFIGURE_ARGS+=        --with-lapack=-llapack
43 .endif
44
45 post-patch:
46         @${REINPLACE_CMD} -e 's|-lhdf5 |-lhdf5 -lpthread |g' \
47                 ${WRKSRC}/configure
48         @${REINPLACE_CMD} \
49                 -e '/INSTALL/s/$$(prefix)/$$(DESTDIR)$$(prefix)/' \
50                 -e '/INSTALL/s/$$(mandir)/$$(DESTDIR)$$(mandir)/' \
51                 ${WRKSRC}/mpb/Makefile.in ${WRKSRC}/utils/Makefile.in
52
53 .include <bsd.port.mk>