ports/183982: [MAINTAINER] databases/php5-pdo_cassandra: [SUMMARIZE CHANGES]
Gasol Wu
gasol.wu at gmail.com
Fri Nov 15 08:40:00 UTC 2013
>Number: 183982
>Category: ports
>Synopsis: [MAINTAINER] databases/php5-pdo_cassandra: [SUMMARIZE CHANGES]
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 15 08:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Gasol Wu
>Release: FreeBSD 9.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD goingmarry 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC
>Description:
1. Fix broken caused by thrift-0.9.1,1
2. Stage support
3. Add LICENSE
4. portlint warning
Generated with FreeBSD Port Tools 0.99_9 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:
--- php5-pdo_cassandra-0.2.1_2.patch begins here ---
Files /usr/ports/databases/php5-pdo_cassandra/.Makefile.swp and ./.Makefile.swp differ
diff -ruN /usr/ports/databases/php5-pdo_cassandra/Makefile ./Makefile
--- /usr/ports/databases/php5-pdo_cassandra/Makefile 2013-09-21 00:13:47.000000000 +0800
+++ ./Makefile 2013-11-15 16:16:04.000000000 +0800
@@ -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 @@
MAINTAINER= gasol.wu at gmail.com
COMMENT= PDO driver for Apache Cassandra
-LIB_DEPENDS= boost_iostreams:${PORTSDIR}/devel/boost-libs \
- thrift:${PORTSDIR}/devel/thrift
+LICENSE= AL2
+
+LIB_DEPENDS= boost_iostreams:${PORTSDIR}/devel/boost-libs
GITREVISION= 7debd5b
GITTAG= 0.8-support
@@ -27,14 +28,24 @@
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!= ${ECHO} '${THRIFT_PORTVERSION}' | ${CUT} -d . -f 1
+THRIFT_MINOR_VER!= ${ECHO} "${THRIFT_PORTVERSION}" | ${CUT} -d . -f 2
+THRIFT_PATCH_VER!= ${ECHO} "${THRIFT_PORTVERSION}" | ${CUT} -d . -f 3
+
+.if ${THRIFT_MAJOR_VER} >= 0 || ${THRIFT_MINOR_VER} >= 9 || ${THRIFT_PATCH_VER} >= 1
+LIB_DEPENDS+= thrift:${PORTSDIR}/devel/thrift-cpp
+BUILD_DEPENDS+= ${LOCALBASE}/bin/thrift:${PORTSDIR}/devel/thrift
+.else
+LIB_DEPENDS+= thrift:${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>
diff -ruN /usr/ports/databases/php5-pdo_cassandra/files/patch-config.m4 ./files/patch-config.m4
--- /usr/ports/databases/php5-pdo_cassandra/files/patch-config.m4 1970-01-01 08:00:00.000000000 +0800
+++ ./files/patch-config.m4 2013-11-15 15:09:00.000000000 +0800
@@ -0,0 +1,22 @@
+--- ./config.m4.orig 2011-12-30 17:41:22.000000000 +0800
++++ ./config.m4 2013-11-14 21:46:12.000000000 +0800
+@@ -38,8 +38,18 @@
+ PHP_THRIFT_VERSION=`${PKG_CONFIG} thrift --modversion`
+
+ AC_MSG_RESULT([found version ${PHP_THRIFT_VERSION}])
++ ac_IFS=$IFS
++ IFS="."
++ set $PHP_THRIFT_VERSION
++ IFS=$ac_IFS
++ dnl workaround for changes of THRIFT-1968
++ THRIFT_VERSION=`expr [$]1 \* 10000 + [$]2 \* 100 + [$]3`
++ if test "$THRIFT_VERSION" -ge "901"; then
++ PHP_THRIFT_INCS="-I`${PKG_CONFIG} thrift --variable=includedir`/thrift"
++ else
++ PHP_THRIFT_INCS=`${PKG_CONFIG} thrift --cflags`
++ fi
+ PHP_THRIFT_LIBS=`${PKG_CONFIG} thrift --libs`
+- PHP_THRIFT_INCS=`${PKG_CONFIG} thrift --cflags`
+
+ PHP_EVAL_LIBLINE(${PHP_THRIFT_LIBS}, PDO_CASSANDRA_SHARED_LIBADD)
+ PHP_EVAL_INCLINE(${PHP_THRIFT_INCS})
diff -ruN /usr/ports/databases/php5-pdo_cassandra/pkg-descr ./pkg-descr
--- /usr/ports/databases/php5-pdo_cassandra/pkg-descr 2012-07-14 21:54:48.000000000 +0800
+++ ./pkg-descr 2013-11-15 15:09:00.000000000 +0800
@@ -7,4 +7,4 @@
BigTable, Cassandra provides a ColumnFamily-based data model richer
than typical key/value systems.
-WWW: http://code.google.com/a/apache-extras.org/p/cassandra-pdo/
+WWW: http://code.google.com/a/apache-extras.org/p/cassandra-pdo/
--- php5-pdo_cassandra-0.2.1_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list