# New ports collection makefile for:	pear
# Date created:			25 Nov 2005
# Whom:				Alex Dupre <ale@FreeBSD.org>
#
# $FreeBSD: ports/devel/pear/Makefile,v 1.35 2010/12/29 07:02:48 miwi Exp $
#

PORTNAME=	pear
PORTVERSION=	1.9.1
PORTREVISION=	1
CATEGORIES=	devel
MASTER_SITES=	${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=	mm

MAINTAINER=	miwi@FreeBSD.org
COMMENT=	PEAR framework for PHP

USE_BZIP2=	yes
NO_BUILD=	yes

WANT_PHP_CLI=	yes
USE_PHP=	pcre xml

PEARDIR=	${PREFIX}/share/pear

post-patch:
	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
		-e "s|%%BUNDLEDIR%%|${WRKSRC}/go-pear-bundle|" \
		-e "s|%%TMPDIR%%|${TMPDIR}/go-pear|" \
		${WRKSRC}/go-pear

do-install:
	@cd ${WRKSRC} && ${LOCALBASE}/bin/php -q ./go-pear
	@${SED} -i "" "s|<?php|<?php dl('pcre.so'); dl('xml.so');|" \
		${PEARDIR}/peclcmd.php

.include <bsd.port.mk>
