aboutsummaryrefslogtreecommitdiff
path: root/math/libtsnnls/Makefile
blob: 4ef61840ff4b57f1992998b7d571d6a9f086a94c (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
# Created by: Tz-Huan Huang <tzhuan@gmail.com>
# $FreeBSD$

PORTNAME=	libtsnnls
PORTVERSION=	2.3.3
CATEGORIES=	math
MASTER_SITES=	http://www.jasoncantarella.com/downloads/

MAINTAINER=	tzhuan@gmail.com
COMMENT=	Fast Sparse Nonnegative Least Squares Solver

GNU_CONFIGURE=	yes
USE_FORTRAN=	yes
USE_LDCONFIG=	yes

OPTIONS_DEFINE=	GOTOBLAS ATLAS
GOTOBLAS_DESC=	Use gotoblas (conflict with USE_ATLAS)
ATLAS_DESC=	Use atlas (conflict with USE_GOTOBLAS)
# DMALLOC "Use dmalloc" off

.include <bsd.port.options.mk>

WITH_BLAS=reference
.if ${PORT_OPTIONS:MGOTOBLAS}
WITH_BLAS=gotoblas
.elif ${PORT_OPTIONS:MATLAS}
WITH_BLAS=atlas
.endif

# FIXME compiling error when using dmalloc
#.if ${PORT_OPTIONS:MDMALLOC}
#CONFIGURE_ARGS+=--with-dmalloc
#LIB_DEPENDS+=dmalloc.1:${PORTSDIR}/devel/dmalloc
#.endif

.if ${WITH_BLAS} == reference
LIB_DEPENDS+=blas.2:${PORTSDIR}/math/blas
LIB_DEPENDS+=lapack.4:${PORTSDIR}/math/lapack
BLAS=-lblas
LAPACK=-llapack
.elif ${WITH_BLAS} == gotoblas
LIB_DEPENDS+=goto2:${PORTSDIR}/math/gotoblas
BLAS=-lgoto2p
LAPACK=-lgoto2p
.elif ${WITH_BLAS} == atlas
LIB_DEPENDS+=atlas:${PORTSDIR}/math/atlas
BLAS=-lptf77blas
LAPACK=-lalapack -lptcblas
.endif

CONFIGURE_ARGS=	--with-blas="${BLAS}" --with-lapack="${LAPACK}"

.include <bsd.port.mk>