aboutsummaryrefslogtreecommitdiffstats
path: root/science/py-scipy/Makefile
blob: bf3bd9fc97b26e0cf40445432764833bfbbf1c23 (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
# ex:ts=8
# Ports collection makefile for:    SciPy
# Date created:         Jun 8, 2004
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   scipy
PORTVERSION=    0.5.1
CATEGORIES= science python
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= scipy
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= db@db.net
COMMENT=    Scientific tools for Python

BUILD_DEPENDS=  ${PYNUMPY} \
        ${LOCALBASE}/lib/libdjbfft.a:${PORTSDIR}/math/djbfft
LIB_DEPENDS=    fftw.2:${PORTSDIR}/math/fftw

LATEST_LINK=    py-${PORTNAME}
OPTIONSFILE=    ${PORT_DBDIR}/py-numpy/options

USE_PYTHON= 2.3+
USE_PYDISTUTILS=    yes
USE_WX=     2.4-2.6
WX_COMPS=   python:build python:run
OPTIONS=    ATLAS "Use optimized blas library" OFF

post-patch:
    @${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
        -e "s@malloc\.h@stdlib.h@"

.include <bsd.port.pre.mk>

.if defined(WITH_ATLAS)
LIB_DEPENDS+=   atlas.1:${PORTSDIR}/math/atlas
.if !exists(${LOCALBASE}/lib/libalapack.a)
IGNORE=     Atlas needs to be built with WITH_STATICLIB for scipy to function properly
.endif
.else
LIB_DEPENDS+=   lapack.3:${PORTSDIR}/math/lapack \
        blas.1:${PORTSDIR}/math/blas
.endif

post-install:
    @${FIND} ${PYTHON_SITELIBDIR}/scipy ! -type d | \
        ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
    @${FIND} ${PYTHON_SITELIBDIR}/scipy -type d | ${SORT} -r | \
        ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}

.include <bsd.port.post.mk>