# Created by: ijliao@FreeBSD.org # $FreeBSD$ PORTNAME= tables PORTVERSION= 3.1.1 CATEGORIES= devel python MASTER_SITES= SF/py${PORTNAME:tl}/py${PORTNAME}/${PORTVERSION} PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTFILES= tables-${PORTVERSION}.tar.gz pytablesmanual-${PORTVERSION}.pdf EXTRACT_ONLY= tables-${PORTVERSION}.tar.gz MAINTAINER= wen@FreeBSD.org COMMENT= Hierarchical database for Python LICENSE= BSD3CLAUSE BUILD_DEPENDS= ${PYNUMPY} \ ${LOCALBASE}/bin/cython:${PORTSDIR}/lang/cython \ ${PYTHON_PKGNAMEPREFIX}numexpr>=1.4.1:${PORTSDIR}/math/py-numexpr LIB_DEPENDS= libhdf5.so:${PORTSDIR}/science/hdf5 \ liblzo2.so:${PORTSDIR}/archivers/lzo2 \ libucl.so:${PORTSDIR}/archivers/ucl RUN_DEPENDS:= ${BUILD_DEPENDS} USES= python USE_PYTHON= distutils PLIST_FILES= bin/pt2to3 bin/ptdump bin/ptrepack OPTIONS_DEFINE= PYREX DOCS EXAMPLES PYREX_DESC= Use code generated by Pyrex to build OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options .include .if ${PORT_OPTIONS:MPYREX} 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} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/tables ! -type d | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} @${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/tables -type d | ${SORT} -r | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DISTDIR}/pytablesmanual-${PORTVERSION}.pdf ${STAGEDIR}${DOCSDIR} ${ECHO} '${STAGEDIR}${DOCSDIR}/pytablesmanual-${PORTVERSION}.pdf' | ${SED} 's,^${STAGEDIR}${PREFIX}/,,' \ >> ${TMPPLIST} ${ECHO} '${STAGEDIR}${DOCSDIR}' | ${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' \ >> ${TMPPLIST} .endif .if ${PORT_OPTIONS:MEXAMPLES} @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/*.py ${STAGEDIR}${EXAMPLESDIR} @${FIND} ${STAGEDIR}${EXAMPLESDIR} ! -type d | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} @${FIND} ${STAGEDIR}${EXAMPLESDIR} -type d | ${SORT} -r | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} .endif .include