summaryrefslogtreecommitdiffstats
path: root/math/arpack/Makefile
blob: ebf3aa25467acef7298abce827fc13ffc35bad9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# New ports collection makefile for:	arpack
# Date created:         31 Jan 2003
# Whom:			Pedro F. Giffuni
#
# $FreeBSD$
#

PORTNAME=	arpack
PORTVERSION=	96
CATEGORIES=	math
MASTER_SITES=	http://www.caam.rice.edu/software/ARPACK/SRC/
DISTFILES=	${PORTNAME}${PORTVERSION}.tar.gz patch.tar.gz
.ifndef NOPORTDOCS
DISTFILES+=	ug.ps.gz
.endif
DIST_SUBDIR=	arpack
EXTRACT_ONLY=	${PORTNAME}${PORTVERSION}.tar.gz

PATCH_SITES=	http://www.caam.rice.edu/software/ARPACK/SRC/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Argand Library: large eigenvalue subroutines (serial version)

BUILD_DEPENDS=	${LOCALBASE}/bin/f2c:${PORTSDIR}/lang/f2c \
		${LOCALBASE}/lib/libf77blas.a:${PORTSDIR}/math/atlas

WRKSRC=		${WRKDIR}/ARPACK
ALL_TARGET=	lib

BLAS_LIBS=	${LOCALBASE}/lib/libf77blas.a ${LOCALBASE}/lib/libatlas.a

INSTALLS_SHLIB=	yes
USE_REINPLACE=	yes

.include <bsd.port.pre.mk>

pre-patch:
	@(cd ${WRKSRC}; tar -xzf ${DISTDIR}/${DIST_SUBDIR}/patch.tar.gz)

pre-build:
	@${REINPLACE_CMD} -e 's+%FC%+${FC}+g ; s+%FFLAGS%+${FFLAGS}+g ; \
	s+%%WRKDIR%%+${WRKDIR}+ ; \
	s+%%BLAS_LIBS%%+${BLAS_LIBS}+' ${WRKSRC}/ARmake.inc

do-install:
	${INSTALL} ${WRKSRC}/libarpack.a ${PREFIX}/lib
	(${MKDIR} ${WRKSRC}/include ;\
	  cd ${WRKSRC}/include ;\
	  f2c -C++ -P  ${WRKSRC}/SRC/*.f ;\
	  f2c -C++ -P  ${WRKSRC}/BLAS/*.f ;\
	  f2c -C++ -P  ${WRKSRC}/LAPACK/*.f ;\
	  ${CAT} *.P | ${GREP} -v :ref: > arpack.h)
	${INSTALL_DATA} ${WRKSRC}/include/arpack.h ${PREFIX}/include

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	-${GZIP_CMD} ${GZIP} ${WRKSRC}/DOCUMENTS/ex-*.doc
	${CP} ${WRKSRC}/DOCUMENTS/ex-*.doc.gz ${DOCSDIR}
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/ug.ps.gz ${DOCSDIR}
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud