# ex:ts=8
# Ports collection makefile for:	google-ctemplate
# Date created:			Apr 26, 2006
# Whom:				ijliao
#
# $FreeBSD: branches/RELEASE_8_4_0/textproc/google-ctemplate/Makefile 303878 2012-09-08 07:49:05Z linimon $
#

PORTNAME=	google-ctemplate
PORTVERSION=	2.2
CATEGORIES=	textproc
MASTER_SITES=	GOOGLE_CODE
PROJECTHOST=	ctemplate
DISTNAME=	ctemplate-${PORTVERSION}

MAINTAINER=	vanilla@FreeBSD.org
COMMENT=	A simple but powerful template language for C++

GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
USE_GNOME=	pkgconfig

.if !defined(NOPORTDOCS)
PORTDOCS=	*
.endif

post-patch:
	${REINPLACE_CMD} -e 's|^pkgconfigdir.*|pkgconfigdir = $${PREFIX}/libdata/pkgconfig|' \
		${WRKSRC}/Makefile.in

.if !defined(NOPORTDOCS)
	@${REINPLACE_CMD} -e \
		's|$$(prefix)/share/doc/$$(PACKAGE)-$$(VERSION)|${DOCSDIR}|' \
		${WRKSRC}/Makefile.in
.else
	@${REINPLACE_CMD} -e \
		'/install-data-am/ s|install-dist_docDATA||' \
		${WRKSRC}/Makefile.in
.endif

tests: build
	@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)

.include <bsd.port.pre.mk>

.if ${ARCH} == "powerpc"
BROKEN=		Does not compile on powerpc
.endif

.include <bsd.port.post.mk>
