ports/databases/php5-pdo_cassandra/files/patch-config.m4
Rene Ladan 0ad63d6162 databases/php5-pdo_cassandra: unbreak
- Do not hardcode expired PHP version
- Fix regression with Thrift 0.9.3, see
  https://issues.apache.org/jira/browse/THRIFT-3317
- Use C++11 compiler via the Ports framework instead of hardcoding GCC
- Bump PORTREVISION

PR:		205749
Submitted by:	stephon@gmail.com
Approved by:	Gasol Wu (maintainer)
MFH:		2016Q1
2016-01-26 22:58:37 +00:00

22 lines
840 B
Text

--- config.m4.orig 2011-12-30 09:41:22 UTC
+++ config.m4
@@ -38,8 +38,18 @@ if test "x${PHP_PDO_CASSANDRA}" != "xno"
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})