ports/databases/php5-pdo_cassandra/Makefile
Mathieu Arnold a1993564e0 Introduce PHP flavors.
Ports using USES=php:phpize, php:ext, php:zend, and php:pecl are now
  flavored.  They will automatically get flavors (php56, php70, php71, php72)
  depending of the versions they support (set with IGNORE_WITH_PHP).  As a
  consequence, ports using USES=pear and USES=horde are also flavored.

PR:		226242
Submitted by:	mat
Exp-run by:	antoine
Approved by:	portmgr
Sponsored by:	Absolight
Differential Revision:	https://reviews.freebsd.org/D14208
2018-03-08 19:48:41 +00:00

50 lines
1.3 KiB
Makefile

# Created by: Gasol Wu <gasol.wu@gmail.com>
# $FreeBSD$
PORTNAME= pdo_cassandra
PORTVERSION= 0.2.1
PORTREVISION= 14
CATEGORIES= databases
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
MAINTAINER= gasol.wu@gmail.com
COMMENT= PDO driver for Apache Cassandra
LICENSE= APACHE20
BROKEN= fails to build
BROKEN_powerpc64= Does not build
LIB_DEPENDS= libboost_iostreams.so:devel/boost-libs
USE_GITHUB= yes
GH_ACCOUNT= mkoppanen
GH_PROJECT= php-${PORTNAME}
GH_TAGNAME= 7debd5b
USES= compiler:c++11-lib php:ext pkgconfig
USE_CXXSTD= c++11
USE_PHP= pdo:build
IGNORE_WITH_PHP= 70 71 72
.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:devel/thrift-cpp
BUILD_DEPENDS+= ${LOCALBASE}/bin/thrift:devel/thrift
.else
LIB_DEPENDS+= libthrift.so:devel/thrift
.endif
post-configure:
${REINPLACE_CMD} 's/\([^:]\)apache::thrift/\1 ::apache::thrift/g' ${WRKSRC}/gen-cpp/Cassandra.cpp
${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_types.cpp
.include <bsd.port.post.mk>