blob: ed1cdc87650ceae736f71768c8b6f758552fe867 (
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
66
67
68
69
70
71
72
73
|
# New ports collection makefile for: numpy
# Date created: 24 July 2006
# Whom: Tony Maher
#
# $FreeBSD$
#
PORTNAME= numpy
PORTVERSION= 1.1.1
CATEGORIES= math python
MASTER_SITES= http://numpy.scipy.org/:doc \
${MASTER_SITE_SOURCEFORGE:S/$/:source/}
MASTER_SITE_SUBDIR= numpy/:source
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}:source \
numpy.pdf:doc
EXTRACT_ONLY= numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}
MAINTAINER= llwang@infor.org
COMMENT= The New Numeric Extension to Python
RUN_DEPENDS= gcc42:${PORTSDIR}/lang/gcc42
OPTIONS= ATLAS "Use optimized blas library" Off
USE_FORTRAN= yes
USE_PYTHON= yes
USE_PYDISTUTILS=yes
MAN1= f2py.1
LATEST_LINK= py-${PORTNAME}
WRKSRC= ${WRKDIR}/${DISTNAME:S/r/rc/}
.include <bsd.port.pre.mk>
.if defined(WITH_ATLAS)
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
.if !exists(${LOCALBASE}/lib/libalapack.a)
IGNORE= atlas needs to be built with WITH_STATICLIB for numpy to function properly
.endif
.else
LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack \
blas.2:${PORTSDIR}/math/blas
.endif
post-extract:
@${CP} ${DISTDIR}/numpy.pdf ${WRKDIR}
GCCLIBDIR= `${FC} -print-file-name=libgfortran.so|${SED} -e s/libgfortran.so//`
post-patch:
.ifdef WITH_ATLAS
@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \
-e "s+%%LOCALBASE%%+${LOCALBASE}+" \
-e "s+%%ATLASLIBS%%+alapack_r, f77blas_r, cblas_r, atlas_r+" \
${WRKSRC}/site.cfg
.else
@${CP} ${FILESDIR}/site.cfg ${WRKSRC}/site.cfg
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \
-e "s+%%LOCALBASE%%+${LOCALBASE}+" \
-e "s+%%ATLASLIBS%%+lapack, blas+" \
${WRKSRC}/site.cfg
.endif
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" ${WRKSRC}/numpy/distutils/system_info.py
post-install:
${INSTALL_MAN} ${WRKSRC}/numpy/f2py/f2py.1 ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/numpy.pdf ${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|