aboutsummaryrefslogtreecommitdiff
path: root/databases/php5-pdo_cassandra/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2013-11-15 17:55:27 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2013-11-15 17:55:27 +0000
commitdf0499802aa8c55c8a3d6c536a74dd5d8132cc28 (patch)
treeb82661543a7408d02d911eeebc128db1617ccf93 /databases/php5-pdo_cassandra/Makefile
parentc4f551e85efd18820e750c28a747c54353a0eff0 (diff)
Notes
Diffstat (limited to 'databases/php5-pdo_cassandra/Makefile')
-rw-r--r--databases/php5-pdo_cassandra/Makefile34
1 files changed, 23 insertions, 11 deletions
diff --git a/databases/php5-pdo_cassandra/Makefile b/databases/php5-pdo_cassandra/Makefile
index 9d7c0335be13..198e8c68e7c7 100644
--- a/databases/php5-pdo_cassandra/Makefile
+++ b/databases/php5-pdo_cassandra/Makefile
@@ -3,7 +3,7 @@
PORTNAME= pdo_cassandra
PORTVERSION= 0.2.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases
MASTER_SITES= https://github.com/${GITHUB_USER}/php-${PORTNAME}/tarball/${GITREVISION}/
PKGNAMEPREFIX= php5-
@@ -12,8 +12,9 @@ DISTNAME= ${GITHUB_USER}-php-${PORTNAME}-${GITTAG}-14-g${GITREVISION}
MAINTAINER= gasol.wu@gmail.com
COMMENT= PDO driver for Apache Cassandra
-LIB_DEPENDS= boost_iostreams:${PORTSDIR}/devel/boost-libs \
- thrift:${PORTSDIR}/devel/thrift
+LICENSE= AL2
+
+LIB_DEPENDS= libboost_iostreams.so:${PORTSDIR}/devel/boost-libs
GITREVISION= 7debd5b
GITTAG= 0.8-support
@@ -27,14 +28,25 @@ USE_PHP= pdo
USE_PHPEXT= yes
DEFAULT_PHP_VER=5
IGNORE_WITH_PHP=52
-THRIFT_CMD= ${LOCALBASE}/bin/thrift
-NO_STAGE= yes
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/devel/thrift/bsd.thrift.mk"
+
+THRIFT_MAJOR_VER= ${THRIFT_PORTVERSION:R:R}
+THRIFT_MINOR_VER= ${THRIFT_PORTVERSION:R:E}
+THRIFT_PATCH_VER= ${THRIFT_PORTVERSION:E}
+
+.if ${THRIFT_MAJOR_VER} >= 0 || ${THRIFT_MINOR_VER} >= 9 || ${THRIFT_PATCH_VER} >= 1
+LIB_DEPENDS+= libthrift.so:${PORTSDIR}/devel/thrift-cpp
+BUILD_DEPENDS+= ${LOCALBASE}/bin/thrift:${PORTSDIR}/devel/thrift
+.else
+LIB_DEPENDS+= libthrift.so:${PORTSDIR}/devel/thrift
+.endif
+
post-configure:
- thrift_version=`${THRIFT_CMD} -version | ${AWK} '{print $$3}'`; \
- if [ "$$thrift_version" = "0.8.0" ]; then \
- ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.h; \
- ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp; \
- fi
+.if ${THRIFT_PORTVERSION} == "0.8.0"
+ ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.h
+ ${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp
+.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>