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