aboutsummaryrefslogtreecommitdiffstats
path: root/devel/py-tables/Makefile
blob: f74ec05eed378f4858afca5652b7095571b0ac79 (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
# ex:ts=8
# Ports collection makefile for:    PyTables
# Date created:         Dec 19, 2003
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   tables
PORTVERSION=    1.4
CATEGORIES= devel python
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= pytables
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   pytables-${PORTVERSION}

MAINTAINER= quakelee@cn.freebsd.org
COMMENT=    A hierarchical database for Python

BUILD_DEPENDS=  ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray
LIB_DEPENDS=    hdf5.0:${PORTSDIR}/science/hdf5 \
        lzo.1:${PORTSDIR}/archivers/lzo \
        ucl.1:${PORTSDIR}/archivers/ucl
RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/numarray/__init__.py:${PORTSDIR}/math/py-numarray

USE_PYTHON= yes
USE_PYDISTUTILS=    yes

PLIST_FILES=    bin/nctoh5 bin/ptdump bin/ptrepack

OPTIONS=    PYREX "Use code generated by Pyrex to build" off
OPTIONSFILE=    ${PORT_DBDIR}/py-${PORTNAME}/options

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_PYREX)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/Pyrex/__init__.py:${PORTSDIR}/devel/pyrex
.endif

post-patch:
    @${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/setup.py

post-install:
    @${FIND} ${PYTHONPREFIX_SITELIBDIR}/tables ! -type d | \
        ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
    @${FIND} ${PYTHONPREFIX_SITELIBDIR}/tables -type d | ${SORT} -r | \
        ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/*.py ${EXAMPLESDIR}
    @${FIND} ${EXAMPLESDIR} ! -type d | \
        ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
    @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
        ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
.endif

.include <bsd.port.post.mk>