summaryrefslogtreecommitdiffstats
path: root/databases/php5-pdo_cassandra/Makefile
blob: 74b99bd75c9d60c98d3ca3ea675ccb749b30300c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Created by: Gasol Wu <gasol.wu@gmail.com>
# $FreeBSD$

PORTNAME=	pdo_cassandra
PORTVERSION=	0.2.1
PORTREVISION=	5
CATEGORIES=	databases
PKGNAMEPREFIX=	php5-

MAINTAINER=	gasol.wu@gmail.com
COMMENT=	PDO driver for Apache Cassandra

LICENSE=	APACHE20

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

.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>
OpenPOWER on IntegriCloud