1 # Created by: Gasol Wu <gasol.wu@gmail.com>
4 PORTNAME= pdo_cassandra
10 MAINTAINER= gasol.wu@gmail.com
11 COMMENT= PDO driver for Apache Cassandra
15 LIB_DEPENDS= libboost_iostreams.so:${PORTSDIR}/devel/boost-libs
19 GH_PROJECT= php-${PORTNAME}
30 .include <bsd.port.pre.mk>
31 .include "${PORTSDIR}/devel/thrift/bsd.thrift.mk"
33 THRIFT_MAJOR_VER= ${THRIFT_PORTVERSION:R:R}
34 THRIFT_MINOR_VER= ${THRIFT_PORTVERSION:R:E}
35 THRIFT_PATCH_VER= ${THRIFT_PORTVERSION:E}
37 .if ${THRIFT_MAJOR_VER} >= 0 || ${THRIFT_MINOR_VER} >= 9 || ${THRIFT_PATCH_VER} >= 1
38 LIB_DEPENDS+= libthrift.so:${PORTSDIR}/devel/thrift-cpp
39 BUILD_DEPENDS+= ${LOCALBASE}/bin/thrift:${PORTSDIR}/devel/thrift
41 LIB_DEPENDS+= libthrift.so:${PORTSDIR}/devel/thrift
45 .if ${THRIFT_PORTVERSION} == "0.8.0"
46 ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.h
47 ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp
50 .include <bsd.port.post.mk>