View | Details | Raw Unified | Return to bug 183982
Collapse All | Expand All

(-)./Makefile (-11 / +22 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	pdo_cassandra
4
PORTNAME=	pdo_cassandra
5
PORTVERSION=	0.2.1
5
PORTVERSION=	0.2.1
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	databases
7
CATEGORIES=	databases
8
MASTER_SITES=	https://github.com/${GITHUB_USER}/php-${PORTNAME}/tarball/${GITREVISION}/
8
MASTER_SITES=	https://github.com/${GITHUB_USER}/php-${PORTNAME}/tarball/${GITREVISION}/
9
PKGNAMEPREFIX=	php5-
9
PKGNAMEPREFIX=	php5-
Lines 12-19 Link Here
12
MAINTAINER=	gasol.wu@gmail.com
12
MAINTAINER=	gasol.wu@gmail.com
13
COMMENT=	PDO driver for Apache Cassandra
13
COMMENT=	PDO driver for Apache Cassandra
14
14
15
LIB_DEPENDS=	boost_iostreams:${PORTSDIR}/devel/boost-libs \
15
LICENSE=	AL2
16
		thrift:${PORTSDIR}/devel/thrift
16
17
LIB_DEPENDS=	boost_iostreams:${PORTSDIR}/devel/boost-libs
17
18
18
GITREVISION=	7debd5b
19
GITREVISION=	7debd5b
19
GITTAG=		0.8-support
20
GITTAG=		0.8-support
Lines 27-40 Link Here
27
USE_PHPEXT=	yes
28
USE_PHPEXT=	yes
28
DEFAULT_PHP_VER=5
29
DEFAULT_PHP_VER=5
29
IGNORE_WITH_PHP=52
30
IGNORE_WITH_PHP=52
30
THRIFT_CMD=	${LOCALBASE}/bin/thrift
31
31
32
NO_STAGE=	yes
32
.include <bsd.port.pre.mk>
33
.include "${PORTSDIR}/devel/thrift/bsd.thrift.mk"
34
THRIFT_MAJOR_VER!=	${ECHO} '${THRIFT_PORTVERSION}' | ${CUT} -d . -f 1
35
THRIFT_MINOR_VER!=	${ECHO} "${THRIFT_PORTVERSION}" | ${CUT} -d . -f 2
36
THRIFT_PATCH_VER!=	${ECHO} "${THRIFT_PORTVERSION}" | ${CUT} -d . -f 3
37
38
.if ${THRIFT_MAJOR_VER} >= 0 || ${THRIFT_MINOR_VER} >= 9 || ${THRIFT_PATCH_VER} >= 1
39
LIB_DEPENDS+=	thrift:${PORTSDIR}/devel/thrift-cpp
40
BUILD_DEPENDS+=	${LOCALBASE}/bin/thrift:${PORTSDIR}/devel/thrift
41
.else
42
LIB_DEPENDS+=	thrift:${PORTSDIR}/devel/thrift
43
.endif
44
33
post-configure:
45
post-configure:
34
	thrift_version=`${THRIFT_CMD} -version | ${AWK} '{print $$3}'`; \
46
.if ${THRIFT_PORTVERSION} == "0.8.0"
35
	if [ "$$thrift_version" = "0.8.0" ]; then \
47
	${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.h
36
		${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.h; \
48
	${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp
37
		${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp; \
49
.endif
38
	fi
39
50
40
.include <bsd.port.mk>
51
.include <bsd.port.post.mk>
(-)./files/patch-config.m4 (+22 lines)
Line 0 Link Here
1
--- ./config.m4.orig	2011-12-30 17:41:22.000000000 +0800
2
+++ ./config.m4	2013-11-14 21:46:12.000000000 +0800
3
@@ -38,8 +38,18 @@
4
     PHP_THRIFT_VERSION=`${PKG_CONFIG} thrift --modversion`
5
 
6
     AC_MSG_RESULT([found version ${PHP_THRIFT_VERSION}])
7
+    ac_IFS=$IFS
8
+    IFS="."
9
+    set $PHP_THRIFT_VERSION
10
+    IFS=$ac_IFS
11
+    dnl workaround for changes of THRIFT-1968
12
+    THRIFT_VERSION=`expr [$]1 \* 10000 + [$]2 \* 100 + [$]3`
13
+    if test "$THRIFT_VERSION" -ge "901"; then
14
+      PHP_THRIFT_INCS="-I`${PKG_CONFIG} thrift --variable=includedir`/thrift"
15
+    else
16
+      PHP_THRIFT_INCS=`${PKG_CONFIG} thrift --cflags`
17
+    fi
18
     PHP_THRIFT_LIBS=`${PKG_CONFIG} thrift --libs`
19
-    PHP_THRIFT_INCS=`${PKG_CONFIG} thrift --cflags`
20
 
21
     PHP_EVAL_LIBLINE(${PHP_THRIFT_LIBS}, PDO_CASSANDRA_SHARED_LIBADD)
22
     PHP_EVAL_INCLINE(${PHP_THRIFT_INCS})
(-)./pkg-descr (-1 / +1 lines)
Lines 7-10 Link Here
7
BigTable, Cassandra provides a ColumnFamily-based data model richer
7
BigTable, Cassandra provides a ColumnFamily-based data model richer
8
than typical key/value systems.
8
than typical key/value systems.
9
9
10
WWW:	http://code.google.com/a/apache-extras.org/p/cassandra-pdo/
10
WWW: http://code.google.com/a/apache-extras.org/p/cassandra-pdo/

Return to bug 183982