aboutsummaryrefslogtreecommitdiffstats
path: root/math/lapack++/Makefile
blob: d5c4ad97ee313fb87142d3f80b0b19e6895d495e (plain) (blame)
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
64
65
# New ports collection makefile for:    lapack++
# Date created:         5 May 2002
# Whom:                 NAKATA Maho <chat95@mbox.kyoto-inet.or.jp>
#
# $FreeBSD$
#

PORTNAME=   lapack++
PORTVERSION=    2.5.3
CATEGORIES= math
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE} \
        http://math.nist.gov/lapack++/:doc
MASTER_SITE_SUBDIR= lapackpp
DISTNAME=   lapackpp-${PORTVERSION}
.if !defined(NOPORTDOCS)
DISTFILES+= ${DISTNAME}${EXTRACT_SUFX} lapack++.ps.gz:doc lapackpp1_1.ps.gz:doc \
        lapackppman1_1.ps.gz:doc lapack++_install.ps.gz:doc
.endif
DIST_SUBDIR=    lapackpp
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= maho@FreeBSD.org
COMMENT=    Linear Algebra PACKage in C++, a wrapper for LAPACK

.include <bsd.port.pre.mk>

.if exists(${LOCALBASE}/lib/libatlas_r.so) && !defined(WITH_BLAS)
WITH_ATLAS= yes
.endif
.if defined(WITH_ATLAS)
LIB_DEPENDS+=   atlas.2:${PORTSDIR}/math/atlas
.else
LIB_DEPENDS+=   blas.2:${PORTSDIR}/math/blas
LIB_DEPENDS+=   lapack.4:${PORTSDIR}/math/lapack
.endif

USE_FORTRAN=    yes

USE_AUTOTOOLS=  libtool:22
USE_GMAKE=  yes
.if defined(WITH_ATLAS)
BLAS_LIB=   -L${LOCALBASE}/lib -lf77blas -latlas
LAPACK_LIB= -L${LOCALBASE}/lib -lalapack
.else
BLAS_LIB=   -L${LOCALBASE}/lib -lblas
LAPACK_LIB= -L${LOCALBASE}/lib -llapack
.endif

#BLAS_LIB=  -L${LOCALBASE}/lib -lptf77blas -latlas_r ${PTHREAD_LIBS}
#LAPACK_LIB=    -L${LOCALBASE}/lib -lalapack_r -lptcblas ${PTHREAD_LIBS}

#lapack++ forces to use atlas when detected, so we should disable here.
CONFIGURE_ARGS+=    --with-blas="${BLAS_LIB}" --with-lapack="${LAPACK_LIB}" --disable-atlas

do-install:
    @(cd ${WRKSRC} ; ${GMAKE} install)
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/lapack++.ps.gz ${DOCSDIR}
    ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/lapack++_install.ps.gz ${DOCSDIR}
    ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/lapackpp1_1.ps.gz ${DOCSDIR}
    ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/lapackppman1_1.ps.gz ${DOCSDIR}
.endif

.include <bsd.port.post.mk>